/*  file name: tour_code.js   */


		
var imageIndex = 0;   /* Initialize the index to the beginning image  */



var imageLength = eval(tourScript + "_imageFile").length-1;
var imageFile;



var flagOne = 0;



function displayImages() {
	if (document.images) {
		imageFile = eval(tourScript + "_imageFile[imageIndex]");
		flagOne = 1;     /*  we clear the flag on the first good image  */



		document.nowshowing.src = imageFile;
		/*  For Netscape browsers that are finicky about
		the onLoad() event placed in the image tag,
		uncomment the following line of code and remove the
		onLoad() event handler from the image tag in the HTML document.  */
		//Call displayTitle();
	}
}



function displayTitle()  {
	if (document.images) {
		if (flagOne == 1) {
		
	
		
		document.displaycomments.comments.value = eval(tourScript + "_imageComments")
		[imageIndex];
		}
	}
}

	

function turnLeft()  {
	imageIndex--;
	if (imageIndex < 0)  { imageIndex = imageLength };
	displayImages();
}

function turnRight()  {
	//alert(imageIndex);
	imageIndex++;
	if (imageIndex > imageLength)  { imageIndex = 0 };
	displayImages();
}

