var theImages = new Array()

//Random-loading images
theImages[0] = '/images/sidephoto_1.png'
theImages[1] = '/images/sidephoto_2.png'
theImages[2] = '/images/sidephoto_3.png'
theImages[3] = '/images/sidephoto_4.png'
theImages[4] = '/images/sidephoto_5.png'
theImages[5] = '/images/sidephoto_6.png'
theImages[6] = '/images/sidephoto_7.png'
theImages[7] = '/images/sidephoto_8.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]+'" alt="photo" />');

}
