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

var homeImage = 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.

homeImage[0] = 'images/photo_home_1.jpg';
homeImage[1] = 'images/photo_home_2.jpg';
homeImage[2] = 'images/photo_home_3.jpg';
homeImage[3] = 'images/photo_home_4.jpg';

var a1 = homeImage.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 showHomeImage(){
var whichImage = Math.round(Math.random() * (a1 - 1));
document.write('<img src="' + homeImage[whichImage] + '" width=262 height=262 />');
}
