var servertime; /* if (typeof(Number)!='undefined'&&typeof(Number.prototype)!='undefined'){ Number.prototype.toFixed = function(d) { var n = this; d = d || 0; var f = Math.pow(10, d); n = Math.round(n * f) / f; n += Math.pow(10, - (d + 1)); n += ''; return d == 0 ? n.substring(0, n.indexOf('.')) : n.substring(0, n.indexOf('.') + d + 1); }; } */ if (typeof(String)!='undefined'&&typeof(String.prototype)!='undefined'){ if (typeof(String.prototype.parseFloat)=='undefined'){ String.prototype.parseFloat = function() { var newVal = this; newVal = newVal.replace(/[^\d,.-]/g,''); var lastP = newVal.lastIndexOf("."); var lastK = newVal.lastIndexOf(","); if(lastP>lastK) { newVal = newVal.replace(/[,]/g,''); } else if (lastP 9) ? servertime.getMonth()+1 : "0" + (servertime.getMonth()+1)); var day ="" + ((servertime.getDate() > 9) ? servertime.getDate() : "0" + servertime.getDate()); var hour ="" + ((servertime.getHours() > 9) ? servertime.getHours() : "0" + servertime.getHours()); var minute ="" + ((servertime.getMinutes() > 9) ? servertime.getMinutes() : "0" + servertime.getMinutes()); var second ="" + ((servertime.getSeconds() > 9) ? servertime.getSeconds() : "0" + servertime.getSeconds()); if (document.getElementById('servertime')) //document.getElementById('servertime').innerHTML=day+'.'+month+'.'+year+' '+hour+':'+minute+':'+second; document.getElementById('servertime').innerHTML=formatDate(servertime, format); } var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat'); function LZ(x) {return(x<0||x>9?"":"0")+x} function formatDate(date,format) { format=format+""; var result=""; var i_format=0; var c=""; var token=""; var y=date.getYear()+""; var M=date.getMonth()+1; var d=date.getDate(); var E=date.getDay(); var H=date.getHours(); var m=date.getMinutes(); var s=date.getSeconds(); var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k; // Convert real date parts into formatted versions var value=new Object(); if (y.length < 4) {y=""+(y-0+1900);} value["y"]=""+y; value["yyyy"]=y; value["yy"]=y.substring(2,4); value["a"]=""+y; value["aaaa"]=y; value["aa"]=y.substring(2,4); value["M"]=M; value["MM"]=LZ(M); value["n"]=M; value["nn"]=LZ(M); value["MMM"]=MONTH_NAMES[M-1]; value["NNN"]=MONTH_NAMES[M+11]; value["d"]=d; value["dd"]=LZ(d); value["j"]=d; value["jj"]=LZ(d); value["E"]=DAY_NAMES[E+7]; value["EE"]=DAY_NAMES[E]; value["H"]=H; value["HH"]=LZ(H); if (H==0){value["h"]=12;} else if (H>12){value["h"]=H-12;} else {value["h"]=H;} value["hh"]=LZ(value["h"]); if (H>11){value["K"]=H-12;} else {value["K"]=H;} value["k"]=H+1; value["KK"]=LZ(value["K"]); value["kk"]=LZ(value["k"]); if (H > 11) { value["aa"]="PM"; } else { value["aa"]="AM"; } value["m"]=m; value["mm"]=LZ(m); value["s"]=s; value["ss"]=LZ(s); while (i_format < format.length) { c=format.charAt(i_format); token=""; while ((format.charAt(i_format)==c) && (i_format < format.length)) { token += format.charAt(i_format++); } if (value[token] != null) { result=result + value[token]; } else { result=result + token; } } return result; } function Url(url) { this.original = url; var regexp = /(https?:\/\/)?([^#?;\/]+)\/?([^?#;]*);?([^?#]*)[?]?([^#]*)#?(.*)/; regexp.exec(""+url); this.protokol = RegExp.$1; this.host = RegExp.$2; this.path = RegExp.$3; this.extra = RegExp.$4; this.query = RegExp.$5; this.anchor = RegExp.$6; this.keyValuePairs = new Array(); this.toString = function() { return this.protokol+this.host+ ((this.path.length!=0)?"/"+this.path:"")+ ((this.extra.length!=0)?";"+this.extra:"")+ ((this.query.length!=0)?"?"+this.query:"")+ ((this.anchor.length!=0)?"#"+this.anchor:""); } if(this.query) { var params = this.query.split("&"); for(var i=0; i < params.length; i++) { this.keyValuePairs[params[i].split("=")[0]] = params[i].split("=")[1]; } } this.getKeyValuePairs = function() { return this.keyValuePairs; } this.getParameter = function(s) { if(this.keyValuePairs[s]) return this.keyValuePairs[s]; else return false; } this.getParameters = function() { var a = new Array(); var i = 0; for(var param in this.keyValuePairs){ a[i++] = param; } return a; } this.setParameter = function(param,value) { this.keyValuePairs[param] = value; var a = ""; for(var param in this.keyValuePairs) a += param+"="+this.keyValuePairs[param]+"&"; this.query = a.substring(0,a.length-1); } this.removeParameter = function(param) { delete this.keyValuePairs[param]; var a = ""; for(var param in this.keyValuePairs) a += param+"="+this.keyValuePairs[param]+"&"; this.query = a.substring(0,a.length-1); } this.getLength = function() { return this.keyValuePairs.length; } this.toString = function() { return this.protokol+this.host+ ((this.path) ? "/" + this.path : "" ) + ((this.extra) ? ";" + this.extra : "" ) + ((this.query) ?"?" + this.query : "" ) + ((this.anchor) ?"#" + this.anchor : "" ) ; } } function checkLoggedin(loggedin, p) { if (p && p.Left && p.Left.loggedin && p.Left.loggedin!=loggedin) { p.Left.location.reload(); } if (p && p.Header && p.Header.loggedin && p.Header.loggedin!=loggedin) { p.Header.location.reload(); } if (p && p.Nav && p.Nav.loggedin && p.Nav.loggedin!=loggedin) { p.Nav.location.reload(); } } function setDisplay(id,display) { if(document.getElementById(id)) document.getElementById(id).style.display = ""+display; } function hide(id) { if(document.getElementById(id)) document.getElementById(id).style.visibility = "hidden"; } function unHide(id) { if(document.getElementById(id)) document.getElementById(id).style.visibility = "visible"; } function getValidOdds(odds, betType) { if (odds < 1.01) { return 1.01; } if (odds > 1000.00) { return 1000.00; } if (odds < 2.00) { return odds.toFixed(2); } else if (odds < 3.00) { if (betType == 'back') { return (0.02 * Math.ceil(100 * odds / 2)).toFixed(2); } else { return (0.02 * Math.floor(100 * odds / 2)).toFixed(2); } } else if (odds < 4.00) { if (betType == 'back') { return (0.05 * Math.ceil(100 * odds / 5)).toFixed(2); } else { return (0.05 * Math.floor(100 * odds / 5)).toFixed(2); } } else if (odds < 6.00) { if (betType == 'back') { return (0.1 * Math.ceil(100 * odds / 10)).toFixed(2); } else { return (0.1 * Math.floor(100 * odds / 10)).toFixed(2); } } else if (odds < 10.00) { if (betType == 'back') { return (0.2 * Math.ceil(100 * odds / 20)).toFixed(2); } else { return (0.2 * Math.floor(100 * odds / 20)).toFixed(2); } } else if (odds < 20.00) { if (betType == 'back') { return (0.5 * Math.ceil(100 * odds / 50)).toFixed(2); } else { return (0.5 * Math.floor(100 * odds / 50)).toFixed(2); } } else if (odds < 30.00) { if (betType == 'back') { return (1 * Math.ceil(100 * odds / 100)).toFixed(2); } else { return (1 * Math.floor(100 * odds / 100)).toFixed(2); } } else if (odds < 50.00) { if (betType == 'back') { return (2 * Math.ceil(100 * odds / 200)).toFixed(2); } else { return (2 * Math.floor(100 * odds / 200)).toFixed(2); } } else if (odds < 100.00) { if (betType == 'back') { return (5 * Math.ceil(100 * odds / 500)).toFixed(2); } else { return (5 * Math.floor(100 * odds / 500)).toFixed(2); } } else { if (betType == 'back') { return (10 * Math.ceil(100 * odds / 1000)).toFixed(2); } else { return (10 * Math.floor(100 * odds / 1000)).toFixed(2); } } } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function getCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function addButtonParam(submitButton) { if(document.all) { var newParam = document.createElement("INPUT"); newParam.value = submitButton.value; newParam.name = submitButton.name; newParam.type = 'hidden'; submitButton.form.appendChild(newParam); } } function addHiddenFormField(name, value, form) { var hiddenElement = document.createElement('input'); hiddenElement.setAttribute('type','hidden'); hiddenElement.setAttribute('name',name); hiddenElement.setAttribute('value',value); form.appendChild(hiddenElement); } function evalJson(data) { if (!data || data.length == 0) { return ""; } try { return eval("("+data.substring(data.indexOf("\/\*")+2, data.lastIndexOf("\*\/"))+")"); } catch(e) {} return ""; }