var theImages = new Array()
theImages[0] = 'images/random2/3.jpg'
theImages[1] = 'images/random2/4.jpg'
theImages[2] = 'images/random2/5.jpg'
theImages[3] = 'images/random2/6.jpg'
theImages[4] = 'images/random2/7.jpg'
theImages[5] = 'images/random2/8.jpg'
theImages[6] = 'images/random2/9.jpg'
theImages[7] = 'images/random2/10.jpg'
theImages[8] = 'images/random2/11.jpg'
theImages[9] = 'images/random2/12.jpg'
theImages[10] = 'images/random2/13.jpg'
theImages[11] = 'images/random2/14.jpg'
theImages[12] = 'images/random2/15.jpg'
theImages[13] = 'images/random2/16.jpg'
theImages[14] = 'images/random2/17.jpg'
theImages[15] = 'images/random2/18.jpg'
theImages[16] = 'images/random2/19.jpg'
theImages[17] = 'images/random2/20.jpg'
theImages[18] = 'images/random2/21.jpg'
theImages[19] = 'images/random2/22.jpg'
theImages[20] = 'images/random2/23.jpg'
theImages[21] = 'images/random2/24.jpg'
theImages[22] = 'images/random2/25.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]+'">');
}