  // Set up the image files to be used.
  var theImages = new Array() 
  var theLinks = new Array()

  // To add more image files, continue with the pattern below, adding to the array.

  theImages[0] = '/home/image/rotating/12thman.jpg'
  theLinks[0] = '/home/imagepage/index.html'

  theImages[1] = '/home/image/rotating/academicrotunda.jpg'
  theLinks[1] = '/home/imagepage/academicrotunda.html'

  theImages[2] = '/home/image/rotating/aggieband.jpg'
  theLinks[2] = '/home/imagepage/aggieband.html'

  theImages[3] = '/home/image/rotating/bonfirememorial.jpg'
  theLinks[3] = '/home/imagepage/bonfirememorial.html'

  theImages[4] = '/home/image/rotating/bushlibrary.jpg'
  theLinks[4] = '/home/imagepage/bushlibrary.html'

  theImages[5] = '/home/image/rotating/centuryoak.jpg'
  theLinks[5] = '/home/imagepage/centuryoak.html'

  theImages[6] = '/home/image/rotating/corpsarches.jpg'
  theLinks[6] = '/home/imagepage/corpsarches.html'

  theImages[7] = '/home/image/rotating/rudder.jpg'
  theLinks[7] = '/home/imagepage/rudder.html'

  theImages[8] = '/home/image/rotating/muster.jpg'
  theLinks[8] = '/home/imagepage/muster.html'

  theImages[9] = '/home/image/rotating/sully.jpg'
  theLinks[9] = '/home/imagepage/sulross.html'

  theImages[10] = '/home/image/rotating/visitorcenter.jpg'
  theLinks[10] = '/home/imagepage/visitorcenter.html'

function showImage() {
  var j = 0;
  var p = theImages.length;
  var preBuffer = new Array();

  for (i = 0; i < p; i++){
    preBuffer[i] = new Image();
    preBuffer[i].src = theImages[i];
  }

  var whichImage = Math.round(Math.random()*(p-1));
  document.write('<a href="'+theLinks[whichImage]+'" >')
  document.write('<img src="'+theImages[whichImage]+'" height="230" width="750" style="display: block; clear: both;" alt="Images from A&amp;M" title="Images from A&amp;M" /> </a>');
}

function showImage2()  {
  if(!document.getElementById) return false;

  var imageTotal = theImages.length;

  var currentTime = new Date()
  var timeSeed = currentTime.getTime();
  var randomKey = Math.round(Math.random(timeSeed)*(imageTotal-1));

  document.getElementById("randomImage").src = theImages[randomKey];
  document.getElementById("imageLink").href = theLinks[randomKey];
}
