var theImages = new Array()

theImages[0] = 'icon/girlatcomputer.png'
theImages[1] = 'icon/boypic.png'
theImages[2] = 'icon/girlatpiano.png'
theImages[3] = 'icon/girlwithflower.png'



var s = theImages.length;

var preBuffer = new Array()
for (k = 0; k < s; k++){
   preBuffer[k] = new Image()
   preBuffer[k].src = theImages[k]
}
var whichImage = Math.round(Math.random()*(s-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}