Type.registerNamespace("Evolutia");Evolutia.validatorBlur=function AjaxControlToolkit$validatorBlur(a){Evolutia.validatorBlur.initializeBase(this,[a]);this._warningIconImageUrl=null;this._closeImageUrl=null;this._highlightCssClass=null;this._width="200px";this._invalid=false;this._originalValidationMethod=null;this._otherOriginalValidationMethod=null;this._validationMethodOverride=null;this._elementToValidate=null;this._popupTable=null;this._errorMessageCell=null;this._calloutArrowCell=null;this._warningIconImage=null;this._closeImage=null;this._popupBehavior=null;this._onShowJson=null;this._onHideJson=null;this._focusAttached=false;this._isOpen=false;this._isBuilt=false;this._divImage=null;this._focusHandler=Function.createDelegate(this,this._onfocus);this._blurHandler=Function.createDelegate(this,this._onblur);this.otherValidator=null;this._otherValidator;};Evolutia.validatorBlur.prototype={initialize:function(){Evolutia.validatorBlur.callBaseMethod(this,"initialize");var a=this.get_element();if(a.evaluationfunction){this._originalValidationMethod=Function.createDelegate(a,a.evaluationfunction);this._validationMethodOverride=Function.createDelegate(this,this._onvalidate);a.evaluationfunction=this._validationMethodOverride;}if(this.otherValidator!=null){this._otherValidator=$get(this.otherValidator);this._otherOriginalValidationMethod=Function.createDelegate(this._otherValidator,this._otherValidator.evaluationfunction);}else{this._otherOriginalValidationMethod=function(){return true;};}},_ensureCallout:function(){if(!this._isBuilt){var a=this.get_element();var b=this._elementToValidate=$get(a.controltovalidate);var c=this._divImage=document.createElement("div");Sys.UI.DomElement.addCssClass(this._divImage,"validatorCross");$(c).injectAfter($(b));$(b).setStyle("float","left");$(c).style.left=$(b).getLeft()+$(b).getSize().x+15+"px";c.style.display="none";this._isBuilt=true;}if(!this._focusAttached){$addHandler(this._elementToValidate,"focus",this._focusHandler);$addHandler(this._elementToValidate,"blur",this._blurHandler);this._focusAttached=true;}},dispose:function(){if(this._isBuilt){this.hide();if(this._focusAttached){$removeHandler(this._elementToValidate,"blur",this._blurHandler);$removeHandler(this._elementToValidate,"focus",this._focusHandler);this._focusAttached=false;}this._onShowJson=null;this._onHideJson=null;if(this._popupBehavior){this._popupBehavior.dispose();this._popupBehavior=null;}if(this._closeBehavior){this._closeBehavior.dispose();this._closeBehavior=null;}if(this._popupTable){this._popupTable.parentNode.removeChild(this._popupTable);this._popupTable=null;this._errorMessageCell=null;this._elementToValidate=null;this._calloutArrowCell=null;this._warningIconImage=null;this._closeImage=null;}this._isBuilt=false;}Evolutia.validatorBlur.callBaseMethod(this,"dispose");},_getErrorMessage:function(){return this.get_element().errormessage||AjaxControlToolkit.Resources.ValidatorCallout_DefaultErrorMessage;},show:function(a){Sys.UI.DomElement.removeCssClass(this._divImage,"validatorOK");Sys.UI.DomElement.addCssClass(this._divImage,"validatorCross");this._divImage.style.display="block";},hide:function(){this._ensureCallout();Sys.UI.DomElement.removeCssClass(this._divImage,"validatorCross");Sys.UI.DomElement.addCssClass(this._divImage,"validatorOK");this._divImage.style.display="block";},_onblur:function(a){if(!this._originalValidationMethod(this.get_element())||!this._otherOriginalValidationMethod(this._otherValidator)){this._ensureCallout();if(this._highlightCssClass){Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass);}this.show(true);return false;}else{this.hide();return true;}},_onfocus:function(a){this._divImage.style.display="none";},_oncloseClick:function(a){this.hide();},_onvalidate:function(a){this._ensureCallout();if((!this._originalValidationMethod(a)||!this._otherOriginalValidationMethod(this._otherValidator))&&!this._elementToValidate.disabled){if(this._highlightCssClass){Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass);}this.show(false);this._invalid=true;return false;}else{if(this._highlightCssClass&&this._invalid){Sys.UI.DomElement.removeCssClass(this._elementToValidate,this._highlightCssClass);}this._invalid=false;this.hide();return true;}},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson;},set_onShow:function(a){if(this._popupBehavior){this._popupBehavior.set_onShow(a);}else{this._onShowJson=a;}this.raisePropertyChanged("onShow");},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null;},onShow:function(){if(this._popupBehavior){this._popupBehavior.onShow();}},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson;},set_onHide:function(a){if(this._popupBehavior){this._popupBehavior.set_onHide(a);}else{this._onHideJson=a;}this.raisePropertyChanged("onHide");},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null;},onHide:function(){if(this._popupBehavior){this._popupBehavior.onHide();}},get_warningIconImageUrl:function(){return this._warningIconImageUrl;},set_warningIconImageUrl:function(a){if(this._warningIconImageUrl!=a){this._warningIconImageUrl=a;if(this.get_isInitialized()){this._warningIconImage.src=a;}this.raisePropertyChanged("warningIconImageUrl");}},get_closeImageUrl:function(){return this._closeImageUrl;},set_closeImageUrl:function(a){if(this._closeImageUrl!=a){this._closeImageUrl=a;if(this.get_isInitialized()){this._closeImage.src=a;}this.raisePropertyChanged("closeImageUrl");}},get_width:function(){return this._width;},set_width:function(a){if(this._width!=a){this._width=a;if(this.get_isInitialized()){this._popupTable.style.width=_width;}this.raisePropertyChanged("width");}},get_highlightCssClass:function(){return this._highlightCssClass;},set_highlightCssClass:function(a){if(this._highlightCssClass!=a){this._highlightCssClass=a;this.raisePropertyChanged("highlightCssClass");}},get_isOpen:function(){return this._isOpen;}};Evolutia.validatorBlur.registerClass("Evolutia.validatorBlur",Sys.UI.Behavior);if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded();}