// JavaScript Document
	var globalSWFFilePath = "";
    //globalSWFFilePath = "http://m3.nflrush.com/dev";
	//globalSWFFilePath = "http://m3.nflrush.com/beta";
	globalSWFFilePath = "http://m3.nflrush.com/live";
	
	function showInvalidPromoCode()
	{
		popup_show('invalidpopup', 'popup_drag', 'popup_exit', 'screen-center', 0, 0);
	}

	function showRedeemedPromoCode()
	{
		popup_show('redeemedpopup', 'redeemedpopup_drag', 'redeemedpopup_exit', 'screen-center', 0, 0);
	}
	
	function showInvalidAccountPromoCode()
	{
		popup_show('invalidaccountpopup', 'invalidaccount_drag', 'invalidaccount_exit', 'screen-center', 0, 0);
	}
	
	function showPaymentPromoPopUp()
	{
		popup_show('paymentpromopopup', 'paymentpromo_drag', 'paymentpromo_exit', 'screen-center', 0, 0);
	}
	
	function showGiftCardPromoPopUp()
	{
		alert("Test1");
		popup_show('invalidpromogiftcard', 'invalidpromogiftcard_popup_drag', 'invalidpromogiftcard_popup_exit', 'screen-center', 0, 0);
	}
	
	function showregpopup(playerName,teamName)
	{
		
		oTrack("Signup pop:RZ","RZ:Signup pop","RZ|Signup pop",false,false,false);
		document.getElementById("regpopup").style.zIndex = "15000";
		if((playerName != undefined || playerName != ">Player name") && teamName != undefined)
		{
		var str = '<object width="760" height="490" align="middle"><param name="registration" value="/play/regpopup.swf"><param name="allowScriptAccess" value="always" /><param name="FlashVars" value="pname='+playerName+'&tname='+teamName+'"><param name="wmode" value="transparent" /><embed src="'+globalSWFFilePath+'/play/regpopup.swf" FlashVars="pname='+playerName+'&tname='+teamName+'" wmode="transparent" width="760" height="490" quality="high" align="middle" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" allowScriptAccess="always" type="application/x-shockwave-flash"></embed></object>';
		}
		else
		{
			var str = '<object width="760" height="490" align="middle"><param name="registration" value="/play/regpopup.swf"><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><embed src="'+globalSWFFilePath+'/play/regpopup.swf" wmode="transparent" width="760" height="490" quality="high" align="middle" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" allowScriptAccess="always" type="application/x-shockwave-flash"></embed></object>';
		}
		
		
		var scrolledX, scrolledY; 
		
		if( self.pageYOffset ) 
		{ 
 			scrolledX = self.pageXOffset; 
 			scrolledY = self.pageYOffset; 
		} 
		else if( document.documentElement && document.documentElement.scrollTop ) 
		{ 
 			scrolledX = document.documentElement.scrollLeft; 
 			scrolledY = document.documentElement.scrollTop; 
		} 
		else if( document.body ) 
		{ 
 			scrolledX = document.body.scrollLeft; 
 			scrolledY = document.body.scrollTop; 
		}
		
		var centerX, centerY; 
		
		if( self.innerHeight ) 
		{ 
			centerX = self.innerWidth; 
			centerY = self.innerHeight; 
		}	 
		else if( document.documentElement && document.documentElement.clientHeight ) 
		{ 
			centerX = document.documentElement.clientWidth; 
			centerY = document.documentElement.clientHeight; 
		} 
		else if( document.body ) 
		{ 
			centerX = document.body.clientWidth; 
			centerY = document.body.clientHeight; 
		}
		var swfWidth = 760;
		var swfHeight = 490;
		var leftOffset = scrolledX + (centerX - swfWidth) / 2; 
		var topOffset = scrolledY + (centerY - swfHeight) / 2;
		
		
		document.getElementById("regpopup").innerHTML = "";
		document.getElementById("regpopup").innerHTML = str;
		document.getElementById("regpopup").style.position = "absolute";
		
		if(window.location.href.indexOf("promo/index") != -1)
		{	
			document.getElementById("regpopup").style.top="80px";
		}
		else
		{
			document.getElementById("regpopup").style.top="170px";
		}
		
		document.getElementById("regpopup").style.left=leftOffset+'px';
		window.scroll(0,150);
		document.getElementById("regpopup").style.visibility="visible";
		
	}
	
	function hideregpopup()
	{
		document.getElementById("regpopup").style.visibility="hidden";
	}
