var theImages = new Array()

theImages[0] = 'images/random/home01.jpg'
theImages[1] = 'images/random/home02.jpg'
theImages[2] = 'images/random/home03.jpg'
theImages[3] = 'images/random/home04.jpg'
theImages[4] = 'images/random/home05.jpg'
theImages[5] = 'images/random/home06.jpg'
theImages[6] = 'images/random/home07.jpg'
theImages[7] = 'images/random/home08.jpg'
theImages[8] = 'images/random/home09.jpg'
theImages[9] = 'images/random/home10.jpg'
theImages[10] = 'images/random/home11.jpg'
theImages[11] = 'images/random/home12.jpg'
theImages[12] = 'images/random/home13.jpg'
theImages[13] = 'images/random/home14.jpg'
theImages[14] = 'images/random/home15.jpg'
theImages[15] = 'images/random/home16.jpg'
theImages[16] = 'images/random/home17.jpg'
theImages[17] = 'images/random/home18.jpg'
theImages[18] = 'images/random/home19.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));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}