var theImages = new Array() 
theImages[0] = 'Gallery/atsea.jpg'
theImages[1] = 'Gallery/beachparty.jpg'
theImages[2] = 'Gallery/buddingartist.jpg'
theImages[3] = 'Gallery/freeasabird.jpg'
theImages[4] = 'Gallery/freedomtrain.jpg'
theImages[5] = 'Gallery/goldengirls.jpg'
theImages[6] = 'Gallery/onelastdip.jpg'
theImages[7] = 'Gallery/shipmates.jpg'
theImages[8] =  'Gallery/g_surfdancers.jpg'
theImages[9] =  'Gallery/ByTheSea_1620_le.jpg'
theImages[10] =  'Gallery/GoldenGirls_1620_le.jpg'
theImages[11] =  'Gallery/BeachBlonde_g.jpg'
theImages[12] =  'Gallery/SummerDaze_1620_le.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]+'">');
}