// JavaScript Document
// JavaScript Document
function getImage(section) {
	
	// First, we need to fill the array with pathnames to all the images we want to use, which are
	// dependent upon the section.

	if (section=="main") {
		pic = new Array(3)
		pic[0] = "/images/banner-image2.jpg"
		pic[1] = "/images/banner-image3.jpg"
		pic[2] = "/images/banner-image4.jpg"
		pic[3] = "/images/banner-image3.jpg"
		pic[4] = "/images/banner-image2.jpg"


	} 		
	// Get the image with an id of 'random1' and copy its src into 'temp'
	document.getElementById('random1');
	
	// Now assign it one of the appropriate images.  "Math.floor(Math.random() * pic.length)" will return
	// a random number which will serve as the "index" to the array "pic".  Assign the value of "pic[index]"
	// to the src of "random1".
	index = Math.floor(Math.random() * pic.length)
    document.random1.src = pic[index]
}//
