var swfobject=function(){var aq="undefined",aD="object",ab="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",aE="application/x-shockwave-flash",ac="SWFObjectExprInst",ax="onreadystatechange",af=window,aL=document,aB=navigator,aa=false,Z=[aN],aG=[],ag=[],al=[],aJ,ad,ap,at,ak=false,aU=false,aH,an,aI=true,ah=function(){var a=typeof aL.getElementById!=aq&&typeof aL.getElementsByTagName!=aq&&typeof aL.createElement!=aq,e=aB.userAgent.toLowerCase(),c=aB.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(e),j=c?/mac/.test(c):/mac/.test(e),g=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,d=!+"\v1",f=[0,0,0],k=null;if(typeof aB.plugins!=aq&&typeof aB.plugins[ab]==aD){k=aB.plugins[ab].description;if(k&&!(typeof aB.mimeTypes!=aq&&aB.mimeTypes[aE]&&!aB.mimeTypes[aE].enabledPlugin)){aa=true;d=false;k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");f[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);f[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10);f[2]=/[a-zA-Z]/.test(k)?parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof af.ActiveXObject!=aq){try{var i=new ActiveXObject(X);if(i){k=i.GetVariable("$version");if(k){d=true;k=k.split(" ")[1].split(",");f=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)]}}}catch(b){}}}return{w3:a,pv:f,wk:g,ie:d,win:h,mac:j}}(),aK=function(){if(!ah.w3){return}if((typeof aL.readyState!=aq&&aL.readyState=="complete")||(typeof aL.readyState==aq&&(aL.getElementsByTagName("body")[0]||aL.body))){aP()}if(!ak){if(typeof aL.addEventListener!=aq){aL.addEventListener("DOMContentLoaded",aP,false)}if(ah.ie&&ah.win){aL.attachEvent(ax,function(){if(aL.readyState=="complete"){aL.detachEvent(ax,arguments.callee);aP()}});if(af==top){(function(){if(ak){return}try{aL.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}aP()})()}}if(ah.wk){(function(){if(ak){return}if(!/loaded|complete/.test(aL.readyState)){setTimeout(arguments.callee,0);return}aP()})()}aC(aP)}}();function aP(){if(ak){return}try{var b=aL.getElementsByTagName("body")[0].appendChild(ar("span"));b.parentNode.removeChild(b)}catch(a){return}ak=true;var d=Z.length;for(var c=0;c0){for(var h=0;h0){var i=aS(c);if(i){if(ao(aG[h].swfVersion)&&!(ah.wk&&ah.wk<312)){ay(c,true);if(l){a.success=true;a.ref=av(c);l(a)}}else{if(aG[h].expressInstall&&au()){var e={};e.data=aG[h].expressInstall;e.width=i.getAttribute("width")||"0";e.height=i.getAttribute("height")||"0";if(i.getAttribute("class")){e.styleclass=i.getAttribute("class")}if(i.getAttribute("align")){e.align=i.getAttribute("align")}var f={};var d=i.getElementsByTagName("param");var k=d.length;for(var j=0;j'}}a.outerHTML='"+h+"";ag[ag.length]=e.id;d=aS(e.id)}else{var b=ar(aD);b.setAttribute("type",aE);for(var k in e){if(e[k]!=Object.prototype[k]){if(k.toLowerCase()=="styleclass"){b.setAttribute("class",e[k])}else{if(k.toLowerCase()!="classid"){b.setAttribute(k,e[k])}}}}for(var l in g){if(g[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"){aQ(b,l,g[l])}}a.parentNode.replaceChild(b,a);d=b}}return d}function aQ(b,d,c){var a=ar("param");a.setAttribute("name",d);a.setAttribute("value",c);b.appendChild(a)}function aw(a){var b=aS(a);if(b&&b.nodeName=="OBJECT"){if(ah.ie&&ah.win){b.style.display="none";(function(){if(b.readyState==4){aT(a)}else{setTimeout(arguments.callee,10)}})()}else{b.parentNode.removeChild(b)}}}function aT(a){var b=aS(a);if(b){for(var c in b){if(typeof b[c]=="function"){b[c]=null}}b.parentNode.removeChild(b)}}function aS(a){var c=null;try{c=aL.getElementById(a)}catch(b){}return c}function ar(a){return aL.createElement(a)}function aM(a,c,b){a.attachEvent(c,b);al[al.length]=[a,c,b]}function ao(a){var b=ah.pv,c=a.split(".");c[0]=parseInt(c[0],10);c[1]=parseInt(c[1],10)||0;c[2]=parseInt(c[2],10)||0;return(b[0]>c[0]||(b[0]==c[0]&&b[1]>c[1])||(b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]))?true:false}function az(b,f,a,c){if(ah.ie&&ah.mac){return}var e=aL.getElementsByTagName("head")[0];if(!e){return}var g=(a&&typeof a=="string")?a:"screen";if(c){aH=null;an=null}if(!aH||an!=g){var d=ar("style");d.setAttribute("type","text/css");d.setAttribute("media",g);aH=e.appendChild(d);if(ah.ie&&ah.win&&typeof aL.styleSheets!=aq&&aL.styleSheets.length>0){aH=aL.styleSheets[aL.styleSheets.length-1]}an=g}if(ah.ie&&ah.win){if(aH&&typeof aH.addRule==aD){aH.addRule(b,f)}}else{if(aH&&typeof aL.createTextNode!=aq){aH.appendChild(aL.createTextNode(b+" {"+f+"}"))}}}function ay(a,c){if(!aI){return}var b=c?"visible":"hidden";if(ak&&aS(a)){aS(a).style.visibility=b}else{az("#"+a,"visibility:"+b)}}function ai(b){var a=/[\\\"<>\.;]/;var c=a.exec(b)!=null;return c&&typeof encodeURIComponent!=aq?encodeURIComponent(b):b}var aR=function(){if(ah.ie&&ah.win){window.attachEvent("onunload",function(){var a=al.length;for(var b=0;b3){Pinger.stop()}},stop:function(){if(Pinger.timer!=null){Pinger.timer.stop();Pinger.timer=null}}};HabbletLoader={currentPoll:null,loadedHabblets:[],loadingStatus:[],needsFlashKbWorkaround:function(){var a=navigator.userAgent.match(/Firefox\/(\d.\d)/);var b=(a!=null?parseFloat(a[1]):0)>=3.5;return HabbletLoader.isWindowsPlatform()&&((Prototype.Browser.Gecko&&!b)||Prototype.Browser.WebKit)},isWindowsPlatform:function(){return navigator.userAgent.indexOf("Windows")>-1},show:function(habbletId,habbletWrapper,data){if(HabbletLoader.needsFlashKbWorkaround()){$("client-ui").addClassName("x-workaround");if(habbletId=="credits"||habbletId=="fbAppRequest"){$("client-ui").addClassName("x-workaround-wide")}}if(typeof habbletWrapper!="undefined"){habbletWrapper.show();HabbletLoader.bringToTop(habbletWrapper);if(typeof data=="string"){try{var sender=eval("__"+habbletId+"__sendmsg__");sender.apply(null,[data])}catch(e){}}if(HabbletLoader.isWindowsPlatform()&&Prototype.Browser.WebKit){$("content").setStyle({width:habbletWrapper.getWidth()+"px"})}}},hide:function(a){if(HabbletLoader.needsFlashKbWorkaround()){$("client-ui").removeClassName("x-workaround");$("client-ui").removeClassName("x-workaround-wide")}if(typeof a!="undefined"){a.hide()}},load:function(g,c){var i=true;var f=false;var b=true;var a=false;var e={fromHabblet:"true"};if(g=="roomenterad"){i=false;b=false;e={contentWidth:$("flash-wrapper").offsetWidth};if(HabbletLoader.needsFlashKbWorkaround()){return}}if(g=="externalLink"){i=false;b=false;a=true;e={url:c}}if(g=="fbLike"){i=false;b=false;a=true;e={roomId:c};f=true}if(g=="fbAppRequest"){i=false;a=true;b=false;e=c}if(g=="avatars"){a=true}if(g=="credits"){e={openedInNewWindow:(window==window.top)}}if(typeof HabbletLoader.loadedHabblets[g]!="undefined"&&!a){HabbletLoader.show(g,HabbletLoader.loadedHabblets[g],c);return}if(typeof HabbletLoader.loadingStatus[g]!="undefined"){return}HabbletLoader.loadingStatus[g]=1;var d=$("content");if(b){var h=Builder.node("div",{id:"loading-"+g,className:"client-habblet-container loading-element"},[Builder.node("img",{src:habboStaticFilePath+"/v2/images/lightwindow/ajax-loading.gif"}),Builder.node("p",g)]);d.appendChild(h);HabbletLoader.bringToTop(h)}new Ajax.Request("/habblet/cproxy?habbletKey="+g,{method:"post",parameters:e,onComplete:function(n,r){if(n.responseText.length==0||(r!=null&&r.disabled)){delete HabbletLoader.loadingStatus[g];if(b){d.removeChild($("loading-"+g))}return}var p=n.responseText.indexOf(""));var q=k.match(new RegExp('',"g"));if(q){for(var o=0;o","g"));if(m){for(var o=0;o1){var c=0;a.each(function(d){c=Math.max(d.style.zIndex,c)});b.style.zIndex=c+1}},removeHabblet:function(a){var b=$("content");if(typeof HabbletLoader.loadingStatus[a]!="undefined"){return}if(typeof HabbletLoader.loadedHabblets[a]!="undefined"){b.removeChild($(a));delete HabbletLoader.loadedHabblets[a]}}};var FlashHabboClient=(function(){var a=function(){Event.observe(window,"unload",function(){Cookie.erase("habboclient");if(FlashExternalInterface.loginLogEnabled&&!FlashExternalInterface.clientInited){new Ajax.Request(habboReqPath+"/clientlog/update",{method:"post",parameters:{flashStep:"client.window.closed"},asynchronous:false})}})};window.habboClient=true;ensureOpenerIsLoggedIn();a();var b=function(){swfobject.createCSS("html","height:100%;");swfobject.createCSS("body","height:100%;");swfobject.createCSS("#flash-container","margin:0; width:100%; height:100%;")};if(typeof facebookUser=="undefined"){swfobject.addDomLoadEvent(b)}document.observe("dom:loaded",function(){if(!swfobject.hasFlashPlayerVersion("10.0.0")){HabboView.run();FlashExternalInterface.logLoginStep("web.flash_missing")}});return{cacheCheck:function(){new Ajax.Request(habboReqPath+"/cacheCheck",{method:"get",parameters:{r:new Date().getTime()},onSuccess:function(c,d){if(d&&d.result=="false"&&window.location.href.indexOf("t=")==-1){window.location.href=window.location.href+(window.location.href.indexOf("?")>0?"&":"?")+"t="+new Date().getTime()}}})}}})();var FlashExternalInterface=(function(){var f=null;var b=0;var g=null;var d=function(){if(!f){f=window.setInterval(function(){var k=new Date().getTime();if(b1){if(window.event.srcElement.id==RightClick.FlashObjectID&&RightClick.Cache==RightClick.FlashObjectID){RightClick.call()}document.getElementById(RightClick.FlashContainerID).setCapture();if(window.event.srcElement.id){RightClick.Cache=window.event.srcElement.id}}},call:function(){}};var Embed={embedWindowName:"embed",docWindowName:"habboMain",docWindowParams:"toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,resizable=yes",rpxWindowName:"rpxLogin",rpxWindowParams:"toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=750,height=440",setEmbedWindowName:function(){window.name=Embed.embedWindowName},openRpxLoginPopup:function(b,a,d){var c=window.open(b.href,Embed.rpxWindowName,Embed.rpxWindowParams);if(window.focus){c.focus()}},openSigninPopup:function(a){var d=(screen.width/2)-(700/2);var c=(screen.height/2.5)-(450/2);var b=window.open(a.href,null,"toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=450,left="+d+",top="+c);if(window.focus){b.focus()}},openFullscreenHabbo:function(c,b){var a=FlashExternalInterface.lastVisitedRoomId;if(a!=null&&a!=""&&c!=null){c+="&roomId="+a+"&forwardId=2"}window.name="old-client";HabboClient.openOrFocus(c);window.location.href=b||"/embed"},decorateNaviLinks:function(a){$$("#navi a").each(function(c){var b=false;if(a&&c.href.indexOf("/credits")!=-1){b=true;c.removeAttribute("href");c.setStyle({cursor:"pointer"})}Event.observe(c,"click",function(g){Event.stop(g);var d=Event.element(g);if(b){HabbletLoader.load("credits");return}var f=window.open(d.href,"_blank",Embed.docWindowParams);if(window.focus){f.focus()}})})},registerUnloadReloadHook:function(){Event.observe(window,"unload",function(){if(window.opener&&window.opener!=window){window.opener.location.replace(window.opener.location.href)}})},decorateFooterLinks:function(){$$("#footer p a").each(function(a){Event.observe(a,"click",function(d){Event.stop(d);var b=Event.element(d);var c=window.open(b.href,"_blank",Embed.docWindowParams);if(window.focus){c.focus()}})})},decorateLogoLink:function(){$$("#right-buttons h1 a").each(function(a){Event.observe(a,"click",function(d){Event.stop(d);var b=Event.element(d);var c=window.open(b.href,Embed.docWindowName,Embed.docWindowParams);if(window.focus){c.focus()}})})}};