var theImages = new Array() 
theImages[0] = 'home1.jpg'
theImages[1] = 'home2.jpg'
theImages[2] = 'home3.jpg'
theImages[3] = 'home4.jpg'

var theAlts = new Array()
theAlts[0] = 'Aerial photo from helicopter survey of live ash trees - Kensington Metropark, MI'
theAlts[1] = 'Hardwood forest canopy - Daniel Boone National Forest, KY'
theAlts[2] = 'Grand Sable Dunes - Pictured Rocks National Lakeshore, MI'
theAlts[3] = 'Yellow lady-slippers (Cypripedium parviflorum) - Au Sable State Forest, MI'

var preBuffer = new Array()
var whichImage = Math.round(Math.random()*(theImages.length-1));

for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

function showImage(){
 document.write('<img src="./img/'+theImages[whichImage]+'" alt="'+theAlts[whichImage]+'"/><br/>&nbsp;');
}
