var theImages = new Array()
theImages[0] = 'images/r01.jpg'
theImages[1] = 'images/r02.jpg'
theImages[2] = 'images/r03.jpg'
theImages[3] = 'images/r04.jpg'
theImages[4] = 'images/r05.jpg'
theImages[5] = 'images/r06.jpg'
theImages[6] = 'images/r07.jpg'
theImages[7] = 'images/r08.jpg'
theImages[8] = 'images/r09.jpg'
theImages[9] = 'images/r10.jpg'
theImages[10] = 'images/r11.jpg'
theImages[11] = 'images/r12.jpg'
theImages[12] = 'images/r13.jpg'
theImages[13] = 'images/r14.jpg'
theImages[14] = 'images/r15.jpg'
theImages[15] = 'images/r16.jpg'
theImages[16] = 'images/r17.jpg'
theImages[17] = 'images/r18.jpg'
theImages[18] = 'images/r19.jpg'
theImages[19] = 'images/r20.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]+'">');
}

