// JavaScript Document
		
		//dummy image change functions to prevent errors in older browsers
		
		function imgOver() 
			{
			}
		
		function imgOut() 
			{
			}
		
		function imgClick() 
			{
			}
		
	
//function picSlide() opens a new window and creates an HTML table. The buttons call the newSlide function
	
	function picSlide(location)
		{
			var loc = location;
			var title = boxTitle[i];
			newWindow = window.open("", "newWin", "resizable=yes,width=370,height=270");
			newWindow.document.write("<link rel='stylesheet' href='styles.css' type='text/css'>");
			newWindow.document.write("<table height='230px' align='center'>");
			newWindow.document.write("<tr><td colspan='3'><h3>Other images of the sample pan:<\/h3><\/td><\/tr>");
			newWindow.document.write("<tr><td height='80%' colspan='3' align='center' bgcolor='#ffffff'><img height='155' width='211' src='images/front.jpg' alt='Pan views' name='slideshow' align='center' hspace='10'><\/td><\/tr>");
			newWindow.document.write("<tr><td><form name='imgForm' action='#'><input type='button' onclick='opener.newSlide(-1)' value='Previous' \/><\/td><td><p><textarea name='imgText' rows='1' cols='20' readonly='readonly'>Front view<\/textarea><\/p><\/td><td><input type='button' onclick='opener.newSlide(1)' value='Next' \/><\/td><\/tr>");
			newWindow.document.write("<\/form><\/table>");
		}
	
	//creates array for each location
	
	boxTitle = new Array(
		"Wichita, Kansas",
		"New York",
		"Alvin, Texas",
		"Galveston, Texas",
		"SeaWorld Orlando, Florida",
		"Florida Everglades",
		"Jersey",
		"Portugal",
		"Lanzarote",
		"Lapland",
		"Lake Como, Italy",
		"Egypt",
		"Singapore",
		"Steve Irwin Zoo, Queensland",
		"Gold Coast, Australia",
		"Sydney, Australia",
		"Ramsay Street, Australia");
	
	//creates array for text captions
	
	captionText = new Array(
		"Front view",
		"Optional glass lid",
		"Side elevation",
		"With standard lid");
		
//creates array for images

	panImages = new Array(
		"images/front.jpg",
		"images/glasslid.jpg",
		"images/side.jpg",
		"images/withlid.jpg");
		
//creates array for image heights
		
	imgHeight = new Array(
	  "155",
		"100",
		"51",
		"82");
		
//creates array for image widths
		
	imgWidth = new Array(
	  "211",
		"150",
		"250",
		"180");
		
//creates variable thisImg and assigns it a value of 0

	var thisImg = 0;
	
//creates variable imgCt and assigns it a value which is the number of items in the captionText array

	var imgCt = captionText.length;
	

/*function newSlide checks to see if the browser understands the image object. If it does, it takes the value passed into the direction parameter and adds it to thisImg to create a new value for thisImg*/
	
	function newSlide(direction) 
		{
			if (document.images) 
				{
					thisImg = thisImg + direction;
			
//if thisImg is less than 0, thisImg is assigned the value of imgCt minus 1.
			
				if (thisImg < 0) 
					{
						thisImg = imgCt-1;
					}
			
//if thisImg has the same value as imgCt, thisImg is assigned a value of 0.

				if (thisImg == imgCt) 
					{
						thisImg = 0;
					}
			
//thisImg defines which value in each array is selected for the slideshow
 
					newWindow.document.slideshow.src = panImages[thisImg];
					newWindow.document.slideshow.height = imgHeight[thisImg];
					newWindow.document.slideshow.width = imgWidth[thisImg];
					newWindow.document.imgForm.imgText.value = captionText[thisImg];
				}
		}


