var theImages = new Array() 

theImages[0] = 'images/bg01.jpg'
theImages[1] = 'images/bg02.jpg'
theImages[2] = 'images/bg03.jpg'
theImages[3] = 'images/bg04.jpg'
theImages[4] = 'images/bg05.jpg'
theImages[5] = 'images/bg06.jpg'
theImages[6] = 'images/bg07.jpg'
theImages[7] = 'images/bg08.jpg'
theImages[8] = 'images/bg09.jpg'
theImages[9] = 'images/bg10.jpg'
theImages[10] = 'images/bg11.jpg'
theImages[11] = 'images/bg01.jpg'
theImages[12] = 'images/bg13.jpg'
theImages[13] = 'images/bg14.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]+'">');
}

