function addParamToUrl(b,l,f){var m=(arguments.length>3)?arguments[3]:true;var n="&";if(m){n=urlEncodeToLower(n)}var p="?";if(m){p=urlEncodeToLower(p)}b=b.toLowerCase();var c=b.indexOf(p);var h=c>-1;c=(h)?c+p.length:b.length;var a=(h)?b.substr(0,c):b;var d=b.substr(c).split(n);b=a;l=(l+"=").toLowerCase();if(m){l=urlEncodeToLower(l)}if(h){var o=d.length;var g=l.length;for(var k=0;kc){b+=n}b+=e}}b+=n}else{b+=p}if(m){f=UrlEncode(UrlEncode(f))}return b+l+f}function AuthCookieExists(){return((typeof(COOKIE_AUTHENTICATION)!="undefined")&&(typeof(Get_Cookie)=="function"))?Get_Cookie(COOKIE_AUTHENTICATION)!=null:true}function canAccessTSR(){return true}function DialogWindow(a){this.Url=a;this.Name=null;this.Width=null;this.Height=null;this.Scroll=false;this.Status=false;this.Resizable=true;this.Toolbar=false;this.TryModal=false;this.WasModal=false;this.ReturnValue=null;this.RequiresLogin=true;this.CanShowModal=function(){return typeof(window.showModalDialog)=="object"};this.Show=function(){if(this.RequiresLogin){var e=false;if(typeof(_loggedIn)!="undefined"){e=_loggedIn}if(!e||!AuthCookieExists()){alert("This page requires login.");this.ReturnValue=null;this.WasModal=true;return}}if(this.TryModal&&this.CanShowModal()){var f=this.Height+40;this.ReturnValue=window.showModalDialog(this.Url,null,"dialogHeight: "+f+"px; dialogWidth: 590px; edge: Raised; center: Yes; help: No; resizable: "+YN(this.Resizable)+"; status: "+YN(this.Status)+"; scroll: "+YN(this.Scroll)+";");this.WasModal=true}else{var d=(screen.availWidth-10-this.Width)/2;var c=(screen.availHeight-20-this.Height)/2;var b=window.open(this.Url,this.Name==null?"":this.Name,"top="+c+"px, left="+d+"px, height="+this.Height+"px, width=590px, scrollbars="+YN(this.Scroll)+", resizable="+YN(this.Resizable)+", status="+YN(this.Status)+", toolbar="+YN(this.Toolbar)+", fullscreen=No, location=No, menubar=No")}}}function DisplayMessage(b){for(var a=arguments.length-1;a>0;--a){b=b.replace("{"+(a-1)+"}",arguments[a])}alert(b)}function getElementsByClass(g,e,a){var d=new Array();if(e==null){e=document}if(a==null){a="*"}var c=e.getElementsByTagName(a);var b=c.length;var f=new RegExp("(^|\\s)"+g+"(\\s|$)");for(i=0,j=0;i0){var c=e.className.split(" ");var a=-1;for(var d=0;d0?" ":"")+c[d]}}e.className=g}}}else{if(b){e.className=f}}}function stripCommas(b){var a=/,/g;return b.replace(a,"")}function toggleMultibet(c){var b=c.parentNode.parentNode.className;var a=getElementsByClass("mulitbet"+b);c.className=c.className=="toggleMultibet_closed"?"toggleMultibet_open":"toggleMultibet_closed";if(a!=null){for(i=0;i255){alert("Unicode Character '"+d+"' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted.");f+="+"}else{f+="%";f+=b.charAt((a>>4)&15);f+=b.charAt(a&15)}}}}return f}function urlEncodeToLower(a){return UrlEncode(a).toLowerCase()}function YN(a){return a?"yes":"no"};