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(b){try{return YAHOO.util.Dom.get(b)}catch(c){}var a=function(f){if(f&&(f.nodeType||f.item)){return f}if((typeof f==="string")||!f){return document.getElementById(f)}if(f.length!==undefined){var g=[];for(var e=0,d=f.length;e<d;++e){g[g.length]=a(f[e])}return g}};return a(b)};if(!(GP.log)){GP.log=function(a){}}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 a=document.getElementById("betslip_div");if(a){a.style.marginBottom="0px"}}}function roll(f,c){var d=document.getElementById(f);var b=c.getElementsByTagName("img")[0];var a,e=f+"_enabled_state";if(d.className=="display"){d.className="hide";b.src="/s/img/i_roll_down.gif";a=0}else{d.className="display";b.src="/s/img/i_roll.gif";a=1}setCookie(e,a,"/",10)
}function setCookie(a,b,d,e){if(b===null){deleteCookie(a,d,e)}else{var c=new Date();c.setDate(c.getDate()+e);document.cookie=a+"="+escape(b)+((d)?"; path="+d:"")+((e==null)?"":";expires="+c)}}function getCookie(a){if(document.cookie&&document.cookie.length>0){var b=document.cookie.indexOf(a+"=");if(b!=-1){b=b+a.length+1;c_end=document.cookie.indexOf(";",b);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(b,c_end))}}return null}function deleteCookie(a,c,b){if(getCookie(a)!==null){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01 Jan 1970 00:00:01 GMT"
}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(b){var a=this.length;var c=Number(arguments[1])||0;c=(c<0)?Math.ceil(c):Math.floor(c);if(c<0){c+=a}for(;c<a;c++){if(c in this&&this[c]===b){return c}}return -1}}if(!Array.prototype.push){Array.prototype.push=function(a){this[this.length]=a}}function pluralForm(b,e,d,c){if(!d){d=e}if(!c){c=e}if(Math.round(b)!=b){return d}b=Math.abs(b)%100;if(b>10&&b<20){return c}var a=b%10;if(a>1&&a<5){return d}if(a==1){return e}return c}function createStyleElement(){var a=document.createElement("style");
a.setAttribute("type","text/css");return a}function appendStyleElement(a){document.getElementsByTagName("head")[0].appendChild(a)}function createAppendStyleElement(b){var a=createStyleElement();appendStyleElement(a);if(b){b(a)}fixIEBug();return a}function addStyleSelector(d,a,e){if(document.styleSheets&&document.styleSheets.length&&document.styleSheets[0].addRule){var f=document.styleSheets[document.styleSheets.length-1];if(f.addRule){a=a.split(",");var c=a.length;while(c--){f.addRule(a[c],e)}}}else{var b=document.createTextNode(a+" {"+e+"}");
d.appendChild(b)}}function removeStyleElement(a){document.getElementsByTagName("head")[0].removeChild(a);fixIEBug()}function fixIEBug(){var a=document.getElementsByTagName("body")[0];a.style.position="relative";a.style.position="static"}var trim=function(a){return a.replace(/(^\s+)|(\s+$)/g,"")};String.prototype.trim=function(){return this.replace(/(^\s+)|(\s+$)/g,"")};var addCellSpacing=function(){var b=YAHOO.util.Dom;var f="simple";var e=document.getElementsByTagName("TABLE");for(var d=0,c=e.length;
d<c;d++){var a=e[d];if(b.hasClass(a,f)){a.cellSpacing="1"}}};var changeStatLink=function(b){var d=/\/r\/s\/((stage|game)[0-9]+)\/$/;var c=b.href.match(d);if(c&&c[1]){b.href=["http://stat.golpas.com/stat/#url=",c[1],"/"].join("")}};var initChangeStatLink=function(a){try{if(GP&&!GP.mobile){var b=YAHOO.util.Event;if(a){b.addListener(a,"click",function(g){var d=0;for(var f=b.getTarget(g);f;f=f.parentNode){if(f.nodeName=="A"){changeStatLink(f);break}if(d>3){break}d++}})}}}catch(c){GP.log(c)}};if(!Array.prototype.map){Array.prototype.map=function(b){var a=this.length>>>0;
if(typeof b!="function"){throw new TypeError()}var e=new Array(a);var d=arguments[1];for(var c=0;c<a;c++){if(c in this){e[c]=b.call(d,this[c],c,this)}}return e}}Date.MONTHNAMES2=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"];Date.MONTHNAMES=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];Date.prototype.getFullMonth=function(){return Date.MONTHNAMES[this.getMonth()]};Date.prototype.getLocalDateFormat=function(a){return this.getDate()+" "+Date.MONTHNAMES2[this.getMonth()]+(a?" "+this.getFullYear():"")
};Date.prototype.getLocalDateTimeFormat=function(e,d,b){var a=this.getHours();var f=this.getMinutes();var c=this.getSeconds();return this.getLocalDateFormat(e)+" "+this.getMinTimeFormat(b)+((d)?(b?'<span class="points">:</span>':":")+withZero(c):"")};Date.prototype.getLineDateTimeFormat=function(a){return this.getDate()+"."+withZero(this.getMonth()+1)+" "+this.getMinTimeFormat(a)};Date.prototype.getMinTimeFormat=function(a){return withZero(this.getHours())+(a?'<span class="points">:</span>':":")+withZero(this.getMinutes())
};function withZero(a,c){if(!c){return(a<10?"0":"")+a}a=a.toString();for(var b=a.length;b<c;b++){a="0"+a}return a};
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}}}()};
