// Each of these arrays represents a set of images to make a random
// choice from for ONE of the sections/positions.

var photohome = new Array();

// Fill in the image paths, following the pattern shown here. I have
// put two sample image paths in each array. The first item in any
// array is 0, the next is 1 ... on to add as many items per array as
// you need. Note that paths will be interpreted relative to the
// location of the page which loads this javascript.

photohome[0] = 'images/photohome_branch.jpg';
photohome[1] = 'images/photohome_cherry.jpg';
photohome[2] = 'images/photohome_gate.jpg';
photohome[3] = 'images/photohome_ivy.jpg';
photohome[4] = 'images/photohome_stainedglass.jpg';
photohome[5] = 'images/photohome_tower.jpg';
photohome[6] = 'images/photohome_veritas.jpg';
photohome[7] = 'images/photohome_weathervane.jpg';
photohome[8] = 'images/photohome_window.jpg';

var a1 = photohome.length;


// This commented-out code is to preload images. The original function
// had it. Frankly, I think loading all these images when you're only
// going to show the user one or two of them is silly, so I've left it
// out. If we put it back in, we will need to make multiple copies of it,
// just like with everything else here.
//
// var preloada1 = new Array();
// for (i = 0; i < a1; i++){
//    preloada1[i] = new Image()
//    preloada1[i].src = imgsHomeTop[i]
// }


// Each of these functions will need its own height and width
// setting, as applicable (and maybe an alt tag). The name tells you which set of images is
// involved. Call the correct one(s) as needed for that page in its onLoad property.

function showphotohome(){
var whichImage = Math.round(Math.random() * (a1 - 1));
document.write('<img src="' + photohome[whichImage] + '" width=\"878\" height=\"338\" alt=\"Harvard University Center for Wellness\" />');
}
