/*
	This file contains information for the slidshow on the Home Page (index.html). 

	To add more pictures:

	1) Move the new picture(s) to the images/slideshow directory
		The pictures must be numbered sequentially (1.jpg, 2.jpg, ...)
		so look in the directory to see where the numbering left off
		before saving the new picture(s)

	2)The following 2 lines must be added to the code for each new image:
		var image?=new Image();
		image?.src="images/slideshow/?.jpg";
		NOTE: The ? in the 2 lines above must be replaced with the number of the image!

	3) Update the nbrOfPictures variable in the code below to equal the number of pictures
	
	4) FTP the image(s) and this file (slideshow.js) to the web server.
		NOTE: .jpg images must be uploaded in binary format!
		
	Optional: To change the speed of the slideshow, edit the slidShowSpeed variable in the code
*/ 
<!--
	var image1=new Image();
	image1.src="images/slideshow/1.jpg";
	var image2=new Image();
	image2.src="images/slideshow/2.jpg";
	var image3=new Image();
	image3.src="images/slideshow/3.jpg";
	var image4=new Image();
	image4.src="images/slideshow/4.jpg";
	var image5=new Image();
	image5.src="images/slideshow/5.jpg";
	var image6=new Image();
	image6.src="images/slideshow/6.jpg";
	var image7=new Image();
	image7.src="images/slideshow/7.jpg";
	var image8=new Image();
	image8.src="images/slideshow/8.jpg";
	var image9=new Image();
	image9.src="images/slideshow/9.jpg";	
	var image10=new Image();
	image10.src="images/slideshow/10.jpg";
	var image11=new Image();
	image11.src="images/slideshow/11.jpg";
	var image12=new Image();
	image12.src="images/slideshow/12.jpg";
	var image13=new Image();
	image13.src="images/slideshow/13.jpg";
	var image14=new Image();
	image14.src="images/slideshow/14.jpg";
	var image15=new Image();
	image15.src="images/slideshow/15.jpg";
	var image16=new Image();
	image16.src="images/slideshow/16.jpg";
	var image17=new Image();
	image17.src="images/slideshow/17.jpg";
	var image18=new Image();
	image18.src="images/slideshow/18.jpg";
	var image19=new Image();
	image19.src="images/slideshow/19.jpg";
	var image20=new Image();	
	image20.src="images/slideshow/20.jpg";	
		





		
	// Add new images above this line then edit the following variable
	var nbrOfPictures = 20; // This must match the number of pictures to display!
	var slidShowSpeed = 5000; // 5 seconds
	
	// For use in identifying the current image being displayed in the Slideshow
	var currentImage = "";
	var step = 1;
	function slideit() {
		// if browser does not support the image object, exit.
		if (!document.images) {
			return;
		}
		currentImage = (step + ".jpg");
		document.images.slide.src = eval("image"+step+".src");
		if (step < nbrOfPictures) { 
			step++;
		} else {
			step = 1;
		}
		setTimeout("slideit()",slidShowSpeed);
	}
	
	// The folloiwng code is for a "larger view" of the current slideshow image
	var screen_width = screen.width;
	var screen_height = screen.height;
	var child_win   = "";
	var next_url = "";

	function largerView() {
		var currentImageBasePath = "images/slideshow/";
		var currentImagePath = currentImageBasePath + currentImage;
		setCookie("pp_img_url", currentImagePath, exp);
		child_win = window.open('image.html', 'childWinImg', 'toolbar=yes,status=yes,scrollbars=yes,location=no,menubar=yes,directories=no,resizable=yes,width=500,height=420,screenX=10,screenY=10,left=10,top=10');
		child_win.focus();
	}

	// The folloiwng code is for dsiplaying the thumbnail images in the Image Gallery
	function swapImage(indx) {
		parent.document.dispImg.src = "images/slideshow/" + indx + ".jpg";
	}
	
	function getImages() {	
		var imageArray = "";
		var y = 0;
		for (x = 1; x <= nbrOfPictures; x++) {
			if ( y == 4) {
				imageArray += '<br>';
				y = 0;
			}
			imageArray += '<A HREF="javascript:swapImage(' + x + ')" ONMOUSEOVER="status=\'\';return true" ONMOUSEOUT="status=\'\';return true"><img src="images/slideshow/' + x + '.jpg" width="100" height="66" BORDER="0" alt=""></A>&nbsp;&nbsp;&nbsp;';
			y++;
		}
		document.write(imageArray);	
	}

	// The following code is for the coupon
	function showCoupon() {
		var currentImageBasePath = "images/pickinpatch/";
		var currentImagePath = currentImageBasePath + "coupon.jpg";
		setCookie("pp_img_url", currentImagePath, exp);
		child_win = window.open('image.html', 'childWinImg', 'toolbar=yes,status=yes,scrollbars=yes,location=no,menubar=yes,directories=no,resizable=yes,width=500,height=420,screenX=10,screenY=10,left=10,top=10');
		child_win.focus();
	}
-->
