(function(){var A=YAHOO.lang,D=YAHOO.util.Dom,F=YAHOO.util.Event,B=ZC.Util;var E=false;var C=ZC.Core.Block.Create("Login","Imperial");C.prototype.CustomSetupEnd=function(){var I,H;I=D.get("trade-menu");if(I){H=new YAHOO.widget.MenuBar(I,{zindex:5});H.render();H.show()}if(this.GetAttrib("UsePopup")&&!this.GetAttrib("IsLoggedIn")&&!E){var G=this.GetAttrib("PopupCaption");var J={fixedcenter:true,modal:true,zIndex:20};this.oLoginPopup=ZC.JSManager.CreateDialog(G,this.GetAttrib("PopupTemplate"),document.body,J);E=true;loginButtons=D.getElementsByClassName("trade-login-button");for(i=0;i<loginButtons.length;i++){F.addListener(loginButtons[i],"click",this.openPopup,this,true)}if(this.GetAttrib("FailedLogin")){this.oLoginPopup.show()}}return true};C.prototype.openPopup=function(G){this.oLoginPopup.show()}})();
