
function addEvent(element,type,handler){if(!handler.$$guid)handler.$$guid=addEvent.guid++;if(!element.events)element.events={};var handlers=element.events[type];if(!handlers){handlers=element.events[type]={};if(element["on"+type]){handlers[0]=element["on"+type]}}handlers[handler.$$guid]=handler;element["on"+type]=handleEvent};addEvent.guid=1;function removeEvent(element,type,handler){if(element.events&&element.events[type]){delete element.events[type][handler.$$guid]}};function handleEvent(event){var returnValue=true;event=event||fixEvent(window.event);var handlers=this.events[event.type];for(var i in handlers){this.$$handleEvent=handlers[i];if(this.$$handleEvent(event)===false){returnValue=false}}return returnValue};function fixEvent(event){event.preventDefault=fixEvent.preventDefault;event.stopPropagation=fixEvent.stopPropagation;return event};fixEvent.preventDefault=function(){this.returnValue=false};fixEvent.stopPropagation=function(){this.cancelBubble=true};
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	allows instant window.onload function execution
	(c) Dean Edwards/Matthias Miller/John Resig/Rob Chenny
	http://www.cherny.com/demos/onload/domloaded.js
	
	Calling:

	DomLoaded.load(FUNCTION_NAME);

	or

	DomLoaded.load( function() {
		...
	});
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

var DomLoaded = {
	onload: [],
	loaded: function() {
		if (arguments.callee.done) return;
		arguments.callee.done = true;
		for (var i=0; i<DomLoaded.onload.length; i++) DomLoaded.onload[i]();
	},
	load: function(fireThis) {
		this.onload.push(fireThis);
		if (document.addEventListener) 
			document.addEventListener("DOMContentLoaded", DomLoaded.loaded, null);
		if (/KHTML|WebKit/i.test(navigator.userAgent)) { 
			var _timer = setInterval(function() {
				if (/loaded|complete/.test(document.readyState)) {
					clearInterval(_timer);
					delete _timer;
					DomLoaded.loaded();
				}
			}, 10);
		}
		/*@cc_on @*/
		/*@if (@_win32)
		var proto = "src='javascript:void(0)'";
		if (location.protocol == "https:") proto = "src=//0";
		document.write("<scr"+"ipt id=__ie_onload defer " + proto + "><\/scr"+"ipt>");
		var script = document.getElementById("__ie_onload");
		script.onreadystatechange = function() {
		    if (this.readyState == "complete") {
		        DomLoaded.loaded();
		    }
		};
		/*@end @*/
	   window.onload = DomLoaded.loaded;
	}
};

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){}}
function xGetElementsByClassName(clsName,parentEle,tagName,fn){var found=new Array();var re=new RegExp('\\b'+clsName+'\\b','i');var list=xGetElementsByTagName(tagName,parentEle);for(var i=0;i<list.length;++i){if(list[i].className.search(re)!=-1){found[found.length]=list[i];if(fn)fn(list[i])}}return found}function xGetElementsByTagName(tagName,parentEle){var list=null;tagName=tagName||'*';parentEle=parentEle||document;if(document.all&&!window.opera){if(tagName=='*')list=parentEle.all;else list=parentEle.all.tags(tagName)}else if(parentEle.getElementsByTagName)list=parentEle.getElementsByTagName(tagName);return list||new Array()}function browserCheck(){var browserName="";var browserVer=0;if((navigator.appName.toLowerCase().indexOf("microsoft")!=-1)&&(navigator.userAgent.toLowerCase().indexOf("opera")==-1)){browserName="ie";browserVer=parseFloat(navigator.appVersion.substring(navigator.appVersion.toLowerCase().indexOf("msie")+4))}if((navigator.appName.toLowerCase().indexOf("netscape")!=-1)&&(navigator.userAgent.toLowerCase().indexOf("netscape")!=-1)){browserName="netscape";browserVer=parseFloat(navigator.userAgent.substring(navigator.userAgent.toLowerCase().indexOf("netscape/")+9))}if((navigator.appName.toLowerCase().indexOf("netscape")!=-1)&&(navigator.userAgent.toLowerCase().indexOf("netscape")==-1)&&(navigator.userAgent.toLowerCase().indexOf("firefox")==-1)){browserName="mozilla";browserVer=parseFloat(navigator.userAgent.substring(navigator.userAgent.toLowerCase().indexOf("rv:")+3))}if((navigator.appName.toLowerCase().indexOf("netscape")!=-1)&&(navigator.userAgent.toLowerCase().indexOf("firefox")!=-1)){browserName="firefox";browserVer=parseFloat(navigator.userAgent.substring(navigator.userAgent.toLowerCase().indexOf("firefox/")+8))}var flashPlugin=navigator.plugins['Shockwave Flash'];var flashEnabled=true;if(typeof flashPlugin=='object'){try{var flashVer=parseInt(flashPlugin.description.substring(flashPlugin.description.indexOf(".")-1))}catch(e){flashEnabled=false}}var activeXEnabled=true;if(browserName=="ie"){for(var flashVer=4;flashVer<=8;flashVer++)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+flashVer)}catch(e){if(flashVer==4){activeXEnabled=false;flashEnabled=false}break}}var win=(navigator.platform.toLowerCase().indexOf("win")!=-1);var mac=(navigator.platform.toLowerCase().indexOf("mac")!=-1);var lin=(navigator.platform.toLowerCase().indexOf("linux")!=-1);var errorMsg="";if(browserName==""){errorMsg+"Your browser may not be supported. \n"}else{if(mac&&((browserName=="netscape"&&browserVer<6.2)||browserName!="netscape"))ErrorMsg=errorMsg+"Please use Netscape 6.2 or higher.\n";if(win&&browserName=="ie"&&browserVer<5)ErrorMsg=errorMsg+"Please use Internet Explorer 5 or higher. \n"}if(!flashEnabled||(flashVer<7)){errorMsg=errorMsg+"Flashplayer 6 or higher is required for Casino Games. \n"}if(!activeXEnabled)errorMsg=errorMsg+"Please enable ActiveX Controls. \n";if(errorMsg!="")alert(errorMsg);else{return true}}
var InternetExplorer=navigator.appName.indexOf("Microsoft")!=-1;function domainconnect_send(msg){var flash;if((window.ActiveXObject)&&(navigator.userAgent.indexOf("MSIE")!=-1)&&(navigator.userAgent.indexOf("Windows")!=-1)){flash=document.getElementById("hiddenConn")}else{flash=document.hiddenConn}flash.SetVariable("sendname",sDomainFlashID);flash.SetVariable("msg",msg);flash.TCallFrame("/",2)}function hiddenConn_DoFSCommand(command,args){if(command=="domainConnect"){var aArgs=args.split('|');if(aArgs.length>1){if(aArgs[0]=='refresh')document.location.href=aArgs[1]}else{launchGame(args)}}else if(command=="getURL"){var temp=new Array();temp=args.split('<separator>');var winwidth=0;var winheight=0;var wtimeout=0;var screenheight=screen.height;var screenwidth=screen.width;temp[1]=temp[1]?temp[1]:'ThisIsATestWindow';windowsi++;if(temp[3]){var size=temp[3].split('X');if(size[0]&&size[1]){winwidth=size[0];winheight=size[1]}}if(temp[2]){wtimeout=parseInt(temp[2])*1000}for(var i in windows){if(i==temp[1]&&temp[1]!='cashier'){windows[i].close();break}}if(temp[1]=='cashier'&&windows['cashier']&&!windows['cashier'].closed){windows['cashier'].focus()}else{var win=new Object();win['content']='<div id="HTMLLayoutFormPlace" style="display: none">'+temp[0]+'</div>';win['focus']=true;win['name']=temp[1];win['winwidth']=winwidth?winwidth:800;win['winheight']=winheight?winheight:600;newwin=newWindowObject(win);postParams(newwin)}}else if(command=="close"){self.close()}else if(command=="closeWindows"){closeWindows()}}if(navigator.appName&&navigator.appName.indexOf("Microsoft")!=-1&&navigator.userAgent.indexOf("Windows")!=-1&&navigator.userAgent.indexOf("Windows 3.1")==-1){document.write('<script  language=\"VBScript\"\>\n');document.write('Sub hiddenConn_FSCommand(ByVal command, ByVal args)\n');document.write('Call hiddenConn_DoFSCommand(command, args)\n');document.write('End Sub\n');document.write('</script\>\n')}var bFlashConnected=false;function Casino_DoFSCommand(command,args){var CasinoObj=InternetExplorer?Casino:document.Casino;if(command=="alert"){alert(args)}else if(command=="opensat"){if(window.frames["betfredsat"]&&!window.frames["betfredsat"].closed&&window.frames["betfredsat"].location.href.indexOf("offline")>0)betfredsat=window.open(sFullPathForGames+"sections/common/flashgame.asp","betfredsat","width=800,height=600,toolbar=no,menubar=no,scrollbars=no,resizable=no,top="+((screen.height/2)-(300))+",left="+((screen.width/2)-(400)));if(window.frames["betfredsat"]&&!window.frames["betfredsat"].closed){window.frames["betfredsat"].focus()}else{betfredsat=window.open(sFullPathForGames+"sections/common/flashgame.asp?game="+CasinoObj.GetVariable("newgame"),"betfredsat","width=800,height=600,toolbar=no,menubar=no,scrollbars=no,resizable=no,top="+((screen.height/2)-(300))+",left="+((screen.width/2)-(400)));betfredsat.focus()}}else if(command=="refreshsat"){if(window.frames["betfredsat"]&&!window.frames["betfredsat"].closed)window.frames["betfredsat"].location.reload()}else if(command=="closesat"){if(window.frames["betfredsat"]&&!window.frames["betfredsat"].closed)window.frames["betfredsat"].close()}else if(command=="gotoCashier"){parent.frames['mainFrame'].location=sAccDomainUrl;parent.frames['mainFrame'].focus()}else if(command=="writeCookie"){howlong=new Date();howlong.setTime(howlong.getTime()+100000000000);document.cookie=args+';expires='+howlong.toGMTString()}else if(command=="connection"){if(args==2){bFlashConnected=true}}else if(command=="getURL"){var temp=new Array();temp=args.split('<separator>');var winwidth=0;var winheight=0;var wtimeout=0;var screenheight=screen.height;var screenwidth=screen.width;temp[1]=temp[1]?temp[1]:'ThisIsATestWindow';windowsi++;if(temp[3]){var size=temp[3].split('X');if(size[0]&&size[1]){winwidth=size[0];winheight=size[1]}}if(temp[2]){wtimeout=parseInt(temp[2])*1000}for(var i in windows){if(i==temp[1]&&temp[1]!='cashier'){windows[i].close();break}}if(temp[1]=='cashier'&&windows['cashier']&&!windows['cashier'].closed){windows['cashier'].focus()}else{var win=new Object();win['content']='<div id="HTMLLayoutFormPlace" style="display: none">'+temp[0]+'</div>';win['focus']=true;win['name']=temp[1];win['winwidth']=winwidth?winwidth:800;win['winheight']=winheight?winheight:600;newwin=newWindowObject(win);postParams(newwin)}}else if(command=="close"){self.close()}else if(command=="closeWindows"){closeWindows()}}function postParams(form){var elForm=form.document.getElementById('SubmitCashierData');if(elForm==null){return false}else{elForm.submit();return true}}function newWindowObject(p){p.resizable=p.resizable?'yes':'no';p.top=p.top?p.top:'';p.left=p.left?p.left:'';p.url=p.url?p.url:'';p.winwidth=p.winwidth?p.winwidth:800;p.winheight=p.winheight?p.winheight:600;var win=window.open(p.url,p.name,"width="+p.winwidth+",height="+p.winheight+",toolbar=no,menubar=no,scrollbars=yes,resizable="+p.resizable+",top="+p.top+",left="+p.left);windows[p.name]=win;if(p.content.length>0&&p.url==''){win.document.open();win.document.write(p.content);win.document.close()}if(p.setoncontextmenu){win.document.getElementsByTagName('body')[0].oncontextmenu=function(){return false}}if(p.winclosetimeout>0){win.setTimeout(function(){win.close()},p.winclosetimeout)}if(p.winfocus){win.focus()}return win}function closeWindows(){for(var i in windows){if(windows[i]){windows[i].close()}}}function playRealOffline(arg){var flash;if((window.ActiveXObject)&&(navigator.userAgent.indexOf("MSIE")!=-1)&&(navigator.userAgent.indexOf("Windows")!=-1)){flash=document.getElementById("Casino")}else{flash=document.Casino}try{flash.SetVariable("newgame",arg);flash.TGotoLabel("clip","openFrame");flash.TPlay("clip");betfredsat=window.open(SiteLocation()+CommonServerUrl+"/satgame.aspx?gameMode=fun","betfredsat","width=800,height=600,toolbar=no,menubar=no,scrollbars=no,resizable=yes,top="+((screen.height/2)-(300))+",left="+((screen.width/2)-(400)));betfredsat.focus()}catch(e){alert(sPleaseEnableFlash)}}function playRealFun(arg){alert(sPleaseLogin);document.cookie="gamename="+escape(arg)+";";window.frames["betfredsat"].close()}if(navigator.appName&&navigator.appName.indexOf("Microsoft")!=-1&&navigator.userAgent.indexOf("Windows")!=-1&&navigator.userAgent.indexOf("Windows 3.1")==-1){document.write('<SCRIPT LANGUAGE=VBScript\> \n');document.write('on error resume next \n');document.write('Sub Casino_FSCommand(ByVal command, ByVal args)\n');document.write('  call Casino_DoFSCommand(command, args)\n');document.write('end sub\n');document.write('</SCRIPT\> \n')}function isGameOpen(){if(window.frames["betfredsat"]==null)return false;if(!window.frames["betfredsat"].closed)return true;else return false}function confirmClose(){if(isGameOpen()){var res=confirm(sCasinoWindowToClose);if(!res)return false;if(window.frames["betfredsat"]!=null){launchGame('logoutgame');window.frames["betfredsat"].close()}return void(0)}launchGame('logoutgame');return void(0)}function launchGame(game){if(sCryptedUserData==''){betfredsat=window.open(sFullPathForGames+"sections/common/offlineflashgame.asp?game="+game,"betfredsat","width=800,height=600,toolbar=no,menubar=no,scrollbars=no,resizable=no,top="+((screen.height/2)-(300))+",left="+((screen.width/2)-(400)));betfredsat.focus();return}var flash;flash=document.getElementById("Casino");if(flash){launchGameDirectly(game)}else{document.location.href=document.location.href+'?'+'game='+game;return}}var nSecsToWait=20;var nSecsWaiting=0;function launchGameDirectly(game){if(flashinstalled==1){alert(sPleaseEnableFlash);return}if(!bFlashConnected){if(nSecsWaiting==nSecsToWait){return}nSecsWaiting++;setTimeout('launchGameDirectly("'+game+'")',1000);return}nSecsWaiting=0;var flash;if((window.ActiveXObject)&&(navigator.userAgent.indexOf("MSIE")!=-1)&&(navigator.userAgent.indexOf("Windows")!=-1)){flash=document.getElementById("Casino")}else{flash=document.Casino}try{flash.SetVariable("newgame",game);flash.SetVariable("user_id",sCryptedUserData);flash.TGotoLabel("clip","openFrame");flash.TPlay("clip")}catch(e){alert('Error running the game')}}var flashinstalled=0;var flashversion=0;MSDetect="false";if(navigator.plugins&&navigator.plugins.length){x=navigator.plugins["Shockwave Flash"];if(x){flashinstalled=2;if(x.description){y=x.description;flashversion=y.charAt(y.indexOf('.')-1)}}else flashinstalled=1;if(navigator.plugins["Shockwave Flash 2.0"]){flashinstalled=2;flashversion=2}}else if(navigator.mimeTypes&&navigator.mimeTypes.length){x=navigator.mimeTypes['application/x-shockwave-flash'];if(x&&x.enabledPlugin)flashinstalled=2;else flashinstalled=1}else MSDetect="true";
function FormHelp_Setup(){if(!document.all||window.opera)return;xGetElementsByClassName("formhelp",document.getElementById("cmain"),"a",function(oA){oA.onmouseenter=function(){if(!(x=this.getElementsByTagName('span')[0]))return;x.style.visibility='visible'};oA.onmouseleave=function(){if(!(x=this.getElementsByTagName('span')[0]))return;x.style.visibility='hidden'}})}DomLoaded.load(FormHelp_Setup);function LogoutConfirm(){if(confirm(FS_I18N("Are you sure you want to logout?")))return true;else return false}function ToggleRPTmpl(oH4){var oDiv=oH4.parentNode;if(oDiv.className.indexOf("fctcoff")==-1){oDiv.className=oDiv.className.replace("fctcon","fctcoff")}else{oDiv.className=oDiv.className.replace("fctcoff","fctcon")}}
function SG_ShowWin(sUrl,sName,xWidth,xHeight){if(!xWidth)xWidth=600;if(!xHeight)xHeight=400;SG_ShowWnd(sUrl,sName,xWidth,xHeight,1)}function FS_AArrayLength(aTmp){var nRet=0;for(var i in aTmp)nRet++;return nRet}function SG_SetupWnd(){var aTmp=xGetElementsByClassName("Wnd",document,"a");for(var i=0;i<aTmp.length;i++){aTmp[i].popupcnt=i;aTmp[i].onclick=function(){var sHref=this.href.replace("&amp;","&");aClasses=this.className.split(" ");if(aClasses.length==1){window.open(sHref)}else{var nW=0,nH=0;var nRW=1,nRH=1;var bHasScrollbars=0,bIsR2W=0;var sName="";for(var j=0;j<aClasses.length;j++){if(aClasses[j].substring(0,2)=="nW")nW=parseInt(aClasses[j].substring(2),10);else if(aClasses[j].substring(0,2)=="nH")nH=parseInt(aClasses[j].substring(2),10);else if(aClasses[j].substring(0,3)=="nRW")nRW=parseFloat(aClasses[j].substring(3));else if(aClasses[j].substring(0,3)=="nRH")nRH=parseFloat(aClasses[j].substring(3));else if(aClasses[j].substring(0,4)=="bR2W"){bIsR2W=parseInt(aClasses[j].substring(4));if(isNaN(bIsR2W))bIsR2W=0}else if(aClasses[j].substring(0,2)=="sN")sName=aClasses[j].substring(2);else if(aClasses[j].substring(0,2)=="bS"){bHasScrollbars=parseInt(aClasses[j].substring(2));if(isNaN(bHasScrollbars))bHasScrollbars=0}}if(sName="")sName="FSpopwnd"+this.popupcnt;if(sHref.indexOf("?")==-1)sHref+="?";else sHref+="&";sHref+="p=1";SG_ShowWnd(sHref,sName,nW,nH,bHasScrollbars,nRW,nRH,bIsR2W)}return false}}}DomLoaded.load(SG_SetupWnd);function SG_ShowWnd(sUrl,sName,xWidth,xHeight,bHasScrollbars,xRatioW,xRatioH,bIsR2W){var xMax=770,yMax=600;if(screen){var xMax=screen.width,yMax=screen.height}if(!xWidth){if(xRatioW)xWidth=xMax*xRatioW;xWidth=Math.round(xWidth)}if(bHasScrollbars)xWidth+=22;if(xWidth>xMax)xWidth=xMax;if(!xHeight){if(xRatioH)xHeight=((bIsR2W)?xWidth*xRatioH:yMax*xRatioH);xHeight=Math.round(xHeight)}var xOffset=(xMax-xWidth)/2;var yOffset=(yMax-xHeight)/2;if(xOffset<1)xOffset=0;if(yOffset<1)yOffset=0;winUpdate=window.open(sUrl,sName,"width="+xWidth.toString()+",height="+xHeight.toString()+",screenX="+xOffset+",screenY="+yOffset+",top="+yOffset+",left="+xOffset+",status=no,resizable=yes"+(bHasScrollbars?",scrollbars=yes":""));if(winUpdate.opener==null)winUpdate.opener=self;winUpdate.focus();return winUpdate}var aFS_I18N=new Array();function FS_I18N(sPhrase){var sKey=sPhrase.replace('"','\"');var sValue=aFS_I18N[sKey];if(sValue==null||sValue=='')sValue=sPhrase;return sValue}
if(navigator.appName&&navigator.appName.indexOf("Microsoft")!=-1&&navigator.userAgent.indexOf("Windows")!=-1&&navigator.userAgent.indexOf("Windows 3.1")==-1){document.write('<script  language=\"VBScript\"\>\n');document.write('Sub maindomainconn_FSCommand(ByVal command, ByVal args)\n');document.write('Call maindomainconn_DoFSCommand(command, args)\n');document.write('End Sub\n');document.write('</script\>\n')}function lG(game){launchGame(game);return false}function launchGame(game){var el=parent.frames['topFrame'];if(el!=null)el.launchGame(game);return void(0)}function refreshHiddenFrame(URL){if(parent)if(parent.frames['topFrame'])parent.frames['topFrame'].location.href=URL}function sendMessageToHiddenFrame(sMessage){var flash;if((window.ActiveXObject)&&(navigator.userAgent.indexOf("MSIE")!=-1)&&(navigator.userAgent.indexOf("Windows")!=-1)){flash=document.getElementById("maindomainconn")}else{flash=document.maindomainconn}flash.SetVariable("sendname",sDomainFlashID);flash.SetVariable("msg",sMessage);flash.TCallFrame("/",2)}var windows={};function maindomainconn_DoFSCommand(command,args){if(command=="domainConnect"&&args=="gotoCashier"){if(sAccDomainUrl)window.location=sAccDomainUrl;else window.location='/account/deposit.asp';window.focus()}else if(command=="getURL"){var temp=new Array();temp=args.split('<separator>');var winwidth=0;var winheight=0;var wtimeout=0;var screenheight=screen.height;var screenwidth=screen.width;temp[1]=temp[1]?temp[1]:'ThisIsATestWindow';if(temp[3]){var size=temp[3].split('X');if(size[0]&&size[1]){winwidth=size[0];winheight=size[1]}}if(temp[2]){wtimeout=parseInt(temp[2])*1000}for(var i in windows){if(i==temp[1]&&temp[1]!='cashier'){windows[i].close();break}}if(temp[1]=='cashier'&&windows['cashier']&&!windows['cashier'].closed){windows['cashier'].focus()}else{var win=new Object();win['content']='<div id="HTMLLayoutFormPlace" style="display: none">'+temp[0]+'</div>';win['focus']=true;win['name']=temp[1];win['winwidth']=winwidth?winwidth:800;win['winheight']=winheight?winheight:600;newwin=newWindowObject(win);postParams(newwin)}}else if(command=="close"){self.close()}else if(command=="closeWindows"){closeWindows()}}function postParams(form){var elForm=form.document.getElementById('SubmitCashierData');if(elForm==null){return false}else{elForm.submit();return true}}function newWindowObject(p){p.resizable=p.resizable?'yes':'no';p.top=p.top?p.top:'';p.left=p.left?p.left:'';p.url=p.url?p.url:'';p.winwidth=p.winwidth?p.winwidth:800;p.winheight=p.winheight?p.winheight:600;var win=window.open(p.url,p.name,"width="+p.winwidth+",height="+p.winheight+",toolbar=no,menubar=no,scrollbars=yes,resizable="+p.resizable+",top="+p.top+",left="+p.left);windows[p.name]=win;if(p.content.length>0&&p.url==''){win.document.open();win.document.write(p.content);win.document.close()}if(p.setoncontextmenu){win.document.getElementsByTagName('body')[0].oncontextmenu=function(){return false}}if(p.winclosetimeout>0){win.setTimeout(function(){win.close()},p.winclosetimeout)}if(p.winfocus){win.focus()}return win}function closeWindows(){for(var i in windows){if(windows[i]){windows[i].close()}}}function launchClient(){if(navigator.appName.indexOf("Microsoft")==-1)return;if(CClientLaunched){var obj=document.getElementById('BFCLauncher');obj.RunCasino()}else{alert("Please wait until casino is ready.")}return void(0)}

