var theImages = new Array()

//Random-loading images
theImages[0] = '/images/header_photo_1.png'
theImages[1] = '/images/header_photo_2.png'
theImages[2] = '/images/header_photo_3.png'
theImages[3] = '/images/header_photo_4.png'
theImages[4] = '/images/header_photo_5.png'
theImages[5] = '/images/header_photo_6.png'
theImages[6] = '/images/header_photo_7.png'

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]+'" width="500" height="218" />');

}