/*
   randomimage.js
   Copyright (C) 2007 Tony Oravet <tony.oravet@auburn.edu>
 
   Random Image Script for the Rare Books Collection - Special 
   Collections and Archives.

   You may freely use and modify the script here, but you 
   may not reproduce the Rare Books Collection - Special Collections
   and Archives of the Auburn University Library look exactly.
*/


// Set up the image files to be used.
var theImages = new Array() 

theImages[0] = 'wolsey_header.jpg'
theImages[1] = 'indians_header.jpg'
theImages[2] = 'lasainte_header.jpg'
theImages[3] = 'ferrier_header.jpg'
theImages[4] = 'attilla_header.jpg'
theImages[5] = 'lily_header.jpg'
theImages[6] = 'compleatgentleman_header.jpg'
theImages[7] = 'aeronautics_header.jpg'
theImages[8] = 'orange-and-blue_header.jpg'


// do not edit anything below this line

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));
function showRandomImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}


