if(typeof GP=="undefined"||!GP){var GP={}}Array.prototype.max=function(){return Math.max.apply(Math,this)};Array.prototype.min=function(){return Math.min.apply(Math,this)};GP.$=function(f){try{return YAHOO.util.Dom.get(f)}catch(e){}var d=function(h){if(h&&(h.nodeType||h.item)){return h}if((typeof h==="string")||!h){return document.getElementById(h)}if(h.length!==undefined){var c=[];for(var a=0,b=h.length;a<b;++a){c[c.length]=d(h[a])}return c}};return d(f)};if(!(GP.log)){GP.log=function(b){}}var isOpera=navigator.userAgent.indexOf("Opera")>=0||typeof window.opera!="undefined";
var isMSIE=!isOpera&&navigator.userAgent.indexOf("MSIE")!=-1&&navigator.appName=="Microsoft Internet Explorer";function fixLayout(){if(isOpera){var b=document.getElementById("betslip_div");if(b){b.style.marginBottom="0px"}}}function roll(k,h){var g=document.getElementById(k);var i=h.getElementsByTagName("img")[0];var j,l=k+"_enabled_state";if(g.className=="display"){g.className="hide";i.src="/s/img/i_roll_down.gif";j=0}else{g.className="display";i.src="/s/img/i_roll.gif";j=1}setCookie(l,j,"/",10)
}function setCookie(i,h,f,j){if(h===null){deleteCookie(i,f,j)}else{var g=new Date();g.setDate(g.getDate()+j);document.cookie=i+"="+escape(h)+((f)?"; path="+f:"")+((j==null)?"":";expires="+g)}}function getCookie(d){if(document.cookie&&document.cookie.length>0){var c=document.cookie.indexOf(d+"=");if(c!=-1){c=c+d.length+1;c_end=document.cookie.indexOf(";",c);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c,c_end))}}return null}function deleteCookie(d,e,f){if(getCookie(d)!==null){document.cookie=d+"="+((e)?"; path="+e:"")+((f)?"; domain="+f:"")+"; expires=Thu, 01 Jan 1970 00:00:01 GMT"
}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(f){var d=this.length;var e=Number(arguments[1])||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=d}for(;e<d;e++){if(e in this&&this[e]===f){return e}}return -1}}if(!Array.push){Array.prototype.push=function(b){this[this.length]=b}}function pluralForm(h,j,f,g){if(!f){f=j}if(!g){g=j}if(Math.round(h)!=h){return f}h=Math.abs(h)%100;if(h>10&&h<20){return g}var i=h%10;if(i>1&&i<5){return f}if(i==1){return j}return g}function createStyleElement(){var b=document.createElement("style");
b.setAttribute("type","text/css");return b}function appendStyleElement(b){document.getElementsByTagName("head")[0].appendChild(b)}function createAppendStyleElement(c){var d=createStyleElement();appendStyleElement(d);if(c){c(d)}fixIEBug();return d}function addStyleSelector(g,j,l){if(document.styleSheets&&document.styleSheets.length&&document.styleSheets[0].addRule){var k=document.styleSheets[document.styleSheets.length-1];if(k.addRule){j=j.split(",");var h=j.length;while(h--){k.addRule(j[h],l)}}}else{var i=document.createTextNode(j+" {"+l+"}");
g.appendChild(i)}}function removeStyleElement(b){document.getElementsByTagName("head")[0].removeChild(b);fixIEBug()}function fixIEBug(){var b=document.getElementsByTagName("body")[0];b.style.position="relative";b.style.position="static"}var trim=function(b){return b.replace(/(^\s+)|(\s+$)/g,"")};String.prototype.trim=function(){return this.replace(/(^\s+)|(\s+$)/g,"")};var addCellSpacing=function(){var i=YAHOO.util.Dom;var k="simple";var l=document.getElementsByTagName("TABLE");for(var g=0,h=l.length;
g<h;g++){var j=l[g];if(i.hasClass(j,k)){j.cellSpacing="1"}}};var changeStatLink=function(a){var e=/\/r\/s\/((stage|game)[0-9]+)\/$/;var f=a.href.match(e);if(f&&f[1]){a.href=["http://stat.golpas.com/stat/#url=",f[1],"/"].join("")}};var initChangeStatLink=function(d){try{if(GP&&!GP.mobile){var f=YAHOO.util.Event;if(d){f.addListener(d,"click",function(b){var a=0;for(var c=f.getTarget(b);c;c=c.parentNode){if(c.nodeName=="A"){changeStatLink(c);break}if(a>3){break}a++}})}}}catch(e){GP.log(e)}};if(!Array.prototype.map){Array.prototype.map=function(h){var i=this.length>>>0;
if(typeof h!="function"){throw new TypeError()}var j=new Array(i);var f=arguments[1];for(var g=0;g<i;g++){if(g in this){j[g]=h.call(f,this[g],g,this)}}return j}}Date.MONTHNAMES2=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"];Date.MONTHNAMES=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];Date.prototype.getFullMonth=function(){return Date.MONTHNAMES[this.getMonth()]};Date.prototype.getLocalDateFormat=function(b){return this.getDate()+" "+Date.MONTHNAMES2[this.getMonth()]+(b?" "+this.getFullYear():"")
};Date.prototype.getLocalDateTimeFormat=function(l,g,i){var j=this.getHours();var k=this.getMinutes();var h=this.getSeconds();return this.getLocalDateFormat(l)+" "+this.getMinTimeFormat(i)+((g)?(i?'<span class="points">:</span>':":")+withZero(h):"")};Date.prototype.getLineDateTimeFormat=function(b){return this.getDate()+"."+withZero(this.getMonth()+1)+" "+this.getMinTimeFormat(b)};Date.prototype.getMinTimeFormat=function(b){return withZero(this.getHours())+(b?'<span class="points">:</span>':":")+withZero(this.getMinutes())
};function withZero(d,e){if(!e){return(d<10?"0":"")+d}d=d.toString();for(var f=d.length;f<e;f++){d="0"+d}return d};
if(typeof GP=="undefined"){var GP={}}if(typeof GP.util=="undefined"){GP.util={}}if(!GP.util.Event){GP.util.Event=(function(){var a={};var f=function(i,g,h){if(!a[i]){a[i]=[]}a[i][a[i].length]={func:g,one_time:h}};var d=function(g,h){if(!h){delete a[g]}else{var i=a[g].length;while(i--){if(a[g][i].func===h){e(g,i);break}}}};var e=function(h,g){a[h].splice(g,1)};var c=function(h,i){if(i&&i.length){var g=i.length;while(g--){e(h,i[g])}}};var b=function(g,h){if(a[g]){var i=[];var j=a[g].length;while(j--){a[g][j].func(h);
if(a[g][j].one_time){i[i.length]=j}}c(g,i)}};return{addListener:f,removeListener:d,fire:b}})()};
if(typeof GP=="undefined"){var GP={}}if(typeof GP.util=="undefined"){GP.util={}}if(!GP.util.Date){GP.util.Date=function(){var g=null;var c=null;var f=null;var b=function(){if(!f){f=-(new Date().getTimezoneOffset()*60)}return f};var d=null;var h=function(){return d!=null?d:0};var i=GP.util.Event;var k=10;var e=null;var a=function(l){d=Math.round(new Date().getTime()/1000)-l;setCookie("correction",d,"/")};var j=function(){d=getCookie("correction");if(typeof d=="undefined"||d==null){YUI().use("io-base",function(n){var m=new Date().getTime()/1000;
var l={on:{success:function(s,r){var q=new Date().getTime()/1000-m;try{var o=parseInt(r.responseText);o=o+Math.round(q*2/3);a(o)}catch(p){}}}};n.io("/tz/time/?"+new Date().getTime(),l)})}};return{list:function(){return g},init:function(l,m){if(!l||!m){throw {code:-1,message:"Wrong parameter"}}g=l;var n=getCookie("TZ");c=n&&g[n]?n:m;j();this.startCurrentTimeTimer()},getOffset:function(m,l){if(g[m]){return g[m]["changeTime"]&&g[m]["changeTime"]<=l?g[m]["nextOffset"]:g[m]["offset"]}throw {code:-1,message:"Unknown TimeZone"}
},toTimeZone:function(m,n){var l=m+this.getOffset(n,m)-b();return new Date(l*1000)},toClient:function(l){return this.toTimeZone(l,c)},getCurrentGMTTime:function(){return new Date().getTime()/1000-h()},startCurrentTimeTimer:function(){var l=this;var m=function(){var o=l.getCurrentGMTTime();if(o){var n=parseInt(o/60);if(!e||n!=e){i.fire("onCurrentTime",o);e=n}}setTimeout(m,k*1000)};setTimeout(m,k*1000)},getClientTimeZone:function(){return c}}}()};