var theImages = new Array()

//Create a list of your random images
theImages[0] = 'images/random_image_1.jpg'
theImages[1] = 'images/random_image_2.jpg'
theImages[2] = 'images/random_image_3.jpg'
theImages[3] = 'images/random_image_4.jpg'
theImages[4] = 'images/random_image_5.jpg'
theImages[5] = 'images/random_image_6.jpg'
theImages[6] = 'images/random_image_7.jpg'
theImages[7] = 'images/random_image_8.jpg'
theImages[8] = 'images/random_image_9.jpg'
theImages[9] = 'images/random_image_10.jpg'

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