
	//setPromtionsCodeToCookie();  //call the JS to capture any URL variables that contain promocodes and save them as cookies.
	//this call is already perfomred in each static file in the onload event.
	
	

	function promoPop(url)
	{
		var promo = "";
		var acctn = "";
		
		var launchString = location.search.substring(1, location.search.length);
		var launchStringArray = launchString.split("&");
	
		promo = readCookie('PromotionCode'); //check and see if we already have a cookie with the promotion code
		if (promo == "") //no cookie so go and check the URL
		{
			if(location.search.length > 0)
			{
				for(var i=0; i<launchStringArray.length; i++)
				{
					if(launchStringArray[i].substring(0, launchStringArray[i].indexOf("=")) == "PromotionCode")
					{
						promo = launchStringArray[i].substring(launchStringArray[i].indexOf("=")+1, launchString.length);
					}
				}
			}
		}
		
		//now check the URL for an account number
		for(var i=0; i<launchStringArray.length; i++)
		{
			if(launchStringArray[i].substring(0, launchStringArray[i].indexOf("=")) == "AccountNumber")
			{
				acctn = launchStringArray[i].substring(launchStringArray[i].indexOf("=")+1, launchString.length);
			}
		}
		if(promo != "")
		{
			url = url + "&PromotionCode=" + promo;
		}
		if(acctn != "")
		{
			url = url + "&accountnumber=" + acctn;
		}
		promoWindow = window.open(url,"promoPop","toolbar=1,width=795,height=575,menubar=1,scrollbars=1");
	}
