/*
included JS file for the language select, cookies and rollover code for the splash screens
*/


/* rollover variable reassignment for the splash page */
	var arrOn = new Image();
	arrOn.src = "/images/splash/8x8Arrow_on.gif"; 
	var arrImgOn = new String("/images/splash/8x8Arrow_on.gif"); 
	var arrImgOff = new String("/images/splash/8x8Arrow_off.gif");
	var pID = ''; 

/* language cookie variable setup */
	var langAry = new Array("Language Array");
	var pageForwardAry = new Array("Page Forward Array"); // variable created (with identifier in position [0]) to hold an array of language page links, populated int he splash page
	var nextYear = new Date(); // creates a date object to be used for cookie expiration
	nextYear.setFullYear(nextYear.getFullYear()+1); //sets object to one year from today
	var cookiesStr = document.cookie; // var holds string of avail. cookies
	var pos = cookiesStr.indexOf("language="); //gets position of the language select cookie name/value pair

	if(pos != -1){ // if "language" is found in cookie...
		beg = pos + 9;  
		end = cookiesStr.indexOf(";",beg); 
		if(end == -1) end = cookiesStr.length;
 		//commented out for testing; waiting for URL strategy
 		//window.location = cookiesStr.substring(beg,end); 
	}	
	
	
/* function used to set the cookie and  forward page*/

	function setCookie(rig){ // rig = passed in index to URL in langAry
		//sets the language inthe cookie and sets exp. date 1 year out
		document.cookie = "language=" + langAry[rig] + "; expires=" + nextYear.toGMTString();
		//alert("cookie set: "+langAry[rig]+"\nPage will forward to"+pageForwardAry[rig])
		
		//commented out for testing; waiting for URL strategy
		//forwards to appropriate splash URL
		//alert(pageForwardAry[rig])
		window.location = pageForwardAry[rig];
		
	}
	
/* 	

function clearCookie is located in navs.js,
as the "change language" link is part of the
general navigation available to all page

*/
	


