
	var version="20090720";
	var $name="";
	var $w=0;
	var $h=0;
	var $params={};
	var $gameatr={};
	
	
	/*window.onbeforeunload=function(){
		if(thisMovie("swfobj_game") && thisMovie("swfobj_game").sfs_disconnect != undefined )
		{
			thisMovie("swfobj_game").sfs_disconnect();
		}
		navTo("disconnect");
	}*/

    var globalSWFFilePath = "";
    //globalSWFFilePath = "http://m3.nflrush.com/dev";
	//globalSWFFilePath = "http://m3.nflrush.com/beta";
	globalSWFFilePath = "http://m3.nflrush.com/live";
	
	//alert(curUrl);
	if(curUrl==""){
		//alert(window.location.pathname);
		curUrl=window.location.pathname.substr(5);
		curUrl=(curUrl=="/")?"":curUrl;
	}
	  
		  var debugString="";
		  var debug=true;
		
	     var asdebug=function(s){
             if(window.location.href.indexOf("dejsbug")!=-1 || window.location.href.indexOf("dev.nfl.")!=-1){
							
				debugString=s+"\n";
				if($("asbug") && debug){
				var a=$("asbug");
				a.value+=debugString;
				a.style.display="";
				}

				}
          }

		
		function stopDebug(){
			
			debug=false;
		}

		 

		  //swfobject start

		 var params = { 
			quality:"high",
			play:"true",
			loop:"true",
			scale:"showall",
			//Pamila
			wmode:"transparent",
			devicefont:"false",
			bgcolor:"#ffffff",
			menu:"false",
			allowFullScreen:"false",
			allowScriptAccess:"always",
			salign:""
		};
		
		 
		var footeratr = {
			align:"middle",
			id:"nav_footer",
			name:"nav_footer"
		};

		var headatr = {
			align:"middle",
			id:"nav_head",
			name:"nav_head"
		};

		var mainparams = { 
			quality:"high",
			flashvars:"curUrl="+curUrl+"&lastUrl="+lastUrl+"&curPrames="+curPrames+"&curFrom="+curFrom+"&isChallenge="+isChallenge+"&challengeInfo="+challengeInfo+"&version="+version+"&globalSWFFilePath="+globalSWFFilePath,
			play:"true",
			loop:"true",
			scale:"showall",
			//Pamila
			wmode:"transparent",
			devicefont:"false",
			bgcolor:"#ffffff",
			menu:"false",
			allowFullScreen:"false",
			allowScriptAccess:"always",
			salign:""
		};

		var mainatr = {
			align:"middle",
			id:"main",
			name:"main"
		};

		var rzgamePoptr= {
			align:"middle",
			id:"rzgameExitPop",
			name:"rzgameExitPop"
		
		};

		var rzparams = { 
			quality:"high",
			play:"true",
			loop:"true",
			scale:"showall",
			//Pamila
			wmode:"transparent",
			//wmode:"window",
			devicefont:"false",
			menu:"false",
			allowFullScreen:"false",
			allowScriptAccess:"always",
			salign:""
		};
		//swfobject.embedSWF("/play/rzgamePopWindow.swf", "rzbowlExitPopupDiv", "250", "280", "9.0.0", "expressInstall.swf",false,rzparams,rzgamePoptr);
		//swfobject.embedSWF("/play/rzgamePopWindow.swf", "rzbowlExitPopup", "250", "280", "9.0.0", "expressInstall.swf",false,rzparams,rzgamePoptr);
		
        swfobject.embedSWF(globalSWFFilePath+"/play/nav_head.swf", "swfobj_header", "996", "142", "9.0.0", "expressInstall.swf",false,params,headatr);
		swfobject.embedSWF(globalSWFFilePath+"/play/FlashUniversial.swf", "swfobj_main", "996", "750", "9.0.0", "expressInstall.swf",false,mainparams,mainatr);
		swfobject.embedSWF(globalSWFFilePath+"/play/nav_footer.swf", "swfobj_footer", "996", "74", "9.0.0", "expressInstall.swf",false,params,footeratr);
		
		
		 //swfobject end

	
		//history javascript start
		

		var applicationMovieClipName="main";

		function addHistory (newHash)
		{
			//unFocus.History.addHistory(newHash.toString());
			//window.document.title="NFLRZ";
		}

		function onHistoryChange (newHash)

		{
			//thisMovie(applicationMovieClipName).addressBarNavigated(newHash);
		}

		
		function showLevelChange(){
//my_window = window.open (my_window_str,"ShowLevelUpPopup","status=0,menubar=0,location=0,directories=0,resizable=0,scrollbars=0,toolbar=0,resizable=no,width=628,height=419"); 
			//document.getElementById("game_swf").params.wmode = "transparent";
			//document.getElementById("game_swf").style.zIndex = ;
			//document.getElementById("levelup").playtheAnimation(true);
			//document.getElementById("game_swf").FlashVars = 'wmode=transparent';
	var allElems = document.getElementsByTagName?document.getElementsByTagName("*"):document.all; // or test for that too
	var maxZIndex = 0;
	for(var i=0;i<allElems.length;i++) {
		var elem = allElems[i];
		var cStyle = null;
			if (elem.currentStyle) {cStyle = elem.currentStyle;}
			else if (document.defaultView && document.defaultView.getComputedStyle) {
				cStyle = document.defaultView.getComputedStyle(elem,"");
			}
			var sNum;
			if (cStyle) {
				sNum = Number(cStyle.zIndex);
			} else {
				sNum = Number(elem.style.zIndex);
			}
		if (!isNaN(sNum)) {
		maxZIndex = Math.max(maxZIndex,sNum);
		}
	}
//alert(maxZIndex);
my_window_str = '<div id="shoowLevelPopUp"><table width="996px" height="620px" ><tr valign="top"><td><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="996px" height="620px" id="levelup" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="http://m3.nflrush.com/dev/play/levelup.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="noborder" /><param name="wmode" value="transparent" /><embed src="http://m3.nflrush.com/dev/play/levelup.swf" menu="false" quality="high" scale="noborder" wmode="transparent" width="996px" height="620px" name="levelup" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object></td></tr></table></div>';
//alert("document.getElementById(showLevelup).style."+document.getElementById("showLevelup").style.zIndex);
			document.getElementById("showLevelup").innerHTML = "";
			document.getElementById("showLevelup").innerHTML = my_window_str;
			document.getElementById("showLevelup").style.display = "block";
			document.getElementById("showLevelup").style.zIndex = maxZIndex+1;
			document.getElementById("showLevelup").style.left = "0px";
//alert("document.getElementById(showLevelup).style."+document.getElementById("showLevelup").style.zIndex);
//alert("document.getElementById(game_swf).style."+document.getElementById("game_swf").style.zIndex);
//alert("document.getElementById(gametd).style."+document.getElementById("gametd").style.zIndex);

		}
		function hideLevelChange(){
			document.getElementById( "showLevelup" ).style.display = "none";
			document.getElementById("showLevelup").style.left = "-2000px";
			//document.getElementById("game_swf").params.wmode = "window";
			//document.getElementById("game_swf").FlashVars = 'wmode=window';
		}
		function getFlashVarsFromHash () 
		{

			var result = "";

			if(location.hash != "")
			{
			result = location.hash;
			result = result.replace("#","");
			}

			return result;
		}

		//unFocus.History.addEventListener('historyChange', onHistoryChange);

		//history javascript end

		//play page javascript start

          var curGame="";
		  var gameChallenge=false;

		function showhead(){    
          	document.getElementById("nav_div").style.display="";
          	thisMovie("main").style.width="996px";
          	thisMovie("main").style.height="620px";
          }

		  	//External Link

		function linkExternal(){
			var url=location.href;
			/*
			var arrUrl=url.split("/");
			var l=arrUrl.length;
			var s="";
			for(i=3; i<l; i++){
				s+=arrUrl[i];
			}
			alert(s);
			*/
			if(url.indexOf("=")!=-1){
				return url.substring(url.indexOf("=")+1,url.length).replace("&","%26");
			}else{
				return "-1";
			}

		}

          function upgrade(){
          	window.location.href="https://nflrz.nflrush.com/Myaccount/changecreditview";
          }

		

          function activeAccount(){
			//active account
          	window.location.href="/login/active";
          }

		  function errorPage(){
			window.location.href="/errorpage/error.php";
		  }


		  
         function logout(a){
			var url=location.href;
			var logoutUrl="";
			
			if(url.indexOf("?")!=-1){
				var linkPrarm=url.substring(url.indexOf("?")+1,url.length);
				logoutUrl="/login/logout/?"+linkPrarm;
			}else{
				logoutUrl="/login/logout";
			}
          	window.location.href=logoutUrl;

          }


          function link(s){
          	if(s!=""){
          	var t=s.lastIndexOf(":");
          	var target=s.substr(t+1);
          	var url=s.substring(0,t);
          	if(target=="_self"){
          		window.location.href=url;
          		}else if(target=="_blank"){
          		window.open(url);
          		}
          	}
          }

		function exitGame(){
			navTo("nothing");
		}

		function exitRzbowlGame(b)
		{
			if(b)
			{
				goHistory();
			}
			else
			{
				$("rzbowlExitPopup").style.display="none";
			}
		}


		function forceExitGame(){ navTo("forceback")}

          var picstatus="avatar"; 

          function navTo(act){
					var curGameTemp=curGame;
					if(act=="disconnect"){
						try{
							thisMovie("main").jscall(act);
						}catch(e){
						
						}
					}
					if(act!="forceback"&&act!="disconnect"){
						//if(curGame=="/games/game/rz.bowl.v1.0.0.swf"){
						if(curGame.indexOf("/rz.bowl.")!=-1){
							//change exit rzbowlgame confirm to pop up swf
							$("rzbowlExitPopup").style.display="block";
							return;
							/*
							if(confirm("Really exit challenge?")){
								//thisMovie("main").jscall("exitChallenge");
								goHistory();

								return;
							}else{
								return;
							}
							*/
						 }
					}else{
						act="nothing";
					}

					
				   if(picstatus!="avatar"){
			
					document.getElementById("game_swf").style.display="none";

					if(gameChallenge && act=="nothing"){
														
								if(lastUrl.indexOf("challenge/selectgame")!=-1){
									submitUrl([ctrUrl(last2Url),[1,1,challengeInfo]],1);
								}else{
									submitUrl([ctrUrl(lastUrl),[1,1,challengeInfo]],1);
								}
								
								return;

					}
					
					//gameswf(swfUrl + "/games/empty",600,600);
					thisMovie("main").style.width="996px";
					thisMovie("main").style.height="620px";
					document.getElementById("main_swf").style.marginLeft="0px";
					document.getElementById("main_swf").style.width="996px";
					document.getElementById("main_swf").style.height="620px";
					document.getElementById("main_swf").style.zIndex = 0;
					
/*					document.getElementById("showLevelup").style.marginLeft="0px";
					document.getElementById("showLevelup").style.width="996px";
					document.getElementById("showLevelup").style.height="620px";
					document.getElementById("showLevelup").style.zIndex = 1;
					document.getElementById("showLevelup").style.position = "";*/
					
						picstatus="avatar";
						curGame="/games/empty.swf";

						goHistory();
		
				   }

				   updateSession();
				
				  if(act!="nothing"){
					if(act=="highscores"){
						thisMovie("main").jscall(act,curGameTemp);
					}else if(act.indexOf("event:")==0){
						//alert(act);
						thisMovie("main").jscall("event",act.substr(6));
					}else{
						thisMovie("main").jscall(act);
					}
				}
		

          }

		  function ctrUrl(url){
			var l=url.indexOf("/play/");
			return url.substr(l+5);
		  }

          var profileStr=" $$$$$ $$$$$4";
          function setNav(s){
			  //alert("yes");
            profileStr=s;
          	window.setTimeout(updateNav,1800);
          }

          function updateNav(){
		  try{
			  //alert("yes1");
          //thisMovie("nav_head").setinfo(profileStr);
          //thisMovie("nav_footer").setinfo(profileStr);
			  //alert("yes2");
          var tempSubscriptionId = 0;
          if( subscriptiontypeid != undefined )
            tempSubscriptionId = subscriptiontypeid;
          thisMovie("nav_footer").setinfo(tempSubscriptionId);
		  thisMovie("swfobj_chat").setinfo(profileStr);

          }catch(e){
			///alert(e)
			  //alert("yesErr");
		  }
			  //alert("yes3");
          }
          
          function updateSession(){
			 try{
				thisMovie("main").jscall("updatesession");
			 }catch(e){
			 }
			}
          
          
          function thisMovie(movieName) {
                   if (navigator.appName.indexOf("Microsoft") != -1) {
                       return window[movieName];
                   } else {
                       return document[movieName];
                   }
               }
          
          var showNum=0;
          
          function $(s){return document.getElementById(s);}
          
          
          function gameswf(swf,w,h,id){
			  asdebug("gameswf"+swf)
				var vars="";
				if(swf.indexOf("?")!=-1){
					vars=swf.split("?")[1];
				}
				
				vars+=((vars=="")?"":"&")+"version="+version;
				//alert(vars);
				swf=swf.split(".swf")[0];
				if(w==undefined||w==0){w=600};
				if(h==undefined||h==0){h=600};
				if(swf==""||swf==undefined){swf=globalSWFFilePath + "/games/empty"};
				if(id==undefined){id="gamecontent"};
				
				var params = { 
					quality:"high",
					flashvars:vars+"&ip=74.63.14.74&port=9339&zone=40yards&globalSWFFilePath="+globalSWFFilePath,
					play:"true",
					loop:"true",
					scale:"showall",
					wmode:"window",
					//wmode:"transparent", -- This will affect the scrolling of games in IE
					devicefont:"false",
					bgcolor:"#003466",
					menu:"false",
					allowFullScreen:"false",
					allowScriptAccess:"always",
					salign:""
				};

				var gameatr = {
					align:"middle"

				}
                
                /*
                 * Appended nflrz/nflrush.com to all game SWFs
                */
                var swfName = swf.replace("..","")+".swf";
                swfName = globalSWFFilePath + swfName;
                /*#################################################*/
                
				swfobject.embedSWF(swfName, "swfobj_game", w, h, "9.0.0", "expressInstall.swf",false,params,gameatr);
				if(w == 0){
					swfobject.embedSWF(globalSWFFilePath+"/play/chat_game.swf", "swfobj_chat", 0, 0, "9.0.0", "expressInstall.swf",false,params,gameatr);
					swfobject.embedSWF(globalSWFFilePath+"/play/GameAd.swf", "chat_ads1", 0, 0, "9.0.0", "expressInstall.swf",false,params,gameatr);
					swfobject.embedSWF(globalSWFFilePath+"/play/relevantgame.swf", "chat_ads2", 0, 0, "9.0.0", "expressInstall.swf",false,params,gameatr);
				}
				else {
					
					swfobject.embedSWF(globalSWFFilePath+"/play/chat_game.swf", "swfobj_chat", 223, 450, "9.0.0", "expressInstall.swf",false,params,gameatr);
					swfobject.embedSWF(globalSWFFilePath+"/play/GameAd.swf", "chat_ads1", 980, 80, "9.0.0", "expressInstall.swf",false,params,gameatr);
					swfobject.embedSWF(globalSWFFilePath+"/play/relevantgame.swf", "chat_ads2", 980, 145, "9.0.0", "expressInstall.swf",false,params,gameatr);
					swfobject.embedSWF(globalSWFFilePath+"/play/weeklyReward_game.swf", "usrrewardpopup", 535,331, "9.0.0", "expressInstall.swf",false,params,gameatr);
				}

				
				$name= swfName;
				$w=w;
				$h=h;
				$params=params;
				$gameatr=gameatr;

				if( w > 750 )
					$("gametd").style.width=w+"px";
				else
					$("gametd").style.width="750px";
					
				$("gametd").style.height=h+"px";
				
				$("gametd").style.textAlign="center";
				
				if( w > 750 )
					$("gameTable").style.width=w+"px";
				else
					$("gameTable").style.width="750px";
				$("gameTable").style.height=(h-(-56))+"px";

				$("gameTr").style.height=h+"px";
				
				//make the rzbowl popup window align center
				$("rzbowlExitPopup").style.left=((w-0)/2-125)+"px";
				$("rzbowlExitPopup").style.top=((h-0)/2-140)+"px";

			
          		
          	}
/*function hideweeklyreward()
{
	alert("hide");
	document.getElementById( "usrrewardpopup" ).style.visibility="hide";
}*/

function ShowRewardPopup()
{
	//alert("yes");
       document.getElementById("rewardpopup").style.height="";
       document.getElementById("rewardpopup").style.overflow="visible !important";
       document.getElementById("gameTr").style.display = 'none';
}
function HideRewardPopup()
{
       document.getElementById("gameTr").style.display = '';
       document.getElementById("usrrewardpopup").style.display = 'none';
       document.getElementById("usrrewardpopupTr").style.display = 'none';
}
	function rematch()
	{
		swfobject.embedSWF($name, "swfobj_game", $w, $h, "9.0.0", "expressInstall.swf",false,$params,$gameatr);
	}
	
	function showgame(s){
	
		eval("var g="+s);
		
		curGame=(g.pathswf)?(g.pathswf):(g["trueurl"].split("?")[0]);//sun modify for train game back button 2009-2-10
		
		gameChallenge=(g["trueurl"].indexOf("type=gamechallenge")!=-1);
		

		document.getElementById("game_swf").style.display="";
		document.getElementById("game_swf").style.zIndex="-1";
		//document.getElementById("main_swf").style.marginLeft="-10px";

		document.getElementById("main_swf").style.width="1px";
		document.getElementById("main_swf").style.height="1px";
		
		thisMovie("main").style.width="1px";
		thisMovie("main").style.height="1px";


		gameswf(g["trueurl"],g["gamewidth"],g["gameheight"]);
		
		if(!g["gameid"]||gameChallenge || g["hashighscore"]=="0"){
		 document.getElementById("highscoreBtn").style.display="none";
		}else{
		 document.getElementById("highscoreBtn").style.display="inline";
		}
		
		try
		{
			if( g.gameid )
			{
				thisMovie("swfobj_chat").UpdateGameId(g.gameid);
				document.getElementById( "curgameid" ).value = g.gameid;
				getgamerating( );
			}
		}
		catch(e){ }
		picstatus="game"; 
	}

function getGameId(){
	return (g.gameid);
}

	function shownews(){
	 window.location.href="/nflrztimes";
	}


	function UpdateXpHead(xpEarned){
		thisMovie("nav_head").UpdateXpHead(xpEarned);
	}
	
	function UpdatePigskin(pigSkin){
		thisMovie("nav_head").UpdatePigskin(pigSkin);
	}
	
	function updateCredit(credit){
		thisMovie("nav_head").UpdateCredit(credit);
	}
	
	function hiddenMailBtn(l){
			thisMovie("nav_head").mailBtn(l);
	}

//var arr:Array=[ts,[COM.curHttpUrl.url,COM.lastHttpUrl,strChallengeInfo],url2];
	function submitUrl(arr,cNum){
		//alert(clInfo);
		if(!cNum){cNum=0}
//alert(arr[1][0]);
		$("urlForm").action="/play"+arr[0];
		$("curUrl").value=arr[0];
		$("lastUrl").value=arr[1][0];
		if(arr.length>2){
			$("curPrames").value=arr[2];
		}
		$("last2Url").value=arr[1][1];
		$("isChallenge").value=cNum;
		if(arr[1].length>2){
			$("challengeInfo").value=arr[1][2];
		}
		
		if( arr[3] )
			$("shareGameName").value=arr[3];
		if( arr[4] )
			$("shareGameDescription").value=arr[4];
		if( arr[5] )
			$("shareGameImagePath").value=arr[5];
		
		//$("pathUrl").value=
		$("urlForm").submit();
	}

	function backBtnCtr(b)
	{
		$("backBtn").style.display=(b)?"block":"none";
	}
    
    function show_popup()
	{
		document.getElementById("nonUnserPopup").style.display = 'block';
	}
	
	function hide_popup(){
		document.getElementById("nonUnserPopup").style.display = 'none';
	}
    
    function nonRegshow_popup()
	{
		document.getElementById("nonRegUnserPopup").style.display = 'block';        
    }
	
	function nonReghide_popup(){
		document.getElementById("nonRegUnserPopup").style.display = 'none';
	}

	function goHistory(url)
 	{
		//window.history.go(s);
		//if url then link to url,if not,call history.back()
		//alert(url);
		//alert("goHistory");
		//alert("URL : "+url+"    document.referrer: "+document.referrer);
		
		if(url){
			if(url != '1')
			{
				window.location.href=url;
			} 
			else 
			{
				//window.location.href = "mainstreet";
				//var str = window.location.href.replace("locker","mainstreet")
				//var str =
				var str = window.location.href.slice(0,window.location.href.indexOf("play"))
				window.location.href = str+"play/mainstreet"
			}
		
		//alert("if");
		}else{
			//window.history.back();
			//alert("else");
			if(document.referrer != '' )
			{
				if(window.location.href.indexOf("training/select") != -1) 
				{
					/*var str = window.location.href.slice(0,window.location.href.indexOf("training/select"))
					window.location.href = str+"training"*/
					window.history.back();
				} 
				else if(window.location.href.indexOf("play/game") != -1) 
				{
					if(window.location.href.indexOf("play/game/speed")==-1 || window.location.href.indexOf("play/game/skill")==-1) 
					{
						window.history.back();
					} 
					else 
					{
						window.location.href = "../stadium/games";
					}
				} 
				else 
				{
					window.location = document.referrer;
				}
			}
			else
			{
				window.history.back();
			}
		}
		//window.history.back();
	}


//Pamila Jose. Commented Related to task#5436, Problm Flash Objects
//gameswf('/games/empty',600,620,'gamecontent');



//play page javascript end

//omni javascript start
    
	var omnitrueLogintype='';
	var omnitrueSubscription='';
	var omnitrueAge="";
	var omnitrueCode="";
			
	function trackingLogin(omnitrueLogintype,omnitrueCode){
			

			if(omnitrueLogintype=='login'){

				switch(omnitrueCode){
					case "undefined","":
						oTrack("Login:RZ","RZ:Login","RZ|Login",null,null,"event11");
						break;
					case "spring08":
						oTrack("Login:RZ","RZ:Login","RZ|Login",null,"1|rz_pc_spring08,18|spring08","event11");
						break;
					default:
						oTrack("Login:RZ","RZ:Login","RZ|Login",null,"1|rz_pc_"+omnitrueCode+",18|"+omnitrueCode,"event11");
						break;
				}

			}


	}

	function ifrheight(){
		var a=document.getElementById("frmNews").height;
		//alert(a);
	}


	function omnitrueAc3(omnitrueSubscription,omnitrueAge,omnitrueCode){
		
			if(omnitrueAge<=13)
				omnitrueAge="Under 13";
			if(omnitrueAge<18 && omnitrueAge>13)
				omnitrueAge="13-17";
			if(omnitrueAge>=18)
				omnitrueAge="18+";

		if(typeof omnitrueCode === 'undefined' || omnitrueCode === "")
			oTrack(omnitrueSubscription+"|Complete:"+omnitrueAge+":Register:RZ", "RZ:RZ Complete", "RZ|Register|"+omnitrueAge+"|Complete|"+omnitrueSubscription, false, false, "event3");
		else
			oTrack(omnitrueSubscription+":Complete:"+omnitrueAge+":Register:RZ", "RZ:RZ Complete", "RZ|Register|"+omnitrueAge+"|Complete|"+omnitrueSubscription, false, "1|rz_pc_"+omnitrueCode+",18|"+omnitrueCode, "event3");
	}
//omni javascript end
//?

	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 showremmepopup( )
	{
		document.getElementById( "remembermePopup" ).style.display = "block";
	}
	
	function hideremmepopup( )
	{
		document.getElementById( "remembermePopup" ).style.display = "none";
	}
	
	function showform()
	{
	//document.getElementById("form");	
	}
	/*
	function showregpopup(playerName,teamName)
	{
		 oTrack("Signup pop:RZ","RZ:Signup pop","RZ|Signup pop",false,false,false);
		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";
		document.getElementById("regpopup").style.zIndex = "15000000";
		document.getElementById( "swfobj_game" ).style.visibility="hidden";
		
	}
	
	function hideregpopup()
	{
		document.getElementById("regpopup").style.visibility="hidden";
		document.getElementById( "swfobj_game" ).style.visibility="visible";
	}*/
	
	function showlatestxp( )
	{
		document.getElementById( "swfobj_game" ).style.visibility="hidden";
		fetch_user_top_xp();
		if(window.location.href.indexOf("play/game")==-1) 
		{
			
			document.getElementById( "showxppoints" ).style.display = "block";
		}
		else
		{
			
			if(window.location.href.indexOf("play/game/speed")!=-1 || window.location.href.indexOf("play/game/skill")!=-1) 
			{
				document.getElementById( "showxppoints" ).style.display = "block";
			}
			else
			{
				document.getElementById("game_swf").FlashVars = 'wmode=transparent'; 
				document.getElementById( "showxppoints" ).style.display = "block";
				document.getElementById( "showxppoints" ).style.zIndex="10";
				document.getElementById( "game_swf" ).style.zIndex="0";
				my_window_str = '<div id="showxbpoints"><table id="Table_01" width="628" height="419" border="0" cellpadding="0" cellspacing="0">	<tr>		<td colspan="3" background="http://m3.nflrush.com/dev/play/images/xp_nav_01.png" width="628" height="38" id="closebut" align="right">			<div style="margin-right:10px;"><a href="hidelatestxp()"></a></div></td>	</tr>	<tr>		<td colspan="3" background="http://m3.nflrush.com/dev/play/images/xp_nav_02.png" width="628" height="76">			<div style="margin-left:125px;margin-top:35px;color:" >level</div></td>	</tr>	<tr>		<td rowspan="2">			<img src="http://m3.nflrush.com/dev/play/images/xp_nav_03.png" width="19" height="286" alt=""></td>		<td width="584" height="200" valign="top" background="http://m3.nflrush.com/dev/play/images/xp_nav_04.png">		<div style="margin-left:10px;margin-top:5px;">Most recent XP acquired:</div>		<div style="margin-left:10px;margin-top:5px;overflow:auto;height:165px;width:570px;"></div>		</td>		<td rowspan="2">			<img src="http://m3.nflrush.com/dev/play/images/xp_nav_05.png" width="25" height="286" alt=""></td>	</tr>	<tr>	<td align="center" id="getmorexp" bgcolor="#FFFFFF">		<a href="#"></a>	</td>	</tr>	<tr>		<td colspan="3">			<img src="http://m3.nflrush.com/dev/play/images/xp_nav_06.png" width="628" height="19" alt=""></td>	</tr></table>';
				//my_window = window.open (my_window_str,"Latest XP","status=0,menubar=0,location=0,directories=0,resizable=0,scrollbars=0,toolbar=0,resizable=no,width=628,height=419"); 
				
				//document.getElementById( "showxppoints" ).style.zIndex="1";
//				thisMovie("main").showlatestxp();
			}
		}
	}
/*	function showlatestxp( )
	{
 		if(window.location.href.indexOf("play/game")!=-1) {
		document.getElementById( "showxppoints" ).style.display = "block";
		} else {
			if(window.location.href.indexOf("play/game/speed")==-1 || window.location.href.indexOf("play/game/skill")==-1) {
				document.getElementById( "showxppoints" ).style.display = "block";
			} else {
				alert("Check");
				thisMovie("main").showlatestxp();
				alert("Check1");
			}
		}
	}*/
	
	function hidelatestxp( )
	{
			document.getElementById( "swfobj_game" ).style.visibility="visible";
			document.getElementById( "showxppoints" ).style.display = "none";
			document.getElementById("game_swf").FlashVars = 'wmode=window'; 

	}
	function goToPreviousURL()
	{
	history.go(-1)
	
	}
	function fetch_user_top_xp( )
	{
		data = 'DATA={"response_type":"json","flag":"0","act":"user/getusertopxpawards","bean":{"userid":"'+curUserId+'"}}';
		
		jQuery.ajax({
			type: "POST",
			async: false,
			url: "/User/getusertopxpawards",
			data: data,
			dataType: "json",
			success: function( json ){
				var XPDescription = "";
				var curuserlevel = 1;
				
				if( json.bean.xpdetails )
				{
					for( var i = 0; i < json.bean.xpdetails.length; i++ )
					{
						if( json.bean.xpdetails[i].description )
							XPDescription += json.bean.xpdetails[i].description + "<br/>";
						
						curuserlevel = json.bean.xpdetails[i].userlevel;
					}
					
					document.getElementById( "showXPAwardedValues" ).innerHTML = "";
					document.getElementById( "usercurlevel" ).innerHTML = "";
					
					document.getElementById( "showXPAwardedValues" ).innerHTML = XPDescription;
					document.getElementById( "usercurlevel" ).innerHTML = curuserlevel;
				}
			}
		});
		
	}
