<!--start hide script

/* Created 5th September 2001. This script generates random numbers which are then used
to refer to the elements in the array. Basically a random image thing */
/* Modified 5th September 2006. Added new images to the folder, so they need to be added
here too. */

/*theImages is an array which contains the URLs of the images. The URLs have to be
absolute! This saves repeating the file in each folder*/
theImages = new Array(
	"http://www.riversideghs.nsw.edu.au/images/random_images/glades_bridge.jpg",
	"http://www.riversideghs.nsw.edu.au/images/random_images/lib_lawn.jpg", 
	"http://www.riversideghs.nsw.edu.au/images/random_images/side_lib.jpg",
	"http://www.riversideghs.nsw.edu.au/images/random_images/water.jpg",
	"http://www.riversideghs.nsw.edu.au/images/random_images/quad.jpg",
	"http://www.riversideghs.nsw.edu.au/images/random_images/snr_lawn.jpg",
	"http://www.riversideghs.nsw.edu.au/images/random_images/bridge.jpg", 
	"http://www.riversideghs.nsw.edu.au/images/random_images/inwood.jpg",		
	"http://www.riversideghs.nsw.edu.au/images/random_images/rghs.jpg", 
	"http://www.riversideghs.nsw.edu.au/images/random_images/boats_harbour.png",
	"http://www.riversideghs.nsw.edu.au/images/random_images/bush.png", 
	"http://www.riversideghs.nsw.edu.au/images/random_images/centerpoint.png",
	"http://www.riversideghs.nsw.edu.au/images/random_images/seat_under_tree.png", 
	"http://www.riversideghs.nsw.edu.au/images/random_images/shrub_feature.png",
	"http://www.riversideghs.nsw.edu.au/images/random_images/upper_staffroom.png"
)

imgCounter = theImages.length

/*The function rotate is called using the onLoad command in the BODY tag of most pages
It generates 3 random numbers and by using this numbers displays the corresponding element
where necessary*/
function rotate()	{
	if (document.images){
		ranNum1 = Math.floor((Math.random() * imgCounter))
		document.display1.src = theImages[ranNum1]
		ranNum2 = Math.floor((Math.random() * imgCounter))
		document.display2.src = theImages[ranNum2]	
		ranNum3 = Math.floor((Math.random() * imgCounter))
		document.display3.src = theImages[ranNum3]	
		setTimeout("rotate()", 4500)
		/*setTimeout("rotate()", 3 * 1500)*/
	}
}
//end hide script-->