//Screen shot slide show

var rotateID;
var rotateImages ="backward"
 var picCur=0;
var productpage = false;
 
function rotate() {

			if (pics.length !=0)
			{
			 if(rotateID) {
			 clearInterval(rotateID)
			 }
			 if (rotateImages =="forward") 
				{
				forward1();
				}

			if (rotateImages =="backward")
				{
				backward1();
				}
			 rotateID = setInterval("rotate()", 2000)
			}

}


//change the direction of the screen shot rotation
function changeRotate(direction)
{   clearInterval(rotateID);
	rotateImages = direction;
	rotate();
}


//forward rotation of the screen shots
function forward1() {
	clearInterval(rotateID)
	 var picLast = pics.length - 1
	 document.picRotate.src = pics[picLast]
 
	 if(picCur >= picLast)
	 {
		var picNew = 0
	 }else{
		var picNew = picCur + 1
	 }
	 document.picRotate.src = pics[picNew]
	 picCur = picNew
	 
	 if (locations[picCur] != "")
	 {
		//document.clicklink.src = "images/extras_11.gif"
	 }else{
		//document.clicklink.src = "images/extras_1a.gif"
	 }
 
}

//backward rotation of the screen shots
function backward1() {
	clearInterval(rotateID)
	 var picLast = 1
	 document.picRotate.src = pics[picLast]
 
	 if(picCur >= picLast)
	 {
		var picNew = picNew = picCur - 1
	 }else{
		var picNew = pics.length - 1
	 }
	 document.picRotate.src = pics[picNew]
	 picCur = picNew
	 
	 if (locations[picCur] != "")
	 {
		//document.clicklink.src = "images/extras_11.gif"
	 }else{
		//document.clicklink.src = "images/extras_1a.gif"
	 }
 
}

//Open the larger screen shot from the smaller one
function picLink() 
{ 
	if (locations[picCur] != "")
	{
		var imgval = locations[picCur]
		
		options = "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=510,width=690,alwaysRaised=yes,left="+(screen.width/2 - 190)+",top=40";
		previewWindow = window.open(imgval, "Preview", options);
	}

}


function init() {

	if (productpage) 
		{
		rotate();
		}
}

function DisplayftpWindow(URL)
	{ 
      options = "menubar=no,toolbar=no,resizable=no,scrollbars=no,height=460,width=640,alwaysRaised=yes,left="+(screen.width/2 - 160)+",top=40";
      ftpWindow = window.open(URL, "ftpWindow", options);
      ftpWindow.focus();
	}

