fe.page={id:"home",sort:6,page:0,onLoad:function(){this.panel.onLoad();if(this.data&&this.data.top){this.onTop({name:"Game.SearchGames",arguments:["",l.id,6,0,5,global.userGroup]},this.data.top)}this.switchNews(this.latestNews&&((new Date()).valueOf()-this.latestNews.valueOf())/86400000<7);delete this.data},_send:function(){var A=this;geewa.server.ps.call(function(){A.onData.apply(A,arguments)},"Game.Search",{tag:"multiplayer"},l.id,this.sort,this.page,fe.search.SEARCH_COUNT,global.userGroup)},sortBy:function(A){this.sort=A;this.page=0;this._send()},getPage:function(A){this.page=A;this._send()},onData:function(C,E){var G=[];var D=E.result.count;var A=l.tag("multiplayer");var B=A.substring(0,1).toUpperCase()+A.substring(1);G.push(fe.gameList.header(B));G.push(fe.gameList.sorting(this.sort,"fe.page.sortBy"));if(fe.gameList.pagingTop){G.push(fe.gameList.pagingTop(this.page,Math.ceil(D/fe.search.SEARCH_COUNT),5,"fe.page.getPage"))}if(D>0){G.push(fe.gameList.body(E.result.games,this.sort))}G.push(fe.gameList.paging(this.page,Math.ceil(D/fe.search.SEARCH_COUNT),5,"fe.page.getPage"));var F=document.getElementById("multiplayerGames");if(F){F.innerHTML=G.join("")}},getTop:function(){var B=document.getElementById("topTag");var A=this;switch(B.value){case"all":geewa.server.ps.call(function(){A.onTop.apply(A,arguments)},"Game.SearchGames","",l.id,6,0,5,global.userGroup);break;default:geewa.server.ps.call(function(){A.onTop.apply(A,arguments)},"Game.GetGamesByTag",B.value,l.id,6,0,5,global.userGroup);break}},onTop:function(A,D){var G=[];var E=D.result.games;for(var C=0;C<E.length;C++){var B=E[C].name.length>15;G.push('<li><span class="number">'+(C+1)+'.</span><a href="'+fe.gameUrl(E[C].gameID)+'"');if(B){G.push(' title="'+E[C].name+'"')}G.push(">"+(B?fe.trimText(E[C].name,15):E[C].name)+"</a></li>")}var F=document.getElementById("topGames");F.innerHTML=G.join("")},switchNews:function(){var A=fe.getIDs("newsSwitch","newsContent");if(A[0]&&A[1]){if(A[1].style.display=="none"&&(arguments.length==0||arguments[0])){A[0].innerHTML=l.gl("home.hideNews");A[1].style.display="block"}else{A[0].innerHTML=l.gl("home.showNews");A[1].style.display="none"}}},panel:{count:0,onLoad:function(){var A=document.getElementById("homePanelContent");if(A){this.count=this._getCount();this.show(1)}},_writePaging:function(A){var D=[];D.push('<a href="javascript:fe.page.panel.show('+(A>1?A-1:this.count)+');" class="prev2"><img src="/img/pixel.gif" alt="'+l.gl("gamesList.previous")+'" /></a>');for(var B=1;B<=this.count;B++){if(B==A){D.push('<a href="javascript:fe.page.panel.show('+B+');" class="active">'+B+"</a>")}else{D.push('<a href="javascript:fe.page.panel.show('+B+');">'+B+"</a>")}}D.push('<a href="javascript:fe.page.panel.show('+(A<this.count?A+1:1)+');" class="next2"><img src="/img/pixel.gif" alt="'+l.gl("gamesList.next")+'" /></a>');var C=document.getElementById("homePanelPaging");if(C){C.innerHTML=D.join("")}},show:function(A){this.clicked=(arguments.length==1);if(this.active){this._getChild(this.active).className="hidden"}this._getChild(A).className="";this.active=A;this._writePaging(A)},onTime:function(){window.clearTimeout(this._timer);if(this.clicked){return}var B=1;if(this.active&&this.active<this.count){B=this.active+1}this.show(B,true);var A=this;window.setTimeout(function(){A.onTime()},5000)},_getCount:function(){var C=document.getElementById("homePanelContent");var A=0;for(var B=0;B<C.childNodes.length;B++){if(C.childNodes[B].nodeType==1&&C.childNodes[B].nodeName=="LI"){A++}}return A},_getChild:function(A){var D=document.getElementById("homePanelContent");var B=0;for(var C=0;C<D.childNodes.length;C++){if(D.childNodes[C].nodeType==1&&D.childNodes[C].nodeName=="LI"){B++}if(B==A){return D.childNodes[C]}}return null},_makeUserLinks:function(){var A=document.getElementById("homePanelContent");if(A){A=A.getElementsByTagName("a");for(var B=0;B<A.length;B++){var D=A[B];var C=D.getAttribute("user");if(C){D.href="http://"+session.playersDomain+"/"+C;D.onclick=function(){fe.page.panel.userClick(this);return false}}}}},click:function(){alert("ne")}},onMessenger:function(A){switch(A.eventType){case"connect":big_ilayer.show();break}},flashHTML:function(B,A,D){var C=[];if(navigator.userAgent.indexOf("MSIE ")>-1){C.push('<object width="'+A+'" height="'+D+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">');C.push('<param name="movie" value="'+B+'"/>');C.push('<param name="quality" value="high"/>');C.push('<param name="allowscriptaccess" value="always"/>');if(arguments.length>3&&arguments[3]){C.push('<param name="wmode" value="'+arguments[3]+'"/>')}if(arguments.length>4&&arguments[4]){C.push('<param name="flashvars" value="'+arguments[4]+'"/>')}C.push("</object>")}else{C.push("<embed");C.push(' width="'+A+'"');C.push(' height="'+D+'"');C.push(' src="'+B+'"');C.push(' quality="high"');C.push(' allowScriptAccess="always"');if(arguments.length>3&&arguments[3]){C.push(' wmode="'+arguments[3]+'"')}if(arguments.length>4&&arguments[4]){C.push(' flashvars="'+arguments[4]+'"')}C.push(' type="application/x-shockwave-flash"');C.push(' pluginspage="http://www.macromedia.com/go/getflashplayer"');C.push("/>\n")}return C.join("")}};var big_ilayer={show:function(){var E=fe.getIDs("niveaAd");if(E[0]&&E[0].innerHTML==""&&geewa.cookieRead("geewa.nivea")!="done"){geewa.cookieWrite("geewa.nivea","done",1440);var D={url:"/ad/nivea/nivea-q10-600x400-geewa.swf?001",width:600,height:400,wmode:"transparent",flashvars:"clickthru="+escape("http://go.cz.bbelements.com/please/redirect/11578/1/7/7/?param=107202/110981_1_")+"&clicktarget=_blank"};if(session.device&&session.device=="ie7"){D.wmode="window"}E[0].innerHTML=fe.flashHTML(D);try{var C=screen,A=navigator,B;B="&ubl="+A.browserLanguage+"&ucc="+A.cpuClass+"&ucd="+C.colorDepth+"&uce="+A.cookieEnabled+"&udx="+C.deviceXDPI+"&udy="+C.deviceYDPI+"&usl="+A.systemLanguage+"&uje="+A.javaEnabled()+"&uah="+C.availHeight+"&uaw="+C.availWidth+"&ubd="+C.bufferDepth+"&uhe="+C.height+"&ulx="+C.logicalXDPI+"&uly="+C.logicalYDPI+"&use="+C.fontSmoothingEnabled+"&uto="+(new Date()).getTimezoneOffset()+"&uti="+(new Date()).getTime()+"&uui="+C.updateInterval+"&uul="+A.userLanguage+"&uwi="+C.width;if(typeof(bburlparam)=="string"){B+="&"+bburlparam}if(typeof(bbkeywords)=="string"){B+="&keywords="+escape(bbkeywords)}var F=document.createElement("script");F.type="text/javascript";F.charset="windows-1250";F.src="http://go.cz.bbelements.com/please/showit/11578/1/7/7/?typkodu=js&_idplan=110981"+B+"&alttext=0&border=0&bust="+Math.random()+"&target=_blank";document.body.appendChild(F)}catch(E){}setTimeout(function(){big_ilayer.ilayer_hide()},10000)}},ilayer_hide:function(){var A=fe.getIDs("niveaAd");if(A[0]&&A[0].innerHTML!=""){A[0].innerHTML=""}}};