var contentUrl="/betfreddev/sports";var ServerUrl="";var CommonServerUrl="/betfreddev/common";var SSLURL="";var sessionTimeout=2;var idSetTimeout;var thisURL=document.location;function popup(winname,url,width,height,left,top,resize){var winopts="flyout,toolbar=no,location=no,directories=no,status=yes,";winopts+="menubar=no,scrollbars=yes,alwaysRaised=yes,width="+width+",height="+height;winopts+=",left="+left+",top="+top+",resizable="+resize;var win=window.open(trim(url),winname,winopts);win.focus();clearSessionTimeout()}function trim(str){return str.replace(/^\s+/,'').replace(/\s+$/,'')}function session_timeOut(){var strFeatures="flyout,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,alwaysRaised=yes,width=300px,height=300px,left=400px,top=300px,resizable=false";popup("Timeout",CommonServerUrl+"/Timeout.aspx?OPENURL="+thisURL,400,300,400,300,false);clearSessionTimeout()}function window_onLoad(strSessionTimeout){sessionTimeout=parseInt(strSessionTimeout);idSetTimeout=window.setTimeout("session_timeOut()",(sessionTimeout-1.25)*60000,"javascript")}function clearSessionTimeout(){if(document.getElementById("lblBalance")!=null){window.clearTimeout(idSetTimeout);idSetTimeout=window.setTimeout("session_timeOut()",(sessionTimeout-1.25)*60000,"javascript")}}function priceFormatChooser_change(){var strUrl=window.location.href;if(strUrl.indexOf("#")>-1)strUrl=strUrl.substring(0,strUrl.indexOf("#"));if(strUrl.indexOf("?")>-1){if(strUrl.indexOf("Price=")>-1){var index=strUrl.indexOf("Price=");window.location.href=strUrl.substring(0,index)+"Price="+trim(document.getElementById("LeftSportMenu_PriceFormatChooser_ddlPriceFormat").value)+strUrl.substring(index+7,strUrl.length)}else window.location.href=strUrl+"&Price="+document.getElementById("LeftSportMenu_PriceFormatChooser_ddlPriceFormat").value}else window.location.href=strUrl+"?Price="+document.getElementById("LeftSportMenu_PriceFormatChooser_ddlPriceFormat").value}function betslip(){if(window.location.href.toLowerCase().indexOf("lottery.aspx")>-1)popup("LotteryBetCard",ServerUrl+contentUrl+"/lotterybetcard.aspx?LT="+lotteryType+"&ViewBetSlip=true",650,350,250,250,0);else popup("BetCard",ServerUrl+contentUrl+"/betcard.aspx",650,350,250,250,0);return false}function reloadOpener(){window.location.href=window.location.href}var s=0,c=0,t=0,e=0,l=0;function m(){var str;if(e!=0)str="/Markets.aspx?EventId="+e;else if(t!=0)str="/Markets.aspx?TournamentId="+t;else if(s!=0&&c!=0)str="/Markets.aspx?SportId="+s+"&CouponId="+c;else if(s!=0)str="/Events.aspx?SportId="+s;window.location.href=ServerUrl+contentUrl+str;s=c=t=e=0}function L(){var str="/Lottery.aspx";if(l>0)str=str+"?type="+l;window.location.href=ServerUrl+contentUrl+str;l=0}function dt(sid){var sdiv=document.getElementById("s"+sid);sdiv.style.backgroundColor="#00005b";sdiv.style.color="#ffffff";document.getElementById("t"+sid).style.visibility="visible"}function ht(sid){var sdiv=document.getElementById("s"+sid);sdiv.style.backgroundColor="#ffffff";sdiv.style.color="#000000";document.getElementById("t"+sid).style.visibility="hidden"}function de(sid,tid){document.getElementById("e"+sid+"_"+tid).style.visibility="visible"}function he(sid,tid){document.getElementById("e"+sid+"_"+tid).style.visibility="hidden"}function SiteLocation(){try{var SiteLocation;var SiteLocationLength;var NewSiteLocation;var SubNewSiteLocation;SiteLocation=document.location.href;SiteLocationLength=SiteLocation.length;NewSiteLocation=SiteLocation.substring(7,SiteLocationLength);SubNewSiteLocation="http://"+NewSiteLocation.substring(0,NewSiteLocation.indexOf("/"));return SubNewSiteLocation}catch(e){}}