dojo.require("bc.Topics");dojo.require("bc.ajax.AjaxUtilities");dojo.lang.declare("bc.login.LoginHandler",null,{_ajaxUtils:bc.ajax.AjaxUtilities,_domUtils:bc.util.DOMUtilities,_genUtils:bc.util.GeneralUtilities,_FADE_INTERVAL:500,_getContentURL:null,_containerId:null,_container:null,initializer:function(A){var C="Error in "+this.declaredClass+" constructor.\n\n";var B=C;if(arguments.length==1){this._argsHash=A}else{B+="There must only be one input argument.\n"}if(B==C){if(this._genUtils.isNotSet(this._argsHash)){B+="The input argument is not set.\n"}else{if("object"!=typeof (this._argsHash)){B+="The input argument must be an associative array.\n"}}}if(B==C){if(this._genUtils.isDefined(this._argsHash.getContentURL)){this._getContentURL=this._argsHash.getContentURL}else{B+="The getContentURL parameter must be set in the input arguments.\n"}if(this._genUtils.isDefined(this._argsHash.containerId)){this._containerId=this._argsHash.containerId}else{B+="The containerId parameter must be set in the input arguments.\n"}}if(B==C){this._init()}else{alert(B)}},_init:function(){this._preparePage()},_setPageElementReferences:function(){var B="Error in "+this.declaredClass+"._setPageElementReferences().\n\n";var A=B;this._container=dojo.byId(this._containerId);if(this._genUtils.isNotSet(this._container)){A+='  Could not get the DOM element with id = "'+this._containerId+'"\n'}if(A==B){return true}else{alert(A);return false}},_preparePage:function(){if(this._setPageElementReferences()){dojo.event.topic.subscribe(bc.topic.login,this,"_getContent");dojo.event.topic.subscribe(bc.topic.registration,this,"_getContent");dojo.event.topic.subscribe(bc.topic.logout,this,"_getContent")}},_getContent:function(A){this._ajaxUtils.get(this._getContentURL,{},"text/html",true,this._handleGetContent,this._ajaxUtils.error,this)},_handleGetContent:function(A,B,C){this.thisInstance._container.innerHTML=B;this.thisInstance._domUtils.evalScriptsInComponent(this.thisInstance._container);dojo.lfx.html.fadeShow(this.thisInstance._container,this._FADE_INTERVAL).play()}});