// Begin
// Set up the image files to be used.
var theImages = new Array(); // do not change this
var altImage = new Array(); // use the same array order to match image to alt text
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'home_image-1.jpg';
theImages[1] = 'home_image-2.jpg';
theImages[2] = 'home_image-3.jpg';
theImages[3] = 'home_image-4.jpg';
theImages[4] = 'home_image-5.jpg';
theImages[5] = 'home_image-6.jpg';

altImage[0] = 'Jack Kerouac - On the Road';
altImage[1] = 'Illuminated Manuscript';
altImage[2] = 'William Shakespeare - The Winters Tale';
altImage[3] = 'Lipsius Manuscript';
altImage[4] = 'Robert Frost - The Gift Outright';
altImage[5] = 'Emily Dickinson - Renunciation';


// 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));

// Quarantine: Lipsius, Illuminated Manuscript, Shakespeare
while ((whichImage == 3) || (whichImage == 1) || (whichImage == 2)) {
	whichImage = Math.round(Math.random()*(p-1));	
}

function showImage(){
document.write('<img src="images/random/'+theImages[whichImage]+'" alt="'+altImage[whichImage]+'" title="'+altImage[whichImage]+'">');
}

//  End -->