// Set Global Variables & initial valuesvar imageNum = 0var HiResImage = "Images/Industrial/High_Res/Industrial_0001.jpg"var HiResWidth = 568var HiResHeight = 720// 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(22)	Gallery[0] = new Photo("Images/Industrial/Preview/Industrial_0001P.jpg",396,281)	Gallery[1] = new Photo("Images/Industrial/Preview/Industrial_0002P.jpg",376,295)	Gallery[2] = new Photo("Images/Industrial/Preview/Industrial_0003P.jpg",373,297)	Gallery[3] = new Photo("Images/Industrial/Preview/Industrial_0004P.jpg",389,286)	Gallery[4] = new Photo("Images/Industrial/Preview/Industrial_0005P.jpg",393,283)	Gallery[5] = new Photo("Images/Industrial/Preview/Industrial_0006P.jpg",389,286)	Gallery[6] = new Photo("Images/Industrial/Preview/Industrial_0007P.jpg",356,312)	Gallery[7] = new Photo("Images/Industrial/Preview/Industrial_0008P.jpg",385,289)	Gallery[8] = new Photo("Images/Industrial/Preview/Industrial_0009P.jpg",373,298)	Gallery[9] = new Photo("Images/Industrial/Preview/Industrial_0010P.jpg",279,399)	Gallery[10] = new Photo("Images/Industrial/Preview/Industrial_0011P.jpg",394,282)	Gallery[11] = new Photo("Images/Industrial/Preview/Industrial_0012P.jpg",408,272)	Gallery[12] = new Photo("Images/Industrial/Preview/Industrial_0013P.jpg",408,272)	Gallery[13] = new Photo("Images/Industrial/Preview/Industrial_0014P.jpg",408,272)	Gallery[14] = new Photo("Images/Industrial/Preview/Industrial_0015P.jpg",408,272)	Gallery[15] = new Photo("Images/Industrial/Preview/Industrial_0016P.jpg",300,370)	Gallery[16] = new Photo("Images/Industrial/Preview/Industrial_0017P.jpg",302,369)	Gallery[17] = new Photo("Images/Industrial/Preview/Industrial_0018P.jpg",302,369) 	Gallery[18] = new Photo("Images/Industrial/Preview/Industrial_0019P.jpg",298,373)	Gallery[19] = new Photo("Images/Industrial/Preview/Industrial_0020P.jpg",385,289)	Gallery[20] = new Photo("Images/Industrial/Preview/Industrial_0021P.jpg",284,392)	Gallery[21] = new Photo("Images/Industrial/Preview/Industrial_0022P.jpg",396,281)// Define the Industrial 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[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	
