// Set Global Variables & initial valuesvar imageNum = 0var HiResImage = "Images/Convention/High_Res/Convention_0001.jpg"var HiResWidth = 720var HiResHeight = 576// Function to place selected Preview image in space below thumbnailsfunction showPreview(imageNum,URL,detailWidth,detailHeight) {	// Pass the array number of the Preview image (from the selected thumbnail) to the function	// plus the URL/path to the Hi Res image, its width and its height	// The "selectedPreview" is defined from the array	selectedPreview = new Image(Gallery[imageNum].Width,Gallery[imageNum].Height)	selectedPreview.src = Gallery[imageNum].Image	document.PreviewImage.src = selectedPreview.src		HiResImage = URL			// Put the passed variables into the global variables	HiResWidth = detailWidth	// for use in the openWindow function	HiResHeight = detailHeight		}	// When preview image is clicked, open a new window and show the current "HiResImage"	function openWindow() {	var features = "WIDTH="+HiResWidth+",HEIGHT="+HiResHeight+",scrollbars=yes,resizable=yes"	var newWindow = window.open(HiResImage,"DetailWindow",features)	}// Define photo array variable for all the Preview images with 3 elements (image, width, height)function Photo(Image,Width,Height)	{	this.Image = Image			// "Image" defines the URL/path of the PREVIEW image	this.Width = Width			// "Width" defines the width of the PREVIEW image	this.Height = Height		// "Height" defines the height of the PREVIEW image	}	// Create the photo Gallery array with names of Preview photos, widths and heights	Gallery = new Array(40)	Gallery[0] = new Photo("Images/Convention/Preview/Convention_0001P.jpg",372,298)	Gallery[1] = new Photo("Images/Convention/Preview/Convention_0002P.jpg",408,272)	Gallery[2] = new Photo("Images/Convention/Preview/Convention_0003P.jpg",408,272)	Gallery[3] = new Photo("Images/Convention/Preview/Convention_0004P.jpg",408,272)	Gallery[4] = new Photo("Images/Convention/Preview/Convention_0005P.jpg",272,408)	Gallery[5] = new Photo("Images/Convention/Preview/Convention_0006P.jpg",410,270)	Gallery[6] = new Photo("Images/Convention/Preview/Convention_0007P.jpg",272,408)	Gallery[7] = new Photo("Images/Convention/Preview/Convention_0008P.jpg",408,272)	Gallery[8] = new Photo("Images/Convention/Preview/Convention_0009P.jpg",272,408)	Gallery[9] = new Photo("Images/Convention/Preview/Convention_0010P.jpg",408,272)	Gallery[10] = new Photo("Images/Convention/Preview/Convention_0011P.jpg",408,272)	Gallery[11] = new Photo("Images/Convention/Preview/Convention_0012P.jpg",272,408)	Gallery[12] = new Photo("Images/Convention/Preview/Convention_0013P.jpg",408,272)	Gallery[13] = new Photo("Images/Convention/Preview/Convention_0014P.jpg",398,279)	Gallery[14] = new Photo("Images/Convention/Preview/Convention_0015P.jpg",408,272)	Gallery[15] = new Photo("Images/Convention/Preview/Convention_0016P.jpg",408,272)	Gallery[16] = new Photo("Images/Convention/Preview/Convention_0017P.jpg",408,272)	Gallery[17] = new Photo("Images/Convention/Preview/Convention_0018P.jpg",414,267) 	Gallery[18] = new Photo("Images/Convention/Preview/Convention_0019P.jpg",272,408)	Gallery[19] = new Photo("Images/Convention/Preview/Convention_0020P.jpg",408,272)	Gallery[20] = new Photo("Images/Convention/Preview/Convention_0021P.jpg",408,272)	Gallery[21] = new Photo("Images/Convention/Preview/Convention_0022P.jpg",372,298)	Gallery[22] = new Photo("Images/Convention/Preview/Convention_0023P.jpg",372,298)	Gallery[23] = new Photo("Images/Convention/Preview/Convention_0024P.jpg",408,272)	Gallery[24] = new Photo("Images/Convention/Preview/Convention_0025P.jpg",372,298)	Gallery[25] = new Photo("Images/Convention/Preview/Convention_0026P.jpg",408,272)	Gallery[26] = new Photo("Images/Convention/Preview/Convention_0027P.jpg",408,272)	Gallery[27] = new Photo("Images/Convention/Preview/Convention_0028P.jpg",408,272)	Gallery[28] = new Photo("Images/Convention/Preview/Convention_0029P.jpg",408,272)	Gallery[29] = new Photo("Images/Convention/Preview/Convention_0030P.jpg",408,272)	Gallery[30] = new Photo("Images/Convention/Preview/Convention_0031P.jpg",408,272)	Gallery[31] = new Photo("Images/Convention/Preview/Convention_0032P.jpg",408,272)	Gallery[32] = new Photo("Images/Convention/Preview/Convention_0033P.jpg",272,408)	Gallery[33] = new Photo("Images/Convention/Preview/Convention_0034P.jpg",408,272)	Gallery[34] = new Photo("Images/Convention/Preview/Convention_0035P.jpg",408,272)	Gallery[35] = new Photo("Images/Convention/Preview/Convention_0036P.jpg",372,298)	Gallery[36] = new Photo("Images/Convention/Preview/Convention_0037P.jpg",408,272)	Gallery[37] = new Photo("Images/Convention/Preview/Convention_0038P.jpg",408,272)	Gallery[38] = new Photo("Images/Convention/Preview/Convention_0039P.jpg",408,272)	Gallery[39] = new Photo("Images/Convention/Preview/Convention_0040P.jpg",408,272)// Define the Convention Gallery Image Array	var imgArray = new Array()	imgArray[0] = new Image(Gallery[0].Width,Gallery[0].Height) 	// define the image's width & height	imgArray[1] = new Image(Gallery[1].Width,Gallery[1].Height)  	imgArray[2] = new Image(Gallery[2].Width,Gallery[2].Height)	imgArray[3] = new Image(Gallery[3].Width,Gallery[3].Height)	imgArray[4] = new Image(Gallery[4].Width,Gallery[4].Height)	imgArray[5] = new Image(Gallery[5].Width,Gallery[5].Height)	imgArray[6] = new Image(Gallery[6].Width,Gallery[6].Height)	imgArray[7] = new Image(Gallery[7].Width,Gallery[7].Height)	imgArray[8] = new Image(Gallery[8].Width,Gallery[8].Height)	imgArray[9] = new Image(Gallery[9].Width,Gallery[9].Height)	imgArray[10] = new Image(Gallery[10].Width,Gallery[10].Height)	imgArray[11] = new Image(Gallery[11].Width,Gallery[11].Height)	imgArray[12] = new Image(Gallery[12].Width,Gallery[12].Height)	imgArray[13] = new Image(Gallery[13].Width,Gallery[13].Height)	imgArray[14] = new Image(Gallery[14].Width,Gallery[14].Height)	imgArray[15] = new Image(Gallery[15].Width,Gallery[15].Height)	imgArray[16] = new Image(Gallery[16].Width,Gallery[16].Height)	imgArray[17] = new Image(Gallery[17].Width,Gallery[17].Height)	imgArray[18] = new Image(Gallery[18].Width,Gallery[18].Height)	imgArray[19] = new Image(Gallery[19].Width,Gallery[19].Height)	imgArray[20] = new Image(Gallery[20].Width,Gallery[20].Height)	imgArray[21] = new Image(Gallery[21].Width,Gallery[21].Height)	imgArray[22] = new Image(Gallery[22].Width,Gallery[22].Height)	imgArray[23] = new Image(Gallery[23].Width,Gallery[23].Height)	imgArray[24] = new Image(Gallery[24].Width,Gallery[24].Height)	imgArray[25] = new Image(Gallery[25].Width,Gallery[25].Height)	imgArray[26] = new Image(Gallery[26].Width,Gallery[26].Height)	imgArray[27] = new Image(Gallery[27].Width,Gallery[27].Height)	imgArray[28] = new Image(Gallery[28].Width,Gallery[28].Height)	imgArray[29] = new Image(Gallery[29].Width,Gallery[29].Height)	imgArray[30] = new Image(Gallery[30].Width,Gallery[30].Height)	imgArray[31] = new Image(Gallery[31].Width,Gallery[31].Height)	imgArray[32] = new Image(Gallery[32].Width,Gallery[32].Height)	imgArray[33] = new Image(Gallery[33].Width,Gallery[33].Height)	imgArray[34] = new Image(Gallery[34].Width,Gallery[34].Height)	imgArray[35] = new Image(Gallery[35].Width,Gallery[35].Height)	imgArray[36] = new Image(Gallery[36].Width,Gallery[36].Height)	imgArray[37] = new Image(Gallery[37].Width,Gallery[37].Height)	imgArray[38] = new Image(Gallery[38].Width,Gallery[38].Height)	imgArray[39] = new Image(Gallery[39].Width,Gallery[39].Height)			imgArray[0].src = Gallery[0].Image		// load the image from the Gallery Array	imgArray[1].src = Gallery[1].Image	imgArray[2].src = Gallery[2].Image	imgArray[3].src = Gallery[3].Image	imgArray[4].src = Gallery[4].Image	imgArray[5].src = Gallery[5].Image	imgArray[6].src = Gallery[6].Image	imgArray[7].src = Gallery[7].Image	imgArray[8].src = Gallery[8].Image	imgArray[9].src = Gallery[9].Image	imgArray[10].src = Gallery[10].Image	imgArray[11].src = Gallery[11].Image	imgArray[12].src = Gallery[12].Image	imgArray[13].src = Gallery[13].Image	imgArray[14].src = Gallery[14].Image	imgArray[15].src = Gallery[15].Image	imgArray[16].src = Gallery[16].Image	imgArray[17].src = Gallery[17].Image	imgArray[18].src = Gallery[18].Image	imgArray[19].src = Gallery[19].Image	imgArray[20].src = Gallery[20].Image	imgArray[21].src = Gallery[21].Image	imgArray[22].src = Gallery[22].Image	imgArray[23].src = Gallery[23].Image	imgArray[24].src = Gallery[24].Image	imgArray[25].src = Gallery[25].Image	imgArray[26].src = Gallery[26].Image	imgArray[27].src = Gallery[27].Image	imgArray[28].src = Gallery[28].Image	imgArray[29].src = Gallery[29].Image	imgArray[30].src = Gallery[30].Image	imgArray[31].src = Gallery[31].Image	imgArray[32].src = Gallery[32].Image	imgArray[33].src = Gallery[33].Image	imgArray[34].src = Gallery[34].Image	imgArray[35].src = Gallery[35].Image	imgArray[36].src = Gallery[36].Image	imgArray[37].src = Gallery[37].Image	imgArray[38].src = Gallery[38].Image	imgArray[39].src = Gallery[39].Image	