﻿// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedMaskedEdit";function a(){var u="string",o="undefined",B="YDM",A="YMD",z="MYD",y="DYM",n="Y",m="D",x="DMY",E="9999",l="M",e=" ",f=10,k="g",i=")",j="(\\",w="px",t="DivMaskedEditTip_",h="0",r="+-",q="-",D="change",C="focus",p="keypress",s="keydown",H="mouseover",G="mousemove",F="mouseout",g=null,c=-1,v="MDY",b=false,d=true,a="";Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.MaskedEditBehavior=function(h){var e=this;Sys.Extended.UI.MaskedEditBehavior.initializeBase(e,[h]);e._Mask=a;e._MaskType=Sys.Extended.UI.MaskedEditType.None;e._Filtered=a;e._PromptChar="_";e._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight;e._MessageValidatorTip=d;e._ShowMessageErrorFloat=b;e._CssMessageErrorFloat=a;e._AutoComplete=d;e._AutoCompleteValue=a;e._ClearTextOnInvalid=b;e._ClearMaskOnLostfocus=d;e._AcceptAmPm=Sys.Extended.UI.MaskedEditShowSymbol.None;e._AcceptNegative=Sys.Extended.UI.MaskedEditShowSymbol.None;e._DisplayMoney=Sys.Extended.UI.MaskedEditShowSymbol.None;e._OnFocusCssClass="MaskedEditFocus";e._OnInvalidCssClass="MaskedEditError";e._OnFocusCssNegative="MaskedEditFocusNegative";e._OnBlurCssNegative="MaskedEditBlurNegative";e._CultureName=Sys.CultureInfo.CurrentCulture.name;e._UserDateFormat=Sys.Extended.UI.MaskedEditUserDateFormat.None;e._UserTimeFormat=Sys.Extended.UI.MaskedEditUserTimeFormat.None;e._CultureDatePlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.DateSeparator;e._CultureTimePlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.TimeSeparator;e._CultureDecimalPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator;e._CultureThousandsPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.NumberGroupSeparator;e._CultureDateFormat=v;var f=Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern.split(e._CultureDatePlaceholder);if(f.length>=3)e._CultureDateFormat=f[0].substr(0,1).toUpperCase()+f[1].substr(0,1).toUpperCase()+f[2].substr(0,1).toUpperCase();e._CultureCurrencySymbolPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.CurrencySymbol;e._CultureAMPMPlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator+";"+Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator;e._AMPMPlaceholderSeparator=";";e._Century=1900;e._AllowCopyPaste=d;e._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.";e._CharsEditMask="9L$CAN?";e._CharsSpecialMask="/:.,";e._MaskConv=a;e._EmptyMask=a;e._maskvalid=a;e._DirectSelText=a;e._initialvalue=a;e._LogicSymbol=a;e._LogicTextMask=a;e._LogicMask=a;e._LogicMaskConv=a;e._LogicPrompt=String.fromCharCode(1);e._LogicEscape=String.fromCharCode(2);e._LogicFirstPos=c;e._LogicLastPos=c;e._LogicLastInt=c;e._LogicDateTimeSepPos=c;e._QtdValidInput=0;e._InLostfocus=b;e._ExternalMessageError=a;e._CurrentMessageError=a;e._FiringOnChange=b;e._ErroOnEnter=b;e._charLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e._charNumbers="0123456789";e._charEscape="\\";e._DelimitStartDup="{";e._DelimitEndDup="}";e._focusHandler=g;e._keypressdown=g;e._keypressHandler=g;e._blurHandler=g;e._mouseOutHandler=g;e._mouseOutHandler=g;e._mouseMoveHandler=g;e._mouseEnterHandler=g;e._changeHandler=g;e._timer=g;e._timerHandler=g;e._SaveSymb=a;e._SaveText=a;e._SavePosi=c;e._SaveMask=a;e._SaveKeyDown=0};Sys.Extended.UI.MaskedEditBehavior.prototype={initialize:function(){var e=this,f=e.get_element();e._InLostfocus=d;Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(e,"initialize");e._createMask();var h=b,i=e.get_ClientState();if(i!=g&&i!=a){h=i=="Focused";e.set_ClientState(g)}try{if(f===document.activeElement)h=d}catch(l){}if(e._ShowMessageErrorFloat){e._mouseOutHandler=Function.createDelegate(e,e._onMouseOut);$addHandler(f,F,e._mouseOutHandler);e._mouseMoveHandler=Function.createDelegate(e,e._onMouseMove);$addHandler(f,G,e._mouseMoveHandler);e._mouseEnterHandler=Function.createDelegate(e,e._onMouseover);$addHandler(f,H,e._mouseEnterHandler)}if(!f.readOnly){e._keypressdown=Function.createDelegate(e,e._onKeyPressdown);$addHandler(f,s,e._keypressdown);e._keypressHandler=Function.createDelegate(e,e._onKeyPress);$addHandler(f,p,e._keypressHandler)}e._focusHandler=Function.createDelegate(e,e._onFocus);$addHandler(f,C,e._focusHandler);e._blurHandler=Function.createDelegate(e,e._onBlur);$addHandler(f,"blur",e._blurHandler);e._changeHandler=Function.createDelegate(e,e._onChange);$addHandler(f,D,e._changeHandler);if(Sys.Browser.agent==Sys.Browser.Opera){e._timerHandler=Function.createDelegate(e,e._OnTimerTicket);e._timer=new Sys.Timer;e._timer.set_enabled(b);e._timer.set_interval(100);e._timer.add_tick(e._timerHandler);e._SaveText=a;e._SavePosi=c;e._timer.set_enabled(d)}var j=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f);e._InitValue(j.get_Value(),d);if(h)e._onFocus();else{e._ClearMaskOnLostfocus&&j.set_Value(e._getClearMask(j.get_Value()));var k=e._CaptureServerValidators();if(!k)e._OnInvalidCssClass!=a&&e.AddCssClassMaskedEdit(e._OnInvalidCssClass)}},dispose:function(){var a=this,c=a.get_element();if(a._mouseOutHandler){$removeHandler(c,F,a._mouseOutHandler);a._mouseOutHandler=g}if(a._mouseMoveHandler){$removeHandler(c,G,a._mouseMoveHandler);a._mouseMoveHandler=g}if(a._mouseEnterHandler){$removeHandler(c,H,a._mouseEnterHandler);a._mouseEnterHandler=g}if(a._focusHandler){$removeHandler(c,C,a._focusHandler);a._focusHandler=g}if(a._focusHandler){$removeHandler(c,C,a._focusHandler);a._focusHandler=g}if(a._blurHandler){$removeHandler(c,"blur",a._blurHandler);a._blurHandler=g}if(a._changeHandler){$removeHandler(c,D,a._changeHandler);a._changeHandler=g}if(a._keypressdown){$removeHandler(c,s,a._keypressdown);a._keypressdown=g}if(a._keypressHandler){$removeHandler(c,p,a._keypressHandler);a._keypressHandler=g}if(a._timerHandler){a._timer.set_enabled(b);a._timerHandler=g;a._timer.dispose();a._timer=g}Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(a,"dispose")},_OnTimerTicket:function(){var e=this;e._SaveSymb=a;if(e._InLostfocus)return;e._timer.set_enabled(b);var f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());if(e._SaveText!=a){f.set_Value(e._SaveText);e.setSelectionRange(e._SavePosi,e._SavePosi);e._SaveText=a;e._SavePosi=c;e._SaveMask=f.get_Value()}else{f.get_Value().length!=e._EmptyMask.length&&f.set_Value(e._SaveMask);e._timer.get_interval()!=100&&e._timer.set_interval(100)}e._timer.set_enabled(d)},_onChange:function(){!this._FiringOnChange&&this._onFocus()},_onFocus:function(){var e=this,f=e.get_element();if(f.readOnly||f.disabled)return;if(!e._keypressdown){e._keypressdown=Function.createDelegate(e,e._onKeyPressdown);$addHandler(f,s,e._keypressdown)}if(!e._keypressHandler){e._keypressHandler=Function.createDelegate(e,e._onKeyPress);$addHandler(f,p,e._keypressHandler)}e._InLostfocus=b;e._RemoveDivToolTip();e._OnFocusCssClass!=a&&e.AddCssClassMaskedEdit(e._OnFocusCssClass);var h=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f);e._initialvalue=h.get_Value();e._InitValue(h.get_Value(),b);var g=e._getClearMask(),i=b;if(e._MessageValidatorTip&&g==a)i=d;if((e._MaskType==Sys.Extended.UI.MaskedEditType.Time||e._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&e.get_CultureAMPMPlaceholder()!=a&&g==a)e._AcceptAmPm&&e.InsertAMPM(e.get_CultureAMPMPlaceholder().substring(0,1));else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g!=a)e._LogicSymbol==q&&e._OnFocusCssNegative!=a&&e.AddCssClassMaskedEdit(e._OnFocusCssNegative);if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(e._LogicLastInt!=c)e.setSelectionRange(e._LogicLastInt,e._LogicLastInt);else e.setSelectionRange(e._LogicLastPos+1,e._LogicLastPos+1);else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g!=a){var j=e._getLastEmptyPosition()+1;e.setSelectionRange(j,j)}else e.setSelectionRange(e._LogicFirstPos,e._LogicFirstPos);e.ShowTooltipMessage(b);i&&e.ShowTooltipMessage(d)},_PeforformValidLostFocus:function(g){var c=this,e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()),d=c._getClearMask(e.get_Value());d==a&&c._MaskType==Sys.Extended.UI.MaskedEditType.Number&&c._LogicSymbol==q&&c.InsertSignal("+");if(d!=a&&c._AutoComplete&&c._MaskType==Sys.Extended.UI.MaskedEditType.Date)c.AutoFormatDate();else if(d!=a&&c._AutoComplete&&c._MaskType==Sys.Extended.UI.MaskedEditType.Time)c.AutoFormatTime();else if(d!=a&&c._AutoComplete&&c._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)c.AutoFormatDateTime();else d!=a&&c._AutoComplete&&c._MaskType==Sys.Extended.UI.MaskedEditType.Number&&c.AutoFormatNumber();(c._ClearMaskOnLostfocus&&d!=a||g&&c._ClearMaskOnLostfocus)&&e.set_Value(c._getClearMask(e.get_Value()));c.AddCssClassMaskedEdit(a);c._MaskType==Sys.Extended.UI.MaskedEditType.Number&&c._LogicSymbol==q&&c._OnBlurCssNegative!=a&&c.AddCssClassMaskedEdit(c._OnBlurCssNegative);c.ShowTooltipMessage(b);c._RemoveDivToolTip();var f=c._CaptureClientsValidators();if(!f){c._OnInvalidCssClass!=a&&c.AddCssClassMaskedEdit(c._OnInvalidCssClass);if(c._ClearTextOnInvalid){c._createMask();e.set_Value(c._EmptyMask)}}return f},_onBlur:function(e){var a=this;a._InLostfocus=d;var b=a._PeforformValidLostFocus(d);if(b){var c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());!a.get_element().readOnly&&a._initialvalue!=c.get_Value()&&e&&a._fireChanged()}},_fireChanged:function(){this._FiringOnChange=d;var a=this.get_element();if(document.createEventObject)a.fireEvent("onchange");else if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(D,d,d);a.dispatchEvent(c)}this._FiringOnChange=b},_onKeyPress:function(l){var e=this,j=e._KeyCode(l);if(j==9)return d;if(j==13){var m=e._PeforformValidLostFocus(b);e._ErroOnEnter=b;if(!m)e._ErroOnEnter=d;if(Sys.Browser.agent==Sys.Browser.Opera){var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());e._SaveText=n.get_Value();e._SavePosi=e._getCurrentPosition();e._timer.set_enabled(b);e._timer.set_interval(1);e._timer.set_enabled(d)}return m}e._OnFocusCssClass!=a&&e._ErroOnEnter&&e.AddCssClassMaskedEdit(e._OnFocusCssClass);e._ErroOnEnter=b;if(!e._isNormalChar(l,j)){e._ExecuteNav(l,j);return b}var f=e._deleteTextSelection();if(f==c)f=e._getCurrentPosition();var g=String.fromCharCode(j);if(e._MaskType==Sys.Extended.UI.MaskedEditType.Date&&g==e.get_CultureDatePlaceholder())e._AdjustElementDate();else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Time&&g==e.get_CultureTimePlaceholder())e._AdjustElementTime();else if(e._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(g==e.get_CultureTimePlaceholder()||g==e.get_CultureDatePlaceholder()))e._AdjustElementDateTime(g);else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&g==e.get_CultureDecimalPlaceholder()&&f==e._LogicLastInt)e._AdjustElementDecimalLTR();else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&g==e.get_CultureDecimalPlaceholder()&&f==e._LogicLastInt)e._AdjustElementDecimalRTL();else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g==e.get_CultureDecimalPlaceholder()&&f!=e._LogicLastInt)e._MoveDecimalPos();else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&g==e.get_CultureThousandsPlaceholder())e._MoveThousandLTR();else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&g==e.get_CultureThousandsPlaceholder())e._MoveThousandRTL();else if((e._MaskType==Sys.Extended.UI.MaskedEditType.Time||e._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&e.get_CultureFirstLettersAMPM().toUpperCase().indexOf(g.toUpperCase())!=c){if(e._AcceptAmPm){e.InsertAMPM(g);e.setSelectionRange(f,f)}}else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&e._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(g)!=c)if(Sys.Browser.agent!=Sys.Browser.Opera){e.InsertSignal(g);e.setSelectionRange(f,f)}else if(e._SaveSymb==a){e.InsertSignal(g);e.setSelectionRange(f,f);e._SaveSymb=g;e._timer.set_enabled(b);e._timer.set_interval(1);e._timer.set_enabled(d)}else e._SaveSymb=a;else{var p=f;f=e._getNextPosition(f);var i=f;if(e._LogicLastInt!=c&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft){if(p==e._LogicLastInt)i=e._getLastEmptyPosition()}else if(f>=e._LogicLastPos+1&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)i=e._getLastEmptyPosition();if(e._processKey(i,g)){e._MessageValidatorTip&&e.ShowTooltipMessage(b);if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight){e._insertContent(g,i);f=e._getNextPosition(i+1)}else if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(e._LogicLastInt==c)if(f<e._LogicLastPos+1){e._insertContent(g,i);f=e._getNextPosition(i+1)}else{e._insertContentRight(g);f=e._LogicLastPos+1}else if(p!=e._LogicLastInt){e._insertContent(g,i);f=e._getNextPosition(i+1)}else{var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()),k=e._getClearMask(n.get_Value());if(k!=a){var q=k.indexOf(e.get_CultureDecimalPlaceholder());if(q!=c){var o=k.substring(0,q);if(o==h||o=="-0"){e.setSelectionRange(e._LogicLastInt-1,e._LogicLastInt);e._deleteTextSelection();f=e._LogicLastInt;e.setSelectionRange(f,f)}}}if(k==a&&g==h)f=e._LogicLastInt;else{e._insertContentRight(g);f=e._LogicLastInt}}e.setSelectionRange(f,f)}}e._SetCancelEvent(l);return b},_onKeyPressdown:function(c){var a=this;a._InLostfocus&&a._onFocus(c);var e=a._KeyCode(c);if(e==9)return d;if(e==13)return d;if(!a._isNormalChar(c,e))a._ExecuteNav(c,e);else if(Sys.Browser.agent==Sys.Browser.Opera)if(c.rawEvent.shiftKey&&!c.rawEvent.ctrlKey&&!c.rawEvent.altKey&&c.rawEvent.keyCode==45){var f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());a._SaveText=f.get_Value();a._SavePosi=a._getCurrentPosition();a._timer.set_enabled(b);a._timer.set_interval(1);a._timer.set_enabled(d)}},_onMouseOut:function(){this._RemoveDivToolTip()},_onMouseMove:function(c){var b=this;(b._InLostfocus||b._ErroOnEnter)&&b._ExternalMessageError!=a&&b._ShowDivToolTip(c)},_onMouseover:function(c){var b=this;!$get(t+b.get_element().id)&&b._CaptureServerValidators();(b._InLostfocus||b._ErroOnEnter)&&b._ExternalMessageError!=a&&b._createDivToolTip(c,b._ExternalMessageError)},_ShowDivToolTip:function(d){var a=this,b=$get(t+a.get_element().id);if(!b){a._createDivToolTip(d,a._ExternalMessageError);b=$get(t+a.get_element().id)}var c=a._GetMousePos(d);b.style.left=c.x+1+w;b.style.top=c.y+1+w},_GetMousePos:function(b){var a="number",c=0,d=0;if(typeof window.pageYOffset==a){d=window.pageYOffset;c=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){d=document.body.scrollTop;c=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){d=document.documentElement.scrollTop;c=document.documentElement.scrollLeft}var e=0,f=0;if(typeof b.pageX==a){e=b.pageX;f=b.pageY}else if(typeof b.clientX==a){e=b.clientX;f=b.clientY}return{x:e+c,y:f+d}},_RemoveDivToolTip:function(){var a=$get(t+this.get_element().id);a&&document.body.removeChild(a)},_createDivToolTip:function(e,f){var c=this,g=$get(t+c.get_element().id);if(!g){var b,d=c._GetMousePos(e);b=document.createElement("div");b.id=t+c.get_element().id;b.style.position="absolute";b.style.left=d.x+2+w;b.style.top=d.y+2+w;b.style.zIndex=99999;if(c._CssMessageErrorFloat==a){b.style.padding="3px 3px 3px 3px";b.style.border="Solid 1px #000000";b.style.backgroundColor="#FFFFEA";b.style.fontWeight="normal";b.style.fontSize="12px";b.style.fontFamily="Arial"}else b.className=c._CssMessageErrorFloat;b.innerHTML=f;b=document.body.insertBefore(b,document.body.firstChild)}},_ExecuteNav:function(g,h){var e=this;if(g.type==s)if(Sys.Browser.agent==Sys.Browser.InternetExplorer){if((h==86||h==118)&&!g.shiftKey&&g.ctrlKey&&!g.altKey){e._SetCancelEvent(g);e._PasteFromClipBoard();return}if(g.shiftKey&&!g.ctrlKey&&!g.altKey&&g.keyCode==45){e._SetCancelEvent(g);e._PasteFromClipBoard();return}}if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||g.type==p){if(g.rawEvent.shiftKey&&!g.rawEvent.ctrlKey&&!g.rawEvent.altKey&&g.rawEvent.keyCode==45){e._SetCancelEvent(g);e._PasteFromClipBoard();return}if(g.type==p&&(h==86||h==118)&&!g.shiftKey&&g.ctrlKey&&!g.altKey){e._SetCancelEvent(g);e._PasteFromClipBoard();return}}var f;if(Sys.Browser.agent==Sys.Browser.InternetExplorer||g.type==p)if(h==8){e._SetCancelEvent(g);f=e._deleteTextSelection();if(f!=c)e.setSelectionRange(f,f);else{f=e._getCurrentPosition();e._backspace(f);f=e._getPreviousPosition(f-1);e.setSelectionRange(f,f)}var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());e._MessageValidatorTip&&n.get_Value()==e._EmptyMask&&e.ShowTooltipMessage(d);if(Sys.Browser.agent==Sys.Browser.Opera){e._SaveText=n.get_Value();e._SavePosi=f;e._timer.set_enabled(b);e._timer.set_interval(1);e._timer.set_enabled(d)}}else if(h==46||h==127){e._SetCancelEvent(g);var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());f=e._deleteTextSelection();if(f==c){f=e._getCurrentPosition();if(!e._isValidMaskedEditPosition(f))if(f!=e._LogicLastInt&&e._InputDirection!=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)f=e._getNextPosition(f);e._deleteAtPosition(f,b)}else if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft){var l=e._getClearMask(n.get_Value());if(l!=a){l=l.replace(new RegExp(j+e.get_CultureThousandsPlaceholder()+i,k),a)+a;if(l.substring(l.length-1,l.length)==e.get_CultureDecimalPlaceholder()){l=l.substring(0,l.length-1);e.loadValue(l,e._LogicLastInt)}else e.loadValue(l,e._LogicLastPos)}}e.setSelectionRange(f,f);e._MessageValidatorTip&&n.get_Value()==e._EmptyMask&&e.ShowTooltipMessage(d);if(Sys.Browser.agent==Sys.Browser.Opera){e._SaveText=n.get_Value();e._SavePosi=f;e._timer.set_enabled(b);e._timer.set_interval(1);e._timer.set_enabled(d)}}else if(g.ctrlKey){if(h==39||h==35||h==34){e._DirectSelText="R";if(Sys.Browser.agent==Sys.Browser.Opera)return;e._SetCancelEvent(g);f=e._getCurrentPosition();e.setSelectionRange(f,e._LogicLastPos+1)}else if(h==37||h==36||h==33){e._DirectSelText="L";if(Sys.Browser.agent==Sys.Browser.Opera)return;e._SetCancelEvent(g);f=e._getCurrentPosition();e.setSelectionRange(e._LogicFirstPos,f)}}else if(h==35||h==34){e._DirectSelText="R";if(Sys.Browser.agent==Sys.Browser.Opera)return;e._SetCancelEvent(g);if(g.shiftKey){f=e._getCurrentPosition();e.setSelectionRange(f,e._LogicLastPos+1)}else e.setSelectionRange(e._LogicLastPos+1,e._LogicLastPos+1)}else if(h==36||h==33){e._DirectSelText="L";if(Sys.Browser.agent==Sys.Browser.Opera)return;e._SetCancelEvent(g);if(g.shiftKey){f=e._getCurrentPosition();e.setSelectionRange(e._LogicFirstPos,f)}else e.setSelectionRange(e._LogicFirstPos,e._LogicFirstPos)}else if(h==37){e._DirectSelText="L";if(Sys.Browser.agent==Sys.Browser.Opera)return;e._SetCancelEvent(g);if(g.shiftKey){var m=e._GetBoundSelection();if(m){if(m.left>e._LogicFirstPos)m.left--;e.setSelectionRange(m.left,m.right)}else{var o=e._getCurrentPosition();o>e._LogicFirstPos&&e.setSelectionRange(o-1,o)}}else{f=e._getCurrentPosition()-1;if(f<e._LogicFirstPos)f=e._LogicFirstPos;e.setSelectionRange(f,f)}if(Sys.Browser.agent==Sys.Browser.Opera){var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());e._SaveText=n.get_Value();e._SavePosi=f;e._timer.set_enabled(b);e._timer.set_interval(1);e._timer.set_enabled(d)}}else if(h==39){e._DirectSelText="R";if(Sys.Browser.agent==Sys.Browser.Opera)return;e._SetCancelEvent(g);if(g.shiftKey){var m=e._GetBoundSelection();if(m){if(m.right<e._LogicLastPos+1)m.right++;e.setSelectionRange(m.left,m.right)}else{o=e._getCurrentPosition();o<e._LogicLastPos+1&&e.setSelectionRange(o,o+1)}}else{f=e._getCurrentPosition()+1;if(f>e._LogicLastPos+1)f=e._LogicLastPos+1;e.setSelectionRange(f,f)}if(Sys.Browser.agent==Sys.Browser.Opera){var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());e._SaveText=n.get_Value();e._SavePosi=f;e._timer.set_enabled(b);e._timer.set_interval(1);e._timer.set_enabled(d)}}else if(h==27){e._SetCancelEvent(g);var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());if(e._EmptyMask==e._initialvalue)n.set_Value(a);else n.set_Value(e._initialvalue);e._onFocus()}e._SetCancelEvent(g)},_backspace:function(a){var c=this,e=b;if(a>c._LogicFirstPos){var f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()),g=f.get_Value();a=c._getPreviousPosition(a-1);c._deleteAtPosition(a,d);e=d}return e},_deleteAtPosition:function(p,D){var g=this,y=b,x=g._LogicLastPos+1;if(g._LogicLastInt!=c&&g._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)x=g._LogicLastInt;var t=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(g.get_element());if(D==b&&g._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&p==x){var l=g._getClearMask(t.get_Value());if(l!=a){y=d;l=l.replace(new RegExp(j+g.get_CultureThousandsPlaceholder()+i,k),a)+a;if(l.substring(l.length-1,l.length)==g.get_CultureDecimalPlaceholder())l=l.substring(0,l.length-1);var r=l.split(g.get_CultureDecimalPlaceholder());if(g._LogicLastInt!=c&&r[0]!=a){r[0]=r[0].substring(0,r[0].length-1);l=r[0];if(r.length=2)l+=g.get_CultureDecimalPlaceholder()+r[1]}else l=l.substring(0,l.length-1);l+=g._LogicSymbol;g.loadValue(l,x)}}else{var h=t.get_Value().substring(g._LogicFirstPos,g._LogicLastPos+1),m=g._LogicTextMask.substring(g._LogicFirstPos,g._LogicLastPos+1),q=0,u=p-g._LogicFirstPos;if(g._isValidMaskedEditPosition(p)){y=d;if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var o=g._SplitDateTime(h),B=p-g._LogicFirstPos;if(B>o[0].length){h=o[1];q=o[0].length+1;m=m.substring(q);u-=q}else{h=o[0];m=m.substring(0,o[0].length)}}var v=h.substring(u+1),w=m.substring(u+1);h=h.substring(0,u)+g._PromptChar;m=m.substring(0,u)+g._LogicPrompt;for(var n=0;n<parseInt(v.length,f);n++)if(g._isValidMaskedEditPosition(p+1+n)){h+=g._PromptChar;m+=g._LogicPrompt}else{h+=v.substring(n,n+1);m+=w.substring(n,n+1)}var s=g._getNextPosition(p);for(n=0;n<parseInt(v.length,f);n++)if(g._isValidMaskedEditPosition(p+1+n)&&w.substring(n,n+1)!=g._LogicPrompt){h=h.substring(0,s-g._LogicFirstPos-q)+v.substring(n,n+1)+h.substring(s+1-g._LogicFirstPos-q);m=m.substring(0,s-g._LogicFirstPos-q)+w.substring(n,n+1)+m.substring(s+1-g._LogicFirstPos-q);s=g._getNextPosition(s+1)}if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var C=t.get_Value().substring(g._LogicFirstPos,g._LogicLastPos+1),A=g._LogicTextMask.substring(g._LogicFirstPos,g._LogicLastPos+1),o=g._SplitDateTime(C),B=p-g._LogicFirstPos;if(B>o[0].length){h=o[0]+e+h;m=A.substring(0,q)+m}else{h=h+e+o[1];m=m+A.substring(o[0].length)}}var z=t.get_Value();h=z.substring(0,g._LogicFirstPos)+h+z.substring(g._LogicLastPos+1);g._LogicTextMask=g._LogicTextMask.substring(0,g._LogicFirstPos)+m+g._LogicTextMask.substring(g._LogicLastPos+1);t.set_Value(h)}}return y},_SplitDateTime:function(a){var b=this,c=[];if(a.charAt(b._LogicDateTimeSepPos)==e){c[0]=a.substring(b._LogicFirstPos,b._LogicDateTimeSepPos);c[1]=a.substring(b._LogicDateTimeSepPos+1)}else c[0]=a;return c},_ShowModalClipBoardInput:function(){return prompt(this._ClipboardText,a)},_PasteFromClipBoard:function(){var e=this,j=g,f,v=c,u=c;if(Sys.Browser.agent==Sys.Browser.InternetExplorer)j=window.clipboardData.getData("Text");else{var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()),p=n.get_Value(),k=e._GetBoundSelection(),f=e._getCurrentPosition(),q=e._AutoComplete,t=e._ClearTextOnInvalid,s=e._ClearMaskOnLostfocus,w=e._DirectSelText;e._AutoComplete=b;e._ClearTextOnInvalid=b;e._ClearMaskOnLostfocus=b;j=e._ShowModalClipBoardInput();e._AutoComplete=q;e._ClearTextOnInvalid=t;e._ClearMaskOnLostfocus=s;n.set_Value(p);if(k)e.setSelectionRange(k.left,k.right);else e.setSelectionRange(f,f)}if(j==g||j==a)return;if(j.length>e._maskvalid.length)j=j.substring(0,e._maskvalid.length);f=e._deleteTextSelection();if(f==c){f=e._getCurrentPosition();if(k)f=k.left}e.setSelectionRange(f,f);var m=b;if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&e._LogicLastInt!=c)m=d;for(var l=0,l=0;l<j.length;l++){var i=j.substring(l,l+1),h=f;if(m)h=e._getLastEmptyPosition();if((e._MaskType==Sys.Extended.UI.MaskedEditType.Time||e._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&e.get_CultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=c){if(e._AcceptAmPm){e.InsertAMPM(i);e.setSelectionRange(f,f)}}else if(e._MaskType==Sys.Extended.UI.MaskedEditType.Number&&e._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(i)!=c){e.InsertSignal(i);e.setSelectionRange(f,f)}else{var o=f;f=e._getNextPosition(f);var h=f;if(e._LogicLastInt!=c&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft){if(o==e._LogicLastInt)h=e._getLastEmptyPosition()}else if(f>=e._LogicLastPos+1&&e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)h=e._getLastEmptyPosition();if(e._processKey(h,i)){e._MessageValidatorTip&&e.ShowTooltipMessage(b);if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight){e._insertContent(i,h);f=e._getNextPosition(h+1)}else if(e._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(e._LogicLastInt==c)if(f<e._LogicLastPos+1){e._insertContent(i,h);f=e._getNextPosition(h+1)}else{e._insertContentRight(i);f=e._LogicLastPos+1}else if(o!=e._LogicLastInt){e._insertContent(i,h);f=e._getNextPosition(h+1)}else{e._insertContentRight(i);f=e._LogicLastInt}e.setSelectionRange(f,f)}}}m&&e.setSelectionRange(e._LogicLastInt,e._LogicLastInt)},_MoveDecimalPos:function(){var b=this,g=b.get_element(),e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(g),a=b._LogicFirstPos,f=b._LogicLastPos,d=c;while(a<f){if(e.get_Value().substring(a,a+1)==b.get_CultureDecimalPlaceholder()){d=a;break}a++}if(d==c)return;b.setSelectionRange(d,d)},_MoveThousandLTR:function(){var b=this,h=b.get_element(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h),g=b._getCurrentPosition(),e=b._LogicLastPos,a=g+1,d=c;while(a<e){if(f.get_Value().substring(a,a+1)==b.get_CultureThousandsPlaceholder()){d=a;break}a++}if(d==c){var a=0;e=g;while(a<e){if(f.get_Value().substring(a,a+1)==b.get_CultureThousandsPlaceholder()){d=a;break}a++}if(d==c)return}b.setSelectionRange(d,d)},_MoveThousandRTL:function(){var b=this,h=b.get_element(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h),g=b._getCurrentPosition(),e=b._LogicFirstPos,a=g-1,d=c;while(a>e){if(f.get_Value().substring(a,a+1)==b.get_CultureThousandsPlaceholder()){d=a;break}a--}if(d==c){a=b._LogicLastPos;e=g;while(a>e){if(f.get_Value().substring(a,a+1)==b.get_CultureThousandsPlaceholder()){d=a;break}a--}if(d==c)return}b.setSelectionRange(d,d)},_AdjustElementDecimalLTR:function(){var b=this,p=b.get_element(),g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(p),m=b._getCurrentPosition();if(g.get_Value().substring(m).indexOf(b.get_CultureDecimalPlaceholder())==c)return;var l=g.get_Value().substring(b._LogicFirstPos,b._LogicLastPos+1),e=l.indexOf(b.get_CultureDecimalPlaceholder());if(e==c)return;var d,f=b._getClearMask(g.get_Value());if(f!=a){f=f.replace(new RegExp(j+b.get_CultureThousandsPlaceholder()+i,k),a)+a;d=f.split(b.get_CultureDecimalPlaceholder())}else d=b.get_CultureDecimalPlaceholder().split(b.get_CultureDecimalPlaceholder());if(d[0]==a)d[0]=h;var o=l.length-e-1;while(d[1].length<o)d[1]+=h;var n=b._InputDirection;b._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;b.loadValue(d[0]+b.get_CultureDecimalPlaceholder()+d[1],b._LogicLastPos);b._InputDirection=n;e+=b._LogicFirstPos+1;b.setSelectionRange(e,e)},_AdjustElementDecimalRTL:function(){var b=this,g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()),l=g.get_Value().substring(b._LogicFirstPos,b._LogicLastPos+1),e=l.indexOf(b.get_CultureDecimalPlaceholder());if(e==c)return;var m=b._getCurrentPosition();if(e+b._LogicFirstPos>=m){b._AdjustElementDecimalLTR();return}var d,f=b._getClearMask(g.get_Value());if(f!=a){f=f.replace(new RegExp(j+b.get_CultureThousandsPlaceholder()+i,k),a)+a;d=f.split(b.get_CultureDecimalPlaceholder())}else d=b.get_CultureDecimalPlaceholder().split(b.get_CultureDecimalPlaceholder());if(d[0]==a)d[0]=h;var o=l.length-e-1;while(d[1].length<o)d[1]+=h;var n=b._InputDirection;b._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;b.loadValue(d[0]+b.get_CultureDecimalPlaceholder()+d[1],b._LogicLastPos);b._InputDirection=n;e+=b._LogicFirstPos+1;b.setSelectionRange(e,e)},_AdjustTime:function(c,l){for(var g=d,e=0;e<parseInt(c.length,f);e++)if(c.substring(e,e+1)!=this._PromptChar)g=b;if(g)return l;var m=c.length;c=c.replace(new RegExp(j+this._PromptChar+i,k),a)+a;while(c.length<m)c=h+c;return c},_AdjustElementTime:function(){var b=this,o=b.get_element(),n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o),g=a,i=b._getCurrentPosition()-b._LogicFirstPos,j=b._maskvalid,c=i+b._LogicFirstPos,d=0;if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){d=j.split(e)[0].length+1;if(i<d){c=d+b._LogicFirstPos;b.setSelectionRange(c,c);return}j=j.split(e)[1];i-=d}j=j.split(":");if(i<=1){g="H";c=3+b._LogicFirstPos+d}else if(i>=2&&i<=4&&j.length==2){g=l;c=d+b._LogicFirstPos}else if(i>=2&&i<=4&&j.length==3){g=l;c=6+b._LogicFirstPos+d}else if(j.length==3){g="S";c=d+b._LogicFirstPos}if(g==a)return;var k=n.get_Value().substring(b._LogicFirstPos,b._LogicLastPos+1);if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)k=b._SplitDateTime(k)[1];var h=k.split(b.get_CultureTimePlaceholder()),m=b._GetTimeElementText(g),f;if(g=="H"){f=m+b.get_CultureTimePlaceholder()+h[1];if(h.length==3)f+=b.get_CultureTimePlaceholder()+h[2]}else if(g==l){f=h[0]+b.get_CultureTimePlaceholder()+m;if(h.length==3)f+=b.get_CultureTimePlaceholder()+h[2]}else if(g=="S"){f=h[0]+b.get_CultureTimePlaceholder()+h[1];f+=b.get_CultureTimePlaceholder()+m}if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)f=n.get_Value().substring(b._LogicFirstPos,d)+f;b.loadMaskValue(f,b._LogicFirstPos,b._LogicSymbol);b.setSelectionRange(c,c)},_GetTimeElementText:function(g){var d=this,b,f=d._LogicTextMask.substring(d._LogicFirstPos,d._LogicLastPos+1);if(d._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)f=f.substring(d._maskvalid.split(e)[0].length+1);var c=f.split(d.get_CultureTimePlaceholder());c[0]=c[0].replace(new RegExp(j+d._LogicPrompt+i,k),d._PromptChar)+a;b=c[0].replace(new RegExp(j+d._PromptChar+i,k),a)+a;if(b!=a&&b.length<2){b=h+b;c[0]=b}c[1]=c[1].replace(new RegExp(j+d._LogicPrompt+i,k),d._PromptChar)+a;b=c[1].replace(new RegExp(j+d._PromptChar+i,k),a)+a;if(b!=a&&b.length<2){b=h+b;c[1]=b}if(c.length==3){c[2]=c[2].replace(new RegExp(j+d._LogicPrompt+i,k),d._PromptChar)+a;b=c[2].replace(new RegExp(j+d._PromptChar+i,k),a)+a;if(b!=a&&b.length<2){b=h+b;c[2]=b}}return g=="H"?c[0]:g==l?c[1]:c[2]},_AdjustElementDateTime:function(b){var a=this;b==a.get_CultureDatePlaceholder()&&a._AdjustElementDate();b==a.get_CultureTimePlaceholder()&&a._AdjustElementTime()},_AdjustElementDate:function(){var b=this,t=b.get_element(),p=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(t),k=p.get_Value().substring(b._LogicFirstPos,b._LogicLastPos+1);if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)k=b._SplitDateTime(k)[0];var i=k.split(b.get_CultureDatePlaceholder()),g=a,d=b._getCurrentPosition()-b._LogicFirstPos,f=d+b._LogicFirstPos,h=b._maskvalid.indexOf(E)!=c?2:0;if(b.get_CultureDateFormat()==x)if(d<=1){g=m;f=3+b._LogicFirstPos}else if(d>=2&&d<=4){g=l;f=6+b._LogicFirstPos}else{if(d>8+h&&b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){b.setSelectionRange(b._LogicFirstPos,b._LogicFirstPos);return}g=n;f=b._LogicFirstPos}else if(b.get_CultureDateFormat()==v)if(d<=1){g=l;f=3+b._LogicFirstPos}else if(d>=2&&d<=4){g=m;f=6+b._LogicFirstPos}else{if(d>8+h&&b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){b.setSelectionRange(b._LogicFirstPos,b._LogicFirstPos);return}g=n;f=b._LogicFirstPos}else if(b.get_CultureDateFormat()==y)if(d<=1){g=m;f=3+b._LogicFirstPos}else if(d>=2&&d<=4+h){g=n;f=6+h+b._LogicFirstPos}else{g=l;f=b._LogicFirstPos}else if(b.get_CultureDateFormat()==z)if(d<=1){g=l;f=3+b._LogicFirstPos}else if(d>=2&&d<=4+h){g=n;f=6+h+b._LogicFirstPos}else{g=m;f=b._LogicFirstPos}else if(b.get_CultureDateFormat()==A)if(d<=1+h){g=n;f=3+h+b._LogicFirstPos}else if(d>=2+h&&d<=4+h){g=l;f=6+h+b._LogicFirstPos}else{g=m;f=b._LogicFirstPos}else if(b.get_CultureDateFormat()==B)if(d<=1+h){g=n;f=3+h+b._LogicFirstPos}else if(d>=2+h&&d<=4+h){g=m;f=6+h+b._LogicFirstPos}else{g=l;f=b._LogicFirstPos}var r=b._GetDateElementText(g);i[b.get_CultureDateFormat().indexOf(g)]=r;var o=i[0]+b.get_CultureDatePlaceholder()+i[1]+b._CultureDatePlaceholder+i[2];if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var s=p.get_Value().substring(b._LogicFirstPos,b._LogicLastPos+1),q=b._SplitDateTime(s),j=q[1].split(e);if(j.length==2)o+=e+j[0]+e+j[1];else o+=e+q[1]}b.loadMaskValue(o,b._LogicFirstPos,b._LogicSymbol);b.setSelectionRange(f,f)},_GetDateElementText:function(p){var e=this,f,g;if(e._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var o=e._SplitDateTime(e._LogicTextMask.substring(e._LogicFirstPos,e._LogicLastPos+1))[0];g=o.split(e.get_CultureDatePlaceholder())}else g=e._LogicTextMask.substring(e._LogicFirstPos,e._LogicLastPos+1).split(e.get_CultureDatePlaceholder());g[e.get_CultureDateFormat().indexOf(m)]=g[e.get_CultureDateFormat().indexOf(m)].replace(new RegExp(j+e._LogicPrompt+i,k),e._PromptChar)+a;f=g[e.get_CultureDateFormat().indexOf(m)].replace(new RegExp(j+e._PromptChar+i,k),a)+a;if(f!=a&&f.length<2){f=h+f;g[e.get_CultureDateFormat().indexOf(m)]=f}g[e.get_CultureDateFormat().indexOf(l)]=g[e.get_CultureDateFormat().indexOf(l)].replace(new RegExp(j+e._LogicPrompt+i,k),e._PromptChar)+a;f=g[e.get_CultureDateFormat().indexOf(l)].replace(new RegExp(j+e._PromptChar+i,k),a)+a;if(f!=a&&f.length<2){f=h+f;g[e.get_CultureDateFormat().indexOf(l)]=f}var q=e._maskvalid.indexOf(E)!=c?d:b;g[e.get_CultureDateFormat().indexOf(n)]=g[e.get_CultureDateFormat().indexOf(n)].replace(new RegExp(j+e._LogicPrompt+i,k),e._PromptChar)+a;f=g[e.get_CultureDateFormat().indexOf(n)].replace(new RegExp(j+e._PromptChar+i,k),a)+a;if(q){if(f!=a&&f.length<4){while(f.length<4)f=h+f;g[e.get_CultureDateFormat().indexOf(n)]=f}}else if(f!=a&&f.length<2){f=h+f;g[e.get_CultureDateFormat().indexOf(n)]=f}return g[e.get_CultureDateFormat().indexOf(p)]},_GetBoundSelection:function(){var d=g,b=this.get_element();if(b.setSelectionRange){if(b.selectionStart!=b.selectionEnd)d={left:parseInt(b.selectionStart,f),right:parseInt(b.selectionEnd,f)}}else if(document.selection){var c=document.selection.createRange();if(c.text!=a){var j=parseInt(c.text.length,f);c.text=String.fromCharCode(3)+c.text;var e=b.createTextRange();e.findText(String.fromCharCode(3));e.select();var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b),h=parseInt(i.get_Value().indexOf(String.fromCharCode(3)),f);document.selection.clear();d={left:h,right:h+j}}}return d},_deleteTextSelection:function(){var g=this,e=g.get_element(),m=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e),j=m.get_Value(),k=c,h=c,n=b;if(e.setSelectionRange){if(e.selectionStart!=e.selectionEnd){var r=parseInt(e.selectionStart,f),q=parseInt(e.selectionEnd,f);n=d;k=q-r;h=e.selectionStart;e.selectionEnd=e.selectionStart}}else if(document.selection){var o=document.selection.createRange();if(o.text!=a){n=d;var l=o.text+String.fromCharCode(3);o.text=l;var p=e.createTextRange();p.findText(l);p.select();h=m.get_Value().indexOf(l);document.selection.clear();k=parseInt(l.length,f)-1}}if(n){for(var i=0;i<k;i++)if(g._isValidMaskedEditPosition(h+i)){j=j.substring(0,h+i)+g._PromptChar+j.substring(h+i+1);g._LogicTextMask=g._LogicTextMask.substring(0,h+i)+g._LogicPrompt+g._LogicTextMask.substring(h+i+1)}m.set_Value(j);if(g._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)h+=k}g._DirectSelText=a;return h},_isNormalChar:function(a,f){var e=this,c=d;if(Sys.Browser.agent==Sys.Browser.Opera&&a.type==s)e._SaveKeyDown=f;if(f<32)c=b;else if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||a.type==s)switch(f){case 33:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g)if(a.rawEvent.which==0)c=b;break;case 34:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g)if(a.rawEvent.which==0)c=b;break;case 35:if(Sys.Browser.agent==Sys.Browser.Opera&&a.type==p){if(e._SaveKeyDown==35)c=b}else c=b;break;case 36:if(Sys.Browser.agent==Sys.Browser.Opera&&a.type==p){if(e._SaveKeyDown==36)c=b}else c=b;break;case 37:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g)if(a.rawEvent.which==0)c=b;break;case 38:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g)if(a.rawEvent.which==0)c=b;break;case 39:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g)if(a.rawEvent.which==0)c=b;break;case 40:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g)if(a.rawEvent.which==0)c=b;break;case 45:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g&&Sys.Browser.agent!=Sys.Browser.Opera){if(a.rawEvent.which==0)c=b}else if(Sys.Browser.agent==Sys.Browser.Opera)c=d;else c=b;break;case 86:case 118:if(!a.rawEvent.shiftKey&&a.rawEvent.ctrlKey&&!a.rawEvent.altKey)c=b;break;case 46:if(typeof a.rawEvent.which!=o&&a.rawEvent.which!=g&&Sys.Browser.agent!=Sys.Browser.Opera){if(a.rawEvent.which==0)c=b}else if(Sys.Browser.agent==Sys.Browser.Opera&&a.type==p){if(e._SaveKeyDown==127)c=b}else c=b;break;case 127:c=b}return c},_KeyCode:function(b){var a=0;if(b.keyIdentifier)if(b.charCode==63272)a=46;else if(b.charCode==63302)a=45;else if(b.charCode==63233)a=40;else if(b.charCode==63235)a=39;else if(b.charCode==63232)a=38;else if(b.charCode==63234)a=37;else if(b.charCode==63273)a=36;else if(b.charCode==63275)a=35;else if(b.charCode==63277)a=34;else if(b.charCode==63276)a=33;else if(b.charCode==3)a=13;if(a==0)if(b.charCode)a=b.charCode;if(a==0)a=b.keyCode;return a},_InitValue:function(c,d){var b=this;b._LogicSymbol=a;var f=b.get_element(),e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f);e.set_Value(b._EmptyMask);if(c==b._EmptyMask||c==a)b.loadValue(a,b._LogicFirstPos);else if(b._MaskType==Sys.Extended.UI.MaskedEditType.Date&&c!=a)c=b.ConvFmtDate(c,d);else if(b._MaskType==Sys.Extended.UI.MaskedEditType.Time&&c!=a)c=b.ConvFmtTime(c,d);else if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&c!=a)c=b.ConvFmtDateTime(c,d);else if(b._MaskType==Sys.Extended.UI.MaskedEditType.Number&&c!=a)c=b.ConvFmtNumber(c,d);if(b._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&c!=a)if(b._MaskType==Sys.Extended.UI.MaskedEditType.Number){b._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;b.loadValue(c,b._LogicLastPos);b._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight}else b.loadValue(c,b._LogicFirstPos);else b._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&c!=a&&b.loadValue(c,b._LogicLastPos);if(b._MaskType==Sys.Extended.UI.MaskedEditType.Number)b._InLostfocus&&b._LogicSymbol==q&&b._OnBlurCssNegative!=a&&b.AddCssClassMaskedEdit(b._OnBlurCssNegative)},loadMaskValue:function(g,d,e){var a=this;a._createMask();var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());i.set_Value(a._EmptyMask);if((a._MaskType==Sys.Extended.UI.MaskedEditType.Time||a._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&a.get_CultureFirstLettersAMPM().toUpperCase().indexOf(e.toUpperCase().substring(0,1))!=c)a._AcceptAmPm&&a.InsertAMPM(e.toUpperCase().substring(0,1));else a._MaskType==Sys.Extended.UI.MaskedEditType.Number&&a._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(e)!=c&&a.InsertSignal(e);for(var b=0,b=0;b<parseInt(g.length,f);b++){var h=g.substring(b+d,b+d+1);a._processKey(d+b,h)&&a._insertContent(h,d+b)}},loadValue:function(h,b){var a=this,d;a._createMask();var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());i.set_Value(a._EmptyMask);if(a._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight)for(d=0;d<parseInt(h.length,f);d++){var e=h.substring(d,d+1);if((a._MaskType==Sys.Extended.UI.MaskedEditType.Time||a._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&a.get_CultureFirstLettersAMPM().toUpperCase().indexOf(e.toUpperCase())!=c)a._AcceptAmPm&&a.InsertAMPM(e);else a._MaskType==Sys.Extended.UI.MaskedEditType.Number&&a._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(e)!=c&&a.InsertSignal(e);if(a._processKey(b,e)){a._insertContent(e,b);b=a._getNextPosition(b+1)}}else if(a._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(b==a._LogicLastInt){b=a._getPreviousPosition(b);var g=h.split(a.get_CultureDecimalPlaceholder());for(d=parseInt(g[0].length,f);d>0;d--){var e=g[0].substring(d-1,d);a._MaskType==Sys.Extended.UI.MaskedEditType.Number&&a._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(e)!=c&&a.InsertSignal(e);if(a._processKey(b,e)){a._insertContent(e,b);b=a._getPreviousPosition(b-1)}}if(g.length>1){b=a._getNextPosition(a._LogicLastInt);for(d=0;d<parseInt(g[1].length,f);d++){var e=g[1].substring(d,d+1);a._MaskType==Sys.Extended.UI.MaskedEditType.Number&&a._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(e)!=c&&a.InsertSignal(e);if(a._processKey(b,e)){a._insertContent(e,b);b=a._getNextPosition(b+1)}}}}else for(d=parseInt(h.length,f);d>0;d--){var e=h.substring(d-1,d);a._MaskType==Sys.Extended.UI.MaskedEditType.Number&&a._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&r.indexOf(e)!=c&&a.InsertSignal(e);if(a._processKey(b,e)){a._insertContent(e,b);b=a._getPreviousPosition(b-1)}}},AutoFormatNumber:function(){var f=this,e,j=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f.get_element());ValueText=j.get_Value();var i=f._AutoCompleteValue,k=b;for(e=f._LogicFirstPos;e<=f._LogicLastPos;e++)if(f._LogicTextMask.substring(e,e+1)==f._LogicPrompt){var g=h;if(i!=a)g=i.substring(e-f._LogicFirstPos,e+1-f._LogicFirstPos);if(k){f._LogicTextMask=f._LogicTextMask.substring(0,e)+g+f._LogicTextMask.substring(e+1);ValueText=ValueText.substring(0,e)+g+ValueText.substring(e+1)}}else if(f._LogicMask.substring(e,e+1)==f._LogicPrompt&&"123456789".indexOf(f._LogicTextMask.substring(e,e+1))!=c)k=d;j.set_Value(ValueText);return ValueText},AutoFormatTime:function(){var g=this,C=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(g.get_element());ValueText=C.get_Value();var i=g._AutoCompleteValue;if(i.indexOf(g.get_CultureTimePlaceholder())==c)i=a;if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var A=g._SplitDateTime(ValueText),u=A[1].split(e);if(u.length==2)ValueText=u[0]+e+u[1];else ValueText=A[0];if(i!=a){if(i.indexOf(g.get_CultureDatePlaceholder())==c)i=e+i;var x=g._SplitDateTime(i),t=x[1].split(e);if(t.length==2)i=t[0]+e+t[1];else i=x[0]}}var y=new Date,j=y.getHours().toString();if(j.length<2)j=h+j;if(i!=a)j=i.substring(0,2);var r=b,q=b,s=a,k=a,p=a;if(g.get_CultureAMPMPlaceholder()!=a){var z=g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator);s=z[0];k=z[1];if(i==a){var p=s;if(j>12){j=(parseInt(j,f)-12).toString();if(j.length<2)j=h+j;p=k}}else{p=s;if(i.indexOf(k)!=c)p=k}r=d;if(ValueText.indexOf(k)!=c&&k!=a)q=d;if(!g._AcceptAmPm){p=a;q=b;r=b}else{var B=d;if(ValueText.substring(0,1)!=g._PromptChar||ValueText.substring(1,2)!=g._PromptChar)B=b;if(B&&p!=a){r=d;q=b;if(k==p)q=d}}}var o=y.getMinutes().toString();if(o.length<2)o=h+o;if(i!=a)o=i.substring(3,5);var w="00",l,m;if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){l=ValueText.substring(0,2);l=g._AdjustTime(l,j);m=ValueText.substring(3,5);m=g._AdjustTime(m,o)}else{l=ValueText.substring(g._LogicFirstPos,g._LogicFirstPos+2);l=g._AdjustTime(l,j);m=ValueText.substring(g._LogicFirstPos+3,g._LogicFirstPos+5);m=g._AdjustTime(m,o)}var v=g._maskvalid;if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)v=v.split(e)[1];if(v=="99:99:99"){if(i!=a)w=i.substring(6);var n;if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){n=ValueText.substring(6,8);n=g._AdjustTime(n,w)}else{n=ValueText.substring(g._LogicFirstPos+6,g._LogicFirstPos+8);n=g._AdjustTime(n,w)}ValueText=l+g.get_CultureTimePlaceholder()+m+g.get_CultureTimePlaceholder()+n}else ValueText=l+g.get_CultureTimePlaceholder()+m;if(q)ValueText+=e+k;else if(r)ValueText+=e+s;g._MaskType!=Sys.Extended.UI.MaskedEditType.DateTime&&g.loadValue(ValueText,g._LogicFirstPos);return ValueText},AutoFormatDateTime:function(){var a=this,b=a.AutoFormatDate(),c=a.AutoFormatTime();a.loadValue(b+e+c,a._LogicFirstPos);return b+e+c},AutoFormatDate:function(){var f=this,t=f._GetDateElementText(m).replace(new RegExp(j+f._PromptChar+i,k),a)+a,u=f._GetDateElementText(l).replace(new RegExp(j+f._PromptChar+i,k),a)+a,w=f._GetDateElementText(n).replace(new RegExp(j+f._PromptChar+i,k),a)+a,D=f._maskvalid.indexOf(E)!=c?d:b,r=f._AutoCompleteValue;if(r.indexOf(f.get_CultureDatePlaceholder())==c)r=a;var p,q,o;if(r==a){var C=new Date;p=C.getUTCDate().toString();if(p.length<2)p=h+p;q=(C.getUTCMonth()+1).toString();if(q.length<2)q=h+q;if(D)o=C.getUTCFullYear().toString();else o=o.substring(2)}else{var g;if(f._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){if(r.indexOf(f.get_CultureTimePlaceholder())==c)r=r+e;var F=f._SplitDateTime(r)[0];g=F.split(f.get_CultureDatePlaceholder())}else g=r.split(f.get_CultureDatePlaceholder());if(f.get_CultureDateFormat()==x){p=g[0];q=g[1];o=g[2]}else if(f.get_CultureDateFormat()==v){p=g[1];q=g[0];o=g[2]}else if(f.get_CultureDateFormat()==y){p=g[0];q=g[2];o=g[1]}else if(f.get_CultureDateFormat()==z){p=g[2];q=g[0];o=g[1]}else if(f.get_CultureDateFormat()==A){p=g[2];q=g[1];o=g[0]}else if(f.get_CultureDateFormat()==B){p=g[1];q=g[2];o=g[0]}if(p.length<2)p=h+p;if(q.length<2)q=h+q;if(D)while(o.length<4)o=h+o;else while(o.length<2)o=h+o}if(t==a)t=p;if(u==a)u=q;if(w==a)w=o;var s;if(f.get_CultureDateFormat()==x)s=t+f.get_CultureDatePlaceholder()+u+f._CultureDatePlaceholder+w;else if(f.get_CultureDateFormat()==v)s=u+f.get_CultureDatePlaceholder()+t+f._CultureDatePlaceholder+w;else if(f.get_CultureDateFormat()==y)s=t+f.get_CultureDatePlaceholder()+w+f._CultureDatePlaceholder+u;else if(f.get_CultureDateFormat()==z)s=u+f.get_CultureDatePlaceholder()+w+f._CultureDatePlaceholder+t;else if(f.get_CultureDateFormat()==A)s=w+f.get_CultureDatePlaceholder()+u+f._CultureDatePlaceholder+t;else if(f.get_CultureDateFormat()==B)s=w+f.get_CultureDatePlaceholder()+t+f._CultureDatePlaceholder+u;f._MaskType!=Sys.Extended.UI.MaskedEditType.DateTime&&f.loadValue(s,f._LogicFirstPos);return s},ConvFmtNumber:function(a){if(this._maskvalid.split(this.get_CultureDecimalPlaceholder()).length==2)if(a.substring(a.length-1,a.length)==this.get_CultureDecimalPlaceholder())a=a.substring(0,a.length-1);return a},ConvFmtTime:function(m,z){var g=this,y=0,w=b,x=b,p=a,q=a;if(g.get_CultureAMPMPlaceholder()!=a){p=g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator)[0];q=g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator)[1]}if(z){var v=a,u=a;if(g._CultureAMPMPlaceholder!=a){v=g._CultureAMPMPlaceholder.split(g._AMPMPlaceholderSeparator)[0];u=g._CultureAMPMPlaceholder.split(g._AMPMPlaceholderSeparator)[1]}if(g.get_UserTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour){m=m.replace(new RegExp(j+v+i,k),a);if(m.indexOf(u)!=c)y=12;m=m.replace(new RegExp(j+u+i,k),a)}}if(m.indexOf(p)!=c&&p!=a)w=d;else if(m.indexOf(q)!=c&&q!=a)x=d;if(p!=a)m=m.replace(new RegExp(j+p+i,k),a);if(q!=a)m=m.replace(new RegExp(j+q+i,k),a);m=m.replace(new RegExp(j+e+i,k),a);var l=m.split(g.get_CultureTimePlaceholder()),n=g._maskvalid;if(g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)n=n.split(e)[1];n=n.split(":");if(parseInt(l.length,f)<2||parseInt(l.length,f)>3)return a;var o=parseInt(l[0],f)+y;o=o.toString();if(o.length<n[0].length)while(o.length<n[0].length)o=h+o;l[0]=o;var s=parseInt(l[1],f)+a;if(s.length<n[1].length)while(s.length<n[1].length)s=h+s;l[1]=s;var r=a;if(parseInt(l.length,f)==3){var t=parseInt(l[2],f)+a;if(t.length<n[2].length)while(t.length<n[2].length)t=h+t;l[2]=t;r=l[0]+g.get_CultureTimePlaceholder()+l[1]+g.get_CultureTimePlaceholder()+l[2]}else r=l[0]+g.get_CultureTimePlaceholder()+l[1];if(w)r+=e+p;else if(x)r+=e+q;return r},ConvFmtDateTime:function(f,c){var d=this._SplitDateTime(f),b=d[0],a=d[1];if(a.split(e).length==2)a+=e+a.split(e)[1];b=this.ConvFmtDate(b,c);a=this.ConvFmtTime(a,c);return b+e+a},ConvFmtDate:function(o,p){var b=this,j,c;if(p){j=o.split(b.get_CultureDatePlaceholder());c=o.split(b.get_CultureDatePlaceholder());if(b.get_UserDateFormat()!=Sys.Extended.UI.MaskedEditUserDateFormat.None){c[b.get_CultureDateFormat().indexOf(m)]=j[b._CultureDateFormat.indexOf(m)];c[b.get_CultureDateFormat().indexOf(l)]=j[b._CultureDateFormat.indexOf(l)];c[b.get_CultureDateFormat().indexOf(n)]=j[b._CultureDateFormat.indexOf(n)]}}else c=o.split(b.get_CultureDatePlaceholder());var d=b._maskvalid;if(b._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)d=d.split(e)[0];d=d.split("/");if(parseInt(c.length,f)!=3)return a;var g=parseInt(c[b.get_CultureDateFormat().indexOf(m)],f)+a;if(g.length<d[b.get_CultureDateFormat().indexOf(m)].length)while(g.length<d[b.get_CultureDateFormat().indexOf(m)].length)g=h+g;c[b.get_CultureDateFormat().indexOf(m)]=g;var i=parseInt(c[b.get_CultureDateFormat().indexOf(l)],f)+a;if(i.length<d[b.get_CultureDateFormat().indexOf(l)].length)while(i.length<d[b.get_CultureDateFormat().indexOf(l)].length)i=h+i;c[b.get_CultureDateFormat().indexOf(l)]=i;var k=parseInt(c[b.get_CultureDateFormat().indexOf(n)],f)+a;while(k.length<d[b.get_CultureDateFormat().indexOf(n)].length)k=h+k;c[b.get_CultureDateFormat().indexOf(n)]=k;return c[0]+b.get_CultureDatePlaceholder()+c[1]+b._CultureDatePlaceholder+c[2]},AddCssClassMaskedEdit:function(d){var b=this,c=b.get_element();Sys.UI.DomElement.removeCssClass(c,b._OnBlurCssNegative);Sys.UI.DomElement.removeCssClass(c,b._OnFocusCssClass);Sys.UI.DomElement.removeCssClass(c,b._OnFocusCssNegative);Sys.UI.DomElement.removeCssClass(c,b._OnInvalidCssClass);d!=a&&Sys.UI.DomElement.addCssClass(c,d)},_SetCancelEvent:function(a){if(typeof a.returnValue!==o)a.returnValue=b;if(typeof a.cancelBubble!==o)a.cancelBubble=d;typeof a.preventDefault!==o&&a.preventDefault();typeof a.stopPropagation!==o&&a.stopPropagation()},_CaptureServerValidators:function(){var i=d,e=this._ExternalMessageError;if(typeof Page_Validators!=o)for(var c=g,h=d,f=0;f<Page_Validators.length;f++){c=Page_Validators[f];if(typeof c.enabled==o||c.enabled!=b)if(c.TargetValidator==this.get_element().id)if(!c.isvalid){if(h){h=b;e=a}if(typeof c.errormessage==u){if(e!=a)e+=", ";e+=c.errormessage}i=b}}this._ExternalMessageError=e;return i},_CaptureClientsValidators:function(){var f=d,e=a;this._ExternalMessageError=e;if(typeof Page_Validators!=o)for(var c=g,h=0;h<Page_Validators.length;h++){c=Page_Validators[h];if(typeof c.enabled==o||c.enabled!=b)if(c.TargetValidator==this.get_element().id)if(typeof c.evaluationfunction=="function"){var j=c.evaluationfunction(c);if(!j){f=b;if(typeof c.errormessage==u){if(e!=a)e+=", ";e+=c.errormessage}}}else if(typeof c.evaluationfunction==u){var j;eval("crtret = "+c.evaluationfunction+"("+c.id+i);if(!j){f=b;if(typeof c.errormessage==u){if(e!=a)e+=", ";e+=c.errormessage}}}}this._ExternalMessageError=e;return f},ShowTooltipMessage:function(e){var c=this;if(typeof Page_Validators==o)return;var f=a;if(!e){f=c._CurrentMessageError;c._CurrentMessageError=a}for(var d=0,b=g,d=0;d<Page_Validators.length;d++){b=Page_Validators[d];if(b.TargetValidator==c.get_element().id&&b.IsMaskedEdit=="true"){if(!e){b.innerHTML=f;if(typeof b.display==u){if(b.display=="None")return;if(b.display=="Dynamic"){b.style.display=b.isvalid?"none":"inline";return}}return}c._CurrentMessageError=b.innerHTML;b.innerHTML=b.TooltipMessage;if(typeof b.display==u){if(b.display=="None")return;if(b.display=="Dynamic"){b.style.display="inline";return}}b.style.visibility="visible";return}}},_insertContent:function(e,b){var c=this,d=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()),a=d.get_Value();a=a.substring(0,b)+e+a.substring(b+1);c._LogicTextMask=c._LogicTextMask.substring(0,b)+e+c._LogicTextMask.substring(b+1);d.set_Value(a)},_insertContentRight:function(n){var a=this,m=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()),d=m.get_Value(),g=a._getLastEmptyPosition();if(g<0)return;var b,i=d.substring(g+1),k=a._LogicTextMask.substring(g+1);d=d.substring(0,g)+a._PromptChar;a._LogicTextMask=a._LogicTextMask.substring(0,g)+a._LogicPrompt;var e;if(a._LogicLastInt!=c&&a._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft){var h=i.split(a.get_CultureDecimalPlaceholder()),l=k.split(a.get_CultureDecimalPlaceholder());for(b=0;b<parseInt(h[0].length,f);b++)if(a._isValidMaskedEditPosition(g+1+b)){d+=a._PromptChar;a._LogicTextMask+=a._LogicPrompt}else{d+=h[0].substring(b,b+1);a._LogicTextMask+=l[0].substring(b,b+1)}if(h.length=2){d+=a.get_CultureDecimalPlaceholder()+h[1];a._LogicTextMask+=a.get_CultureDecimalPlaceholder()+l[1]}e=a._getNextPosition(g);for(b=0;b<parseInt(h[0].length,f);b++)if(a._isValidMaskedEditPosition(g+1+b)&&l[0].substring(b,b+1)!=a._LogicPrompt){d=d.substring(0,e)+h[0].substring(b,b+1)+d.substring(e+1);a._LogicTextMask=a._LogicTextMask.substring(0,e)+l[0].substring(b,b+1)+a._LogicTextMask.substring(e+1);e=a._getNextPosition(e+1)}}else{for(b=0;b<parseInt(i.length,f);b++)if(a._isValidMaskedEditPosition(g+1+b)){d+=a._PromptChar;a._LogicTextMask+=a._LogicPrompt}else{d+=i.substring(b,b+1);a._LogicTextMask+=k.substring(b,b+1)}e=a._getNextPosition(g);for(b=0;b<parseInt(i.length,f);b++)if(a._isValidMaskedEditPosition(g+1+b)&&k.substring(b,b+1)!=a._LogicPrompt){d=d.substring(0,e)+i.substring(b,b+1)+d.substring(e+1);a._LogicTextMask=a._LogicTextMask.substring(0,e)+k.substring(b,b+1)+a._LogicTextMask.substring(e+1);e=a._getNextPosition(e+1)}}var j=0;if(a._LogicLastInt!=c&&a._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)j=a._LogicLastPos-a._LogicLastInt+1;d=d.substring(0,a._LogicLastPos-j)+n+d.substring(a._LogicLastPos-j+1);a._LogicTextMask=a._LogicTextMask.substring(0,a._LogicLastPos-j)+n+a._LogicTextMask.substring(a._LogicLastPos-j+1);m.set_Value(d)},InsertAMPM:function(g){var b=this,f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()),d=f.get_Value(),e=b.get_CultureAMPMPlaceholder().split(b._AMPMPlaceholderSeparator),c=a;if(e.length==2){if(g.toUpperCase()==b.get_CultureFirstLetterAM().toUpperCase())c=e[0];else if(g.toUpperCase()==b.get_CultureFirstLetterPM().toUpperCase())c=e[1];b._LogicSymbol=c}d=d.substring(0,b._LogicLastPos+2)+c+d.substring(b._LogicLastPos+2+c.length);f.set_Value(d)},InsertSignal:function(d){var b=this,f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()),c=f.get_Value();if(d==q&&b._LogicSymbol==q)d="+";if(d=="+"){d=e;b._LogicSymbol=a;if(!b._InLostfocus&&b._OnFocusCssClass!=a)b.AddCssClassMaskedEdit(b._OnFocusCssClass);else!b._InLostfocus&&b.AddCssClassMaskedEdit(a)}else{b._LogicSymbol=q;!b._InLostfocus&&b._OnFocusCssNegative!=a&&b.AddCssClassMaskedEdit(b._OnFocusCssNegative)}if(b._AcceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left)c=c.substring(0,b._LogicFirstPos-1)+d+c.substring(b._LogicFirstPos);else if(b._AcceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right)c=c.substring(0,b._LogicLastPos+1)+d+c.substring(b._LogicLastPos+2);f.set_Value(c)},setSelectionRange:function(e,f){var a="character",b=this.get_element();if(b.setSelectionRange)b.setSelectionRange(e,f);else if(b.createTextRange){var c=b.createTextRange();c.collapse(d);c.moveEnd(a,f);c.moveStart(a,e);c.select()}},_getLastEmptyPosition:function(){var a=this,b=a._LogicLastPos;if(a._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&a._LogicLastInt!=c){var d=a._getCurrentPosition();if(d<=a._LogicLastInt)b=a._LogicLastInt}while(b>=0&&a._LogicTextMask.substring(b,b+1)!=a._LogicPrompt)b--;return b},_isValidMaskedEditPosition:function(a){return this._LogicMask.substring(a,a+1)==this._LogicPrompt},_getNextPosition:function(a){var b=this;while(!b._isValidMaskedEditPosition(a)&&a<b._LogicLastPos+1)a++;if(a>b._LogicLastPos+1)a=b._LogicLastPos+1;return a},_getPreviousPosition:function(a){var b=this;while(!b._isValidMaskedEditPosition(a)&&a>b._LogicFirstPos)a--;if(a<b._LogicFirstPos)a=b._LogicFirstPos;return a},_getCurrentPosition:function(){var b=this,c=0,e=b.get_element();if(e.setSelectionRange)c=parseInt(e.selectionStart,f);else if(document.selection){var d=document.selection.createRange();if(d.text!=a){var g=a;if(b._DirectSelText=="R")g=d.text+String.fromCharCode(3);else if(b._DirectSelText=="L")g=String.fromCharCode(3)+d.text;d.text=g;b._DirectSelText==a}else{d.text=String.fromCharCode(3);b._DirectSelText==a}var h=e.createTextRange();h.findText(String.fromCharCode(3));h.select();var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e);c=i.get_Value().indexOf(String.fromCharCode(3));document.selection.clear()}if(c>b._LogicLastPos+1)c=b._LogicLastPos+1;if(c<b._LogicFirstPos)c=b._LogicFirstPos;return c},_processKey:function(f,j){var g=this,i=g._LogicMaskConv,h;if(i.substring(f,f+1)=="9")h=g._charNumbers;else if(i.substring(f,f+1).toUpperCase()=="L")h=g._charLetters+g._charLetters.toLowerCase();else if(i.substring(f,f+1)=="$")h=g._charLetters+g._charLetters.toLowerCase()+e;else if(i.substring(f,f+1).toUpperCase()=="C")h=g._Filtered;else if(i.substring(f,f+1).toUpperCase()=="A")h=g._charLetters+g._charLetters.toLowerCase()+g._Filtered;else if(i.substring(f,f+1).toUpperCase()=="N")h=g._charNumbers+g._Filtered;else if(i.substring(f,f+1)=="?")h=a;else return b;return h==a?d:!h||h.length==0||h.indexOf(j)!=c},_createMask:function(){var g=this;g._MaskConv==a&&g._Mask!=a&&g._convertMask();var i=g._MaskConv,h=0,j=a,k=a,l=b;g._LogicTextMask=a;g._QtdValidInput=0;while(h<parseInt(i.length,f)){if(i.substring(h,h+1)==g._charEscape&&l==b)l=d;else if(g._CharsEditMask.indexOf(i.substring(h,h+1))==c)if(l==d){l=b;j+=i.substring(h,h+1);k+=i.substring(h,h+1);g._LogicTextMask+=g._LogicEscape}else if(g._CharsSpecialMask.indexOf(i.substring(h,h+1))!=c){g._QtdValidInput++;if(i.substring(h,h+1)=="/"){j+=g.get_CultureDatePlaceholder();k+="/";g._LogicTextMask+=g.get_CultureDatePlaceholder()}else if(i.substring(h,h+1)==":"){j+=g.get_CultureTimePlaceholder();k+=":";g._LogicTextMask+=g.get_CultureTimePlaceholder()}else if(i.substring(h,h+1)==","){j+=g.get_CultureThousandsPlaceholder();k+=".";g._LogicTextMask+=g.get_CultureThousandsPlaceholder()}else if(i.substring(h,h+1)=="."){j+=g.get_CultureDecimalPlaceholder();k+=",";g._LogicTextMask+=g.get_CultureDecimalPlaceholder()}}else{j+=i.substring(h,h+1);k+=i.substring(h,h+1);g._LogicTextMask+=i.substring(h,h+1)}else if(l==d){l=b;j+=i.substring(h,h+1);k+=i.substring(h,h+1);g._LogicTextMask+=g._LogicEscape}else{g._QtdValidInput++;j+=g._PromptChar;k+=i.substring(h,h+1);g._LogicTextMask+=g._LogicPrompt}h++}g._LogicFirstPos=c;g._LogicLastPos=c;g._LogicLastInt=c;g._LogicMask=g._LogicTextMask;for(h=0;h<parseInt(g._LogicMask.length,f);h++){if(g._LogicFirstPos==c&&g._LogicMask.substring(h,h+1)==g._LogicPrompt)g._LogicFirstPos=h;if(g._LogicMask.substring(h,h+g.get_CultureDatePlaceholder().length)==g.get_CultureDatePlaceholder())continue;else if(g._LogicMask.substring(h,h+1)==e)g._LogicDateTimeSepPos=h;if(g._LogicMask.substring(h,h+1)==g._LogicPrompt)g._LogicLastPos=h;if(g._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(g._LogicMask.substring(h,h+1)==g.get_CultureDecimalPlaceholder())g._LogicLastInt=h}g._maskvalid=k.substring(g._LogicFirstPos,g._LogicLastPos+1);g._EmptyMask=j},_getClearMask:function(){var c=this,g=0,i=a,k=0,j=b;while(g<parseInt(c._LogicTextMask.length,f)){if(k<c._QtdValidInput)if(c._isValidMaskedEditPosition(g)&&c._LogicTextMask.substring(g,g+1)!=c._LogicPrompt){if(i==a&&j){i+=h+c.get_CultureDecimalPlaceholder();j=b}i+=c._LogicTextMask.substring(g,g+1);k++}else if(c._LogicTextMask.substring(g,g+1)!=c._LogicPrompt&&c._LogicTextMask.substring(g,g+1)!=c._LogicEscape)if(c._LogicTextMask.substring(g,g+c.get_CultureDatePlaceholder().length)==c.get_CultureDatePlaceholder()&&(c._MaskType==Sys.Extended.UI.MaskedEditType.Date||c._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)){i+=i==a?a:c.get_CultureDatePlaceholder();g+=c.get_CultureDatePlaceholder().length-1}else if(c._LogicTextMask.substring(g,g+1)==c.get_CultureTimePlaceholder()&&(c._MaskType==Sys.Extended.UI.MaskedEditType.Time||c._MaskType==Sys.Extended.UI.MaskedEditType.DateTime))i+=i==a?a:c.get_CultureTimePlaceholder();else if(c._LogicTextMask.substring(g,g+1)==e&&c._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)i+=i==a?a:e;else if(c._LogicTextMask.substring(g,g+1)==c.get_CultureThousandsPlaceholder()&&c._MaskType==Sys.Extended.UI.MaskedEditType.Number)i+=i==a?a:c.get_CultureThousandsPlaceholder();else if(c._LogicTextMask.substring(g,g+1)==c.get_CultureDecimalPlaceholder()&&c._MaskType==Sys.Extended.UI.MaskedEditType.Number){i+=i==a?a:c.get_CultureDecimalPlaceholder();if(i==a)j=d}g++}if(c._LogicSymbol!=a&&i!=a)if(c._MaskType==Sys.Extended.UI.MaskedEditType.Time||c._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)i+=e+c._LogicSymbol;else if(c._MaskType==Sys.Extended.UI.MaskedEditType.Number)i=c._LogicSymbol+i;return i},_convertMask:function(){var g=this;g._MaskConv=a;for(var j=a,o=a,i=0;i<parseInt(g._Mask.length,f);i++)if(g._CharsEditMask.indexOf(g._Mask.substring(i,i+1))!=c){if(j.length==0){g._MaskConv+=g._Mask.substring(i,i+1);j=a;o=g._Mask.substring(i,i+1)}else if(g._Mask.substring(i,i+1)=="9")j+="9";else if(g._Mask.substring(i,i+1)==h)j+=h}else if(g._CharsEditMask.indexOf(g._Mask.substring(i,i+1))==c&&g._Mask.substring(i,i+1)!=g._DelimitStartDup&&g._Mask.substring(i,i+1)!=g._DelimitEndDup){if(j.length==0){g._MaskConv+=g._Mask.substring(i,i+1);j=a;o=a}else if(g._charNumbers.indexOf(g._Mask.substring(i,i+1))!=c)j+=g._Mask.substring(i,i+1)}else if(g._Mask.substring(i,i+1)==g._DelimitStartDup&&j==a)j=h;else if(g._Mask.substring(i,i+1)==g._DelimitEndDup&&j!=a){var q=parseInt(j,f)-1;if(q>0)for(var r=0;r<q;r++)g._MaskConv+=o;j=a;o=a}var m=c,l=c,n=b;for(i=0;i<parseInt(g._MaskConv.length,f);i++)if(g._MaskConv.substring(i,i+1)==g._charEscape&&!n)n=d;else if(g._CharsEditMask.indexOf(g._MaskConv.substring(i,i+1))!=c&&!n){if(m==c)m=i;l=i}else if(n)n=b;if((g._MaskType==Sys.Extended.UI.MaskedEditType.Time||g._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&g._AcceptAmPm){var p=g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator),k=a;if(p.length==2){k=g._charEscape+e;for(i=0;i<parseInt(p[0].length,f);i++)k+=g._charEscape+e}g._MaskConv=g._MaskConv.substring(0,l+1)+k+g._MaskConv.substring(l+1)}else if(g._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g._DisplayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Left){var k=a;for(i=0;i<parseInt(g.get_CultureCurrencySymbolPlaceholder().length,f);i++)if(g._CharsEditMask.indexOf(g.get_CultureCurrencySymbolPlaceholder().substring(i,i+1))==c)k+=g.get_CultureCurrencySymbolPlaceholder().substring(i,i+1);else k+=g._charEscape+g.get_CultureCurrencySymbolPlaceholder().substring(i,i+1);k+=g._charEscape+e;g._MaskConv=g._MaskConv.substring(0,m)+k+g._MaskConv.substring(m);m+=k.length;l+=k.length}else if(g._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g._DisplayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Right){var k=g._charEscape+e;for(i=0;i<parseInt(g.get_CultureCurrencySymbolPlaceholder().length,f);i++)if(g._CharsEditMask.indexOf(g.get_CultureCurrencySymbolPlaceholder().substring(i,i+1))==c)k+=g.get_CultureCurrencySymbolPlaceholder().substring(i,i+1);else k+=g._charEscape+g.get_CultureCurrencySymbolPlaceholder().substring(i,i+1);g._MaskConv=g._MaskConv.substring(0,l+1)+k+g._MaskConv.substring(l+1)}if(g._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g._AcceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right)g._MaskConv=g._MaskConv.substring(0,l+1)+g._charEscape+e+g._MaskConv.substring(l+1);else if(g._MaskType==Sys.Extended.UI.MaskedEditType.Number&&g._AcceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left)g._MaskConv=g._MaskConv.substring(0,m)+g._charEscape+e+g._MaskConv.substring(m);g._convertMaskNotEscape()},_convertMaskNotEscape:function(){var c=this;c._LogicMaskConv=a;for(var h=c._MaskConv.replace(/(\/)/g,c.get_CultureDatePlaceholder()),g=b,e=0;e<parseInt(h.length,f);e++)if(h.substring(e,e+1)==c._charEscape)g=d;else if(!g)c._LogicMaskConv+=h.substring(e,e+1);else{c._LogicMaskConv+=c._LogicEscape;g=b}},get_Mask:function(){var b=this;b._MaskConv==a&&b._Mask!=a&&b._convertMask();return b._MaskConv},set_Mask:function(a){this._Mask=a;this.raisePropertyChanged("Mask")},get_Filtered:function(){return this._Filtered},set_Filtered:function(a){this._Filtered=a;this.raisePropertyChanged("Filtered")},get_InputDirection:function(){return this._InputDirection},set_InputDirection:function(a){this._InputDirection=a;this.raisePropertyChanged("InputDirection")},get_PromptCharacter:function(){return this._PromptChar},set_PromptCharacter:function(a){this._PromptChar=a;this.raisePropertyChanged("PromptChar")},get_OnFocusCssClass:function(){return this._OnFocusCssClass},set_OnFocusCssClass:function(a){this._OnFocusCssClass=a;this.raisePropertyChanged("OnFocusCssClass")},get_OnInvalidCssClass:function(){return this._OnInvalidCssClass},set_OnInvalidCssClass:function(a){this._OnInvalidCssClass=a;this.raisePropertyChanged("OnInvalidCssClass")},get_CultureName:function(){return this._CultureName},set_CultureName:function(a){this._CultureName=a;this.raisePropertyChanged("Culture")},get_CultureDatePlaceholder:function(){return this._CultureDatePlaceholder},set_CultureDatePlaceholder:function(a){this._CultureDatePlaceholder=a;this.raisePropertyChanged("CultureDatePlaceholder")},get_CultureTimePlaceholder:function(){return this._CultureTimePlaceholder},set_CultureTimePlaceholder:function(a){this._CultureTimePlaceholder=a;this.raisePropertyChanged("CultureTimePlaceholder")},get_CultureDecimalPlaceholder:function(){return this._CultureDecimalPlaceholder},set_CultureDecimalPlaceholder:function(a){this._CultureDecimalPlaceholder=a;this.raisePropertyChanged("CultureDecimalPlaceholder")},get_CultureThousandsPlaceholder:function(){return this._CultureThousandsPlaceholder},set_CultureThousandsPlaceholder:function(a){this._CultureThousandsPlaceholder=a;this.raisePropertyChanged("CultureThousandsPlaceholder")},get_CultureDateFormat:function(){var a=this._CultureDateFormat;switch(this.get_UserDateFormat()){case Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear:a=x;break;case Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth:a=y;break;case Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear:a=v;break;case Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay:a=z;break;case Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth:a=B;break;case Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay:a=A}return a},set_CultureDateFormat:function(a){this._CultureDateFormat=a;this.raisePropertyChanged("CultureDateFormat")},get_CultureCurrencySymbolPlaceholder:function(){return this._CultureCurrencySymbolPlaceholder},set_CultureCurrencySymbolPlaceholder:function(a){this._CultureCurrencySymbolPlaceholder=a;this.raisePropertyChanged("CultureCurrencySymbolPlaceholder")},get_CultureAMPMPlaceholder:function(){var c=this,b=c._CultureAMPMPlaceholder;if(b.split(c._AMPMPlaceholderSeparator).length!=2||b==c._AMPMPlaceholderSeparator)b=a;if(c.get_UserTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour)b=a;return b},set_CultureAMPMPlaceholder:function(a){this._CultureAMPMPlaceholder=a;this.raisePropertyChanged("CultureAMPMPlaceholder")},get_CultureFirstLettersAMPM:function(){if(this.get_CultureAMPMPlaceholder()!=a){var b=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return b[0].substring(0,1)+b[1].substring(0,1)}return a},get_CultureFirstLetterAM:function(){if(this.get_CultureAMPMPlaceholder()!=a){var b=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return b[0].substring(0,1)}return a},get_CultureFirstLetterPM:function(){if(this.get_CultureAMPMPlaceholder()!=a){var b=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return b[1].substring(0,1)}return a},get_ClearMaskOnLostFocus:function(){return this._ClearMaskOnLostfocus},set_ClearMaskOnLostFocus:function(a){this._ClearMaskOnLostfocus=a;this.raisePropertyChanged("ClearMaskOnLostfocus")},get_MessageValidatorTip:function(){return this._MessageValidatorTip},set_MessageValidatorTip:function(a){this._MessageValidatorTip=a;this.raisePropertyChanged("MessageValidatorTip")},get_AcceptAMPM:function(){return this._AcceptAmPm},set_AcceptAMPM:function(a){this._AcceptAmPm=a;this.raisePropertyChanged("AcceptAmPm")},get_AcceptNegative:function(){return this._AcceptNegative},set_AcceptNegative:function(a){this._AcceptNegative=a;this.raisePropertyChanged("AcceptNegative")},get_DisplayMoney:function(){return this._DisplayMoney},set_DisplayMoney:function(a){this._DisplayMoney=a;this.raisePropertyChanged("DisplayMoney")},get_OnFocusCssNegative:function(){return this._OnFocusCssNegative},set_OnFocusCssNegative:function(a){this._OnFocusCssNegative=a;this.raisePropertyChanged("OnFocusCssNegative")},get_OnBlurCssNegative:function(){return this._OnBlurCssNegative},set_OnBlurCssNegative:function(a){this._OnBlurCssNegative=a;this.raisePropertyChanged("OnBlurCssNegative")},get_Century:function(){return this._Century},set_Century:function(a){this._Century=a;this.raisePropertyChanged("Century")},get_AutoComplete:function(){return this._AutoComplete},set_AutoComplete:function(a){this._AutoComplete=a;this.raisePropertyChanged("AutoComplete")},get_AutoCompleteValue:function(){return this._AutoCompleteValue},set_AutoCompleteValue:function(a){this._AutoCompleteValue=a;this.raisePropertyChanged("AutoCompleteValue")},get_MaskType:function(){return this._MaskType},set_MaskType:function(a){this._MaskType=a;this.raisePropertyChanged("MaskType")},get_ClearTextOnInvalid:function(){return this._ClearTextOnInvalid},set_ClearTextOnInvalid:function(a){if(this._ClearTextOnInvalid!==a){this._ClearTextOnInvalid=a;this.raisePropertyChanged("ClearTextOnInvalid")}},get_ClipboardText:function(){return this._ClipboardText},set_ClipboardText:function(a){this._ClipboardText=a;this.raisePropertyChanged("ClipboardText")},get_ClipboardEnabled:function(){return this._AllowCopyPaste},set_ClipboardEnabled:function(a){this._AllowCopyPaste=a;this.raisePropertyChanged("ClipboardEnabled")},get_ErrorTooltipEnabled:function(){return this._ShowMessageErrorFloat},set_ErrorTooltipEnabled:function(a){this._ShowMessageErrorFloat=a;this.raisePropertyChanged("ErrorTooltipEnabled")},get_ErrorTooltipCssClass:function(){return this._CssMessageErrorFloat},set_ErrorTooltipCssClass:function(a){this._CssMessageErrorFloat=a;this.raisePropertyChanged("ErrorTooltipCssClass")},get_UserDateFormat:function(){return this._UserDateFormat},set_UserDateFormat:function(a){this._UserDateFormat=a;this.raisePropertyChanged("UserDateFormat")},get_UserTimeFormat:function(){return this._UserTimeFormat},set_UserTimeFormat:function(a){this._UserTimeFormat=a;this.raisePropertyChanged("UserTimeFormat")}};Sys.Extended.UI.MaskedEditBehavior.registerClass("Sys.Extended.UI.MaskedEditBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.MaskedEditBehavior,{name:"maskedEdit"});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")}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["Globalization","ExtendedBase","ExtendedTimer","ExtendedCommon"],a);else a()})();