//START Compat.Timer.Timer.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedTimer";function a(){var a="tick",b="interval",c=Sys.version;if(!c&&!Sys._versionChecked){Sys._versionChecked=true;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Sys.Timer=function(){var a=this;Sys.Timer.initializeBase(a);a._interval=1e3;a._enabled=false;a._timer=null};Sys.Timer.prototype={get_interval:function(){return this._interval},set_interval:function(c){var a=this;if(a._interval!==c){a._interval=c;a.raisePropertyChanged(b);if(!a.get_isUpdating()&&a._timer!==null){a._stopTimer();a._startTimer()}}},get_enabled:function(){return this._enabled},set_enabled:function(b){var a=this;if(b!==a.get_enabled()){a._enabled=b;a.raisePropertyChanged("enabled");if(!a.get_isUpdating())if(b)a._startTimer();else a._stopTimer()}},add_tick:function(b){this.get_events().addHandler(a,b)},remove_tick:function(b){this.get_events().removeHandler(a,b)},dispose:function(){this.set_enabled(false);this._stopTimer();Sys.Timer.callBaseMethod(this,"dispose")},updated:function(){var a=this;Sys.Timer.callBaseMethod(a,"updated");if(a._enabled){a._stopTimer();a._startTimer()}},_timerCallback:function(){var b=this.get_events().getHandler(a);b&&b(this,Sys.EventArgs.Empty)},_startTimer:function(){var a=this;a._timer=window.setInterval(Function.createDelegate(a,a._timerCallback),a._interval)},_stopTimer:function(){window.clearInterval(this._timer);this._timer=null}};Sys.Timer.descriptor={properties:[{name:b,type:Number},{name:"enabled",type:Boolean}],events:[{name:a}]};Sys.Timer.registerClass("Sys.Timer",Sys.Component)}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ComponentModel"],a);else a()})();
//END Compat.Timer.Timer.js
//START Common.Common.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedCommon";function a(){var p="WatermarkChanged",l="hiddenInputToUpdateATBuffer_CommonToolkitScripts",g="HTMLEvents",r="mousemove",k="MouseEvents",m="UIEvents",o="display",q="DXImageTransform.Microsoft.Alpha",i="value",h="hidden",n="none",f="px",e="element",d="undefined",c=null,a=false,j="Sys.Extended.UI.BoxSide",b=true,s=Sys.version;if(!s&&!Sys._versionChecked){Sys._versionChecked=b;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BoxSide=function(){};Sys.Extended.UI.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};Sys.Extended.UI.BoxSide.registerEnum(j,a);Sys.Extended.UI._CommonToolkitScripts=function(){};Sys.Extended.UI._CommonToolkitScripts.prototype={_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],getCurrentStyle:function(b,e,f){var a=c;if(b){if(b.currentStyle)a=b.currentStyle[e];else if(document.defaultView&&document.defaultView.getComputedStyle){var g=document.defaultView.getComputedStyle(b,c);if(g)a=g[e]}if(!a&&b.style.getPropertyValue)a=b.style.getPropertyValue(e);else if(!a&&b.style.getAttribute)a=b.style.getAttribute(e)}if(!a||a==""||typeof a===d)if(typeof f!=d)a=f;else a=c;return a},getInheritedBackgroundColor:function(d){var c="backgroundColor",a="#FFFFFF";if(!d)return a;var b=this.getCurrentStyle(d,c);try{while(!b||b==""||b=="transparent"||b=="rgba(0, 0, 0, 0)"){d=d.parentNode;if(!d)b=a;else b=this.getCurrentStyle(d,c)}}catch(e){b=a}return b},getLocation:function(a){return Sys.UI.DomElement.getLocation(a)},setLocation:function(b,a){Sys.UI.DomElement.setLocation(b,a.x,a.y)},getContentSize:function(a){if(!a)throw Error.argumentNull(e);var d=this.getSize(a),c=this.getBorderBox(a),b=this.getPaddingBox(a);return{width:d.width-c.horizontal-b.horizontal,height:d.height-c.vertical-b.vertical}},getSize:function(a){if(!a)throw Error.argumentNull(e);return{width:a.offsetWidth,height:a.offsetHeight}},setContentSize:function(a,c){var b="border-box",d=this;if(!a)throw Error.argumentNull(e);if(!c)throw Error.argumentNull("size");if(d.getCurrentStyle(a,"MozBoxSizing")==b||d.getCurrentStyle(a,"BoxSizing")==b){var h=d.getBorderBox(a),g=d.getPaddingBox(a);c={width:c.width+h.horizontal+g.horizontal,height:c.height+h.vertical+g.vertical}}a.style.width=c.width.toString()+f;a.style.height=c.height.toString()+f},setSize:function(a,b){if(!a)throw Error.argumentNull(e);if(!b)throw Error.argumentNull("size");var d=this.getBorderBox(a),c=this.getPaddingBox(a),f={width:b.width-d.horizontal-c.horizontal,height:b.height-d.vertical-c.vertical};this.setContentSize(a,f)},getBounds:function(a){return Sys.UI.DomElement.getBounds(a)},setBounds:function(a,b){if(!a)throw Error.argumentNull(e);if(!b)throw Error.argumentNull("bounds");this.setSize(a,b);$common.setLocation(a,b)},getClientBounds:function(){var b,a;if(document.compatMode=="CSS1Compat"){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{b=document.body.clientWidth;a=document.body.clientHeight}return new Sys.UI.Bounds(0,0,b,a)},getMarginBox:function(b){var c=this;if(!b)throw Error.argumentNull(e);var a={top:c.getMargin(b,Sys.Extended.UI.BoxSide.Top),right:c.getMargin(b,Sys.Extended.UI.BoxSide.Right),bottom:c.getMargin(b,Sys.Extended.UI.BoxSide.Bottom),left:c.getMargin(b,Sys.Extended.UI.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},getBorderBox:function(b){var c=this;if(!b)throw Error.argumentNull(e);var a={top:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Top),right:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Right),bottom:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Bottom),left:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},getPaddingBox:function(b){var c=this;if(!b)throw Error.argumentNull(e);var a={top:c.getPadding(b,Sys.Extended.UI.BoxSide.Top),right:c.getPadding(b,Sys.Extended.UI.BoxSide.Right),bottom:c.getPadding(b,Sys.Extended.UI.BoxSide.Bottom),left:c.getPadding(b,Sys.Extended.UI.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},isBorderVisible:function(b,a){if(!b)throw Error.argumentNull(e);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,j));var d=this._borderStyleNames[a],c=this.getCurrentStyle(b,d);return c!=n},getMargin:function(b,a){if(!b)throw Error.argumentNull(e);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,j));var d=this._marginWidthNames[a],c=this.getCurrentStyle(b,d);try{return this.parsePadding(c)}catch(f){return 0}},getBorderWidth:function(c,a){var b=this;if(!c)throw Error.argumentNull(e);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,j));if(!b.isBorderVisible(c,a))return 0;var f=b._borderWidthNames[a],d=b.getCurrentStyle(c,f);return b.parseBorderWidth(d)},getPadding:function(b,a){if(!b)throw Error.argumentNull(e);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,j));var d=this._paddingWidthNames[a],c=this.getCurrentStyle(b,d);return this.parsePadding(c)},parseBorderWidth:function(d){var e=this;if(!e._borderThicknesses){var c={},a=document.createElement("div");a.style.visibility=h;a.style.position="absolute";a.style.fontSize="1px";document.body.appendChild(a);var b=document.createElement("div");b.style.height="0px";b.style.overflow=h;a.appendChild(b);var g=a.offsetHeight;b.style.borderTop="solid black";b.style.borderTopWidth="thin";c.thin=a.offsetHeight-g;b.style.borderTopWidth="medium";c.medium=a.offsetHeight-g;b.style.borderTopWidth="thick";c.thick=a.offsetHeight-g;a.removeChild(b);document.body.removeChild(a);e._borderThicknesses=c}if(d){switch(d){case"thin":case"medium":case"thick":return e._borderThicknesses[d];case"inherit":return 0}var i=e.parseUnit(d);Sys.Debug.assert(i.type==f,String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit,i.type));return i.size}return 0},parsePadding:function(a){if(a){if(a=="inherit")return 0;var b=this.parseUnit(a);b.type!==f&&Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit,b.type));return b.size}return 0},parseUnit:function(a){if(!a)throw Error.argumentNull(i);a=a.trim().toLowerCase();for(var h=a.length,c=-1,g=0;g<h;g++){var b=a.substr(g,1);if((b<"0"||b>"9")&&b!="-"&&b!="."&&b!=",")break;c=g}if(c==-1)throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits);var e,d;if(c<h-1)e=a.substring(c+1).trim();else e=f;d=parseFloat(a.substr(0,c+1));if(e==f)d=Math.floor(d);return{size:d,type:e}},getElementOpacity:function(c){if(!c)throw Error.argumentNull(e);var d=a,f;if(c.filters){var h=c.filters;if(h.length!==0){var g=h[q];if(g){f=g.opacity/100;d=b}}}else{f=this.getCurrentStyle(c,"opacity",1);d=b}return d===a?1:parseFloat(f)},setElementOpacity:function(c,d){if(!c)throw Error.argumentNull(e);if(c.filters){var h=c.filters,f=b;if(h.length!==0){var g=h[q];if(g){f=a;g.opacity=d*100}}if(f)c.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+d*100+")"}else c.style.opacity=d},getVisible:function(a){return a&&n!=$common.getCurrentStyle(a,o)&&h!=$common.getCurrentStyle(a,"visibility")},setVisible:function(a,b){if(a&&b!=$common.getVisible(a)){if(b)if(a.style.removeAttribute)a.style.removeAttribute(o);else a.style.removeProperty(o);else a.style.display=n;a.style.visibility=b?"visible":h}},resolveFunction:function(a){if(a)if(a instanceof Function)return a;else if(String.isInstanceOfType(a)&&a.length>0){var b;if((b=window[a])instanceof Function)return b;else if((b=eval(a))instanceof Function)return b}return c},addCssClasses:function(c,b){for(var a=0;a<b.length;a++)Sys.UI.DomElement.addCssClass(c,b[a])},removeCssClasses:function(c,b){for(var a=0;a<b.length;a++)Sys.UI.DomElement.removeCssClass(c,b[a])},setStyle:function(a,b){$common.applyProperties(a.style,b)},removeHandlers:function(c,a){for(var b in a)$removeHandler(c,b,a[b])},overlaps:function(a,b){return a.x<b.x+b.width&&b.x<a.x+a.width&&a.y<b.y+b.height&&b.y<a.y+a.height},containsPoint:function(a,b,c){return b>=a.x&&b<a.x+a.width&&c>=a.y&&c<a.y+a.height},isKeyDigit:function(a){return 48<=a&&a<=57},isKeyNavigation:function(a){return Sys.UI.Key.left<=a&&a<=Sys.UI.Key.down},padLeft:function(d,c,e,b){return $common._pad(d,c||2,e||" ","l",b||a)},padRight:function(d,c,e,b){return $common._pad(d,c||2,e||" ","r",b||a)},_pad:function(c,b,h,e,g){c=c.toString();var f=c.length,d=new Sys.StringBuilder;e=="r"&&d.append(c);while(f<b){d.append(h);f++}e=="l"&&d.append(c);var a=d.toString();if(g&&a.length>b)if(e=="l")a=a.substr(a.length-b,b);else a=a.substr(0,b);return a},__DOMEvents:{focusin:{eventGroup:m,init:function(c){c.initUIEvent("focusin",b,a,window,1)}},focusout:{eventGroup:m,init:function(c){c.initUIEvent("focusout",b,a,window,1)}},activate:{eventGroup:m,init:function(a){a.initUIEvent("activate",b,b,window,1)}},focus:{eventGroup:m,init:function(b){b.initUIEvent("focus",a,a,window,1)}},blur:{eventGroup:m,init:function(b){b.initUIEvent("blur",a,a,window,1)}},click:{eventGroup:k,init:function(e,d){e.initMouseEvent("click",b,b,window,1,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},dblclick:{eventGroup:k,init:function(e,d){e.initMouseEvent("click",b,b,window,2,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},mousedown:{eventGroup:k,init:function(e,d){e.initMouseEvent("mousedown",b,b,window,1,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},mouseup:{eventGroup:k,init:function(e,d){e.initMouseEvent("mouseup",b,b,window,1,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},mouseover:{eventGroup:k,init:function(e,d){e.initMouseEvent("mouseover",b,b,window,1,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},mousemove:{eventGroup:k,init:function(e,d){e.initMouseEvent(r,b,b,window,1,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},mouseout:{eventGroup:k,init:function(e,d){e.initMouseEvent(r,b,b,window,1,d.screenX||0,d.screenY||0,d.clientX||0,d.clientY||0,d.ctrlKey||a,d.altKey||a,d.shiftKey||a,d.metaKey||a,d.button||0,d.relatedTarget||c)}},load:{eventGroup:g,init:function(b){b.initEvent("load",a,a)}},unload:{eventGroup:g,init:function(b){b.initEvent("unload",a,a)}},select:{eventGroup:g,init:function(c){c.initEvent("select",b,a)}},change:{eventGroup:g,init:function(c){c.initEvent("change",b,a)}},submit:{eventGroup:g,init:function(a){a.initEvent("submit",b,b)}},reset:{eventGroup:g,init:function(c){c.initEvent("reset",b,a)}},resize:{eventGroup:g,init:function(c){c.initEvent("resize",b,a)}},scroll:{eventGroup:g,init:function(c){c.initEvent("scroll",b,a)}}},tryFireRawEvent:function(c,d){try{if(c.fireEvent){c.fireEvent("on"+d.type,d);return b}else if(c.dispatchEvent){c.dispatchEvent(d);return b}}catch(e){}return a},tryFireEvent:function(g,f,e){try{if(document.createEventObject){var c=document.createEventObject();$common.applyProperties(c,e||{});g.fireEvent("on"+f,c);return b}else if(document.createEvent){var d=$common.__DOMEvents[f];if(d){var c=document.createEvent(d.eventGroup);d.init(c,e||{});g.dispatchEvent(c);return b}}}catch(c){}return a},wrapElement:function(a,b,c){var d=a.parentNode;d.replaceChild(b,a);(c||b).appendChild(a)},unwrapElement:function(b,a){var d=a.parentNode;if(d!=c){$common.removeElement(b);d.replaceChild(b,a)}},removeElement:function(a){var b=a.parentNode;b!=c&&b.removeChild(a)},applyProperties:function(e,d){for(var b in d){var a=d[b];if(a!=c&&Object.getType(a)===Object){var f=e[b];$common.applyProperties(f,a)}else e[b]=a}},createElementFromTemplate:function(a,j,e){if(typeof a.nameTable!=d){var g=a.nameTable;if(String.isInstanceOfType(g))g=e[g];if(g!=c)e=g}var l=c;if(typeof a.name!==d)l=a.name;var b=document.createElement(a.nodeName);if(typeof a.name!==d&&e)e[a.name]=b;if(typeof a.parent!==d&&j==c){var h=a.parent;if(String.isInstanceOfType(h))h=e[h];if(h!=c)j=h}typeof a.properties!==d&&a.properties!=c&&$common.applyProperties(b,a.properties);typeof a.cssClasses!==d&&a.cssClasses!=c&&$common.addCssClasses(b,a.cssClasses);typeof a.events!==d&&a.events!=c&&$addHandlers(b,a.events);typeof a.visible!==d&&a.visible!=c&&this.setVisible(b,a.visible);j&&j.appendChild(b);typeof a.opacity!==d&&a.opacity!=c&&$common.setElementOpacity(b,a.opacity);if(typeof a.children!==d&&a.children!=c)for(var k=0;k<a.children.length;k++){var m=a.children[k];$common.createElementFromTemplate(m,b,e)}var i=b;if(typeof a.contentPresenter!==d&&a.contentPresenter!=c)i=e[i];if(typeof a.content!==d&&a.content!=c){var f=a.content;if(String.isInstanceOfType(f))f=e[f];if(f.parentNode)$common.wrapElement(f,b,i);else i.appendChild(f)}return b},prepareHiddenElementForATDeviceUpdate:function(){var a=document.getElementById(l);if(!a){var a=document.createElement("input");a.setAttribute("type",h);a.setAttribute(i,"1");a.setAttribute("id",l);a.setAttribute("name",l);document.forms[0]&&document.forms[0].appendChild(a)}},updateFormToRefreshATDeviceBuffer:function(){var a=document.getElementById(l);if(a)if(a.getAttribute(i)=="1")a.setAttribute(i,"0");else a.setAttribute(i,"1")},appendElementToFormOrBody:function(a){if(document.forms&&document.forms[0])document.forms[0].appendChild(a);else document.body.appendChild(a)}};CommonToolkitScripts=Sys.Extended.UI.CommonToolkitScripts=new Sys.Extended.UI._CommonToolkitScripts;$common=CommonToolkitScripts;Sys.UI.DomElement.getVisible=$common.getVisible;Sys.UI.DomElement.setVisible=$common.setVisible;Sys.UI.Control.overlaps=$common.overlaps;Sys.Extended.UI._DomUtility=function(){};Sys.Extended.UI._DomUtility.prototype={isDescendant:function(f,e){for(var d=e.parentNode;d!=c;d=d.parentNode)if(d==f)return b;return a},isDescendantOrSelf:function(c,a){return c===a?b:Sys.Extended.UI.DomUtility.isDescendant(c,a)},isAncestor:function(a,b){return Sys.Extended.UI.DomUtility.isDescendant(b,a)},isAncestorOrSelf:function(a,c){return a===c?b:Sys.Extended.UI.DomUtility.isDescendant(c,a)},isSibling:function(f,e){for(var d=f.parentNode,c=0;c<d.childNodes.length;c++)if(d.childNodes[c]==e)return b;return a}};Sys.Extended.UI._DomUtility.registerClass("Sys.Extended.UI._DomUtility");Sys.Extended.UI.DomUtility=new Sys.Extended.UI._DomUtility;Sys.Extended.UI.TextBoxWrapper=function(d){var b=this;Sys.Extended.UI.TextBoxWrapper.initializeBase(b,[d]);b._current=d.value;b._watermark=c;b._isWatermarked=a};Sys.Extended.UI.TextBoxWrapper.prototype={dispose:function(){this.get_element().TextBoxWrapper=c;Sys.Extended.UI.TextBoxWrapper.callBaseMethod(this,"dispose")},get_Current:function(){this._current=this.get_element().value;return this._current},set_Current:function(a){this._current=a;this._updateElement()},get_Value:function(){return this.get_IsWatermarked()?"":this.get_Current()},set_Value:function(e){var d=this;d.set_Current(e);if(!e||0==e.length)c!=d._watermark&&d.set_IsWatermarked(b);else d.set_IsWatermarked(a)},get_Watermark:function(){return this._watermark},set_Watermark:function(a){this._watermark=a;this._updateElement()},get_IsWatermarked:function(){return this._isWatermarked},set_IsWatermarked:function(b){var a=this;if(a._isWatermarked!=b){a._isWatermarked=b;a._updateElement();a._raiseWatermarkChanged()}},_updateElement:function(){var a=this,b=a.get_element();if(a._isWatermarked){if(b.value!=a._watermark)b.value=a._watermark}else if(b.value!=a._current)b.value=a._current},add_WatermarkChanged:function(a){this.get_events().addHandler(p,a)},remove_WatermarkChanged:function(a){this.get_events().removeHandler(p,a)},_raiseWatermarkChanged:function(){var a=this.get_events().getHandler(p);a&&a(this,Sys.EventArgs.Empty)}};Sys.Extended.UI.TextBoxWrapper.get_Wrapper=function(a){if(c==a.TextBoxWrapper)a.TextBoxWrapper=new Sys.Extended.UI.TextBoxWrapper(a);return a.TextBoxWrapper};Sys.Extended.UI.TextBoxWrapper.registerClass("Sys.Extended.UI.TextBoxWrapper",Sys.UI.Behavior);Sys.Extended.UI.TextBoxWrapper.validatorGetValue=function(b){var a=$get(b);return a&&a.TextBoxWrapper?a.TextBoxWrapper.get_Value():Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue(b)};if(typeof ValidatorGetValue=="function"){Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue=ValidatorGetValue;ValidatorGetValue=Sys.Extended.UI.TextBoxWrapper.validatorGetValue}if(Sys.CultureInfo&&Sys.CultureInfo.prototype._getAbbrMonthIndex){Sys.CultureInfo.prototype._getAbbrMonthIndex=function(b){var a=this;if(!a._upperAbbrMonths)a._upperAbbrMonths=a._toUpperArray(a.dateTimeFormat.AbbreviatedMonthNames);return Array.indexOf(a._upperAbbrMonths,a._toUpper(b))};Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex}}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ComponentModel"],a);else a()})();var $common,CommonToolkitScripts;
//END Common.Common.js
//START ExtenderBase.BaseScripts.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedBase";function a(){var b="undefined",f="populating",e="populated",d="dispose",c="initialize",a=null,g=this,h=Sys.version;if(!h&&!Sys._versionChecked){Sys._versionChecked=true;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BehaviorBase=function(c){var b=this;Sys.Extended.UI.BehaviorBase.initializeBase(b,[c]);b._clientStateFieldID=a;b._pageRequestManager=a;b._partialUpdateBeginRequestHandler=a;b._partialUpdateEndRequestHandler=a};Sys.Extended.UI.BehaviorBase.prototype={initialize:function(){Sys.Extended.UI.BehaviorBase.callBaseMethod(this,c)},dispose:function(){var b=this;Sys.Extended.UI.BehaviorBase.callBaseMethod(b,d);if(b._pageRequestManager){if(b._partialUpdateBeginRequestHandler){b._pageRequestManager.remove_beginRequest(b._partialUpdateBeginRequestHandler);b._partialUpdateBeginRequestHandler=a}if(b._partialUpdateEndRequestHandler){b._pageRequestManager.remove_endRequest(b._partialUpdateEndRequestHandler);b._partialUpdateEndRequestHandler=a}b._pageRequestManager=a}},get_ClientStateFieldID:function(){return this._clientStateFieldID},set_ClientStateFieldID:function(a){if(this._clientStateFieldID!=a){this._clientStateFieldID=a;this.raisePropertyChanged("ClientStateFieldID")}},get_ClientState:function(){if(this._clientStateFieldID){var b=document.getElementById(this._clientStateFieldID);if(b)return b.value}return a},set_ClientState:function(b){if(this._clientStateFieldID){var a=document.getElementById(this._clientStateFieldID);if(a)a.value=b}},registerPartialUpdateEvents:function(){var a=this;if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){a._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(a._pageRequestManager){a._partialUpdateBeginRequestHandler=Function.createDelegate(a,a._partialUpdateBeginRequest);a._pageRequestManager.add_beginRequest(a._partialUpdateBeginRequestHandler);a._partialUpdateEndRequestHandler=Function.createDelegate(a,a._partialUpdateEndRequest);a._pageRequestManager.add_endRequest(a._partialUpdateEndRequestHandler)}}},_partialUpdateBeginRequest:function(){},_partialUpdateEndRequest:function(){}};Sys.Extended.UI.BehaviorBase.registerClass("Sys.Extended.UI.BehaviorBase",Sys.UI.Behavior);Sys.Extended.UI.DynamicPopulateBehaviorBase=function(c){var b=this;Sys.Extended.UI.DynamicPopulateBehaviorBase.initializeBase(b,[c]);b._DynamicControlID=a;b._DynamicContextKey=a;b._DynamicServicePath=a;b._DynamicServiceMethod=a;b._cacheDynamicResults=false;b._dynamicPopulateBehavior=a;b._populatingHandler=a;b._populatedHandler=a};Sys.Extended.UI.DynamicPopulateBehaviorBase.prototype={initialize:function(){var a=this;Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(a,c);a._populatingHandler=Function.createDelegate(a,a._onPopulating);a._populatedHandler=Function.createDelegate(a,a._onPopulated)},dispose:function(){var b=this;if(b._populatedHandler){b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.remove_populated(b._populatedHandler);b._populatedHandler=a}if(b._populatingHandler){b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.remove_populating(b._populatingHandler);b._populatingHandler=a}if(b._dynamicPopulateBehavior){b._dynamicPopulateBehavior.dispose();b._dynamicPopulateBehavior=a}Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(b,d)},populate:function(c){var b=this;if(b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.get_element()!=$get(b._DynamicControlID)){b._dynamicPopulateBehavior.dispose();b._dynamicPopulateBehavior=a}if(!b._dynamicPopulateBehavior&&b._DynamicControlID&&b._DynamicServiceMethod){b._dynamicPopulateBehavior=$create(Sys.Extended.UI.DynamicPopulateBehavior,{id:b.get_id()+"_DynamicPopulateBehavior",ContextKey:b._DynamicContextKey,ServicePath:b._DynamicServicePath,ServiceMethod:b._DynamicServiceMethod,cacheDynamicResults:b._cacheDynamicResults},a,a,$get(b._DynamicControlID));b._dynamicPopulateBehavior.add_populating(b._populatingHandler);b._dynamicPopulateBehavior.add_populated(b._populatedHandler)}b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.populate(c?c:b._DynamicContextKey)},_onPopulating:function(b,a){this.raisePopulating(a)},_onPopulated:function(b,a){this.raisePopulated(a)},get_dynamicControlID:function(){return this._DynamicControlID},get_DynamicControlID:g.get_dynamicControlID,set_dynamicControlID:function(b){var a=this;if(a._DynamicControlID!=b){a._DynamicControlID=b;a.raisePropertyChanged("dynamicControlID");a.raisePropertyChanged("DynamicControlID")}},set_DynamicControlID:g.set_dynamicControlID,get_dynamicContextKey:function(){return this._DynamicContextKey},get_DynamicContextKey:g.get_dynamicContextKey,set_dynamicContextKey:function(b){var a=this;if(a._DynamicContextKey!=b){a._DynamicContextKey=b;a.raisePropertyChanged("dynamicContextKey");a.raisePropertyChanged("DynamicContextKey")}},set_DynamicContextKey:g.set_dynamicContextKey,get_dynamicServicePath:function(){return this._DynamicServicePath},get_DynamicServicePath:g.get_dynamicServicePath,set_dynamicServicePath:function(b){var a=this;if(a._DynamicServicePath!=b){a._DynamicServicePath=b;a.raisePropertyChanged("dynamicServicePath");a.raisePropertyChanged("DynamicServicePath")}},set_DynamicServicePath:g.set_dynamicServicePath,get_dynamicServiceMethod:function(){return this._DynamicServiceMethod},get_DynamicServiceMethod:g.get_dynamicServiceMethod,set_dynamicServiceMethod:function(b){var a=this;if(a._DynamicServiceMethod!=b){a._DynamicServiceMethod=b;a.raisePropertyChanged("dynamicServiceMethod");a.raisePropertyChanged("DynamicServiceMethod")}},set_DynamicServiceMethod:g.set_dynamicServiceMethod,get_cacheDynamicResults:function(){return this._cacheDynamicResults},set_cacheDynamicResults:function(a){if(this._cacheDynamicResults!=a){this._cacheDynamicResults=a;this.raisePropertyChanged("cacheDynamicResults")}},add_populated:function(a){this.get_events().addHandler(e,a)},remove_populated:function(a){this.get_events().removeHandler(e,a)},raisePopulated:function(b){var a=this.get_events().getHandler(e);a&&a(this,b)},add_populating:function(a){this.get_events().addHandler(f,a)},remove_populating:function(a){this.get_events().removeHandler(f,a)},raisePopulating:function(b){var a=this.get_events().getHandler(f);a&&a(this,b)}};Sys.Extended.UI.DynamicPopulateBehaviorBase.registerClass("Sys.Extended.UI.DynamicPopulateBehaviorBase",Sys.Extended.UI.BehaviorBase);Sys.Extended.UI.ControlBase=function(c){var b=this;Sys.Extended.UI.ControlBase.initializeBase(b,[c]);b._clientStateField=a;b._callbackTarget=a;b._onsubmit$delegate=Function.createDelegate(b,b._onsubmit);b._oncomplete$delegate=Function.createDelegate(b,b._oncomplete);b._onerror$delegate=Function.createDelegate(b,b._onerror)};Sys.Extended.UI.ControlBase.__doPostBack=function(c,b){if(!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())for(var a=0;a<Sys.Extended.UI.ControlBase.onsubmitCollection.length;a++)Sys.Extended.UI.ControlBase.onsubmitCollection[a]();Function.createDelegate(window,Sys.Extended.UI.ControlBase.__doPostBackSaved)(c,b)};Sys.Extended.UI.ControlBase.prototype={initialize:function(){var d=this;Sys.Extended.UI.ControlBase.callBaseMethod(d,c);d._clientStateField&&d.loadClientState(d._clientStateField.value);if(typeof Sys.WebForms!==b&&typeof Sys.WebForms.PageRequestManager!==b){Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,d._onsubmit$delegate);if(Sys.Extended.UI.ControlBase.__doPostBackSaved==a||typeof Sys.Extended.UI.ControlBase.__doPostBackSaved==b){Sys.Extended.UI.ControlBase.__doPostBackSaved=window.__doPostBack;window.__doPostBack=Sys.Extended.UI.ControlBase.__doPostBack;Sys.Extended.UI.ControlBase.onsubmitCollection=[]}Array.add(Sys.Extended.UI.ControlBase.onsubmitCollection,d._onsubmit$delegate)}else $addHandler(document.forms[0],"submit",d._onsubmit$delegate)},dispose:function(){var a=this;if(typeof Sys.WebForms!==b&&typeof Sys.WebForms.PageRequestManager!==b){Array.remove(Sys.Extended.UI.ControlBase.onsubmitCollection,a._onsubmit$delegate);Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,a._onsubmit$delegate)}else $removeHandler(document.forms[0],"submit",a._onsubmit$delegate);Sys.Extended.UI.ControlBase.callBaseMethod(a,d)},findElement:function(a){return $get(this.get_id()+"_"+a.split(":").join("_"))},get_clientStateField:function(){return this._clientStateField},set_clientStateField:function(b){var a=this;if(a.get_isInitialized())throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_CannotSetClientStateField);if(a._clientStateField!=b){a._clientStateField=b;a.raisePropertyChanged("clientStateField")}},loadClientState:function(){},saveClientState:function(){return a},_invoke:function(i,f,j){var c=this;if(!c._callbackTarget)throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_ControlNotRegisteredForCallbacks);if(typeof WebForm_DoCallback===b)throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_PageNotRegisteredForCallbacks);for(var g=[],d=0;d<f.length;d++)g[d]=f[d];var e=c.saveClientState();if(e!=a&&!String.isInstanceOfType(e))throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_InvalidClientStateType);var h=Sys.Serialization.JavaScriptSerializer.serialize({name:i,args:g,state:c.saveClientState()});WebForm_DoCallback(c._callbackTarget,h,c._oncomplete$delegate,j,c._onerror$delegate,true)},_oncomplete:function(a,b){a=Sys.Serialization.JavaScriptSerializer.deserialize(a);if(a.error)throw Error.create(a.error);this.loadClientState(a.state);b(a.result)},_onerror:function(a){throw Error.create(a);},_onsubmit:function(){if(this._clientStateField)this._clientStateField.value=this.saveClientState();return true}};Sys.Extended.UI.ControlBase.registerClass("Sys.Extended.UI.ControlBase",Sys.UI.Control)}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ComponentModel","Serialization"],a);else a()})();
Sys.Extended.UI.Resources={
"PasswordStrength_InvalidWeightingRatios":"Strength Weighting ratios must have 4 elements","HTMLEditor_toolbar_button_FontSize_defaultValue":"default","HTMLEditor_toolbar_button_DesignMode_title":"Design mode","Animation_ChildrenNotAllowed":"Sys.Extended.UI.Animation.createAnimation cannot add child animations to type \"{0}\" that does not derive from Sys.Extended.UI.Animation.ParentAnimation","PasswordStrength_RemainingSymbols":"{0} symbol characters","HTMLEditor_toolbar_button_FixedForeColor_title":"Foreground color","HTMLEditor_toolbar_popup_LinkProperties_field_URL":"URL","ExtenderBase_CannotSetClientStateField":"clientStateField can only be set before initialization","HTMLEditor_toolbar_button_Bold_title":"Bold","RTE_PreviewHTML":"Preview HTML","HTMLEditor_toolbar_popup_LinkProperties_button_OK":"OK","HTMLEditor_toolbar_button_JustifyRight_title":"Justify Right","RTE_JustifyCenter":"Justify Center","PasswordStrength_RemainingUpperCase":"{0} more upper case characters","HTMLEditor_toolbar_popup_LinkProperties_button_Cancel":"Cancel","Animation_TargetNotFound":"Sys.Extended.UI.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control.  No element or control could be found corresponding to \"{0}\"","AsyncFileUpload_UnhandledException":"Unhandled Exception","RTE_FontColor":"Font Color","RTE_LabelColor":"Label Color","Common_InvalidBorderWidthUnit":"A unit type of \"{0}\"\u0027 is invalid for parseBorderWidth","HTMLEditor_toolbar_button_JustifyFull_title":"Justify","RTE_Heading":"Heading","AsyncFileUpload_ConfirmToSeeErrorPage":"Do you want to see the response page?","Tabs_PropertySetBeforeInitialization":"{0} cannot be changed before initialization","HTMLEditor_toolbar_button_StrikeThrough_title":"Strike through","RTE_OrderedList":"Ordered List","HTMLEditor_toolbar_button_OnPastePlainText":"Plain text pasting is switched on. Just now: {0}","HTMLEditor_toolbar_button_RemoveLink_title":"Remove Link","HTMLEditor_toolbar_button_FontName_defaultValue":"default","HTMLEditor_toolbar_button_FontName_label":"Font","ReorderList_DropWatcherBehavior_NoChild":"Could not find child of list with id \"{0}\"","CascadingDropDown_MethodTimeout":"[Method timeout]","RTE_Columns":"Columns","RTE_InsertImage":"Insert Image","RTE_InsertTable":"Insert Table","RTE_Values":"Values","RTE_OK":"OK","ExtenderBase_PageNotRegisteredForCallbacks":"This Page has not been registered for callbacks","HTMLEditor_toolbar_button_InsertLink_title":"Insert/Edit URL link","Animation_NoDynamicPropertyFound":"Sys.Extended.UI.Animation.createAnimation found no property corresponding to \"{0}\" or \"{1}\"","Animation_InvalidBaseType":"Sys.Extended.UI.Animation.registerAnimation can only register types that inherit from Sys.Extended.UI.Animation.Animation","RTE_UnorderedList":"Unordered List","AsyncFileUpload_UnknownServerError":"Unknown Server error","ResizableControlBehavior_InvalidHandler":"{0} handler not a function, function name, or function text","Animation_InvalidColor":"Color must be a 7-character hex representation (e.g. #246ACF), not \"{0}\"","RTE_CellColor":"Cell Color","PasswordStrength_RemainingMixedCase":"Mixed case characters","HTMLEditor_toolbar_button_HtmlMode_title":"HTML text","RTE_Italic":"Italic","CascadingDropDown_NoParentElement":"Failed to find parent element \"{0}\"","ValidatorCallout_DefaultErrorMessage":"This control is invalid","HTMLEditor_toolbar_button_DecreaseIndent_title":"Decrease Indent","RTE_Indent":"Indent","ReorderList_DropWatcherBehavior_CallbackError":"Reorder failed, see details below.\\r\\n\\r\\n{0}","PopupControl_NoDefaultProperty":"No default property supported for control \"{0}\" of type \"{1}\"","RTE_Normal":"Normal","PopupExtender_NoParentElement":"Couldn\u0027t find parent element \"{0}\"","RTE_ViewValues":"View Values","RTE_Legend":"Legend","RTE_Labels":"Labels","RTE_CellSpacing":"Cell Spacing","PasswordStrength_RemainingNumbers":"{0} more numbers","HTMLEditor_toolbar_popup_LinkProperties_field_Target":"Target","HTMLEditor_toolbar_button_PreviewMode_title":"Preview","RTE_Border":"Border","RTE_Create":"Create","RTE_BackgroundColor":"Background Color","RTE_Cancel":"Cancel","HTMLEditor_toolbar_button_PasteText_title":"Paste Plain Text","RTE_JustifyFull":"Justify Full","RTE_JustifyLeft":"Justify Left","RTE_Cut":"Cut","AsyncFileUpload_UploadingProblem":"The requested file uploading problem.","ResizableControlBehavior_CannotChangeProperty":"Changes to {0} not supported","RTE_ViewSource":"View Source","Common_InvalidPaddingUnit":"A unit type of \"{0}\" is invalid for parsePadding","RTE_Paste":"Paste","ExtenderBase_ControlNotRegisteredForCallbacks":"This Control has not been registered for callbacks","Calendar_Today":"Today: {0}","MultiHandleSlider_CssHeightWidthRequired":"You must specify a CSS width and height for all handle styles as well as the rail.","Common_DateTime_InvalidFormat":"Invalid format","HTMLEditor_toolbar_button_Copy_title":"Copy","ListSearch_DefaultPrompt":"Type to search","CollapsiblePanel_NoControlID":"Failed to find element \"{0}\"","RTE_ViewEditor":"View Editor","HTMLEditor_toolbar_popup_LinkProperties_field_Target_Current":"Current window","RTE_BarColor":"Bar Color","AsyncFileUpload_InternalErrorMessage":"The AsyncFileUpload control has encountered an error with the uploader in this page. Please refresh the page and try again.","HTMLEditor_toolbar_button_Underline_title":"Underline","PasswordStrength_DefaultStrengthDescriptions":"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!","HTMLEditor_toolbar_button_SuperScript_title":"Super script","HTMLEditor_toolbar_button_Ltr_title":"Left to right direction","HTMLEditor_toolbar_button_RemoveAlignment_title":"Remove Alignment","HTMLEditor_toolbar_button_OrderedList_title":"Ordered List","HTMLEditor_toolbar_popup_LinkProperties_field_Target_New":"New window","HTMLEditor_toolbar_popup_LinkProperties_field_Target_Top":"Top window","HTMLEditor_toolbar_button_JustifyCenter_title":"Justify Center","RTE_Inserttexthere":"Insert text here","Animation_UknownAnimationName":"Sys.Extended.UI.Animation.createAnimation could not find an Animation corresponding to the name \"{0}\"","ExtenderBase_InvalidClientStateType":"saveClientState must return a value of type String","HTMLEditor_toolbar_button_JustifyLeft_title":"Justify Left","Rating_CallbackError":"An unhandled exception has occurred:\\r\\n{0}","HTMLEditor_toolbar_button_Undo_title":"Undo","HTMLEditor_toolbar_button_Redo_title":"Redo","Tabs_OwnerExpected":"owner must be set before initialize","DynamicPopulate_WebServiceTimeout":"Web service call timed out","PasswordStrength_RemainingLowerCase":"{0} more lower case characters","HTMLEditor_toolbar_button_BulletedList_title":"Bulleted List","HTMLEditor_toolbar_button_Paste_title":"Paste","Animation_MissingAnimationName":"Sys.Extended.UI.Animation.createAnimation requires an object with an AnimationName property","HTMLEditor_toolbar_button_PasteWord_title":"Paste from MS Word (with cleanup)","HTMLEditor_toolbar_button_Italic_title":"Italic","RTE_JustifyRight":"Justify Right","Tabs_ActiveTabArgumentOutOfRange":"Argument is not a member of the tabs collection","RTE_CellPadding":"Cell Padding","HTMLEditor_toolbar_button_ForeColorClear_title":"Clear foreground color","RTE_ClearFormatting":"Clear Formatting","AlwaysVisible_ElementRequired":"Sys.Extended.UI.AlwaysVisibleControlBehavior must have an element","HTMLEditor_toolbar_button_SubScript_title":"Sub script","Slider_NoSizeProvided":"Please set valid values for the height and width attributes in the slider\u0027s CSS classes","DynamicPopulate_WebServiceError":"Web Service call failed: {0}","PasswordStrength_StrengthPrompt":"Strength: ","HTMLEditor_toolbar_button_Rtl_title":"Right to left direction","PasswordStrength_RemainingCharacters":"{0} more characters","HTMLEditor_toolbar_button_BackColorClear_title":"Clear background color","PasswordStrength_Satisfied":"Nothing more required","RTE_Hyperlink":"Hyperlink","Animation_NoPropertyFound":"Sys.Extended.UI.Animation.createAnimation found no property corresponding to \"{0}\"","PasswordStrength_InvalidStrengthDescriptionStyles":"Text Strength description style classes must match the number of text descriptions.","HTMLEditor_toolbar_button_Use_verb":"Use {0}","HTMLEditor_toolbar_popup_LinkProperties_field_Target_Parent":"Parent window","PasswordStrength_GetHelpRequirements":"Get help on password requirements","HTMLEditor_toolbar_button_FixedBackColor_title":"Background color","PasswordStrength_InvalidStrengthDescriptions":"Invalid number of text strength descriptions specified","RTE_Underline":"Underline","HTMLEditor_toolbar_button_IncreaseIndent_title":"Increase Indent","AsyncFileUpload_ServerResponseError":"Server Response Error","Tabs_PropertySetAfterInitialization":"{0} cannot be changed after initialization","RTE_Rows":"Rows","RTE_Redo":"Redo","RTE_Size":"Size","RTE_Undo":"Undo","RTE_Bold":"Bold","RTE_Copy":"Copy","RTE_Font":"Font","HTMLEditor_toolbar_button_FontSize_label":"Size","HTMLEditor_toolbar_button_Cut_title":"Cut","CascadingDropDown_MethodError":"[Method error {0}]","HTMLEditor_toolbar_button_InsertLink_message_EmptyURL":"URL can not be empty","RTE_BorderColor":"Border Color","HTMLEditor_toolbar_button_RemoveStyles_title":"Remove styles","RTE_Paragraph":"Paragraph","RTE_InsertHorizontalRule":"Insert Horizontal Rule","HTMLEditor_toolbar_button_Paragraph_title":"Make Paragraph","Common_UnitHasNoDigits":"No digits","RTE_Outdent":"Outdent","Common_DateTime_InvalidTimeSpan":"\"{0}\" is not a valid TimeSpan format","Animation_CannotNestSequence":"Sys.Extended.UI.Animation.SequenceAnimation cannot be nested inside Sys.Extended.UI.Animation.ParallelAnimation","HTMLEditor_toolbar_button_InsertHR_title":"Insert horizontal rule","HTMLEditor_toolbar_button_OnPasteFromMSWord":"Pasting from MS Word is switched on. Just now: {0}","Shared_BrowserSecurityPreventsPaste":"Your browser security settings don\u0027t permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."};
//END ExtenderBase.BaseScripts.js
//START MaskedEdit.MaskedEditValidator.js
// (c) 2010 CodePlex Foundation
function MaskedEditSetMessage(a,b,c){a.errormessage=b;if(c=="")a.text=b;else a.text=c;a.innerHTML=a.text}function MaskedEditMessageShow(a,b){if(typeof a.display=="string"){if(a.display=="None")return;if(a.display=="Dynamic"){a.style.display=b?"none":"inline";return}}a.style.visibility=b?"hidden":"visible"}function MaskedEditSetCssClass(b,c){var a=$get(b.TargetValidator);Sys.UI.DomElement.removeCssClass(a,b.InvalidValueCssClass);Sys.UI.DomElement.removeCssClass(a,b.CssBlurNegative);Sys.UI.DomElement.removeCssClass(a,b.CssFocus);Sys.UI.DomElement.removeCssClass(a,b.CssFocusNegative);c!=""&&Sys.UI.DomElement.addCssClass(a,c)}function MaskedEditValidatorDateTime(a){var f=false,d=true,b="";MaskedEditSetMessage(a,b,b);MaskedEditSetCssClass(a,b);MaskedEditMessageShow(a,d);if(a.IsMaskedEdit=="false")return d;var e=$get(a.TargetValidator);if(a.ValidEmpty=="false")if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_Value()==a.InitialValue){MaskedEditSetMessage(a,a.EmptyValueMessage,a.EmptyValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,f);return f}if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_Value()==b)return d;var c=d,g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_Value();if(a.ValidationExpression!=b){var p=new RegExp(a.ValidationExpression),h=p.exec(g);c=h!=null&&g==h[0];if(!c){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,f);return f}}var m=e.MaskedEditBehavior.AutoFormatDate(),n=e.MaskedEditBehavior.AutoFormatTime(),k=b,l=b;if(a.MinimumValue!=b){k=a.MinimumValue.split(" ")[0];l=a.MinimumValue.split(" ")[1]}var i=b,j=b;if(a.MaximumValue!=b){i=a.MaximumValue.split(" ")[0];j=a.MaximumValue.split(" ")[1]}c=MaskedEditValidatorPartDate(a,m,k,i);if(c)c=MaskedEditValidatorPartTime(a,n,l,j);if(c&&a.ClientValidationFunction!=b){var o={Value:g,IsValid:d};eval(a.ClientValidationFunction+"(value, args);");c=o.IsValid;if(!c){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}!c&&MaskedEditMessageShow(a,c);return c}function MaskedEditValidatorPartTime(b,n,h,g){var a=10,e=-1,x="([0-5][0-9])\\s(",w="([0-5][0-9])",k=true,j=b.TimeSeparator,y=b.AmPmSymbol,v=y.split(";"),z=y.replace(";","|"),A="^(^([0][0-9]|[1][0-2])"+j+w+j+x+z+")$)|(^([0][0-9]|[1][0-2])"+j+x+z+")$)$",B="^(^([0-1][0-9]|[2][0-3])"+j+w+j+"([0-5][0-9])$)|(^([0-1][0-9]|[2][0-3])"+j+"([0-5][0-9])$)$",f=e,p=e,s=e,r="",q=n.split(j),t=new RegExp(A),l=t.exec(n),u=new RegExp(B),m=u.exec(n);if(l&&l[0]==n){r=n.substring(n.length-2).substring(0,1);f=parseInt(q[0],a);if(r.toUpperCase()==v[1].substring(0,1).toUpperCase()){f+=12;if(f==24)f=12}p=parseInt(q[1],a);s=b.length>9?parseInt(q[2].substring(0,2),a):0}else if(m&&m[0]==n){f=parseInt(q[0],a);p=parseInt(q[1],a);s=n.length>5?parseInt(q[2],a):0}if(f==e||p==e||s==e)k=false;if(!k){MaskedEditSetMessage(b,b.InvalidValueMessage,b.InvalidValueText);MaskedEditSetCssClass(b,b.InvalidValueCssClass)}if(k&&(g!=""||h!="")){var c,i,o,d;if(h!=""){c=e;i=e;o=e;d=h.split(j);l=t.exec(h);m=u.exec(h);if(l&&l[0]==h){r=h.substring(h.length-2).substring(0,1);c=parseInt(d[0],a);if(r.toUpperCase()==v[1].substring(0,1).toUpperCase()){c+=12;if(c==24)c=0}i=parseInt(d[1],a);o=h.length>9?parseInt(d[2].substring(0,2),a):0}else if(m&&m[0]==h){c=parseInt(d[0],a);i=parseInt(d[1],a);o=h.length>5?parseInt(d[2],a):0}k=f>c||f==c&&p>i||f==c&&p==i&&s>=o;if(!k){MaskedEditSetMessage(b,b.MinimumValueMessage,b.MinimumValueText);MaskedEditSetCssClass(b,b.InvalidValueCssClass)}}if(g!=""&&k){c=e;i=e;o=e;d=g.split(j);l=t.exec(g);m=u.exec(g);if(l&&l[0]==g){r=g.substring(g.length-2).substring(0,1);c=parseInt(d[0],a);if(r.toUpperCase()==v[1].substring(0,1).toUpperCase()){c+=12;if(c==24)c=0}i=parseInt(d[1],a);o=g.length>9?parseInt(d[2].substring(0,2),a):0}else if(m&&m[0]==g){c=parseInt(d[0],a);i=parseInt(d[1],a);o=g.length>5?parseInt(d[2],a):0}k=f<c||f==c&&p<i||f==c&&p==i&&s<=o;if(!k){MaskedEditSetMessage(b,b.MaximumValueMessage,b.MaximumValueText);MaskedEditSetCssClass(b,b.InvalidValueCssClass)}}}return k}function MaskedEditValidatorPartDate(a,p,o,n){var d=10,f=true,e=a.DateFormat,m=a.DateSeparator,l=p.split(m);if(parseInt(l.length,d)!=3){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);f=false}if(e.indexOf("D")==-1||e.indexOf("M")==-1||e.indexOf("Y")==-1){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);f=false}var k=-1,i=-1,c=-1;if(f){k=parseInt(l[e.indexOf("D")],d);i=parseInt(l[e.indexOf("M")],d);c=parseInt(l[e.indexOf("Y")],d);if(c<100)c=parseInt(c+a.Century,d);else if(c<999)c+=parseInt(a.Century.substring(0,1)+c,d);f=k>0&&i>0&&c>0&&(k<=([,31,28,31,30,31,30,31,31,30,31,30,31])[i]||k==29&&i==2&&c%4==0&&(c%100>0||c%400==0))}if(!f){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}if(f&&(n!=""||o!="")){var g,j=-1,h=-1,b=-1;if(o!=""){g=o.split(m);j=parseInt(g[e.indexOf("D")],d);h=parseInt(g[e.indexOf("M")],d);b=parseInt(g[e.indexOf("Y")],d);if(b<100)b=parseInt(b+a.Century,d);else if(b<999)b+=parseInt(a.Century.substring(0,1)+b,d);f=j>0&&h>0&&b>0&&c>b||c==b&&i>h||c==b&&i==h&&k>=j;if(!f){MaskedEditSetMessage(a,a.MinimumValueMessage,a.MinimumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}if(f&&n!=""){g=n.split(m);j=parseInt(g[e.indexOf("D")],d);h=parseInt(g[e.indexOf("M")],d);b=parseInt(g[e.indexOf("Y")],d);if(b<100)b=parseInt(b+a.Century,d);else if(b<999)b+=parseInt(a.Century.substring(0,1)+b,d);f=j>0&&h>0&&b>0&&c<b||c==b&&i<h||c==b&&i==h&&k<=j;if(!f){MaskedEditSetMessage(a,a.MaximumValueMessage,a.MaximumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}}return f}function MaskedEditValidatorDate(a){var d=false,c=true;MaskedEditSetMessage(a,"","");MaskedEditSetCssClass(a,"");MaskedEditMessageShow(a,c);if(a.IsMaskedEdit=="false")return c;var f=$get(a.TargetValidator);if(a.ValidEmpty=="false")if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value()==a.InitialValue){MaskedEditSetMessage(a,a.EmptyValueMessage,a.EmptyValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,d);return d}if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value()=="")return c;var b=c,e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value();if(a.ValidationExpression!=""){var i=new RegExp(a.ValidationExpression),g=i.exec(e);b=g!=null&&e==g[0];if(!b){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,d);return d}}b=MaskedEditValidatorPartDate(a,e,a.MinimumValue,a.MaximumValue);if(b&&a.ClientValidationFunction!=""){var h={Value:e,IsValid:c};eval(a.ClientValidationFunction+"(value, args);");b=h.IsValid;if(!b){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}!b&&MaskedEditMessageShow(a,b);return b}function MaskedEditValidatorTime(a){var d=false,c=true;MaskedEditSetMessage(a,"","");MaskedEditSetCssClass(a,"");MaskedEditMessageShow(a,c);if(a.IsMaskedEdit=="false")return c;var f=$get(a.TargetValidator);if(a.ValidEmpty=="false")if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value()==a.InitialValue){MaskedEditSetMessage(a,a.EmptyValueMessage,a.EmptyValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,d);return d}if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value()=="")return c;var b=c,e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value();if(a.ValidationExpression!=""){var i=new RegExp(a.ValidationExpression),g=i.exec(e);b=g!=null&&e==g[0];if(!b){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,d);return d}}b=MaskedEditValidatorPartTime(a,e,a.MinimumValue,a.MaximumValue);if(b&&a.ClientValidationFunction!=""){var h={Value:e,IsValid:c};eval(a.ClientValidationFunction+"(value, args);");b=h.IsValid;if(!b){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}!b&&MaskedEditMessageShow(a,b);return b}function MaskedEditValidatorNumber(a){var d=null,i=false,j=true,f="";MaskedEditSetMessage(a,f,f);MaskedEditSetCssClass(a,f);MaskedEditMessageShow(a,j);if(a.IsMaskedEdit=="false")return j;var m=$get(a.TargetValidator);if(a.ValidEmpty=="false")if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(m).get_Value()==a.InitialValue){MaskedEditSetMessage(a,a.EmptyValueMessage,a.EmptyValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,i);return i}if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(m).get_Value()==f)return j;var c=j,q=a.Thousands,p=a.Decimal,n=a.Money,t=a.LastMaskPosition+n.length+1,g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(m).get_Value();if(a.ValidationExpression!=f){var s=new RegExp(a.ValidationExpression),o=s.exec(g);c=o!=d&&g==o[0];if(!c){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,i);return i}}c=i;var k=d,l=d,e=d,h=d,b=d;g=g.replace(new RegExp("(\\"+q+")","g"),f);g=g.replace(new RegExp("(\\"+n+")","g"),f);e=g.match(/^\s*(\S+(\s+\S+)*)\s*$/);if(e!=d)g=e[1];l=/^\s*[-\+]?\d+\s*$/;if(g.match(l)!=d){h=parseInt(g,10);c=h==(isNaN(h)?d:h)}if(c){if(a.MaximumValue!=f){b=parseInt(a.MaximumValue,10);if(b==(isNaN(b)?d:b))if(h>b){c=i;MaskedEditSetMessage(a,a.MaximumValueMessage,a.MaximumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}if(c&&a.MinimumValue!=f){b=parseInt(a.MinimumValue,10);if(b==(isNaN(b)?d:b))if(h<b){c=i;MaskedEditSetMessage(a,a.MinimumValueMessage,a.MinimumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}}else{l=new RegExp("^\\s*([-\\+])?(\\d+)?(\\"+p+"(\\d+))?\\s*$");e=g.match(l);if(e!=d){k=d;if(typeof e[1]!="undefined")k=e[1]+(e[2].length>0?e[2]:"0")+"."+e[4];else k=(e[2].length>0?e[2]:"0")+"."+e[4];h=parseFloat(k);c=h==(isNaN(h)?d:h)}if(!c){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}if(c){if(a.MaximumValue!=f){b=parseFloat(a.MaximumValue);if(b==(isNaN(b)?d:b))if(h>b){c=i;MaskedEditSetMessage(a,a.MaximumValueMessage,a.MaximumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}if(c&&a.MinimumValue!=f){b=parseFloat(a.MinimumValue);if(b==(isNaN(b)?d:b))if(h<b){c=i;MaskedEditSetMessage(a,a.MinimumValueMessage,a.MinimumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}}}if(c&&a.ClientValidationFunction!=f){var r={Value:g,IsValid:j};eval(a.ClientValidationFunction+"(value, args);");c=r.IsValid;if(!c){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}!c&&MaskedEditMessageShow(a,c);return c}function MaskedEditValidatorNone(a){var e=null,d=false,f=true;MaskedEditSetMessage(a,"","");MaskedEditSetCssClass(a,"");MaskedEditMessageShow(a,f);if(a.IsMaskedEdit=="false")return f;var h=$get(a.TargetValidator);if(a.ValidEmpty=="false")if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h).get_Value()==a.InitialValue){MaskedEditSetMessage(a,a.EmptyValueMessage,a.EmptyValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,d);return d}if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h).get_Value()=="")return f;var b=f,g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h).get_Value();if(a.ValidationExpression!=""){var l=new RegExp(a.ValidationExpression),i=l.exec(g);b=i!=e&&g==i[0];if(!b){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass);MaskedEditMessageShow(a,d);return d}}var j=/^\d+\s*$/,c=e;if(a.MaximumValue!="")if(a.MaximumValue.match(j)!=e){c=parseInt(a.MaximumValue,10);if(c==(isNaN(c)?e:c))if(g.length>c){b=d;MaskedEditSetMessage(a,a.MaximumValueMessage,a.MaximumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}if(b&&a.MinimumValue!="")if(a.MinimumValue.match(j)!=e){c=parseInt(a.MinimumValue,10);if(c==(isNaN(c)?e:c))if(g.length<c){b=d;MaskedEditSetMessage(a,a.MinimumValueMessage,a.MinimumValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}if(b&&a.ClientValidationFunction!=""){var k={Value:g,IsValid:f};eval(a.ClientValidationFunction+"(value, args);");b=k.IsValid;if(!b){MaskedEditSetMessage(a,a.InvalidValueMessage,a.InvalidValueText);MaskedEditSetCssClass(a,a.InvalidValueCssClass)}}!b&&MaskedEditMessageShow(a,b);return b};
//END MaskedEdit.MaskedEditValidator.js
//START MaskedEdit.MaskedEditBehavior.js
// (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()})();
//END MaskedEdit.MaskedEditBehavior.js
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
(function() {var fn = function() {$get("ctl00_Conteudo_ToolkitScriptManager1_HiddenField").value += ';;AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:en-US:1547e793-5b7e-48fe-8490-03a375b13a33:f2c8e708:de1feab2:f9cec9bc:987bb99b:a4b66312';Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();
