var theImagesH = new Array()

theImagesH[0] = 'thumbs/H1.gif'
theImagesH[1] = 'thumbs/H2.gif'
theImagesH[2] = 'thumbs/H3.gif'
theImagesH[3] = 'thumbs/H4.gif'
theImagesH[4] = 'thumbs/H5.gif'
theImagesH[5] = 'thumbs/H6.gif'
theImagesH[6] = 'thumbs/H7.gif'

var j = 0
var p = theImagesH.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImagesH[i]
}
var whichImageH = Math.round(Math.random()*(p-1));
function showImageH(){
document.write('<img src="'+theImagesH[whichImageH]+'">');
}

