// Random image JavaScript. This script selects an image at random from// a list of possible choices. This script is tested in Netscape and IE for Mac// and PC. Lachie.// © 2002, Couch Design Studio.var numImages = 3;				// Number of different images for random selection.var imageWidth = 357;				// The width, in pixels, of the images.var imageHeight = 92;				// The height, in pixels, of the imaes.var imageAltText = "car on road, satellite dish, waterfall, sunlight, beach, clouds";	// Alt text to be displayed if an image doesn't load.var imageList = new Array( numImages );// Enter URLs for randomly selected images below. URLs are relative to the// page that will run this script. Not the script itself.imageList[0] = "images/index/photos_1.jpg";imageList[1] = "images/index/photos_2.jpg";imageList[2] = "images/index/photos_3.jpg";// This function writes HTML code to the page to display a randomly selected// image. Insert the function call in the HTML document where you would// normally have put the image tag.function RandomImage(){	randomNum = RandomInt( numImages );	imageName = imageList[randomNum];	imageString = "<IMG SRC=\"" + imageName + "\" WIDTH=\"" + imageWidth +				 "\" HEIGHT=\"" + imageHeight + "\" ALT=\"" + imageAltText + "\">";	document.write( imageString );}// This function returns a random integer between 0 and one less than the value// passed for <range>.function RandomInt( range ) {return Math.floor( Math.random() * range );}