if (document.images) {
  arrow_on = new Image();
  arrow_on.src = "images/arrow_right_green_17x16.gif";
  arrow_off = new Image();
  arrow_off.src = "images/arrow_right_blue_17x16.gif";

  star_on = new Image();
  star_on.src = "images/icon_star_on_7x8.gif";
  star_off = new Image();
  star_off.src = "images/icon_star_off_7x8.gif";

  dark_star_on = new Image();
  dark_star_on.src = "images/icon_star_on_7x8.gif";
  dark_star_off = new Image();
  dark_star_off.src = "images/icon_star_darkgray_7x8.gif";

  consult_on = new Image();
  consult_on.src = "images/photo_classroom_on_196x142.jpg";
  consult_off = new Image();
  consult_off.src = "images/photo_classroom_off_196x142.jpg";

  build_on = new Image();
  build_on.src = "images/photo_digger_on_196x142.jpg";
  build_off = new Image();
  build_off.src = "images/photo_digger_off_196x142.jpg";

  services_on = new Image();
  services_on.src = "images/photo_walk_on_wall_on_196x142.jpg";
  services_off = new Image();
  services_off.src = "images/photo_walk_on_wall_off_196x142.jpg";

}

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(4)
image[0] = 'book'
image[1] = 'biker'
image[2] = 'cable'
image[3] = 'blader'

var ran = 60/image.length

function randomImage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}
