Files
SIG/Scripts/AjaxControlToolkit/Release/MaskedEdit.js
rrene 927295c7ba Revert "-- corr"
This reverts commit 5315c47fcd.
2024-11-05 10:55:34 -07:00

1 line
86 KiB
JavaScript

Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.MaskedEditBehavior=function(n){Sys.Extended.UI.MaskedEditBehavior.initializeBase(this,[n]);this._mask="";this._maskType=Sys.Extended.UI.MaskedEditType.None;this._filtered="";this._promptCharacter="_";this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight;this._messageValidatorTip=!0;this._showMessageErrorFloat=!1;this._cssMessageErrorFloat="";this._autoComplete=!0;this._autoCompleteValue="";this._clearTextOnInvalid=!1;this._clearMaskOnLostfocus=!0;this._acceptAmPm=Sys.Extended.UI.MaskedEditShowSymbol.None;this._acceptNegative=Sys.Extended.UI.MaskedEditShowSymbol.None;this._displayMoney=Sys.Extended.UI.MaskedEditShowSymbol.None;this._onFocusCssClass="MaskedEditFocus";this._onInvalidCssClass="MaskedEditError";this._onFocusCssNegative="MaskedEditFocusNegative";this._onBlurCssNegative="MaskedEditBlurNegative";this._cultureName=Sys.CultureInfo.CurrentCulture.name;this._userDateFormat=Sys.Extended.UI.MaskedEditUserDateFormat.None;this._userTimeFormat=Sys.Extended.UI.MaskedEditUserTimeFormat.None;this._cultureDatePlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.DateSeparator;this._cultureTimePlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.TimeSeparator;this._cultureDecimalPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator;this._cultureThousandsPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.NumberGroupSeparator;this._cultureDateFormat="MDY";var t=Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern.split(this._cultureDatePlaceholder);t.length>=3&&(this._cultureDateFormat=t[0].substr(0,1).toUpperCase()+t[1].substr(0,1).toUpperCase()+t[2].substr(0,1).toUpperCase());this._cultureCurrencySymbolPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.CurrencySymbol;this._cultureAMPMPlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator+";"+Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator;this._AMPMPlaceholderSeparator=";";this._century=1900;this._allowCopyPaste=!0;this._clipboardText=Sys.Extended.UI.Resources&&Sys.Extended.UI.Resources.Shared_BrowserSecurityPreventsPaste||"Your browser security settings don't permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead.";this._CharsEditMask="9L$CAN?";this._CharsSpecialMask="/:.,";this._maskConv="";this._EmptyMask="";this._maskvalid="";this._DirectSelText="";this._initialvalue="";this._LogicSymbol="";this._LogicTextMask="";this._LogicMask="";this._LogicMaskConv="";this._LogicPrompt=String.fromCharCode(1);this._LogicEscape=String.fromCharCode(2);this._LogicFirstPos=-1;this._LogicLastPos=-1;this._LogicLastInt=-1;this._LogicDateTimeSepPos=-1;this._QtdValidInput=0;this._InLostfocus=!1;this._ExternalMessageError="";this._CurrentMessageError="";this._FiringOnChange=!1;this._ErroOnEnter=!1;this._charLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZ";this._charNumbers="0123456789";this._charEscape="\\";this._DelimitStartDup="{";this._DelimitEndDup="}";this._focusHandler=null;this._keypressdown=null;this._keypressHandler=null;this._blurHandler=null;this._mouseOutHandler=null;this._mouseOutHandler=null;this._mouseMoveHandler=null;this._mouseEnterHandler=null;this._changeHandler=null;this._timer=null;this._timerHandler=null;this._SaveSymb="";this._SaveText="";this._SavePosi=-1;this._SaveMask="";this._SaveKeyDown=0};Sys.Extended.UI.MaskedEditBehavior.prototype={initialize:function(){var n=this.get_element(),t,i,r,u;this._InLostfocus=!0;Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(this,"initialize");this._createMask();t=!1;i=this.get_ClientState();i!=null&&i!=""&&(t=i=="Focused",this.set_ClientState(null));try{n===document.activeElement&&(t=!0)}catch(f){}this._showMessageErrorFloat&&(this._mouseOutHandler=Function.createDelegate(this,this._onMouseOut),$addHandler(n,"mouseout",this._mouseOutHandler),this._mouseMoveHandler=Function.createDelegate(this,this._onMouseMove),$addHandler(n,"mousemove",this._mouseMoveHandler),this._mouseEnterHandler=Function.createDelegate(this,this._onMouseover),$addHandler(n,"mouseover",this._mouseEnterHandler));n.readOnly||(this._keypressdown=Function.createDelegate(this,this._onKeyPressdown),$addHandler(n,"keydown",this._keypressdown),this._keypressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"keypress",this._keypressHandler));this._focusHandler=Function.createDelegate(this,this._onFocus);$addHandler(n,"focus",this._focusHandler);this._blurHandler=Function.createDelegate(this,this._onBlur);$addHandler(n,"blur",this._blurHandler);this._changeHandler=Function.createDelegate(this,this._onChange);$addHandler(n,"change",this._changeHandler);Sys.Browser.agent==Sys.Browser.Opera&&(this._timerHandler=Function.createDelegate(this,this._OnTimerTicket),this._timer=new Sys.Timer,this._timer.set_enabled(!1),this._timer.set_interval(100),this._timer.add_tick(this._timerHandler),this._SaveText="",this._SavePosi=-1,this._timer.set_enabled(!0));r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n);this._InitValue(r.get_Value(),!0);t?this._onFocus():(this._clearMaskOnLostfocus&&r.set_Value(this._getClearMask(r.get_Value())),u=this._CaptureServerValidators(),u||this._onInvalidCssClass!=""&&this.addCssClassMaskedEdit(this._onInvalidCssClass))},dispose:function(){var n=this.get_element();this._mouseOutHandler&&($removeHandler(n,"mouseout",this._mouseOutHandler),this._mouseOutHandler=null);this._mouseMoveHandler&&($removeHandler(n,"mousemove",this._mouseMoveHandler),this._mouseMoveHandler=null);this._mouseEnterHandler&&($removeHandler(n,"mouseover",this._mouseEnterHandler),this._mouseEnterHandler=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._blurHandler&&($removeHandler(n,"blur",this._blurHandler),this._blurHandler=null);this._changeHandler&&($removeHandler(n,"change",this._changeHandler),this._changeHandler=null);this._keypressdown&&($removeHandler(n,"keydown",this._keypressdown),this._keypressdown=null);this._keypressHandler&&($removeHandler(n,"keypress",this._keypressHandler),this._keypressHandler=null);this._timerHandler&&(this._timer.set_enabled(!1),this._timerHandler=null,this._timer.dispose(),this._timer=null);Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(this,"dispose")},_OnTimerTicket:function(){if(this._SaveSymb="",!this._InLostfocus){this._timer.set_enabled(!1);var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());this._SaveText!=""?(n.set_Value(this._SaveText),this.setSelectionRange(this._SavePosi,this._SavePosi),this._SaveText="",this._SavePosi=-1,this._SaveMask=n.get_Value()):(n.get_Value().length!=this._EmptyMask.length&&n.set_Value(this._SaveMask),this._timer.get_interval()!=100&&this._timer.set_interval(100));this._timer.set_enabled(!0)}},_onChange:function(){this._FiringOnChange||this._onFocus()},_onFocus:function(){var n=this.get_element(),i,t,r,u;n.readOnly||n.disabled||(this._keypressdown||(this._keypressdown=Function.createDelegate(this,this._onKeyPressdown),$addHandler(n,"keydown",this._keypressdown)),this._keypressHandler||(this._keypressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"keypress",this._keypressHandler)),this._InLostfocus=!1,this._RemoveDivToolTip(),this._onFocusCssClass!=""&&this.addCssClassMaskedEdit(this._onFocusCssClass),i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),this._initialvalue=i.get_Value(),this._InitValue(i.get_Value(),!1),t=this._getClearMask(),r=!1,this._messageValidatorTip&&t==""&&(r=!0),(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.get_cultureAMPMPlaceholder()!=""&&t==""?this._acceptAmPm&&this.insertAMPM(this.get_cultureAMPMPlaceholder().substring(0,1)):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&t!=""&&this._LogicSymbol=="-"&&this._onFocusCssNegative!=""&&this.addCssClassMaskedEdit(this._onFocusCssNegative),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?this._LogicLastInt!=-1?this.setSelectionRange(this._LogicLastInt,this._LogicLastInt):this.setSelectionRange(this._LogicLastPos+1,this._LogicLastPos+1):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&t!=""?(u=this._getLastEmptyPosition()+1,this.setSelectionRange(u,u)):this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos),this.showTooltipMessage(!1),r&&this.showTooltipMessage(!0))},_PeforformValidLostFocus:function(n){var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t=this._getClearMask(i.get_Value()),r;return t==""&&this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._LogicSymbol=="-"&&this.insertSignal("+"),t!=""&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.Date?this.AutoFormatDate():t!=""&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.Time?this.AutoFormatTime():t!=""&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?this.AutoFormatDateTime():t!=""&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this.AutoFormatNumber(),(this._clearMaskOnLostfocus&&t!=""||n&&this._clearMaskOnLostfocus)&&i.set_Value(this._getClearMask(i.get_Value())),this.addCssClassMaskedEdit(""),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._LogicSymbol=="-"&&this._onBlurCssNegative!=""&&this.addCssClassMaskedEdit(this._onBlurCssNegative),this.showTooltipMessage(!1),this._RemoveDivToolTip(),r=this._CaptureClientsValidators(),r||(this._onInvalidCssClass!=""&&this.addCssClassMaskedEdit(this._onInvalidCssClass),this._clearTextOnInvalid&&(this._createMask(),i.set_Value(this._EmptyMask))),r},_onBlur:function(n){var t,i;this._InLostfocus=!0;t=this._PeforformValidLostFocus(!0);t&&(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),!this.get_element().readOnly&&this._initialvalue!=i.get_Value()&&n&&this._fireChanged())},_fireChanged:function(){var n,t;this._FiringOnChange=!0;n=this.get_element();document.createEventObject?n.fireEvent("onchange"):document.createEvent&&(t=document.createEvent("HTMLEvents"),t.initEvent("change",!0,!0),n.dispatchEvent(t));this._FiringOnChange=!1},_onKeyPress:function(n){var u=this._KeyCode(n),o,t,i,s,r,e,f,h,c;return u==9?!0:u==13?(o=this._PeforformValidLostFocus(!1),this._ErroOnEnter=!1,o||(this._ErroOnEnter=!0),Sys.Browser.agent==Sys.Browser.Opera&&(e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=e.get_Value(),this._SavePosi=this._getCurrentPosition(),this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)),o):(this._onFocusCssClass!=""&&this._ErroOnEnter&&this.addCssClassMaskedEdit(this._onFocusCssClass),this._ErroOnEnter=!1,!this._isNormalChar(n,u))?(this._ExecuteNav(n,u),!1):(t=this._deleteTextSelection(),t==-1&&(t=this._getCurrentPosition()),i=String.fromCharCode(u),this._maskType==Sys.Extended.UI.MaskedEditType.Date&&i==this.get_cultureDatePlaceholder()?this._AdjustElementDate():this._maskType==Sys.Extended.UI.MaskedEditType.Time&&i==this.get_cultureTimePlaceholder()?this._AdjustElementTime():this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(i==this.get_cultureTimePlaceholder()||i==this.get_cultureDatePlaceholder())?this._AdjustElementDateTime(i):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&i==this.get_cultureDecimalPlaceholder()&&t==this._LogicLastInt?this._AdjustElementDecimalLTR():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&i==this.get_cultureDecimalPlaceholder()&&t==this._LogicLastInt?this._AdjustElementDecimalRTL():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&i==this.get_cultureDecimalPlaceholder()&&t!=this._LogicLastInt?this._MoveDecimalPos():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&i==this.get_cultureThousandsPlaceholder()?this._MoveThousandLTR():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&i==this.get_cultureThousandsPlaceholder()?this._MoveThousandRTL():(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=-1?this._acceptAmPm&&(this.insertAMPM(i),this.setSelectionRange(t,t)):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1?Sys.Browser.agent!=Sys.Browser.Opera?(this.insertSignal(i),this.setSelectionRange(t,t)):this._SaveSymb==""?(this.insertSignal(i),this.setSelectionRange(t,t),this._SaveSymb=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)):this._SaveSymb="":(s=t,t=this._getNextPosition(t),r=t,this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?s==this._LogicLastInt&&(r=this._getLastEmptyPosition()):t>=this._LogicLastPos+1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(r=this._getLastEmptyPosition()),this._processKey(r,i)&&(this._messageValidatorTip&&this.showTooltipMessage(!1),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight?(this._insertContent(i,r),t=this._getNextPosition(r+1)):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(this._LogicLastInt==-1?t<this._LogicLastPos+1?(this._insertContent(i,r),t=this._getNextPosition(r+1)):(this._insertContentRight(i),t=this._LogicLastPos+1):s!=this._LogicLastInt?(this._insertContent(i,r),t=this._getNextPosition(r+1)):(e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f=this._getClearMask(e.get_Value()),f!=""&&(h=f.indexOf(this.get_cultureDecimalPlaceholder()),h!=-1&&(c=f.substring(0,h),(c=="0"||c=="-0")&&(this.setSelectionRange(this._LogicLastInt-1,this._LogicLastInt),this._deleteTextSelection(),t=this._LogicLastInt,this.setSelectionRange(t,t)))),f==""&&i=="0"?t=this._LogicLastInt:(this._insertContentRight(i),t=this._LogicLastInt))),this.setSelectionRange(t,t))),this._SetCancelEvent(n),!1)},_onKeyPressdown:function(n){var t,i;if((this._InLostfocus&&this._onFocus(n),t=this._KeyCode(n),t==9)||t==13)return!0;this._isNormalChar(n,t)?Sys.Browser.agent==Sys.Browser.Opera&&(!n.rawEvent.shiftKey||n.rawEvent.ctrlKey||n.rawEvent.altKey||n.rawEvent.keyCode!=45||(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=i.get_Value(),this._SavePosi=this._getCurrentPosition(),this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))):this._ExecuteNav(n,t)},_onMouseOut:function(){this._RemoveDivToolTip()},_onMouseMove:function(n){(this._InLostfocus||this._ErroOnEnter)&&this._ExternalMessageError!=""&&this._ShowDivToolTip(n)},_onMouseover:function(n){$get("DivMaskedEditTip_"+this.get_element().id)||this._CaptureServerValidators();(this._InLostfocus||this._ErroOnEnter)&&this._ExternalMessageError!=""&&this._createDivToolTip(n,this._ExternalMessageError)},_ShowDivToolTip:function(n){var t=$get("DivMaskedEditTip_"+this.get_element().id),i;t||(this._createDivToolTip(n,this._ExternalMessageError),t=$get("DivMaskedEditTip_"+this.get_element().id));i=this._GetMousePos(n);t.style.left=i.x+1+"px";t.style.top=i.y+1+"px"},_GetMousePos:function(n){var t=0,i=0,r,u;return typeof pageYOffset=="number"?(i=window.pageYOffset,t=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(i=document.body.scrollTop,t=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(i=document.documentElement.scrollTop,t=document.documentElement.scrollLeft),r=0,u=0,typeof n.pageX=="number"?(r=n.pageX,u=n.pageY):typeof n.clientX=="number"&&(r=n.clientX,u=n.clientY),{x:r+t,y:u+i}},_RemoveDivToolTip:function(){var n=$get("DivMaskedEditTip_"+this.get_element().id);n&&document.body.removeChild(n)},_createDivToolTip:function(n,t){var u=$get("DivMaskedEditTip_"+this.get_element().id),i,r;u||(r=this._GetMousePos(n),i=document.createElement("div"),i.id="DivMaskedEditTip_"+this.get_element().id,i.style.position="absolute",i.style.left=r.x+2+"px",i.style.top=r.y+2+"px",i.style.zIndex=Sys.Extended.UI.zIndex.MaskedEditDivTip,this._cssMessageErrorFloat==""?(i.style.padding="3px 3px 3px 3px",i.style.border="Solid 1px #000000",i.style.backgroundColor="#FFFFEA",i.style.fontWeight="normal",i.style.fontSize="12px",i.style.fontFamily="Arial"):i.className=this._cssMessageErrorFloat,i.innerHTML=t,i=document.body.insertBefore(i,document.body.firstChild))},_ExecuteNav:function(n,t){var i,u,e,f,r;if(n.type=="keydown"&&this._isInternetExplorer()){if((t==86||t==118)&&!n.shiftKey&&n.ctrlKey&&!n.altKey){this._SetCancelEvent(n);this._PasteFromClipBoard();return}if(n.shiftKey&&!n.ctrlKey&&!n.altKey&&n.keyCode==45){this._SetCancelEvent(n);this._PasteFromClipBoard();return}}if(!this._isInternetExplorer()||n.type=="keypress"){if(n.rawEvent.shiftKey&&!n.rawEvent.ctrlKey&&!n.rawEvent.altKey&&n.rawEvent.keyCode==45){this._SetCancelEvent(n);this._PasteFromClipBoard();return}if(n.type=="keydown"&&(t==86||t==118)&&!n.shiftKey&&n.ctrlKey&&!n.altKey){this._SetCancelEvent(n);this._PasteFromClipBoard();return}}if(Sys.Browser.agent==Sys.Browser.InternetExplorer||n.type=="keypress"||n.type=="keydown")if(t==8)this._SetCancelEvent(n),i=this._deleteTextSelection(),i!=-1?this.setSelectionRange(i,i):(i=this._getCurrentPosition(),this._backspace(i),i=this._getPreviousPosition(i-1),this.setSelectionRange(i,i)),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._messageValidatorTip&&r.get_Value()==this._EmptyMask&&this.showTooltipMessage(!0),Sys.Browser.agent==Sys.Browser.Opera&&(this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0));else if(t==46||t==127)this._SetCancelEvent(n),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=this._deleteTextSelection(),i==-1?(i=this._getCurrentPosition(),this._isValidMaskedEditPosition(i)||i!=this._LogicLastInt&&this._inputDirection!=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(i=this._getNextPosition(i)),this._deleteAtPosition(i,!1)):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(u=this._getClearMask(r.get_Value()),u!=""&&(u=u.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",u.substring(u.length-1,u.length)==this.get_cultureDecimalPlaceholder()?(u=u.substring(0,u.length-1),this.loadValue(u,this._LogicLastInt)):this.loadValue(u,this._LogicLastPos))),this.setSelectionRange(i,i),this._messageValidatorTip&&r.get_Value()==this._EmptyMask&&this.showTooltipMessage(!0),Sys.Browser.agent==Sys.Browser.Opera&&(this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0));else if(n.ctrlKey){if(t==39||t==35||t==34){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);i=this._getCurrentPosition();this.setSelectionRange(i,this._LogicLastPos+1)}else if(t==37||t==36||t==33){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);i=this._getCurrentPosition();this.setSelectionRange(this._LogicFirstPos,i)}}else if(t==35||t==34){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(i=this._getCurrentPosition(),this.setSelectionRange(i,this._LogicLastPos+1)):this.setSelectionRange(this._LogicLastPos+1,this._LogicLastPos+1)}else if(t==36||t==33){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(i=this._getCurrentPosition(),this.setSelectionRange(this._LogicFirstPos,i)):this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos)}else if(t==37){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(f=this._GetBoundSelection(),f?(f.left>this._LogicFirstPos&&f.left--,this.setSelectionRange(f.left,f.right)):(e=this._getCurrentPosition(),e>this._LogicFirstPos&&this.setSelectionRange(e-1,e))):(i=this._getCurrentPosition()-1,i<this._LogicFirstPos&&(i=this._LogicFirstPos),this.setSelectionRange(i,i));Sys.Browser.agent==Sys.Browser.Opera&&(r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))}else if(t==39){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(f=this._GetBoundSelection(),f?(f.right<this._LogicLastPos+1&&f.right++,this.setSelectionRange(f.left,f.right)):(e=this._getCurrentPosition(),e<this._LogicLastPos+1&&this.setSelectionRange(e,e+1))):(i=this._getCurrentPosition()+1,i>this._LogicLastPos+1&&(i=this._LogicLastPos+1),this.setSelectionRange(i,i));Sys.Browser.agent==Sys.Browser.Opera&&(r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))}else t==27&&(this._SetCancelEvent(n),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._EmptyMask==this._initialvalue?r.set_Value(""):r.set_Value(this._initialvalue),this._onFocus());this._SetCancelEvent(n)},_backspace:function(n){var t=!1,i,r;return n>this._LogicFirstPos&&(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),r=i.get_Value(),n=this._getPreviousPosition(n-1),this._deleteAtPosition(n,!0),t=!0),t},_deleteAtPosition:function(n,t){var y=!1,p=this._LogicLastPos+1,c,i,o,e,w,a,v,u,h,b;if(this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(p=this._LogicLastInt),c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t==!1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&n==p)i=this._getClearMask(c.get_Value()),i!=""&&(y=!0,i=i.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",i.substring(i.length-1,i.length)==this.get_cultureDecimalPlaceholder()&&(i=i.substring(0,i.length-1)),o=i.split(this.get_cultureDecimalPlaceholder()),this._LogicLastInt!=-1&&o[0]!=""?(o[0]=o[0].substring(0,o[0].length-1),i=o[0],(o.length=2)&&(i+=this.get_cultureDecimalPlaceholder()+o[1])):i=i.substring(0,i.length-1),i+=this._LogicSymbol,this.loadValue(i,p));else{var r=c.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),f=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),s=0,l=n-this._LogicFirstPos;if(this._isValidMaskedEditPosition(n)){for(y=!0,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(e=this._SplitDateTime(r),w=n-this._LogicFirstPos,w>e[0].length?(r=e[1],s=e[0].length+1,f=f.substring(s),l-=s):(r=e[0],f=f.substring(0,e[0].length))),a=r.substring(l+1),v=f.substring(l+1),r=r.substring(0,l)+this._promptCharacter,f=f.substring(0,l)+this._LogicPrompt,u=0;u<parseInt(a.length,10);u++)this._isValidMaskedEditPosition(n+1+u)?(r+=this._promptCharacter,f+=this._LogicPrompt):(r+=a.substring(u,u+1),f+=v.substring(u,u+1));for(h=this._getNextPosition(n),u=0;u<parseInt(a.length,10);u++)this._isValidMaskedEditPosition(n+1+u)&&v.substring(u,u+1)!=this._LogicPrompt&&(r=r.substring(0,h-this._LogicFirstPos-s)+a.substring(u,u+1)+r.substring(h+1-this._LogicFirstPos-s),f=f.substring(0,h-this._LogicFirstPos-s)+v.substring(u,u+1)+f.substring(h+1-this._LogicFirstPos-s),h=this._getNextPosition(h+1));if(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){var d=c.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),k=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),e=this._SplitDateTime(d),w=n-this._LogicFirstPos;w>e[0].length?(r=e[0]+" "+r,f=k.substring(0,s)+f):(r=r+" "+e[1],f=f+k.substring(e[0].length))}b=c.get_Value();r=b.substring(0,this._LogicFirstPos)+r+b.substring(this._LogicLastPos+1);this._LogicTextMask=this._LogicTextMask.substring(0,this._LogicFirstPos)+f+this._LogicTextMask.substring(this._LogicLastPos+1);c.set_Value(r)}}return y},_SplitDateTime:function(n){var t=[];return n.charAt(this._LogicDateTimeSepPos)==" "?(t[0]=n.substring(this._LogicFirstPos,this._LogicDateTimeSepPos),t[1]=n.substring(this._LogicDateTimeSepPos+1)):t[0]=n,t},_isInternetExplorer:function(){return Sys.Browser.agent==Sys.Browser.InternetExplorer||Sys.Browser.agent==null&&Sys.Browser.name=="Netscape"&&Sys.Browser.version==5?!0:!1},_ShowModalClipBoardInput:function(){return prompt(this._clipboardText,"")},_PasteFromClipBoard:function(){var r=null,n,e,u,i,o,t;if(this._isInternetExplorer())r=window.clipboardData.getData("Text");else{var s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),h=s.get_Value(),f=this._GetBoundSelection(),n=this._getCurrentPosition(),c=this._autoComplete,l=this._clearTextOnInvalid,a=this._clearMaskOnLostfocus,v=this._DirectSelText;this._autoComplete=!1;this._clearTextOnInvalid=!1;this._clearMaskOnLostfocus=!1;r=this._ShowModalClipBoardInput();this._autoComplete=c;this._clearTextOnInvalid=l;this._clearMaskOnLostfocus=a;s.set_Value(h);f?this.setSelectionRange(f.left,f.right):this.setSelectionRange(n,n)}if(r!=null&&r!=""){for(r.length>this._maskvalid.length&&(r=r.substring(0,this._maskvalid.length)),n=this._deleteTextSelection(),n==-1&&(n=this._getCurrentPosition(),f&&(n=f.left)),this.setSelectionRange(n,n),e=!1,this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicLastInt!=-1&&(e=!0),u=0,u=0;u<r.length;u++)i=r.substring(u,u+1),t=n,e&&(t=this._getLastEmptyPosition()),(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=-1?this._acceptAmPm&&(this.insertAMPM(i),this.setSelectionRange(n,n)):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1?(this.insertSignal(i),this.setSelectionRange(n,n)):(o=n,n=this._getNextPosition(n),t=n,this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?o==this._LogicLastInt&&(t=this._getLastEmptyPosition()):n>=this._LogicLastPos+1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(t=this._getLastEmptyPosition()),this._processKey(t,i)&&(this._messageValidatorTip&&this.showTooltipMessage(!1),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight?(this._insertContent(i,t),n=this._getNextPosition(t+1)):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(this._LogicLastInt==-1?n<this._LogicLastPos+1?(this._insertContent(i,t),n=this._getNextPosition(t+1)):(this._insertContentRight(i),n=this._LogicLastPos+1):o!=this._LogicLastInt?(this._insertContent(i,t),n=this._getNextPosition(t+1)):(this._insertContentRight(i),n=this._LogicLastInt)),this.setSelectionRange(n,n)));e&&this.setSelectionRange(this._LogicLastInt,this._LogicLastInt)}},_MoveDecimalPos:function(){for(var i=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i),n=this._LogicFirstPos,u=this._LogicLastPos,t=-1;n<u;){if(r.get_Value().substring(n,n+1)==this.get_cultureDecimalPlaceholder()){t=n;break}n++}t!=-1&&this.setSelectionRange(t,t)},_MoveThousandLTR:function(){for(var f=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f),u=this._getCurrentPosition(),i=this._LogicLastPos,n=u+1,t=-1;n<i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n++}if(t==-1){for(n=0,i=u;n<i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n++}if(t==-1)return}this.setSelectionRange(t,t)},_MoveThousandRTL:function(){for(var f=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f),u=this._getCurrentPosition(),i=this._LogicFirstPos,n=u-1,t=-1;n>i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n--}if(t==-1){for(n=this._LogicLastPos,i=u;n>i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n--}if(t==-1)return}this.setSelectionRange(t,t)},_AdjustElementDecimalLTR:function(){var o=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o),s=this._getCurrentPosition(),u,t,n,i,f,e;if(r.get_Value().substring(s).indexOf(this.get_cultureDecimalPlaceholder())!=-1&&(u=r.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),t=u.indexOf(this.get_cultureDecimalPlaceholder()),t!=-1)){for(i=this._getClearMask(r.get_Value()),i!=""?(i=i.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",n=i.split(this.get_cultureDecimalPlaceholder())):n=this.get_cultureDecimalPlaceholder().split(this.get_cultureDecimalPlaceholder()),n[0]==""&&(n[0]="0"),f=u.length-t-1;n[1].length<f;)n[1]+="0";e=this._inputDirection;this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;this.loadValue(n[0]+this.get_cultureDecimalPlaceholder()+n[1],this._LogicLastPos);this._inputDirection=e;t+=this._LogicFirstPos+1;this.setSelectionRange(t,t)}},_AdjustElementDecimalRTL:function(){var r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),u=r.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),t=u.indexOf(this.get_cultureDecimalPlaceholder()),f,n,i,e,o;if(t!=-1){if(f=this._getCurrentPosition(),t+this._LogicFirstPos>=f){this._AdjustElementDecimalLTR();return}for(i=this._getClearMask(r.get_Value()),i!=""?(i=i.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",n=i.split(this.get_cultureDecimalPlaceholder())):n=this.get_cultureDecimalPlaceholder().split(this.get_cultureDecimalPlaceholder()),n[0]==""&&(n[0]="0"),e=u.length-t-1;n[1].length<e;)n[1]+="0";o=this._inputDirection;this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;this.loadValue(n[0]+this.get_cultureDecimalPlaceholder()+n[1],this._LogicLastPos);this._inputDirection=o;t+=this._LogicFirstPos+1;this.setSelectionRange(t,t)}},_AdjustTime:function(n,t){for(var r=!0,u,i=0;i<parseInt(n.length,10);i++)n.substring(i,i+1)!=this._promptCharacter&&(r=!1);if(r)return t;for(u=n.length,n=n.replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"";n.length<u;)n="0"+n;return n},_AdjustElementTime:function(){var c=this.get_element(),h=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c),n="",u=this._getCurrentPosition()-this._LogicFirstPos,f=this._maskvalid,t=u+this._LogicFirstPos,i=0,o,r,s,e;if(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){if(i=f.split(" ")[0].length+1,u<i){t=i+this._LogicFirstPos;this.setSelectionRange(t,t);return}f=f.split(" ")[1];u-=i}(f=f.split(":"),u<=1?(n="H",t=3+this._LogicFirstPos+i):u>=2&&u<=4&&f.length==2?(n="M",t=i+this._LogicFirstPos):u>=2&&u<=4&&f.length==3?(n="M",t=6+this._LogicFirstPos+i):f.length==3&&(n="S",t=i+this._LogicFirstPos),n!="")&&(o=h.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(o=this._SplitDateTime(o)[1]),r=o.split(this.get_cultureTimePlaceholder()),s=this._GetTimeElementText(n),n=="H"?(e=s+this.get_cultureTimePlaceholder()+r[1],r.length==3&&(e+=this.get_cultureTimePlaceholder()+r[2])):n=="M"?(e=r[0]+this.get_cultureTimePlaceholder()+s,r.length==3&&(e+=this.get_cultureTimePlaceholder()+r[2])):n=="S"&&(e=r[0]+this.get_cultureTimePlaceholder()+r[1]+(this.get_cultureTimePlaceholder()+s)),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(e=h.get_Value().substring(this._LogicFirstPos,i)+e),this.loadMaskValue(e,this._LogicFirstPos,this._LogicSymbol),this.setSelectionRange(t,t))},_GetTimeElementText:function(n){var t,r=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),i;return(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.substring(this._maskvalid.split(" ")[0].length+1)),i=r.split(this.get_cultureTimePlaceholder()),i[0]=i[0].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[0].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[0]=t),i[1]=i[1].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[1].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[1]=t),i.length==3&&(i[2]=i[2].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[2].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[2]=t)),n=="H")?i[0]:n=="M"?i[1]:i[2]},_AdjustElementDateTime:function(n){n==this.get_cultureDatePlaceholder()&&this._AdjustElementDate();n==this.get_cultureTimePlaceholder()&&this._AdjustElementTime()},_AdjustElementDate:function(){var l=this.get_element(),s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(l),f=s.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),h,e;this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(f=this._SplitDateTime(f)[0]);var u=f.split(this.get_cultureDatePlaceholder()),t="",n=this._getCurrentPosition()-this._LogicFirstPos,i=n+this._LogicFirstPos,r=this._maskvalid.indexOf("9999")!=-1?2:0;if(this.get_cultureDateFormat()=="DMY")if(n<=1)t="D",i=3+this._LogicFirstPos;else if(n>=2&&n<=4)t="M",i=6+this._LogicFirstPos;else{if(n>8+r&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos);return}t="Y";i=this._LogicFirstPos}else if(this.get_cultureDateFormat()=="MDY")if(n<=1)t="M",i=3+this._LogicFirstPos;else if(n>=2&&n<=4)t="D",i=6+this._LogicFirstPos;else{if(n>8+r&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos);return}t="Y";i=this._LogicFirstPos}else this.get_cultureDateFormat()=="DYM"?n<=1?(t="D",i=3+this._LogicFirstPos):n>=2&&n<=4+r?(t="Y",i=6+r+this._LogicFirstPos):(t="M",i=this._LogicFirstPos):this.get_cultureDateFormat()=="MYD"?n<=1?(t="M",i=3+this._LogicFirstPos):n>=2&&n<=4+r?(t="Y",i=6+r+this._LogicFirstPos):(t="D",i=this._LogicFirstPos):this.get_cultureDateFormat()=="YMD"?n<=1+r?(t="Y",i=3+r+this._LogicFirstPos):n>=2+r&&n<=4+r?(t="M",i=6+r+this._LogicFirstPos):(t="D",i=this._LogicFirstPos):this.get_cultureDateFormat()=="YDM"&&(n<=1+r?(t="Y",i=3+r+this._LogicFirstPos):n>=2+r&&n<=4+r?(t="D",i=6+r+this._LogicFirstPos):(t="M",i=this._LogicFirstPos));if(h=this._GetDateElementText(t),u[this.get_cultureDateFormat().indexOf(t)]=h,e=u[0]+this.get_cultureDatePlaceholder()+u[1]+this._cultureDatePlaceholder+u[2],this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){var a=s.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),c=this._SplitDateTime(a),o=c[1].split(" ");e+=o.length==2?" "+o[0]+" "+o[1]:" "+c[1]}this.loadMaskValue(e,this._LogicFirstPos,this._LogicSymbol);this.setSelectionRange(i,i)},_GetDateElementText:function(n){var t,i,r,u;return this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(r=this._SplitDateTime(this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1))[0],i=r.split(this.get_cultureDatePlaceholder())):i=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1).split(this.get_cultureDatePlaceholder()),i[this.get_cultureDateFormat().indexOf("D")]=i[this.get_cultureDateFormat().indexOf("D")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[this.get_cultureDateFormat().indexOf("D")].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[this.get_cultureDateFormat().indexOf("D")]=t),i[this.get_cultureDateFormat().indexOf("M")]=i[this.get_cultureDateFormat().indexOf("M")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[this.get_cultureDateFormat().indexOf("M")].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[this.get_cultureDateFormat().indexOf("M")]=t),u=this._maskvalid.indexOf("9999")!=-1?!0:!1,i[this.get_cultureDateFormat().indexOf("Y")]=i[this.get_cultureDateFormat().indexOf("Y")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[this.get_cultureDateFormat().indexOf("Y")].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",u?t!=""&&t.length<4&&(t=this._century.toString().substr(0,t.length)+t,i[this.get_cultureDateFormat().indexOf("Y")]=t):t!=""&&t.length<2&&(t="0"+t,i[this.get_cultureDateFormat().indexOf("Y")]=t),i[this.get_cultureDateFormat().indexOf(n)]},_GetBoundSelection:function(){var i=null,n=this.get_element(),t,f,r,e,u;return n.setSelectionRange?n.selectionStart!=n.selectionEnd&&(i={left:parseInt(n.selectionStart,10),right:parseInt(n.selectionEnd,10)}):document.selection&&(t=document.selection.createRange(),t.text!=""&&(f=parseInt(t.text.length,10),t.text=String.fromCharCode(3)+t.text,r=n.createTextRange(),r.findText(String.fromCharCode(3)),r.select(),e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),u=parseInt(e.get_Value().indexOf(String.fromCharCode(3)),10),document.selection.clear(),i={left:u,right:u+f})),i},_deleteTextSelection:function(){var n=this.get_element(),o=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),u=o.get_Value(),f=-1,t=-1,s=!1,c,l,e,r,h,i;if(n.setSelectionRange?n.selectionStart!=n.selectionEnd&&(c=parseInt(n.selectionStart,10),l=parseInt(n.selectionEnd,10),s=!0,f=l-c,t=n.selectionStart,n.selectionEnd=n.selectionStart):document.selection&&(e=document.selection.createRange(),e.text!=""&&(s=!0,r=e.text+String.fromCharCode(3),e.text=r,h=n.createTextRange(),h.findText(r),h.select(),t=o.get_Value().indexOf(r),document.selection.clear(),f=parseInt(r.length,10)-1)),s){for(i=0;i<f;i++)this._isValidMaskedEditPosition(t+i)&&(u=u.substring(0,t+i)+this._promptCharacter+u.substring(t+i+1),this._LogicTextMask=this._LogicTextMask.substring(0,t+i)+this._LogicPrompt+this._LogicTextMask.substring(t+i+1));o.set_Value(u);this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(t+=f)}return this._DirectSelText="",t},_isNormalChar:function(n,t){var i=!0;if(Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keydown"&&(this._SaveKeyDown=t),t<32)i=!1;else if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||n.type=="keydown")switch(t){case 33:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 34:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 35:Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keypress"?this._SaveKeyDown==35&&(i=!1):i=!1;break;case 36:Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keypress"?this._SaveKeyDown==36&&(i=!1):i=!1;break;case 37:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 38:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 39:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 40:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 45:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&Sys.Browser.agent!=Sys.Browser.Opera?n.rawEvent.which==0&&(i=!1):i=Sys.Browser.agent==Sys.Browser.Opera?!0:!1;break;case 86:case 118:n.rawEvent.shiftKey||!n.rawEvent.ctrlKey||n.rawEvent.altKey||(i=!1);break;case 46:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&Sys.Browser.agent!=Sys.Browser.Opera?n.rawEvent.which==0&&(i=!1):Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keypress"?this._SaveKeyDown==127&&(i=!1):i=!1;break;case 127:i=!1}return i},_KeyCode:function(n){var t=0;return n.keyIdentifier&&(n.charCode==63272?t=46:n.charCode==63302?t=45:n.charCode==63233?t=40:n.charCode==63235?t=39:n.charCode==63232?t=38:n.charCode==63234?t=37:n.charCode==63273?t=36:n.charCode==63275?t=35:n.charCode==63277?t=34:n.charCode==63276?t=33:n.charCode==3&&(t=13)),t==0&&n.charCode&&(t=n.charCode),t==0&&(t=n.keyCode),t},_InitValue:function(n,t){this._LogicSymbol="";var i=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i);r.set_Value(this._EmptyMask);n==this._EmptyMask||n==""?this.loadValue("",this._LogicFirstPos):this._maskType==Sys.Extended.UI.MaskedEditType.Date&&n!=""?n=this.ConvFmtDate(n,t):this._maskType==Sys.Extended.UI.MaskedEditType.Time&&n!=""?n=this.ConvFmtTime(n,t):this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&n!=""?n=this.ConvFmtDateTime(n,t):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&n!=""&&(n=this.ConvFmtNumber(n,t));this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&n!=""?this._maskType==Sys.Extended.UI.MaskedEditType.Number?(this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft,this.loadValue(n,this._LogicLastPos),this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight):this.loadValue(n,this._LogicFirstPos):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&n!=""&&this.loadValue(n,this._LogicLastPos);this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._InLostfocus&&this._LogicSymbol=="-"&&this._onBlurCssNegative!=""&&this.addCssClassMaskedEdit(this._onBlurCssNegative)},loadMaskValue:function(n,t,i){var f,r,u;for(this._createMask(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f.set_Value(this._EmptyMask),(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase().substring(0,1))!=-1?this._acceptAmPm&&this.insertAMPM(i.toUpperCase().substring(0,1)):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i),r=0,r=0;r<parseInt(n.length,10);r++)u=n.substring(r+t,r+t+1),this._processKey(t+r,u)&&this._insertContent(u,t+r)},containsAMPMLetters:function(n,t){var i=n.substring(t)},loadValue:function(n,t){var r,f,u,i;if(this._createMask(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f.set_Value(this._EmptyMask),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight)for(r=0;r<parseInt(n.length,10);r++){if(i=n.substring(r,r+1),(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=-1){if(this._acceptAmPm){this.insertAMPM(i);break}}else this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i);this._processKey(t,i)&&(this._maskType!=Sys.Extended.UI.MaskedEditType.Number&&this._insertContent(i,t),t=this._getNextPosition(t+1))}else if(this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(t==this._LogicLastInt){for(t=this._getPreviousPosition(t),u=n.split(this.get_cultureDecimalPlaceholder()),r=parseInt(u[0].length,10);r>0;r--)i=u[0].substring(r-1,r),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getPreviousPosition(t-1));if(u.length>1)for(t=this._getNextPosition(this._LogicLastInt),r=0;r<parseInt(u[1].length,10);r++)i=u[1].substring(r,r+1),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getNextPosition(t+1))}else for(r=parseInt(n.length,10);r>0;r--)if(i=n.substring(r-1,r),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&(this._LogicSymbol=="-"&&(this._LogicSymbol=" "),this.insertSignal(i)),this._processKey(t,i)&&this._insertContent(i,t),oldLogicPosition=t,t=this._getPreviousPosition(t-1),this._maskType===Sys.Extended.UI.MaskedEditType.Number&&t===oldLogicPosition)break},AutoFormatNumber:function(){var n,u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i,r,t;for(ValueText=u.get_Value(),i=this._autoCompleteValue,r=!1,n=this._LogicFirstPos;n<=this._LogicLastPos;n++)this._LogicTextMask.substring(n,n+1)==this._LogicPrompt?(t="0",i!=""&&(t=i.substring(n-this._LogicFirstPos,n+1-this._LogicFirstPos)),r&&(this._LogicTextMask=this._LogicTextMask.substring(0,n)+t+this._LogicTextMask.substring(n+1),ValueText=ValueText.substring(0,n)+t+ValueText.substring(n+1))):this._LogicMask.substring(n,n+1)==this._LogicPrompt&&"123456789".indexOf(this._LogicTextMask.substring(n,n+1))!=-1&&(r=!0);return u.set_Value(ValueText),ValueText},getCurrentHour:function(n){return n.getHours().toString()},AutoFormatTime:function(){var g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),n,d,s,p,c,w,t,b,f,k,e,v,r,u,y,o;ValueText=g.get_Value();n=this._autoCompleteValue;n.indexOf(this.get_cultureTimePlaceholder())==-1&&(n="");this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(d=this._SplitDateTime(ValueText),s=d[1].split(" "),ValueText=s.length==2?s[0]+" "+s[1]:s[0],n!=""&&(n.indexOf(this.get_cultureDatePlaceholder())==-1&&(n=" "+n),p=this._SplitDateTime(n),c=p[1].split(" "),n=c.length==2?c[0]+" "+c[1]:p[0]));w=new Date;t=this.getCurrentHour(w);t.length<2&&(t="0"+t);n!=""&&(t=n.substring(0,2));var l=!1,h=!1,a="",i="",f="";return this.get_cultureAMPMPlaceholder()!=""&&(b=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),a=b[0],i=b[1],n==""?(f=a,t>12&&(t=(parseInt(t,10)-12).toString(),t.length<2&&(t="0"+t),f=i)):(f=a,n.indexOf(i)!=-1&&(f=i)),l=!0,ValueText.indexOf(i)!=-1&&i!=""&&(h=!0),this._acceptAmPm?(k=!0,(ValueText.substring(0,1)!=this._promptCharacter||ValueText.substring(1,2)!=this._promptCharacter)&&(k=!1),k&&f!=""&&(l=!0,h=!1,i==f&&(h=!0))):(f="",h=!1,l=!1)),e=w.getMinutes().toString(),e.length<2&&(e="0"+e),n!=""&&(e=n.substring(3,5)),v="00",this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(r=ValueText.substring(0,2),r=this._AdjustTime(r,t),u=ValueText.substring(3,5),u=this._AdjustTime(u,e)):(r=ValueText.substring(this._LogicFirstPos,this._LogicFirstPos+2),r=this._AdjustTime(r,t),u=ValueText.substring(this._LogicFirstPos+3,this._LogicFirstPos+5),u=this._AdjustTime(u,e)),y=this._maskvalid,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(y=y.split(" ")[1]),y=="99:99:99"?(n!=""&&(v=n.substring(6)),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(o=ValueText.substring(6,8),o=this._AdjustTime(o,v)):(o=ValueText.substring(this._LogicFirstPos+6,this._LogicFirstPos+8),o=this._AdjustTime(o,v)),ValueText=r+this.get_cultureTimePlaceholder()+u+this.get_cultureTimePlaceholder()+o):ValueText=r+this.get_cultureTimePlaceholder()+u,h?ValueText+=" "+i:l&&(ValueText+=" "+a),this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime&&this.loadValue(ValueText,this._LogicFirstPos),ValueText},AutoFormatDateTime:function(){var n=this.AutoFormatDate(),t=this.AutoFormatTime();return this.loadValue(n+" "+t,this._LogicFirstPos),n+" "+t},AutoFormatDate:function(){var u=this._GetDateElementText("D").replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",f=this._GetDateElementText("M").replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",e=this._GetDateElementText("Y").replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",c=this._maskvalid.indexOf("9999")!=-1?!0:!1,o=this._autoCompleteValue,i,r,t,h,n,l,s;if(o.indexOf(this.get_cultureDatePlaceholder())==-1&&(o=""),o=="")h=new Date,i=h.getUTCDate().toString(),i.length<2&&(i="0"+i),r=(h.getUTCMonth()+1).toString(),r.length<2&&(r="0"+r),t=h.getUTCFullYear().toString(),c||(t=h.getUTCFullYear().toString().substring(2));else if(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(o.indexOf(this.get_cultureTimePlaceholder())==-1&&(o=o+" "),l=this._SplitDateTime(o)[0],n=l.split(this.get_cultureDatePlaceholder())):n=o.split(this.get_cultureDatePlaceholder()),this.get_cultureDateFormat()=="DMY"?(i=n[0],r=n[1],t=n[2]):this.get_cultureDateFormat()=="MDY"?(i=n[1],r=n[0],t=n[2]):this.get_cultureDateFormat()=="DYM"?(i=n[0],r=n[2],t=n[1]):this.get_cultureDateFormat()=="MYD"?(i=n[2],r=n[0],t=n[1]):this.get_cultureDateFormat()=="YMD"?(i=n[2],r=n[1],t=n[0]):this.get_cultureDateFormat()=="YDM"&&(i=n[1],r=n[2],t=n[0]),i.length<2&&(i="0"+i),r.length<2&&(r="0"+r),c)while(t.length<4)t="0"+t;else while(t.length<2)t="0"+t;return u==""&&(u=i),f==""&&(f=r),e==""&&(e=t),this.get_cultureDateFormat()=="DMY"?s=u+this.get_cultureDatePlaceholder()+f+this._cultureDatePlaceholder+e:this.get_cultureDateFormat()=="MDY"?s=f+this.get_cultureDatePlaceholder()+u+this._cultureDatePlaceholder+e:this.get_cultureDateFormat()=="DYM"?s=u+this.get_cultureDatePlaceholder()+e+this._cultureDatePlaceholder+f:this.get_cultureDateFormat()=="MYD"?s=f+this.get_cultureDatePlaceholder()+e+this._cultureDatePlaceholder+u:this.get_cultureDateFormat()=="YMD"?s=e+this.get_cultureDatePlaceholder()+f+this._cultureDatePlaceholder+u:this.get_cultureDateFormat()=="YDM"&&(s=e+this.get_cultureDatePlaceholder()+u+this._cultureDatePlaceholder+f),this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime&&this.loadValue(s,this._LogicFirstPos),s},ConvFmtNumber:function(n){return this._maskvalid.split(this.get_cultureDecimalPlaceholder()).length==2&&n.substring(n.length-1,n.length)==this.get_cultureDecimalPlaceholder()&&(n=n.substring(0,n.length-1)),n},ConvFmtTime:function(n,t){var a=0,v=!1,y=!1,f="",e="",l,c,i,r,u,o,s,h;if(this.get_cultureAMPMPlaceholder()!=""&&(f=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator)[0],e=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator)[1]),t&&(l="",c="",this._cultureAMPMPlaceholder!=""&&(l=this._cultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[0],c=this._cultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[1]),this.get_userTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour&&(n=n.replace(new RegExp("(\\"+l+")","g"),""),n.indexOf(c)!=-1&&(a=12),n=n.replace(new RegExp("(\\"+c+")","g"),""))),n.indexOf(f)!=-1&&f!=""?v=!0:n.indexOf(e)!=-1&&e!=""&&(y=!0),f!=""&&(n=n.replace(new RegExp("(\\"+f+")","g"),"")),e!=""&&(n=n.replace(new RegExp("(\\"+e+")","g"),"")),n=n.replace(new RegExp("(\\ )","g"),""),i=n.split(this.get_cultureTimePlaceholder()),r=this._maskvalid,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.split(" ")[1]),r=r.split(":"),parseInt(i.length,10)<2||parseInt(i.length,10)>3)return"";if(u=parseInt(i[0],10)+a,u=u.toString(),u.length<r[0].length)while(u.length<r[0].length)u="0"+u;if(i[0]=u,o=parseInt(i[1],10)+"",o.length<r[1].length)while(o.length<r[1].length)o="0"+o;if(i[1]=o,s="",parseInt(i.length,10)==3){if(h=parseInt(i[2],10)+"",h.length<r[2].length)while(h.length<r[2].length)h="0"+h;i[2]=h;s=i[0]+this.get_cultureTimePlaceholder()+i[1]+this.get_cultureTimePlaceholder()+i[2]}else s=i[0]+this.get_cultureTimePlaceholder()+i[1];return v?s+=" "+f:y&&(s+=" "+e),s},ConvFmtDateTime:function(n,t){var u=this._SplitDateTime(n),r=u[0],i=u[1];return i.split(" ").length==2&&(i+=" "+i.split(" ")[1]),r=this.ConvFmtDate(r,t),i=this.ConvFmtTime(i,t),r+" "+i},_filter:function(n,t){for(var r=[],i=0;i<n.length;i++)t(n[i])&&r.push(n[i]);return r},_map:function(n,t){for(var r=[],i=0;i<n.length;i++)r.push(t(n[i]));return r},ConvFmtDate:function(n,t){var o,i,r,u,f,e;if(i=this._filter(n.split(this.get_CultureDatePlaceholder()),function(n){return n!=""}),i=this._map(i,function(n){return n.replace(/[^\/\d]/g,"")}),t&&(o=n.split(this.get_CultureDatePlaceholder()),this.get_UserDateFormat()!=Sys.Extended.UI.MaskedEditUserDateFormat.None&&(this.get_UserDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear&&(this._cultureDateFormat="DMY"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth&&(this._cultureDateFormat="DYM"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear&&(this._cultureDateFormat="MDY"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay&&(this._cultureDateFormat="MYD"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth&&(this._cultureDateFormat="YDM"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay&&(this._cultureDateFormat="YMD"),i[this.get_cultureDateFormat().indexOf("D")]=o[this._cultureDateFormat.indexOf("D")],i[this.get_cultureDateFormat().indexOf("M")]=o[this._cultureDateFormat.indexOf("M")],i[this.get_cultureDateFormat().indexOf("Y")]=o[this._cultureDateFormat.indexOf("Y")])),r=this._maskvalid,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.split(" ")[0]),r=r.split("/"),parseInt(i.length,10)!=3)return"";if(u=parseInt(i[this.get_cultureDateFormat().indexOf("D")],10)+"",u.length<r[this.get_cultureDateFormat().indexOf("D")].length)while(u.length<r[this.get_cultureDateFormat().indexOf("D")].length)u="0"+u;if(i[this.get_cultureDateFormat().indexOf("D")]=u,f=parseInt(i[this.get_cultureDateFormat().indexOf("M")],10)+"",f.length<r[this.get_cultureDateFormat().indexOf("M")].length)while(f.length<r[this.get_cultureDateFormat().indexOf("M")].length)f="0"+f;for(i[this.get_cultureDateFormat().indexOf("M")]=f,e=parseInt(i[this.get_cultureDateFormat().indexOf("Y")],10)+"";e.length<r[this.get_cultureDateFormat().indexOf("Y")].length;)e="0"+e;return i[this.get_cultureDateFormat().indexOf("Y")]=e,i[0]+this.get_cultureDatePlaceholder()+i[1]+this.get_cultureDatePlaceholder()+i[2]},addCssClassMaskedEdit:function(n){var t=this.get_element();Sys.UI.DomElement.removeCssClass(t,this._onBlurCssNegative);Sys.UI.DomElement.removeCssClass(t,this._onFocusCssClass);Sys.UI.DomElement.removeCssClass(t,this._onFocusCssNegative);Sys.UI.DomElement.removeCssClass(t,this._onInvalidCssClass);n!=""&&Sys.UI.DomElement.addCssClass(t,n)},AddCssClassMaskedEdit:function(n){Sys.Extended.Deprecated("AddCssClassMaskedEdit(CssClass)","addCssClassMaskedEdit(cssClass)");this.addCssClassMaskedEdit(n)},_SetCancelEvent:function(n){typeof n.returnValue!="undefined"&&(n.returnValue=!1);typeof n.cancelBubble!="undefined"&&(n.cancelBubble=!0);typeof n.preventDefault!="undefined"&&n.preventDefault();typeof n.stopPropagation!="undefined"&&n.stopPropagation()},_CaptureServerValidators:function(){var u=!0,t=this._ExternalMessageError,n,r,i;if(typeof Page_Validators!="undefined")for(n=null,r=!0,i=0;i<Page_Validators.length;i++)n=Page_Validators[i],(typeof n.enabled=="undefined"||n.enabled!=!1)&&n.TargetValidator==this.get_element().id&&(n.isvalid||(r&&(r=!1,t=""),typeof n.errormessage=="string"&&(t!=""&&(t+=", "),t+=n.errormessage),u=!1));return this._ExternalMessageError=t,u},_CaptureClientsValidators:function(){var ret=!0,msg="",ctrval,i,crtret;if(this._ExternalMessageError=msg,typeof Page_Validators!="undefined")for(ctrval=null,i=0;i<Page_Validators.length;i++)ctrval=Page_Validators[i],(typeof ctrval.enabled=="undefined"||ctrval.enabled!=!1)&&ctrval.TargetValidator==this.get_element().id&&(typeof ctrval.evaluationfunction=="function"?(crtret=ctrval.evaluationfunction(ctrval),crtret||(ret=!1,typeof ctrval.errormessage=="string"&&(msg!=""&&(msg+=", "),msg+=ctrval.errormessage))):typeof ctrval.evaluationfunction=="string"&&(eval("crtret = "+ctrval.evaluationfunction+"("+ctrval.id+")"),crtret||(ret=!1,typeof ctrval.errormessage=="string"&&(msg!=""&&(msg+=", "),msg+=ctrval.errormessage))));return this._ExternalMessageError=msg,ret},showTooltipMessage:function(n){var r,i,t;if(typeof Page_Validators!="undefined")for(r="",n||(r=this._CurrentMessageError,this._CurrentMessageError=""),i=0,t=null,i=0;i<Page_Validators.length;i++)if(t=Page_Validators[i],t.TargetValidator==this.get_element().id&&t.IsMaskedEdit=="true"){if(!n){if(t.innerHTML=r,typeof t.display=="string"){if(t.display=="None")return;if(t.display=="Dynamic"){t.style.display=t.isvalid?"none":"inline";return}}return}if(this._CurrentMessageError=t.innerHTML,t.innerHTML=t.TooltipMessage,typeof t.display=="string"){if(t.display=="None")return;if(t.display=="Dynamic"){t.style.display="inline";return}}t.style.visibility="visible";return}},ShowTooltipMessage:function(n){Sys.Extended.Deprecated("ShowTooltipMessage(Visible)","showTooltipMessage(visible)");this.showTooltipMessage(n)},_insertContent:function(n,t){var r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=r.get_Value();i=i.substring(0,t)+n+i.substring(t+1);this._LogicTextMask=this._LogicTextMask.substring(0,t)+n+this._LogicTextMask.substring(t+1);r.set_Value(i)},_insertContentRight:function(n){var c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=c.get_Value(),u=this._getLastEmptyPosition(),t,e,s,r,f,h,o;if(!(u<0)){if(e=i.substring(u+1),s=this._LogicTextMask.substring(u+1),i=i.substring(0,u)+this._promptCharacter,this._LogicTextMask=this._LogicTextMask.substring(0,u)+this._LogicPrompt,this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft){for(f=e.split(this.get_cultureDecimalPlaceholder()),h=s.split(this.get_cultureDecimalPlaceholder()),t=0;t<parseInt(f[0].length,10);t++)this._isValidMaskedEditPosition(u+1+t)?(i+=this._promptCharacter,this._LogicTextMask+=this._LogicPrompt):(i+=f[0].substring(t,t+1),this._LogicTextMask+=h[0].substring(t,t+1));for((f.length=2)&&(i+=this.get_cultureDecimalPlaceholder()+f[1],this._LogicTextMask+=this.get_cultureDecimalPlaceholder()+h[1]),r=this._getNextPosition(u),t=0;t<parseInt(f[0].length,10);t++)this._isValidMaskedEditPosition(u+1+t)&&h[0].substring(t,t+1)!=this._LogicPrompt&&(i=i.substring(0,r)+f[0].substring(t,t+1)+i.substring(r+1),this._LogicTextMask=this._LogicTextMask.substring(0,r)+h[0].substring(t,t+1)+this._LogicTextMask.substring(r+1),r=this._getNextPosition(r+1))}else{for(t=0;t<parseInt(e.length,10);t++)this._isValidMaskedEditPosition(u+1+t)?(i+=this._promptCharacter,this._LogicTextMask+=this._LogicPrompt):(i+=e.substring(t,t+1),this._LogicTextMask+=s.substring(t,t+1));for(r=this._getNextPosition(u),t=0;t<parseInt(e.length,10);t++)this._isValidMaskedEditPosition(u+1+t)&&s.substring(t,t+1)!=this._LogicPrompt&&(i=i.substring(0,r)+e.substring(t,t+1)+i.substring(r+1),this._LogicTextMask=this._LogicTextMask.substring(0,r)+s.substring(t,t+1)+this._LogicTextMask.substring(r+1),r=this._getNextPosition(r+1))}o=0;this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(o=this._LogicLastPos-this._LogicLastInt+1);i=i.substring(0,this._LogicLastPos-o)+n+i.substring(this._LogicLastPos-o+1);this._LogicTextMask=this._LogicTextMask.substring(0,this._LogicLastPos-o)+n+this._LogicTextMask.substring(this._LogicLastPos-o+1);c.set_Value(i)}},insertAMPM:function(n){var u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=u.get_Value(),r=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),t="";r.length==2&&(n.toUpperCase()==this.getCultureFirstLetterAM().toUpperCase()?t=r[0]:n.toUpperCase()==this.getCultureFirstLetterPM().toUpperCase()&&(t=r[1]),this._LogicSymbol=t);i=i.substring(0,this._LogicLastPos+2)+t+i.substring(this._LogicLastPos+2+t.length);u.set_Value(i)},InsertAMPM:function(n){Sys.Extended.Deprecated("InsertAMPM(value)","insertAMPM(value)");this.insertAMPM(n)},insertSignal:function(n){var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t=i.get_Value();n=="-"&&this._LogicSymbol=="-"&&(n="+");n=="+"?(n=" ",this._LogicSymbol="",this._InLostfocus||this._onFocusCssClass==""?this._InLostfocus||this.addCssClassMaskedEdit(""):this.addCssClassMaskedEdit(this._onFocusCssClass)):(this._LogicSymbol="-",this._InLostfocus||this._onFocusCssNegative==""||this.addCssClassMaskedEdit(this._onFocusCssNegative));this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left?t=t.substring(0,this._LogicFirstPos-1)+n+t.substring(this._LogicFirstPos):this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right&&(t=t.substring(0,this._LogicLastPos+1)+n+t.substring(this._LogicLastPos+2));i.set_Value(t)},InsertSignal:function(n){Sys.Extended.Deprecated("InsertSignal(value)","insertSignal(value)");this.insertSignal(n)},setSelectionRange:function(n,t){var r=this.get_element(),i;r.setSelectionRange?r.setSelectionRange(n,t):r.createTextRange&&(i=r.createTextRange(),i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",n),i.select())},_getLastEmptyPosition:function(){var n=this._LogicLastPos,t;for(this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicLastInt!=-1&&(t=this._getCurrentPosition(),t<=this._LogicLastInt&&(n=this._LogicLastInt));n>=0&&this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt;)n--;return n},_isValidMaskedEditPosition:function(n){return this._LogicMask.substring(n,n+1)==this._LogicPrompt},_getNextPosition:function(n){while(!this._isValidMaskedEditPosition(n)&&n<this._LogicLastPos+1)n++;return n>this._LogicLastPos+1&&(n=this._LogicLastPos+1),n},_getPreviousPosition:function(n){while(!this._isValidMaskedEditPosition(n)&&n>this._LogicFirstPos)n--;return n<this._LogicFirstPos&&(n=this._LogicFirstPos),n},_getCurrentPosition:function(){var n=0,i=this.get_element(),t,r,u,f;return i.setSelectionRange?n=parseInt(i.selectionStart,10):document.selection&&(t=document.selection.createRange(),t.text!=""?(r="",this._DirectSelText=="R"?r=t.text+String.fromCharCode(3):this._DirectSelText=="L"&&(r=String.fromCharCode(3)+t.text),t.text=r,this._DirectSelText==""):(t.text=String.fromCharCode(3),this._DirectSelText==""),u=i.createTextRange(),u.findText(String.fromCharCode(3)),u.select(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i),n=f.get_Value().indexOf(String.fromCharCode(3)),document.selection.clear()),n>this._LogicLastPos+1&&(n=this._LogicLastPos+1),n<this._LogicFirstPos&&(n=this._LogicFirstPos),n},_processKey:function(n,t){var r=this._LogicMaskConv,i;if(r.substring(n,n+1)=="9")i=this._charNumbers;else if(r.substring(n,n+1).toUpperCase()=="L")i=this._charLetters+this._charLetters.toLowerCase();else if(r.substring(n,n+1)=="$")i=this._charLetters+this._charLetters.toLowerCase()+" ";else if(r.substring(n,n+1).toUpperCase()=="C")i=this._filtered;else if(r.substring(n,n+1).toUpperCase()=="A")i=this._charLetters+this._charLetters.toLowerCase()+this._filtered;else if(r.substring(n,n+1).toUpperCase()=="N")i=this._charNumbers+this._filtered;else if(r.substring(n,n+1)=="?")i="";else return!1;return i==""?!0:!i||i.length==0||i.indexOf(t)!=-1},_createMask:function(){this._maskConv==""&&this._mask!=""&&this._convertMask();var t=this._maskConv,n=0,i="",r="",u=!1;for(this._LogicTextMask="",this._QtdValidInput=0;n<parseInt(t.length,10);)t.substring(n,n+1)==this._charEscape&&u==!1?u=!0:this._CharsEditMask.indexOf(t.substring(n,n+1))==-1?u==!0?(u=!1,i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicEscape):this._CharsSpecialMask.indexOf(t.substring(n,n+1))!=-1?(this._QtdValidInput++,t.substring(n,n+1)=="/"?(i+=this.get_cultureDatePlaceholder(),r+="/",this._LogicTextMask+=this.get_cultureDatePlaceholder()):t.substring(n,n+1)==":"?(i+=this.get_cultureTimePlaceholder(),r+=":",this._LogicTextMask+=this.get_cultureTimePlaceholder()):t.substring(n,n+1)==","?(i+=this.get_cultureThousandsPlaceholder(),r+=".",this._LogicTextMask+=this.get_cultureThousandsPlaceholder()):t.substring(n,n+1)=="."&&(i+=this.get_cultureDecimalPlaceholder(),r+=",",this._LogicTextMask+=this.get_cultureDecimalPlaceholder())):(i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=t.substring(n,n+1)):u==!0?(u=!1,i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicEscape):(this._QtdValidInput++,i+=this._promptCharacter,r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicPrompt),n++;for(this._LogicFirstPos=-1,this._LogicLastPos=-1,this._LogicLastInt=-1,this._LogicMask=this._LogicTextMask,n=0;n<parseInt(this._LogicMask.length,10);n++){if(this._LogicFirstPos==-1&&this._LogicMask.substring(n,n+1)==this._LogicPrompt&&(this._LogicFirstPos=n),this._LogicMask.substring(n,n+this.get_cultureDatePlaceholder().length)==this.get_cultureDatePlaceholder())continue;else this._LogicMask.substring(n,n+1)==" "&&(this._LogicDateTimeSepPos=n);this._LogicMask.substring(n,n+1)==this._LogicPrompt&&(this._LogicLastPos=n);this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicMask.substring(n,n+1)==this.get_cultureDecimalPlaceholder()&&(this._LogicLastInt=n)}this._maskvalid=r.substring(this._LogicFirstPos,this._LogicLastPos+1);this._EmptyMask=i},_getClearMask:function(){for(var n=0,t="",r=0,i=!1;n<parseInt(this._LogicTextMask.length,10);)r<this._QtdValidInput&&(this._isValidMaskedEditPosition(n)&&this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt?(t==""&&i&&(t+="0"+this.get_cultureDecimalPlaceholder(),i=!1),t+=this._LogicTextMask.substring(n,n+1),r++):this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt&&this._LogicTextMask.substring(n,n+1)!=this._LogicEscape&&(this._LogicTextMask.substring(n,n+this.get_cultureDatePlaceholder().length)==this.get_cultureDatePlaceholder()&&(this._maskType==Sys.Extended.UI.MaskedEditType.Date||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)?(t+=t==""?"":this.get_cultureDatePlaceholder(),n+=this.get_cultureDatePlaceholder().length-1):this._LogicTextMask.substring(n,n+1)==this.get_cultureTimePlaceholder()&&(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)?t+=t==""?"":this.get_cultureTimePlaceholder():this._LogicTextMask.substring(n,n+1)==" "&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?t+=t==""?"":" ":this._LogicTextMask.substring(n,n+1)==this.get_cultureThousandsPlaceholder()&&this._maskType==Sys.Extended.UI.MaskedEditType.Number?t+=t==""?"":this.get_cultureThousandsPlaceholder():this._LogicTextMask.substring(n,n+1)==this.get_cultureDecimalPlaceholder()&&this._maskType==Sys.Extended.UI.MaskedEditType.Number&&(t+=t==""?"":this.get_cultureDecimalPlaceholder(),t==""&&(i=!0)))),n++;return this._LogicSymbol!=""&&t!=""&&(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?t+=" "+this._LogicSymbol:this._maskType==Sys.Extended.UI.MaskedEditType.Number&&(t=this._LogicSymbol+t)),t},_convertMask:function(){var t,f,n,o,s,h,i;for(this._maskConv="",t="",f="",n=0;n<parseInt(this._mask.length,10);n++)if(this._CharsEditMask.indexOf(this._mask.substring(n,n+1))!=-1)t.length==0?(this._maskConv+=this._mask.substring(n,n+1),t="",f=this._mask.substring(n,n+1)):this._mask.substring(n,n+1)=="9"?t+="9":this._mask.substring(n,n+1)=="0"&&(t+="0");else if(this._CharsEditMask.indexOf(this._mask.substring(n,n+1))==-1&&this._mask.substring(n,n+1)!=this._DelimitStartDup&&this._mask.substring(n,n+1)!=this._DelimitEndDup)t.length==0?(this._maskConv+=this._mask.substring(n,n+1),t="",f=""):this._charNumbers.indexOf(this._mask.substring(n,n+1))!=-1&&(t+=this._mask.substring(n,n+1));else if(this._mask.substring(n,n+1)==this._DelimitStartDup&&t=="")t="0";else if(this._mask.substring(n,n+1)==this._DelimitEndDup&&t!=""){if(o=parseInt(t,10)-1,o>0)for(s=0;s<o;s++)this._maskConv+=f;t="";f=""}var u=-1,r=-1,e=!1;for(n=0;n<parseInt(this._maskConv.length,10);n++)this._maskConv.substring(n,n+1)!=this._charEscape||e?this._CharsEditMask.indexOf(this._maskConv.substring(n,n+1))==-1||e?e&&(e=!1):(u==-1&&(u=n),r=n):e=!0;if((this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this._acceptAmPm){if(h=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),i="",h.length==2)for(i=this._charEscape+" ",n=0;n<parseInt(h[0].length,10);n++)i+=this._charEscape+" ";this._maskConv=this._maskConv.substring(0,r+1)+i+this._maskConv.substring(r+1)}else if(this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._displayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Left){for(i="",n=0;n<parseInt(this.get_cultureCurrencySymbolPlaceholder().length,10);n++)i+=this._CharsEditMask.indexOf(this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1))==-1?this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1):this._charEscape+this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1);i+=this._charEscape+" ";this._maskConv=this._maskConv.substring(0,u)+i+this._maskConv.substring(u);u+=i.length;r+=i.length}else if(this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._displayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Right){for(i=this._charEscape+" ",n=0;n<parseInt(this.get_cultureCurrencySymbolPlaceholder().length,10);n++)i+=this._CharsEditMask.indexOf(this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1))==-1?this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1):this._charEscape+this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1);this._maskConv=this._maskConv.substring(0,r+1)+i+this._maskConv.substring(r+1)}this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right?this._maskConv=this._maskConv.substring(0,r+1)+this._charEscape+" "+this._maskConv.substring(r+1):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left&&(this._maskConv=this._maskConv.substring(0,u)+this._charEscape+" "+this._maskConv.substring(u));this._convertMaskNotEscape()},_convertMaskNotEscape:function(){this._LogicMaskConv="";for(var t=this._maskConv.replace(/(\/)/g,this.get_cultureDatePlaceholder()),i=!1,n=0;n<parseInt(t.length,10);n++)t.substring(n,n+1)==this._charEscape?i=!0:i?(this._LogicMaskConv+=this._LogicEscape,i=!1):this._LogicMaskConv+=t.substring(n,n+1)},get_mask:function(){return this._maskConv==""&&this._mask!=""&&this._convertMask(),this._maskConv},set_mask:function(n){this._mask=n;this.raisePropertyChanged("mask")},get_Mask:function(){return Sys.Extended.Deprecated("get_Mask()","get_mask()"),this.get_mask()},set_Mask:function(n){Sys.Extended.Deprecated("set_Mask(value)","set_mask(value)");this.set_mask(n)},get_filtered:function(){return this._filtered},set_filtered:function(n){this._filtered=n;this.raisePropertyChanged("filtered")},get_Filtered:function(){return Sys.Extended.Deprecated("get_Filtered()","get_filtered()"),this.get_filtered()},set_Filtered:function(n){Sys.Extended.Deprecated("set_Filtered(value)","set_filtered(value)");this.set_filtered(n)},get_inputDirection:function(){return this._inputDirection},set_inputDirection:function(n){this._inputDirection=n;this.raisePropertyChanged("inputDirection")},get_InputDirection:function(){return Sys.Extended.Deprecated("get_InputDirection()","get_inputDirection()"),this.get_inputDirection()},set_InputDirection:function(n){Sys.Extended.Deprecated("set_InputDirection(value)","set_inputDirection(value)");this.set_inputDirection(n)},get_promptCharacter:function(){return this._promptCharacter},set_promptCharacter:function(n){this._promptCharacter=n;this.raisePropertyChanged("promptCharacter")},get_PromptCharacter:function(){return Sys.Extended.Deprecated("get_PromptCharacter()","get_promptCharacter()"),this.get_promptCharacter()},set_PromptCharacter:function(n){Sys.Extended.Deprecated("set_PromptCharacter(value)","set_promptCharacter(value)");this.set_promptCharacter(n)},get_onFocusCssClass:function(){return this._onFocusCssClass},set_onFocusCssClass:function(n){this._onFocusCssClass=n;this.raisePropertyChanged("onFocusCssClass")},get_OnFocusCssClass:function(){return Sys.Extended.Deprecated("get_OnFocusCssClass()","get_onFocusCssClass()"),this.get_onFocusCssClass()},set_OnFocusCssClass:function(n){Sys.Extended.Deprecated("set_OnFocusCssClass(value)","set_onFocusCssClass(value)");this.set_onFocusCssClass(n)},get_onInvalidCssClass:function(){return this._onInvalidCssClass},set_onInvalidCssClass:function(n){this._onInvalidCssClass=n;this.raisePropertyChanged("onInvalidCssClass")},get_OnInvalidCssClass:function(){return Sys.Extended.Deprecated("get_OnInvalidCssClass()","get_onInvalidCssClass()"),this.get_onInvalidCssClass()},set_OnInvalidCssClass:function(n){Sys.Extended.Deprecated("set_OnInvalidCssClass(value)","set_onInvalidCssClass(value)");this.set_onInvalidCssClass(n)},get_cultureName:function(){return this._cultureName},set_cultureName:function(n){this._cultureName=n;this.raisePropertyChanged("cultureName")},get_CultureName:function(){return Sys.Extended.Deprecated("get_CultureName()","get_cultureName()"),this.get_cultureName()},set_CultureName:function(n){Sys.Extended.Deprecated("set_CultureName(value)","set_cultureName(value)");this.set_cultureName(n)},get_cultureDatePlaceholder:function(){return this._cultureDatePlaceholder},set_cultureDatePlaceholder:function(n){this._cultureDatePlaceholder=n;this.raisePropertyChanged("cultureDatePlaceholder")},get_CultureDatePlaceholder:function(){return Sys.Extended.Deprecated("get_CultureDatePlaceholder()","get_cultureDatePlaceholder()"),this.get_cultureDatePlaceholder()},set_CultureDatePlaceholder:function(n){Sys.Extended.Deprecated("set_CultureDatePlaceholder(value)","set_cultureDatePlaceholder(value)");this.set_cultureDatePlaceholder(n)},get_cultureTimePlaceholder:function(){return this._cultureTimePlaceholder},set_cultureTimePlaceholder:function(n){this._cultureTimePlaceholder=n;this.raisePropertyChanged("cultureTimePlaceholder")},get_CultureTimePlaceholder:function(){return Sys.Extended.Deprecated("get_CultureTimePlaceholder()","get_cultureTimePlaceholder()"),this.get_cultureTimePlaceholder()},set_CultureTimePlaceholder:function(n){Sys.Extended.Deprecated("set_CultureTimePlaceholder(value)","set_cultureTimePlaceholder(value)");this.set_cultureTimePlaceholder(n)},get_cultureDecimalPlaceholder:function(){return this._cultureDecimalPlaceholder},set_cultureDecimalPlaceholder:function(n){this._cultureDecimalPlaceholder=n;this.raisePropertyChanged("cultureDecimalPlaceholder")},get_CultureDecimalPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureDecimalPlaceholder()","get_cultureDecimalPlaceholder()"),this.get_cultureDecimalPlaceholder()},set_CultureDecimalPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureDecimalPlaceholder(value)","set_cultureDecimalPlaceholder(value)");this.set_cultureDecimalPlaceholder(n)},get_cultureThousandsPlaceholder:function(){return this._cultureThousandsPlaceholder},set_cultureThousandsPlaceholder:function(n){this._cultureThousandsPlaceholder=n;this.raisePropertyChanged("cultureThousandsPlaceholder")},get_CultureThousandsPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureThousandsPlaceholder()","get_cultureThousandsPlaceholder()"),this.get_cultureThousandsPlaceholder()},set_CultureThousandsPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureThousandsPlaceholder(value)","set_cultureThousandsPlaceholder(value)");this.set_cultureThousandsPlaceholder(n)},get_cultureDateFormat:function(){var n=this._cultureDateFormat;switch(this.get_userDateFormat()){case Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear:n="DMY";break;case Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth:n="DYM";break;case Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear:n="MDY";break;case Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay:n="MYD";break;case Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth:n="YDM";break;case Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay:n="YMD"}return n},set_cultureDateFormat:function(n){this._cultureDateFormat=n;this.raisePropertyChanged("cultureDateFormat")},get_CultureDateFormat:function(){return Sys.Extended.Deprecated("get_CultureDateFormat()","get_cultureDateFormat()"),this.get_cultureDateFormat()},set_CultureDateFormat:function(n){Sys.Extended.Deprecated("set_CultureDateFormat(value)","set_cultureDateFormat(value)");this.set_cultureDateFormat(n)},get_cultureCurrencySymbolPlaceholder:function(){return this._cultureCurrencySymbolPlaceholder},set_cultureCurrencySymbolPlaceholder:function(n){this._cultureCurrencySymbolPlaceholder=n;this.raisePropertyChanged("cultureCurrencySymbolPlaceholder")},get_CultureCurrencySymbolPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureCurrencySymbolPlaceholder()","get_cultureCurrencySymbolPlaceholder()"),this.get_cultureCurrencySymbolPlaceholder()},set_CultureCurrencySymbolPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureCurrencySymbolPlaceholder(value)","set_cultureCurrencySymbolPlaceholder(value)");this.set_cultureCurrencySymbolPlaceholder(n)},get_cultureAMPMPlaceholder:function(){var n=this._cultureAMPMPlaceholder;return(n.split(this._AMPMPlaceholderSeparator).length!=2||n==this._AMPMPlaceholderSeparator)&&(n=""),this.get_userTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour&&(n=""),n},set_cultureAMPMPlaceholder:function(n){this._cultureAMPMPlaceholder=n;this.raisePropertyChanged("cultureAMPMPlaceholder")},get_CultureAMPMPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureAMPMPlaceholder()","get_cultureAMPMPlaceholder()"),this.get_cultureAMPMPlaceholder()},set_CultureAMPMPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureAMPMPlaceholder(value)","set_cultureAMPMPlaceholder(value)");this.set_cultureAMPMPlaceholder(n)},getCultureFirstLettersAMPM:function(){if(this.get_cultureAMPMPlaceholder()!=""){var n=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[0].substring(0,1)+n[1].substring(0,1)}return""},get_CultureFirstLettersAMPM:function(){return Sys.Extended.Deprecated("get_CultureFirstLettersAMPM()","getCultureFirstLettersAMPM()"),this.getCultureFirstLettersAMPM()},getCultureFirstLetterAM:function(){if(this.get_cultureAMPMPlaceholder()!=""){var n=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[0].substring(0,1)}return""},get_CultureFirstLetterAM:function(){return Sys.Extended.Deprecated("get_CultureFirstLetterAM()","getCultureFirstLetterAM()"),this.getCultureFirstLetterAM()},getCultureFirstLetterPM:function(){if(this.get_cultureAMPMPlaceholder()!=""){var n=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[1].substring(0,1)}return""},get_CultureFirstLetterPM:function(){return Sys.Extended.Deprecated("get_CultureFirstLetterPM()","getCultureFirstLetterPM()"),this.getCultureFirstLetterPM()},get_clearMaskOnLostFocus:function(){return this._clearMaskOnLostfocus},set_clearMaskOnLostFocus:function(n){this._clearMaskOnLostfocus=n;this.raisePropertyChanged("clearMaskOnLostFocus")},get_ClearMaskOnLostFocus:function(){return Sys.Extended.Deprecated("get_ClearMaskOnLostFocus()","get_clearMaskOnLostFocus()"),this.get_clearMaskOnLostFocus()},set_ClearMaskOnLostFocus:function(n){Sys.Extended.Deprecated("set_ClearMaskOnLostFocus(value)","set_clearMaskOnLostFocus(value)");this.set_clearMaskOnLostFocus(n)},get_messageValidatorTip:function(){return this._messageValidatorTip},set_messageValidatorTip:function(n){this._messageValidatorTip=n;this.raisePropertyChanged("messageValidatorTip")},get_MessageValidatorTip:function(){return Sys.Extended.Deprecated("get_MessageValidatorTip()","get_messageValidatorTip()"),this.get_messageValidatorTip()},set_MessageValidatorTip:function(n){Sys.Extended.Deprecated("set_MessageValidatorTip(value)","set_messageValidatorTip(value)");this.set_messageValidatorTip(n)},get_acceptAMPM:function(){return this._acceptAmPm},set_acceptAMPM:function(n){this._acceptAmPm=n;this.raisePropertyChanged("acceptAMPM")},get_AcceptAMPM:function(){return Sys.Extended.Deprecated("get_AcceptAMPM()","get_acceptAMPM()"),this.get_acceptAMPM()},set_AcceptAMPM:function(n){Sys.Extended.Deprecated("set_AcceptAMPM(value)","set_acceptAMPM(value)");this.set_acceptAMPM(n)},get_acceptNegative:function(){return this._acceptNegative},set_acceptNegative:function(n){this._acceptNegative=n;this.raisePropertyChanged("acceptNegative")},get_AcceptNegative:function(){return Sys.Extended.Deprecated("get_AcceptNegative()","get_acceptNegative()"),this.get_acceptNegative()},set_AcceptNegative:function(n){Sys.Extended.Deprecated("set_AcceptNegative(value)","set_acceptNegative(value)");this.set_acceptNegative(n)},get_displayMoney:function(){return this._displayMoney},set_displayMoney:function(n){this._displayMoney=n;this.raisePropertyChanged("displayMoney")},get_DisplayMoney:function(){return Sys.Extended.Deprecated("get_DisplayMoney()","get_displayMoney()"),this.get_displayMoney()},set_DisplayMoney:function(n){Sys.Extended.Deprecated("set_DisplayMoney(value)","set_displayMoney(value)");this.set_displayMoney(n)},get_onFocusCssNegative:function(){return this._onFocusCssNegative},set_onFocusCssNegative:function(n){this._onFocusCssNegative=n;this.raisePropertyChanged("onFocusCssNegative")},get_OnFocusCssNegative:function(){return Sys.Extended.Deprecated("get_OnFocusCssNegative()","get_onFocusCssNegative()"),this.get_onFocusCssNegative()},set_OnFocusCssNegative:function(n){Sys.Extended.Deprecated("set_OnFocusCssNegative(value)","set_onFocusCssNegative(value)");this.set_onFocusCssNegative(n)},get_onBlurCssNegative:function(){return this._onBlurCssNegative},set_onBlurCssNegative:function(n){this._onBlurCssNegative=n;this.raisePropertyChanged("onBlurCssNegative")},get_OnBlurCssNegative:function(){return Sys.Extended.Deprecated("get_OnBlurCssNegative()","get_onBlurCssNegative()"),this.get_onBlurCssNegative()},set_OnBlurCssNegative:function(n){Sys.Extended.Deprecated("set_OnBlurCssNegative(value)","set_onBlurCssNegative(value)");this.set_onBlurCssNegative(n)},get_century:function(){return this._century},set_century:function(n){this._century=n;this.raisePropertyChanged("century")},get_Century:function(){return Sys.Extended.Deprecated("get_Century()","get_century()"),this.get_century()},set_Century:function(n){Sys.Extended.Deprecated("set_Century(value)","set_century(value)");this.set_century(n)},get_autoComplete:function(){return this._autoComplete},set_autoComplete:function(n){this._autoComplete=n;this.raisePropertyChanged("autoComplete")},get_AutoComplete:function(){return Sys.Extended.Deprecated("get_AutoComplete()","get_autoComplete()"),this.get_autoComplete()},set_AutoComplete:function(n){Sys.Extended.Deprecated("set_AutoComplete(value)","set_autoComplete(value)");this.set_autoComplete(n)},get_autoCompleteValue:function(){return this._autoCompleteValue},set_autoCompleteValue:function(n){this._autoCompleteValue=n;this.raisePropertyChanged("autoCompleteValue")},get_AutoCompleteValue:function(){return Sys.Extended.Deprecated("get_AutoCompleteValue()","get_autoCompleteValue()"),this.get_autoCompleteValue()},set_AutoCompleteValue:function(n){Sys.Extended.Deprecated("set_AutoCompleteValue(value)","set_autoCompleteValue(value)");this.set_autoCompleteValue(n)},get_maskType:function(){return this._maskType},set_maskType:function(n){this._maskType=n;this.raisePropertyChanged("maskType")},get_MaskType:function(){return Sys.Extended.Deprecated("get_MaskType()","get_maskType()"),this.get_maskType()},set_MaskType:function(n){Sys.Extended.Deprecated("set_MaskType(value)","set_maskType(value)");this.set_maskType(n)},get_clearTextOnInvalid:function(){return this._clearTextOnInvalid},set_clearTextOnInvalid:function(n){this._clearTextOnInvalid!==n&&(this._clearTextOnInvalid=n,this.raisePropertyChanged("clearTextOnInvalid"))},get_ClearTextOnInvalid:function(){return Sys.Extended.Deprecated("get_ClearTextOnInvalid()","get_clearTextOnInvalid()"),this.get_clearTextOnInvalid()},set_ClearTextOnInvalid:function(n){Sys.Extended.Deprecated("set_ClearTextOnInvalid(value)","set_clearTextOnInvalid(value)");this.set_clearTextOnInvalid(n)},get_clipboardText:function(){return this._clipboardText},set_clipboardText:function(n){this._clipboardText=n;this.raisePropertyChanged("clipboardText")},get_ClipboardText:function(){return Sys.Extended.Deprecated("get_ClipboardText()","get_clipboardText()"),this.get_clipboardText()},set_ClipboardText:function(n){Sys.Extended.Deprecated("set_ClipboardText(value)","set_clipboardText(value)");this.set_clipboardText(n)},get_clipboardEnabled:function(){return this._allowCopyPaste},set_clipboardEnabled:function(n){this._allowCopyPaste=n;this.raisePropertyChanged("clipboardEnabled")},get_ClipboardEnabled:function(){return Sys.Extended.Deprecated("get_ClipboardEnabled()","get_clipboardEnabled()"),this.get_clipboardEnabled()},set_ClipboardEnabled:function(n){Sys.Extended.Deprecated("set_ClipboardEnabled(value)","set_clipboardEnabled(value)");this.set_clipboardEnabled(n)},get_errorTooltipEnabled:function(){return this._showMessageErrorFloat},set_errorTooltipEnabled:function(n){this._showMessageErrorFloat=n;this.raisePropertyChanged("errorTooltipEnabled")},get_ErrorTooltipEnabled:function(){return Sys.Extended.Deprecated("get_ErrorTooltipEnabled()","get_errorTooltipEnabled()"),this.get_errorTooltipEnabled()},set_ErrorTooltipEnabled:function(n){Sys.Extended.Deprecated("set_ErrorTooltipEnabled(value)","set_errorTooltipEnabled(value)");this.set_errorTooltipEnabled(n)},get_errorTooltipCssClass:function(){return this._cssMessageErrorFloat},set_errorTooltipCssClass:function(n){this._cssMessageErrorFloat=n;this.raisePropertyChanged("errorTooltipCssClass")},get_ErrorTooltipCssClass:function(){return Sys.Extended.Deprecated("get_ErrorTooltipCssClass()","get_errorTooltipCssClass()"),this.get_errorTooltipCssClass()},set_ErrorTooltipCssClass:function(n){Sys.Extended.Deprecated("set_ErrorTooltipCssClass(value)","set_errorTooltipCssClass(value)");this.set_errorTooltipCssClass(n)},get_userDateFormat:function(){return this._userDateFormat},set_userDateFormat:function(n){this._userDateFormat=n;this.raisePropertyChanged("userDateFormat")},get_UserDateFormat:function(){return Sys.Extended.Deprecated("get_UserDateFormat()","get_userDateFormat()"),this.get_userDateFormat()},set_UserDateFormat:function(n){Sys.Extended.Deprecated("set_UserDateFormat(value)","set_userDateFormat(value)");this.set_userDateFormat(n)},get_userTimeFormat:function(){return this._userTimeFormat},set_userTimeFormat:function(n){this._userTimeFormat=n;this.raisePropertyChanged("userTimeFormat")},get_UserTimeFormat:function(){return Sys.Extended.Deprecated("get_UserTimeFormat()","get_userTimeFormat()"),this.get_userTimeFormat()},set_UserTimeFormat:function(n){Sys.Extended.Deprecated("set_UserTimeFormat(value)","set_userTimeFormat(value)");this.set_userTimeFormat(n)}};Sys.Extended.UI.MaskedEditBehavior.registerClass("Sys.Extended.UI.MaskedEditBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.Extended.UI.MaskedEditType=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditInputDirections=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditShowSymbol=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditUserDateFormat=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditUserTimeFormat=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditType.prototype={None:0,Date:1,Number:2,Time:3,DateTime:4};Sys.Extended.UI.MaskedEditInputDirections.prototype={LeftToRight:0,RightToLeft:1};Sys.Extended.UI.MaskedEditShowSymbol.prototype={None:0,Left:1,Right:2};Sys.Extended.UI.MaskedEditUserDateFormat.prototype={None:0,DayMonthYear:1,DayYearMonth:2,MonthDayYear:3,MonthYearDay:4,YearDayMonth:5,YearMonthDay:6};Sys.Extended.UI.MaskedEditUserTimeFormat.prototype={None:0,TwentyFourHour:1};Sys.Extended.UI.MaskedEditType.registerEnum("Sys.Extended.UI.MaskedEditType");Sys.Extended.UI.MaskedEditInputDirections.registerEnum("Sys.Extended.UI.MaskedEditInputDirections");Sys.Extended.UI.MaskedEditShowSymbol.registerEnum("Sys.Extended.UI.MaskedEditShowSymbol");Sys.Extended.UI.MaskedEditUserDateFormat.registerEnum("Sys.Extended.UI.MaskedEditUserDateFormat");Sys.Extended.UI.MaskedEditUserTimeFormat.registerEnum("Sys.Extended.UI.MaskedEditUserTimeFormat");