var tagged={strings:{},data:{},spaces:{},addValue:function(f,c,d){var g=c.split(".");var e=f;for(var b=0,a=g.length;b<a-1;++b){e[g[b]]=e[g[b]]||{};e=e[g[b]]}if(d!==undefined){if(YAHOO.lang.isObject(d)){YAHOO.lang.augmentObject(e[g[b]],d,true)}else{e[g[b]]=d}}else{if(e[g[b]]!==undefined){e[g[b]]=e[g[b]]}else{e[g[b]]={}}}return e[g[b]]},clone:function(d,e){if(YAHOO.lang.isNumber(e)){if(e<0){return d}}else{e=1}if(Object.prototype.toString.call(d)==="[object Array]"){var b=[],c=0,a=d.length;for(;c<a;c++){b[c]=arguments.callee(d[c],e-1)}return b}if(typeof d==="object"){var b={},c;for(c in d){b[c]=arguments.callee(d[c],e-1)}return b}return d},merge:function(c,b){for(var a in b){if(c[a]&&YAHOO.lang.isObject(c[a])&&YAHOO.lang.isObject(b[a])){c[a]=this.merge(c[a],b[a])}else{c[a]=b[a]}}return c},exists:function(namespace){var parts=namespace.split(".");var prefix="";for(var i in parts){var part=parts[i];if(!YAHOO.lang.isString(part)){continue}if(eval(prefix+part)){prefix+=part+"."}else{return false}}return true},namespace:function(){var b=arguments;var d=null;if(b.length==2&&YAHOO.lang.isObject(b[1])){d=this.addValue(tagged,b[0],b[1])}else{for(var c=0,a=b.length;c<a;++c){this.spaces[b[c]]=true;d=this.addValue(tagged,b[c])}}return d},safeLoad:function(f,g){f=f.replace(/\s*/g,"").split(",");var b={};for(var c in f){if(YAHOO.lang.isFunction(f[c])){continue}if(this.exists(f[c])){b[f[c]]=true}else{b[f[c]]=false}}for(var c in f){var d=f[c];if(YAHOO.lang.isFunction(d)){continue}var e={namespace:d,done:b,callback:g};if(b[d]){this.safeLoadSuccess(e);continue}var a=false;if(d.match(/^tagged/)!=null){a=TAGGED.base_url+"/get_script.php?"+d.replace(/\./g,"/")+".js"}if(!a){this.safeLoadSuccess(e);continue}YAHOO.util.Get.script(a,{onSuccess:function(){tagged.safeLoadSuccess(e)}})}},safeLoadSuccess:function(c){if(c.namespace.match(/^tagged/)!=null){tagged.namespace(c.namespace)}if(c.namespace.match(/^TAGGED/)!=null){TAGGED.namespace(c.namespace)}c.done[c.namespace]=true;var a=true;for(var b in c.done){if(!c.done[b]){a=false;break}}if(a){c.done[c.namespace]=false;c.callback()}},lateBinding:false,loadedSelfInfo:true,handleSelfInfo:function(a){if(!a.result){return}this.loadedSelfInfo=true;this.uid=a.result.user_id;this.optOut=a.result.opt_out},loadStringsDirect:function(c,b){if(!b){b=window}for(var d in c){if(YAHOO.lang.isString(c[d])){this.addValue(b,d,c[d])}else{var a=this.addValue(b,d);this.loadStringsDirect(c[d],a)}}},loadData:function(a){this.data=this.merge(this.data,a)},changeLanguage:function(c){E.stopEvent(c);var a=D.get("site_language_selector");var d=a.options[a.selectedIndex].value;var b={method:"tagged.account.setUserLanguage",langCode:d,callback:"tagged.languageUpdated"};TAGGED.api.call(b)},languageUpdated:function(a){if(a.stat=="ok"&&a.result&&a.result.newLocale){tagged.refreshPage(a.result.newLocale)}},refreshPage:function(c){var b=""+window.location+"";var a=b.indexOf("#");if(b.indexOf("loc=")>=0){var e=b.indexOf("loc=");var d=b.indexOf("&",e);if(a>0&&a<d){d=a}if(e>=0&&d==-1){d=(a>0?a:b.length)}var h=b.substring(e,d);b=b.replace(h,"loc="+c)}else{var f=b.indexOf("?");var g="";if(a>0){g=b.substring(a);b=b.replace(g,"")}b=b+(f>=0?"&":"?")+"loc="+c+g}tagged.changingLanguage=true;document.location=b},ads:{ads:[],lastReload:0,reloadTime:5000,reload:function(){var b=new Date();var a=b.getTime();if(this.lastReload>a-this.reloadTime){return}for(var c in this.ads){var d=this.ads[c];try{window.frames[d.id].location.replace(d.url+"&t="+a%10000)}catch(f){}}this.lastReload=a},register:function(b,a){this.ads.push({id:b,url:a})}},bind:function(c,b){var a=Array.prototype.slice.call(arguments,2);return function(){c.apply(b||window,a.concat(Array.prototype.slice.call(arguments)))}},debug:/local/.test(window.location.host)};var TAGGED={getValue:function(e,c){var f=c.split(".");var d=e;var b;var a=false;for(b=0;b<f.length;b++){if(d[f[b]]===undefined||d[f[b]]===null){a=true;break}d=d[f[b]]}if(a){return null}return d},deleteValue:function(e,c){var f=c.split(".");var d=e;var b;var a=false;for(b=0;b<f.length-1;b++){if(d[f[b]]===undefined||d[f[b]]===null){a=true;break}d=d[f[b]]}if(a){return false}delete d[f[b]];return true},namespace:function(){var a=arguments;var c=null;var b;if(typeof TAGGED.spaces=="undefined"){TAGGED.spaces={}}for(b=0;b<a.length;b++){TAGGED.spaces[a[b]]=true;c=tagged.addValue(TAGGED,a[b])}return c}};if(!tagged.exists("D")&&tagged.exists("YAHOO.util.Dom")){var D=YAHOO.util.Dom}if(!tagged.exists("E")&&tagged.exists("YAHOO.util.Event")){var E=YAHOO.util.Event}if(!tagged.exists("H")&&tagged.exists("YAHOO.util.History")){var H=YAHOO.util.History}E.addListener(window,"load",function(){tagged.ads.reload();E.addListener("site_language_selector","change",tagged.changeLanguage)});tagged.namespace("security.flashdetect");tagged.security.flashdetect={requiredMajorVersion:8,requiredMinorVersion:1,requiredRevision:1,isIE:(navigator.appVersion.indexOf("MSIE")!=-1)?true:false,isWin:(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false,isOpera:(navigator.userAgent.indexOf("Opera")!=-1)?true:false,init:function(){var a=this.DetectFlashVer(this.requiredMajorVersion,this.requiredMinorVersion,this.requiredRevision);if(!a&&window.location!=tagged.base_url+"/flashupgrade.html"){window.location=tagged.base_url+"/flashupgrade.html"}},ControlVersion:function(){var a;var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a},GetSwfVer:function(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];var d=e[3];if(d==""){d=e[4]}if(d[0]=="d"){d=d.substring(1)}else{if(d[0]=="r"){d=d.substring(1);if(d.indexOf("d")>0){d=d.substring(0,d.indexOf("d"))}}}var g=h+"."+b+"."+d}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2}else{if(this.isIE&&this.isWin&&!this.isOpera){g=this.ControlVersion()}}}}}return g},DetectFlashVer:function(f,d,c){versionStr=this.GetSwfVer();if(versionStr==-1){return true}else{if(versionStr!=0){if(this.isIE&&this.isWin&&!this.isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var e=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(e>parseFloat(f)){return true}else{if(e==parseFloat(f)){if(a>parseFloat(d)){return true}else{if(a==parseFloat(d)){if(b>=parseFloat(c)){return true}}}}}return false}}return versionStr}};E.onDOMReady(tagged.security.flashdetect.init,"",tagged.security.flashdetect);if(!tagged.util){tagged.util={}}tagged.namespace("tagged.util.domMethods");tagged.util.domMethods={toggle:function(){for(var b=0,a=arguments.length;b<a;++b){var c=(typeof arguments[b]=="string")?D.get(arguments[b]):arguments[b];if(!c){continue}c.style.display=(c.style.display!="none"?"none":"")}},toggle_hideme:function(){for(var b=0,a=arguments.length;b<a;++b){var c=(typeof arguments[b]=="string")?D.get(arguments[b]):arguments[b];if(!c){continue}if(D.hasClass(c,"hide_me")){D.removeClass(c,"hide_me")}else{D.addclass(c,"hide_me")}}},display:function(b,a,c){if(typeof(b)=="string"){b=D.get(b)}if(!b){return}if(a){if(c){b.style.display=c}else{b.style.display=""}}else{b.style.display="none"}},set_bg_iframe:function(h){try{if(typeof D.getRegion!="function"){return false}}catch(g){return false}var c=D.get(h);var f=D.getRegion(c);if(!f){return false}var b=document.createElement("iframe");var a=Math.round(f.bottom-f.top);var d=Math.round(f.right-f.left);b.src="/__utm.gif";b.frameBorder=0;b.scrolling="no";b.style.position="absolute";b.style.height=a>0?a+"px":"100%";b.style.width=d>0?d+"px":"100%";b.style.top=0;b.style.left=0;b.style.zIndex=-1;b.tabIndex=-1;return c.appendChild(b)}};tagged.namespace("gold.lightbox");tagged.gold.lightbox={show:function(c,e){var a={width:"802px",height:"484px",close:true,fixedcenter:true,draggable:false,modal:true,iframe:true};this.goldPanel=new YAHOO.widget.Panel("panel_hover_btn",a);var b=document.createElement("link");b.type="text/css";b.rel="stylesheet";b.href="gold/gold_light.css";var d=document.createElement("div");d.appendChild(b);d.innerHTML='<iframe class="gold_light" src="/gold.html?view=lightbox&msg='+c+"&ll="+e+'" frameborder="0" height="468" width="786" scrolling="auto"></iframe>';this.goldPanel.setBody(d);this.goldPanel.render(document.body);this.goldPanel.subscribe("hide",tagged.gold.lightbox.hide)},hide:function(){window.setTimeout(function(){if(tagged.gold.lightbox.goldPanel){tagged.gold.lightbox.goldPanel.destroy()}},0);var a={method:"tagged.gold.getBalance",callback:"tagged.gold.lightbox.updateBalance"};TAGGED.api.call(a)},updateBalance:function(a){if(a.result){TAGGED.header.updateHeaderGold(a.result.gold_bal_string)}}};TAGGED.namespace("header");TAGGED.header={presenceDropDownMenu:null,newUserStatus:null,init:function(){var d=TAGGED.header.profileMenu=new YAHOO.widget.Menu("nav_profile_menu",{context:["nav_profile","tl","bl"],iframe:true,visible:false,zindex:1000});var e=TAGGED.header.friendsMenu=new YAHOO.widget.Menu("nav_friends_menu",{context:["nav_friends","tl","bl"],iframe:true,visible:false,zindex:1000});var c=TAGGED.header.groupsMenu=new YAHOO.widget.Menu("nav_groups_menu",{context:["nav_groups","tl","bl"],iframe:true,visible:false,zindex:1000});var b=TAGGED.header.messagesMenu=new YAHOO.widget.Menu("nav_messages_menu",{context:["nav_messages","tl","bl"],iframe:true,visible:false,zindex:1000});var g=D.get("presence-menu");if(g){TAGGED.header.presenceDropDownMenu=new YAHOO.widget.Menu(g,{context:[YAHOO.util.Dom.getFirstChild("presence-icon"),"tr","br"],iframe:true,visible:false,zindex:1000})}d.hideEvent.subscribe(TAGGED.header.lostFocus,"nav_profile");e.hideEvent.subscribe(TAGGED.header.lostFocus,"nav_friends");c.hideEvent.subscribe(TAGGED.header.lostFocus,"nav_groups");b.hideEvent.subscribe(TAGGED.header.lostFocus,"nav_messages");if(TAGGED.header.presenceDropDownMenu){TAGGED.header.presenceDropDownMenu.hideEvent.subscribe(TAGGED.header.unhighlightPresenceIcon)}d.render();e.render();b.render();if(TAGGED.header.presenceDropDownMenu){TAGGED.header.presenceDropDownMenu.render()}var o=D.get("nav_profile_dropdown");YAHOO.util.Event.addListener(o,"click",TAGGED.header.showMenu,"profile");YAHOO.util.Event.addListener(o,"mouseover",TAGGED.header.toggleSibling,o);YAHOO.util.Event.addListener(o,"mouseout",TAGGED.header.toggleSibling,o);var j=D.get("nav_friends_dropdown");YAHOO.util.Event.addListener(j,"click",TAGGED.header.showMenu,"friends");YAHOO.util.Event.addListener(j,"mouseover",TAGGED.header.toggleSibling,j);YAHOO.util.Event.addListener(j,"mouseout",TAGGED.header.toggleSibling,j);var n=D.get("nav_groups_dropdown");YAHOO.util.Event.addListener(n,"click",TAGGED.header.showMenu,"groups");YAHOO.util.Event.addListener(n,"mouseover",TAGGED.header.toggleSibling,n);YAHOO.util.Event.addListener(n,"mouseout",TAGGED.header.toggleSibling,n);var f=D.get("nav_messages_dropdown");YAHOO.util.Event.addListener(f,"click",TAGGED.header.showMenu,"messages");YAHOO.util.Event.addListener(f,"mouseover",TAGGED.header.toggleSibling,f);YAHOO.util.Event.addListener(f,"mouseout",TAGGED.header.toggleSibling,f);var a=D.get("nav_games_dropdown");YAHOO.util.Event.addListener(a,"click",TAGGED.header.showMenu,"games");YAHOO.util.Event.addListener(a,"mouseover",TAGGED.header.toggleSibling,a);YAHOO.util.Event.addListener(a,"mouseout",TAGGED.header.toggleSibling,a);var m=D.get("nav_more_dropdown");YAHOO.util.Event.addListener(m,"click",TAGGED.header.showMenu,"more");YAHOO.util.Event.addListener(m,"mouseover",TAGGED.header.toggleSibling,m);YAHOO.util.Event.addListener(m,"mouseout",TAGGED.header.toggleSibling,m);var l=D.get("presence-icon");if(TAGGED.header.presenceDropDownMenu){YAHOO.util.Event.addListener(l,"click",TAGGED.header.showMenu,"presence-icon");YAHOO.util.Event.addListener(l,"mouseover",TAGGED.header.onHoverPresenceIcon,{el:YAHOO.util.Dom.getFirstChild(l),operation:"add"});YAHOO.util.Event.addListener(l,"mouseout",TAGGED.header.onHoverPresenceIcon,{el:YAHOO.util.Dom.getFirstChild(l),operation:"remove"});var i=tagged.currentUserStatus==1?TAGGED.header.presenceDropDownMenu.getItem(2).element:TAGGED.header.presenceDropDownMenu.getItem(1).element;TAGGED.header.setOption(i);TAGGED.header.presenceDropDownMenu.subscribe("click",TAGGED.header.onPresenceClick)}var h=D.get("nav_btm_games");TAGGED.header.gamesDropDownMenu=new YAHOO.widget.Menu("nav_games_menu",{context:["nav_btm_games","tl","bl"],iframe:true,visible:false,zindex:1000});TAGGED.header.gamesDropDownMenu.render();TAGGED.header.gamesDropDownMenu.hideEvent.subscribe(TAGGED.header.lostFocus,h);YAHOO.util.Event.addListener(h,"click",TAGGED.header.showMenu,"games");var k=D.get("nav_btm_more");TAGGED.header.moreDropDownMenu=new YAHOO.widget.Menu("nav_more_menu",{context:["nav_btm_more","tl","bl"],iframe:true,visible:false,zindex:1000});TAGGED.header.moreDropDownMenu.render();TAGGED.header.moreDropDownMenu.hideEvent.subscribe(TAGGED.header.lostFocus,k);YAHOO.util.Event.addListener(k,"click",TAGGED.header.showMenu,"more");YAHOO.widget.Overlay.windowResizeEvent.subscribe(TAGGED.header.positionMenu);this.resizeSubnav()},resizeSubnav:function(){var c=tagged.data.navBar&&tagged.data.navBar.subnavLoadOrder;if(!c){return}var b={};var f=[];var m=D.get("nav_content");var k=D.get("sub_nav_container");var n=YAHOO.util.Region.getRegion(m).width;var g=D.getChildrenBy(m,function(i){return(i!=k)});n-=D.getStyle(k,"marginLeft").match(/[-]?[0-9]+/g)[0];for(var h=0;h<g.length;h++){var e=g[h];var a=YAHOO.util.Region.getRegion(e);if(a.width){n-=D.getStyle(e,"marginLeft").match(/[-]?[0-9]+/g)[0];n-=D.getStyle(e,"marginRight").match(/[-]?[0-9]+/g)[0];n-=a.width}}var l=D.getChildrenBy(k,function(i){return(i.getAttribute("type")?true:false)});for(h in l){if(typeof(l[h])!="function"){b[l[h].getAttribute("type")]=l[h]}}var j=function(){var i=YAHOO.util.Region.getRegion(k).width;return(i<n)};var d=function(p){if(j()){if(c.length){var i=b[c.shift()];if(i){D.removeClass(i,"hide_me");D.removeClass(D.getNextSibling(i),"hide_me");d(i)}else{d()}}}else{var i=p||b[c.pop()];if(!i){return}var o=D.getFirstChild(i);f[p?"push":"unshift"]({text:o.innerHTML,url:o.href});D.addClass(i,"hide_me");D.addClass(D.getNextSibling(i),"hide_me");d()}};d();this.moreDropDownMenu.addItems(f)},toggleSibling:function(){linkLabel=this.previousSibling;if(D.hasClass(linkLabel,"semi_highlight")){D.removeClass(linkLabel,"semi_highlight")}else{D.addClass(linkLabel,"semi_highlight")}},lostFocus:function(d,c,f){var e=D.get(f);var g=e.nextSibling;D.removeClass(e,"highlight");D.removeClass(g,"highlight")},positionMenu:function(){TAGGED.header.profileMenu.align("tl","bl");TAGGED.header.friendsMenu.align("tl","bl");TAGGED.header.groupsMenu.align("tl","bl");TAGGED.header.messagesMenu.align("tl","bl");TAGGED.header.gamesDropDownMenu.align("tl","bl");TAGGED.header.moreDropDownMenu.align("tl","bl");if(TAGGED.header.presenceDropDownMenu){TAGGED.header.presenceDropDownMenu.align("tr","br")}},showMenu:function(b,a){YAHOO.util.Event.preventDefault(b);var d=YAHOO.util.Event.getTarget(b);var c=d.previousSibling;D.addClass(d,"highlight");D.addClass(c,"highlight");TAGGED.header.positionMenu();if(a=="profile"){TAGGED.header.profileMenu.show()}else{if(a=="friends"){TAGGED.header.friendsMenu.show()}else{if(a=="groups"){TAGGED.header.groupsMenu.show()}else{if(a=="messages"){TAGGED.header.messagesMenu.show()}else{if(a=="games"){TAGGED.header.gamesDropDownMenu.show()}else{if(a=="more"){TAGGED.header.moreDropDownMenu.show()}else{if((a=="presence-icon")&&TAGGED.header.presenceDropDownMenu){TAGGED.header.highlightPresenceIcon();TAGGED.header.presenceDropDownMenu.show()}}}}}}}},onHoverPresenceIcon:function(a,b){if(!TAGGED.header.presenceMenuOpen){YAHOO.util.Dom[b.operation+"Class"](b.el,"icon_hover")}},unhighlightPresenceIcon:function(){var a=D.get("presence-icon");var b=YAHOO.util.Dom.getFirstChild(a);TAGGED.header.presenceMenuOpen=false;YAHOO.util.Dom.removeClass(b,"button-menu-open")},highlightPresenceIcon:function(){var a=D.get("presence-icon");var b=YAHOO.util.Dom.getFirstChild(a);TAGGED.header.presenceMenuOpen=true;YAHOO.util.Dom.removeClass(b,"icon_hover");YAHOO.util.Dom.addClass(b,"button-menu-open")},onPresenceClick:function(b,a){if(!a||!TAGGED.header.presenceDropDownMenu){return}TAGGED.header.setOption(a[1].element,true)},setOption:function(f,d){var c=TAGGED.header.presenceDropDownMenu.getItem(1).element;var a=TAGGED.header.presenceDropDownMenu.getItem(2).element;var b=YAHOO.util.Dom.getFirstChild(D.get("presence-icon"));var e=null;if(!b){return}if(f==c){YAHOO.util.Dom.addClass(c,"selectedItem boldText");YAHOO.util.Dom.removeClass(a,"selectedItem boldText");b.innerHTML='<a href="#"><img width="18" height="17" class="png" src="'+tagged.static_uri+'/im/im/icon_presence_green_large.png" /></a>';TAGGED.header.newUserStatus=3;e=true}else{if(f==a){YAHOO.util.Dom.addClass(a,"selectedItem boldText");YAHOO.util.Dom.removeClass(c,"selectedItem boldText");b.innerHTML='<a href="#"><img src="'+tagged.static_uri+'/im/im/icon_presence_grey_large.gif" /></a>';TAGGED.header.newUserStatus=1;e=false}}if(d&&(typeof(e)=="boolean")&&(tagged.currentUserStatus!=TAGGED.header.newUserStatus)){TAGGED.header._setOption(e)}},_setOption:function(b){var a={method:"tagged.header.changeVisibility",visible:b,callback:"TAGGED.header.onPresenceSet"};TAGGED.api.call(a)},onPresenceSet:function(c){if(c.stat=="ok"&&c.result&&c.result.success){tagged.currentUserStatus=TAGGED.header.newUserStatus;if(tagged.comet_protocol){tagged.comet_protocol.controller.sendAPICall({forceEmpty:true})}}else{var a=null;var b=YAHOO.util.Dom.getFirstChild(YAHOO.util.Dom.get("presence-icon"));if(tagged.currentUserStatus==1){a=TAGGED.header.presenceDropDownMenu.getItem(2).element;b.innerHTML='<a href="#"><img src="'+tagged.static_uri+'/im/im/icon_presence_grey_large.gif" /></a>'}else{if(tagged.currentUserStatus==3){a=TAGGED.header.presenceDropDownMenu.getItem(1).element;b.innerHTML='<a href="#"><img width="18" height="17" class="png" src="'+tagged.static_uri+'/im/im/icon_presence_green_large.png" /></a>'}}TAGGED.header.setOption(a);alert("There was a problem updating your Presence status, please try again.")}},updateHeaderGold:function(b){if(D.get("header_gold_amount")){if(b<1000&&D.get("header_gold_amount").innerHTML.length>3){var a={method:"tagged.gold.getLightboxTest",callback:{fn:this.showLightbox,scope:this}};TAGGED.api.call(a)}D.get("header_gold_amount").innerHTML=b}},showLightbox:function(a){if(a.results.use_gold_lightbox){tagged.gold.lightbox.show("lowGold","lb_lowgold")}}};YAHOO.util.Event.onContentReady("navheader",TAGGED.header.init,TAGGED.header,true);