var theImages = new Array() 

theImages[0] = 'images/activities/binoculars.jpg'
theImages[1] = 'images/activities/camping.jpg'
theImages[2] = 'images/activities/carlson.jpg'
theImages[3] = 'images/activities/field.jpg'
theImages[4] = 'images/activities/shovels.jpg'
theImages[5] = 'images/activities/wheelbarrow.jpg'
theImages[6] = 'images/activities/4students.jpg'
theImages[7] = 'images/activities/pointing.jpg'
theImages[8] = 'images/activities/snowwalk.jpg'
theImages[9] = 'images/activities/looking.jpg'
theImages[10] = 'images/activities/learning.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="Environmental & Natural Resource Sciences Image">');
}