var theImages = new Array() 

theImages[0] = '../images/photos/image1.gif'
theImages[1] = '../images/photos/image2.gif'
theImages[2] = '../images/photos/image3.gif'
theImages[3] = '../images/photos/image4.gif'
theImages[4] = '../images/photos/image5.gif'
theImages[5] = '../images/photos/image6.gif'
theImages[6] = '../images/photos/image7.gif'
theImages[7] = '../images/photos/image8.gif'


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 showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
