var theImages = new Array()

theImages[0] = '/_img/photo00.jpg'
theImages[1] = '/_img/photo01.jpg'
theImages[2] = '/_img/photo02.jpg'
theImages[3] = '/_img/photo03.jpg'
theImages[4] = '/_img/photo04.jpg'
theImages[5] = '/_img/photo05.jpg'
theImages[6] = '/_img/photo06.jpg'
theImages[7] = '/_img/photo07.jpg'
theImages[8] = '/_img/photo08.jpg'
theImages[9] = '/_img/photo09.jpg'
theImages[10] = '/_img/photo10.jpg'
theImages[11] = '/_img/photo11.jpg'
theImages[12] = '/_img/photo12.jpg'
theImages[13] = '/_img/photo13.jpg'
theImages[14] = '/_img/photo14.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]+'" alt="Photo" class="headphoto" width="590" height="160" />');
}