function MaskedEditSetMessage(n,t,i){n.errormessage=t;n.text=""==i?t:i;n.innerHTML=n.text}function MaskedEditMessageShow(n,t){if("string"==typeof n.display){if("None"==n.display)return;if("Dynamic"==n.display)return void(n.style.display=t?"none":"inline")}n.style.visibility=t?"hidden":"visible"}function MaskedEditSetCssClass(n,t){var i=$get(n.TargetValidator);Sys.UI.DomElement.removeCssClass(i,n.InvalidValueCssClass);Sys.UI.DomElement.removeCssClass(i,n.CssBlurNegative);Sys.UI.DomElement.removeCssClass(i,n.CssFocus);Sys.UI.DomElement.removeCssClass(i,n.CssFocusNegative);""!=t&&Sys.UI.DomElement.addCssClass(i,t)}function MaskedEditValidatorDateTime(value){var target,ret,mask,rx,matches,MaxVlDt,MaxVlTm,args;if(MaskedEditSetMessage(value,"",""),MaskedEditSetCssClass(value,""),MaskedEditMessageShow(value,!0),"false"==value.IsMaskedEdit)return!0;if(target=$get(value.TargetValidator),"false"==value.ValidEmpty&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()==value.InitialValue)return MaskedEditSetMessage(value,value.EmptyValueMessage,value.EmptyValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1;if(""==Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value())return!0;if(ret=!0,mask=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value(),""!=value.ValidationExpression&&(rx=new RegExp(value.ValidationExpression),matches=rx.exec(mask),ret=null!=matches&&mask==matches[0],!ret))return MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1;var PartDate=target.MaskedEditBehavior.AutoFormatDate(),PartTime=target.MaskedEditBehavior.AutoFormatTime(),MinVlDt="",MinVlTm="";return""!=value.MinimumValue&&(MinVlDt=value.MinimumValue.split(" ")[0],MinVlTm=value.MinimumValue.split(" ")[1]),MaxVlDt="",MaxVlTm="",(""!=value.MaximumValue&&(MaxVlDt=value.MaximumValue.split(" ")[0],MaxVlTm=value.MaximumValue.split(" ")[1]),ret=MaskedEditValidatorPartDate(value,PartDate,MinVlDt,MaxVlDt),ret&&(ret=MaskedEditValidatorPartTime(value,PartTime,MinVlTm,MaxVlTm)),ret&&""!=value.ClientValidationFunction)&&(args={Value:mask,IsValid:!0},eval(value.ClientValidationFunction+"(value, args);"),ret=args.IsValid,ret||(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret||MaskedEditMessageShow(value,ret),ret}function MaskedEditValidatorPartTime(n,t,i,r){var s=!0,h=n.TimeSeparator,g=n.AmPmSymbol,b=g.split(";"),nt=g.replace(";","|"),tt="^(^([0][0-9]|[1][0-2])"+h+"([0-5][0-9])"+h+"([0-5][0-9])\\s("+nt+")$)|(^([0][0-9]|[1][0-2])"+h+"([0-5][0-9])\\s("+nt+")$)$",it="^(^([0-1][0-9]|[2][0-3])"+h+"([0-5][0-9])"+h+"([0-5][0-9])$)|(^([0-1][0-9]|[2][0-3])"+h+"([0-5][0-9])$)$",e=-1,v=-1,w=-1,y="",p=t.split(h),k=new RegExp(tt),c=k.exec(t),d=new RegExp(it),l=d.exec(t),u,o,a,f;return(c&&c[0]==t?(y=t.substring(t.length-2).substring(0,1),e=parseInt(p[0],10),y.toUpperCase()==b[1].substring(0,1).toUpperCase()&&(e+=12,24==e&&(e=12)),v=parseInt(p[1],10),w=n.length>9?parseInt(p[2].substring(0,2),10):0):l&&l[0]==t&&(e=parseInt(p[0],10),v=parseInt(p[1],10),w=t.length>5?parseInt(p[2],10):0),e!=-1&&v!=-1&&w!=-1||(s=!1),s||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)),s&&(""!=r||""!=i))&&(""!=i&&(u=-1,o=-1,a=-1,f=i.split(h),c=k.exec(i),l=d.exec(i),c&&c[0]==i?(y=i.substring(i.length-2).substring(0,1),u=parseInt(f[0],10),y.toUpperCase()==b[1].substring(0,1).toUpperCase()&&(u+=12,24==u&&(u=0)),o=parseInt(f[1],10),a=i.length>9?parseInt(f[2].substring(0,2),10):0):l&&l[0]==i&&(u=parseInt(f[0],10),o=parseInt(f[1],10),a=i.length>5?parseInt(f[2],10):0),s=e>u||e==u&&v>o||e==u&&v==o&&w>=a,s||(MaskedEditSetMessage(n,n.MinimumValueMessage,n.MinimumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),""!=r&&s&&(u=-1,o=-1,a=-1,f=r.split(h),c=k.exec(r),l=d.exec(r),c&&c[0]==r?(y=r.substring(r.length-2).substring(0,1),u=parseInt(f[0],10),y.toUpperCase()==b[1].substring(0,1).toUpperCase()&&(u+=12,24==u&&(u=0)),o=parseInt(f[1],10),a=r.length>9?parseInt(f[2].substring(0,2),10):0):l&&l[0]==r&&(u=parseInt(f[0],10),o=parseInt(f[1],10),a=r.length>5?parseInt(f[2],10):0),s=e<u||e==u&&v<o||e==u&&v==o&&w<=a,s||(MaskedEditSetMessage(n,n.MaximumValueMessage,n.MaximumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)))),s}function MaskedEditValidatorPartDate(n,t,i,r){var f=!0,u="MDY",y,v;switch(n.DateFormat){case"DayMonthYear":case"DMY":u="DMY";break;case"DayYearMonth":case"DYM":u="DYM";break;case"MonthDayYear":case"MDY":u="MDY";break;case"MonthYearDay":case"MYD":u="MYD";break;case"YearDayMonth":case"YDM":u="YDM";break;case"YearMonthDay":case"YMD":u="YMD"}y=n.DateSeparator;v=t.split(y);3!=parseInt(v.length,10)&&(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),f=!1);u.indexOf("D")!=-1&&u.indexOf("M")!=-1&&u.indexOf("Y")!=-1||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),f=!1);var l=-1,s=-1,e=-1;if(f&&(l=parseInt(v[u.indexOf("D")],10),s=parseInt(v[u.indexOf("M")],10),e=parseInt(v[u.indexOf("Y")],10),f=l>0&&s>0&&e>0&&(l<=[,31,28,31,30,31,30,31,31,30,31,30,31][s]||29==l&&2==s&&e%4==0&&(e%100>0||e%400==0))),f||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)),f&&(""!=r||""!=i)){var h,a=-1,c=-1,o=-1;""!=i&&(h=i.split(y),a=parseInt(h[u.indexOf("D")],10),c=parseInt(h[u.indexOf("M")],10),o=parseInt(h[u.indexOf("Y")],10),f=a>0&&c>0&&o>0&&e>o||e==o&&s>c||e==o&&s==c&&l>=a,f||(MaskedEditSetMessage(n,n.MinimumValueMessage,n.MinimumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)));f&&""!=r&&(h=r.split(y),a=parseInt(h[u.indexOf("D")],10),c=parseInt(h[u.indexOf("M")],10),o=parseInt(h[u.indexOf("Y")],10),f=a>0&&c>0&&o>0&&e<o||e==o&&s<c||e==o&&s==c&&l<=a,f||(MaskedEditSetMessage(n,n.MaximumValueMessage,n.MaximumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)))}return f}function MaskedEditValidatorDate(value){var target,ret,mask,rx,matches,args;return(MaskedEditSetMessage(value,"",""),MaskedEditSetCssClass(value,""),MaskedEditMessageShow(value,!0),"false"==value.IsMaskedEdit)?!0:(target=$get(value.TargetValidator),"false"==value.ValidEmpty&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()==value.InitialValue)?(MaskedEditSetMessage(value,value.EmptyValueMessage,value.EmptyValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1):""==Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()?!0:(ret=!0,mask=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value(),""!=value.ValidationExpression&&(rx=new RegExp(value.ValidationExpression),matches=rx.exec(mask),ret=null!=matches&&mask==matches[0],!ret))?(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1):((ret=MaskedEditValidatorPartDate(value,mask,value.MinimumValue,value.MaximumValue),ret&&""!=value.ClientValidationFunction)&&(args={Value:mask,IsValid:!0},eval(value.ClientValidationFunction+"(value, args);"),ret=args.IsValid,ret||(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret||MaskedEditMessageShow(value,ret),ret)}function MaskedEditValidatorTime(value){var target,ret,mask,rx,matches,args;return(MaskedEditSetMessage(value,"",""),MaskedEditSetCssClass(value,""),MaskedEditMessageShow(value,!0),"false"==value.IsMaskedEdit)?!0:(target=$get(value.TargetValidator),"false"==value.ValidEmpty&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()==value.InitialValue)?(MaskedEditSetMessage(value,value.EmptyValueMessage,value.EmptyValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1):""==Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()?!0:(ret=!0,mask=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value(),""!=value.ValidationExpression&&(rx=new RegExp(value.ValidationExpression),matches=rx.exec(mask),ret=null!=matches&&mask==matches[0],!ret))?(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1):((ret=MaskedEditValidatorPartTime(value,mask,value.MinimumValue,value.MaximumValue),ret&&""!=value.ClientValidationFunction)&&(args={Value:mask,IsValid:!0},eval(value.ClientValidationFunction+"(value, args);"),ret=args.IsValid,ret||(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret||MaskedEditMessageShow(value,ret),ret)}function MaskedEditValidatorNumber(value){var target,numVal,rx,matches,args;if(MaskedEditSetMessage(value,"",""),MaskedEditSetCssClass(value,""),MaskedEditMessageShow(value,!0),"false"==value.IsMaskedEdit)return!0;if(target=$get(value.TargetValidator),numVal=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value().replace(new RegExp("([w_.,s$ ])","g"),""),"false"==value.ValidEmpty&&numVal==value.InitialValue)return MaskedEditSetMessage(value,value.EmptyValueMessage,value.EmptyValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1;if(""==numVal)return!0;var ret=!0,AttibThSep=value.Thousands,AttibDcSep=value.Decimal,AttibCuSyb=value.Money,AttibLastPos=value.LastMaskPosition+AttibCuSyb.length+1,mask=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value();if(""!=value.ValidationExpression&&(rx=new RegExp(value.ValidationExpression),matches=rx.exec(mask),ret=null!=matches&&mask==matches[0],!ret))return MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1;ret=!1;var cleanInput=null,exp=null,m=null,num=null,Compnum=null;return(mask=mask.replace(new RegExp("(\\"+AttibThSep+")","g"),""),mask=mask.replace(new RegExp("(\\"+AttibCuSyb+")","g"),""),m=mask.match(/^\s*(\S+(\s+\S+)*)\s*$/),null!=m&&(mask=m[1]),exp=/^\s*[-\+]?\d+\s*$/,null!=mask.match(exp)&&(num=parseInt(mask,10),ret=!isNaN(num)),ret?(""!=value.MaximumValue&&(Compnum=parseInt(value.MaximumValue,10),isNaN(Compnum)||num>Compnum&&(ret=!1,MaskedEditSetMessage(value,value.MaximumValueMessage,value.MaximumValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret&&""!=value.MinimumValue&&(Compnum=parseInt(value.MinimumValue,10),isNaN(Compnum)||num<Compnum&&(ret=!1,MaskedEditSetMessage(value,value.MinimumValueMessage,value.MinimumValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass)))):(exp=new RegExp("^\\s*([-\\+])?(\\d+)?(\\"+AttibDcSep+"(\\d+))?\\s*$"),m=mask.match(exp),null!=m&&(cleanInput=null,cleanInput="undefined"!=typeof m[1]?m[1]+(m[2].length>0?m[2]:"0")+"."+m[4]:(m[2].length>0?m[2]:"0")+"."+m[4],num=parseFloat(cleanInput),ret=!isNaN(num)),ret||(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass)),ret&&(""!=value.MaximumValue&&(Compnum=parseFloat(value.MaximumValue),isNaN(Compnum)||num>Compnum&&(ret=!1,MaskedEditSetMessage(value,value.MaximumValueMessage,value.MaximumValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret&&""!=value.MinimumValue&&(Compnum=parseFloat(value.MinimumValue),isNaN(Compnum)||num<Compnum&&(ret=!1,MaskedEditSetMessage(value,value.MinimumValueMessage,value.MinimumValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))))),ret&&""!=value.ClientValidationFunction)&&(args={Value:mask,IsValid:!0},eval(value.ClientValidationFunction+"(value, args);"),ret=args.IsValid,ret||(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret||MaskedEditMessageShow(value,ret),ret}function MaskedEditValidatorNone(value){var target,ret,mask,rx,matches,exp,num,args;return(MaskedEditSetMessage(value,"",""),MaskedEditSetCssClass(value,""),MaskedEditMessageShow(value,!0),"false"==value.IsMaskedEdit)?!0:(target=$get(value.TargetValidator),"false"==value.ValidEmpty&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()==value.InitialValue)?(MaskedEditSetMessage(value,value.EmptyValueMessage,value.EmptyValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1):""==Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value()?!0:(ret=!0,mask=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(target).get_Value(),""!=value.ValidationExpression&&(rx=new RegExp(value.ValidationExpression),matches=rx.exec(mask),ret=null!=matches&&mask==matches[0],!ret))?(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass),MaskedEditMessageShow(value,!1),!1):(exp=/^\d+\s*$/,num=null,(""!=value.MaximumValue&&null!=value.MaximumValue.match(exp)&&(num=parseInt(value.MaximumValue,10),isNaN(num)||mask.length>num&&(ret=!1,MaskedEditSetMessage(value,value.MaximumValueMessage,value.MaximumValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret&&""!=value.MinimumValue&&null!=value.MinimumValue.match(exp)&&(num=parseInt(value.MinimumValue,10),isNaN(num)||mask.length<num&&(ret=!1,MaskedEditSetMessage(value,value.MinimumValueMessage,value.MinimumValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret&&""!=value.ClientValidationFunction)&&(args={Value:mask,IsValid:!0},eval(value.ClientValidationFunction+"(value, args);"),ret=args.IsValid,ret||(MaskedEditSetMessage(value,value.InvalidValueMessage,value.InvalidValueText),MaskedEditSetCssClass(value,value.InvalidValueCssClass))),ret||MaskedEditMessageShow(value,ret),ret)}var isUnminified,$AA;if(Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.Resources={AlwaysVisible_ElementRequired:"Sys.Extended.UI.AlwaysVisibleControlBehavior must have an element",Animation_CannotNestSequence:"Sys.Extended.UI.Animation.SequenceAnimation cannot be nested inside Sys.Extended.UI.Animation.ParallelAnimation",Animation_ChildrenNotAllowed:'Sys.Extended.UI.Animation.createAnimation cannot add child animations to type "{0}" that does not derive from Sys.Extended.UI.Animation.ParentAnimation',Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation can only register types that inherit from Sys.Extended.UI.Animation.Animation",Animation_InvalidColor:'Color must be a 7-character hex representation (e.g. #246ACF), not "{0}"',Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation requires an object with an AnimationName property",Animation_NoDynamicPropertyFound:'Sys.Extended.UI.Animation.createAnimation found no property corresponding to "{0}" or "{1}"',Animation_NoPropertyFound:'Sys.Extended.UI.Animation.createAnimation found no property corresponding to "{0}"',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}"',Animation_UknownAnimationName:'Sys.Extended.UI.Animation.createAnimation could not find an Animation corresponding to the name "{0}"',Calendar_Today:"Today: {0}",CascadingDropDown_MethodError:"[Method error {0}]",CascadingDropDown_MethodTimeout:"[Method timeout]",CascadingDropDown_NoParentElement:'Failed to find parent element "{0}"',CollapsiblePanel_NoControlID:'Failed to find element "{0}"',Common_DateTime_InvalidFormat:"Invalid format",Common_DateTime_InvalidTimeSpan:'"{0}" is not a valid TimeSpan format',Common_InvalidBorderWidthUnit:'A unit type of "{0}"\' is invalid for parseBorderWidth',Common_InvalidPaddingUnit:'A unit type of "{0}" is invalid for parsePadding',Common_UnitHasNoDigits:"No digits",DynamicPopulate_WebServiceError:"Web Service call failed: {0}",DynamicPopulate_WebServiceTimeout:"Web service call timed out",ExtenderBase_CannotSetClientStateField:"clientStateField can only be set before initialization",ExtenderBase_ControlNotRegisteredForCallbacks:"This Control has not been registered for callbacks",ExtenderBase_InvalidClientStateType:"saveClientState must return a value of type String",ExtenderBase_PageNotRegisteredForCallbacks:"This Page has not been registered for callbacks",HTMLEditor_toolbar_button_FixedBackColor_title:"Background color",HTMLEditor_toolbar_button_BackColorClear_title:"Clear background color",HTMLEditor_toolbar_button_Bold_title:"Bold",HTMLEditor_toolbar_button_BulletedList_title:"Bulleted List",HTMLEditor_toolbar_button_Copy_title:"Copy",HTMLEditor_toolbar_button_Cut_title:"Cut",HTMLEditor_toolbar_button_DecreaseIndent_title:"Decrease Indent",HTMLEditor_toolbar_button_FontName_defaultValue:"default",HTMLEditor_toolbar_button_FontSize_defaultValue:"default",HTMLEditor_toolbar_button_DesignMode_title:"Design mode",HTMLEditor_toolbar_button_FontName_label:"Font",HTMLEditor_toolbar_button_FixedForeColor_title:"Foreground color",HTMLEditor_toolbar_button_ForeColorClear_title:"Clear foreground color",HTMLEditor_toolbar_button_HtmlMode_title:"HTML text",HTMLEditor_toolbar_button_IncreaseIndent_title:"Increase Indent",HTMLEditor_toolbar_button_InsertHR_title:"Insert horizontal rule",HTMLEditor_toolbar_button_InsertLink_title:"Insert/Edit URL link",HTMLEditor_toolbar_button_InsertLink_message_EmptyURL:"URL can not be empty",HTMLEditor_toolbar_button_Italic_title:"Italic",HTMLEditor_toolbar_button_JustifyCenter_title:"Justify Center",HTMLEditor_toolbar_button_JustifyFull_title:"Justify",HTMLEditor_toolbar_button_JustifyLeft_title:"Justify Left",HTMLEditor_toolbar_button_JustifyRight_title:"Justify Right",HTMLEditor_toolbar_button_Ltr_title:"Left to right direction",HTMLEditor_toolbar_button_OnPasteFromMSWord:"Pasting from MS Word is switched on. Just now: {0}",HTMLEditor_toolbar_button_OnPastePlainText:"Plain text pasting is switched on. Just now: {0}",HTMLEditor_toolbar_button_OrderedList_title:"Ordered List",HTMLEditor_toolbar_button_Paragraph_title:"Make Paragraph",HTMLEditor_toolbar_button_Paste_title:"Paste",HTMLEditor_toolbar_button_PasteText_title:"Paste Plain Text",HTMLEditor_toolbar_button_PasteWord_title:"Paste from MS Word (with cleanup)",HTMLEditor_toolbar_popup_LinkProperties_button_Cancel:"Cancel",HTMLEditor_toolbar_popup_LinkProperties_button_OK:"OK",HTMLEditor_toolbar_popup_LinkProperties_field_URL:"URL",HTMLEditor_toolbar_popup_LinkProperties_field_Target:"Target",HTMLEditor_toolbar_popup_LinkProperties_field_Target_New:"New window",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Current:"Current window",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Parent:"Parent window",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Top:"Top window",HTMLEditor_toolbar_button_PreviewMode_title:"Preview",HTMLEditor_toolbar_button_Redo_title:"Redo",HTMLEditor_toolbar_button_RemoveAlignment_title:"Remove Alignment",HTMLEditor_toolbar_button_RemoveLink_title:"Remove Link",HTMLEditor_toolbar_button_RemoveStyles_title:"Remove styles",HTMLEditor_toolbar_button_Rtl_title:"Right to left direction",HTMLEditor_toolbar_button_FontSize_label:"Size",HTMLEditor_toolbar_button_StrikeThrough_title:"Strike through",HTMLEditor_toolbar_button_SubScript_title:"Sub script",HTMLEditor_toolbar_button_SuperScript_title:"Super script",HTMLEditor_toolbar_button_Underline_title:"Underline",HTMLEditor_toolbar_button_Undo_title:"Undo",HTMLEditor_toolbar_button_Use_verb:"Use {0}",ListSearch_DefaultPrompt:"Type to search",PasswordStrength_DefaultStrengthDescriptions:"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!",PasswordStrength_GetHelpRequirements:"Get help on password requirements",PasswordStrength_InvalidStrengthDescriptions:"Invalid number of text strength descriptions specified",PasswordStrength_InvalidStrengthDescriptionStyles:"Text Strength description style classes must match the number of text descriptions.",PasswordStrength_InvalidWeightingRatios:"Strength Weighting ratios must have 4 elements",PasswordStrength_RemainingCharacters:"{0} more characters",PasswordStrength_RemainingLowerCase:"{0} more lower case characters",PasswordStrength_RemainingMixedCase:"Mixed case characters",PasswordStrength_RemainingNumbers:"{0} more numbers",PasswordStrength_RemainingSymbols:"{0} symbol characters",PasswordStrength_RemainingUpperCase:"{0} more upper case characters",PasswordStrength_Satisfied:"Nothing more required",PasswordStrength_StrengthPrompt:"Strength: ",PopupControl_NoDefaultProperty:'No default property supported for control "{0}" of type "{1}"',PopupExtender_NoParentElement:'Couldn\'t find parent element "{0}"',Rating_CallbackError:"An unhandled exception has occurred:\\r\\n{0}",ReorderList_DropWatcherBehavior_CallbackError:"Reorder failed, see details below.\\r\\n\\r\\n{0}",ReorderList_DropWatcherBehavior_NoChild:'Could not find child of list with id "{0}"',ResizableControlBehavior_CannotChangeProperty:"Changes to {0} not supported",ResizableControlBehavior_InvalidHandler:"{0} handler not a function, function name, or function text",RTE_BackgroundColor:"Background Color",RTE_BarColor:"Bar Color",RTE_Bold:"Bold",RTE_Border:"Border",RTE_BorderColor:"Border Color",RTE_Cancel:"Cancel",RTE_CellColor:"Cell Color",RTE_CellPadding:"Cell Padding",RTE_CellSpacing:"Cell Spacing",RTE_ClearFormatting:"Clear Formatting",RTE_Columns:"Columns",RTE_Copy:"Copy",RTE_Create:"Create",RTE_Cut:"Cut",RTE_Font:"Font",RTE_FontColor:"Font Color",RTE_Heading:"Heading",RTE_Hyperlink:"Hyperlink",RTE_Indent:"Indent",RTE_InsertHorizontalRule:"Insert Horizontal Rule",RTE_InsertImage:"Insert Image",RTE_InsertTable:"Insert Table",RTE_Inserttexthere:"Insert text here",RTE_Italic:"Italic",RTE_JustifyCenter:"Justify Center",RTE_JustifyFull:"Justify Full",RTE_JustifyLeft:"Justify Left",RTE_JustifyRight:"Justify Right",RTE_LabelColor:"Label Color",RTE_Labels:"Labels",RTE_Legend:"Legend",RTE_Normal:"Normal",RTE_OK:"OK",RTE_OrderedList:"Ordered List",RTE_Outdent:"Outdent",RTE_Paragraph:"Paragraph",RTE_Paste:"Paste",RTE_PreviewHTML:"Preview HTML",RTE_Redo:"Redo",RTE_Rows:"Rows",RTE_Size:"Size",RTE_Underline:"Underline",RTE_Undo:"Undo",RTE_UnorderedList:"Unordered List",RTE_Values:"Values",RTE_ViewEditor:"View Editor",RTE_ViewSource:"View Source",RTE_ViewValues:"View Values",Shared_BrowserSecurityPreventsPaste:"Your browser security settings don't permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead.",Slider_NoSizeProvided:"Please set valid values for the height and width attributes in the slider's CSS classes",Tabs_ActiveTabArgumentOutOfRange:"Argument is not a member of the tabs collection",Tabs_OwnerExpected:"owner must be set before initialize",Tabs_PropertySetAfterInitialization:"{0} cannot be changed after initialization",Tabs_PropertySetBeforeInitialization:"{0} cannot be changed before initialization",Tabs_UnknownTheme:"Theme {0} cannot be converted to a CSS class",ValidatorCallout_DefaultErrorMessage:"This control is invalid",MultiHandleSlider_CssHeightWidthRequired:"You must specify a CSS width and height for all handle styles as well as the rail.",AsyncFileUpload_InternalErrorMessage:"The AsyncFileUpload control has encountered an error with the uploader in this page. Please refresh the page and try again.",AsyncFileUpload_UnhandledException:"Unhandled Exception",AsyncFileUpload_ConfirmToSeeErrorPage:"Do you want to see the response page?",AsyncFileUpload_ServerResponseError:"Server Response Error",AsyncFileUpload_UnknownServerError:"Unknown Server error",AsyncFileUpload_UploadingProblem:"The requested file uploading problem.",AjaxFileUpload_DropFiles:"Drop files here",AjaxFileUpload_AllFilesUploaded:"All Files Uploaded.",AjaxFileUpload_SelectFile:"Select File",AjaxFileUpload_Remove:"Remove",AjaxFileUpload_Upload:"Upload",AjaxFileUpload_Cancel:"Cancel",AjaxFileUpload_FileList:"List of Uploaded files:",AjaxFileUpload_SelectFileToUpload:"Please select file(s) to upload.",AjaxFileUpload_Pending:"pending",AjaxFileUpload_FileInQueue:"{0} file(s) in queue.",AjaxFileUpload_UploadingFileInQueue:"Uploading {0} of {1} file(s)",AjaxFileUpload_UploadingHtml5File:"Uploading file: {0} of size {1} bytes.",AjaxFileUpload_UploadingInputFile:"Uploading file: {0}.",AjaxFileUpload_UploadError:"An Error occured during file upload.",AjaxFileUpload_DefaultError:"File upload error.",AjaxFileUpload_UploadedPercentage:"uploaded {0} %",AjaxFileUpload_Uploading:"Uploading",AjaxFileUpload_Uploaded:"Uploaded",AjaxFileUpload_Cancelling:"Cancelling...",AjaxFileUpload_CancellingUpload:"Cancelling upload...",AjaxFileUpload_UploadCanceled:"File upload cancelled.",AjaxFileUpload_Canceled:"cancelled",AjaxFileUpload_error:"error",AjaxFileUpload_MaxNumberOfFilesExceeded:"Maximum number of files exceeded",AjaxFileUpload_WrongFileType:"Can't add file '{0}' to upload list. File with type '{1}' is not allowed",AjaxFileUpload_TooLargeFile:"The '{0}' file size exceeds the {1} Kbytes limit."},Type.registerNamespace("Sys.Extended.UI.Localization"),Sys.Extended.UI.Localization.SetLocale=function(n){var t=Sys.Extended.UI.Localization[n],i;if(t)for(i in t)t.hasOwnProperty(i)&&(Sys.Extended.UI.Resources[i]=t[i])},Sys.Extended.UI.Localization.ar={Calendar_Today:"اليوم: {0}"},Sys.Extended.UI.Localization.cs={Calendar_Today:"Dnes: {0}",Common_DateTime_InvalidFormat:"Nesprávný formát data",Common_DateTime_InvalidTimeSpan:'"{0}" není správný formát časového úseku',PasswordStrength_DefaultStrengthDescriptions:"Neexistuje;Velmi chatrné;Chatrné;Slabé;Téměř použitelné;Téměř akceptovatelné;Průměrné;Dobré;Silné;Vynikající;Nezlomitlné!",PasswordStrength_GetHelpRequirements:"Získat nápovědu k požadavkům na heslo",PasswordStrength_RemainingCharacters:"{0} dalších znaků",PasswordStrength_RemainingMixedCase:"více malých a velkých písmen",PasswordStrength_RemainingNumbers:"{0} dalších čísel",PasswordStrength_RemainingSymbols:"{0} dalších symbolů",PasswordStrength_Satisfied:"Nic víc nevyžadováno",PasswordStrength_StrengthPrompt:"Síla: "},Sys.Extended.UI.Localization.de={Calendar_Today:"Heute: {0}"},Sys.Extended.UI.Localization.es={Calendar_Today:"Hoy: {0}"},Sys.Extended.UI.Localization.fr={Calendar_Today:"Aujourd'hui : {0}",AjaxFileUpload_DropFiles:"Glisser les fichiers ici",AjaxFileUpload_AllFilesUploaded:"Tous les files ont été envoyés.",AjaxFileUpload_SelectFile:"Sélectionner un fichier",AjaxFileUpload_Remove:"Supprimer",AjaxFileUpload_Upload:"Envoi",AjaxFileUpload_Cancel:"Annuler",AjaxFileUpload_FileList:"Liste des fichiers envoyés :",AjaxFileUpload_SelectFileToUpload:"Veuiller sélectionner le(s) fichier(s) à envoyer.",AjaxFileUpload_Pending:"en attente",AjaxFileUpload_FileInQueue:"{0} fichier(s) dans la file d'attente.",AjaxFileUpload_UploadingHtml5File:"Envoi de fichier : {0} sur un total de {1} octets.",AjaxFileUpload_UploadingInputFile:"Envoi du fichier : {0}.",AjaxFileUpload_UploadError:"Une erreur est survenu lors l'envoi de fichier.",AjaxFileUpload_DefaultError:"Error lors de l'envoi du fichier.",AjaxFileUpload_UploadedPercentage:"{0} % envoyé",AjaxFileUpload_Uploading:"Envoi",AjaxFileUpload_Uploaded:"Envoyé",AjaxFileUpload_Cancelling:"Annulation en cours",AjaxFileUpload_CancellingUpload:"Annulation de l'envoi...",AjaxFileUpload_UploadCanceled:"Envoi de fichier annulé.",AjaxFileUpload_Canceled:"annulé",AjaxFileUpload_error:"erreur",AjaxFileUpload_MaxNumberOfFilesExceeded:"Maximum number of files exceeded",AjaxFileUpload_WrongFileType:"Can't add file '{0}' to upload list. File with type '{1}' is not allowed"},Sys.Extended.UI.Localization.he={Calendar_Today:"היום: {0}"},Sys.Extended.UI.Localization.hi={Calendar_Today:"आज: {0}"},Sys.Extended.UI.Localization.it={Calendar_Today:"Oggi: {0}"},Sys.Extended.UI.Localization.ja={Calendar_Today:"今日: {0}"},Sys.Extended.UI.Localization.ko={Calendar_Today:"오늘: {0}"},Sys.Extended.UI.Localization.nl={AlwaysVisible_ElementRequired:"Sys.Extended.UI.AlwaysVisibleControlBehavior moet een element hebben",Animation_CannotNestSequence:"Sys.Extended.UI.Animation.SequenceAnimation kan niet genest worden binnen  Sys.Extended.UI.Animation.ParallelAnimation",Animation_ChildrenNotAllowed:'Sys.Extended.UI.Animation.createAnimation kan geen deelanimaties toevoegen aantype "{0}" omdat deze niet afgeleid is van Sys.Extended.UI.Animation.ParentAnimation',Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation kan alleen types registreren die afgeleid zijn van Sys.Extended.UI.Animation.Animation",Animation_InvalidColor:'Color moet een hexadecimale notatie van 7 tekens zijn (bijv. #246ACF), niet "{0}"',Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation vereist een object met een AnimationName-eigenschap",Animation_NoDynamicPropertyFound:'Sys.Extended.UI.Animation.createAnimation vond geen eigenschap corresponderend met "{0}" of "{1}"',Animation_NoPropertyFound:'Sys.Extended.UI.Animation.createAnimation vond geen eigenschap corresponderend met "{0}"',Animation_TargetNotFound:'Sys.Extended.UI.Animation.Animation.set_animationTarget vereist dat de ID van een Sys.UI.DomElement of Sys.UI.Control.  Er kon geen element of control gevonden worden corresponderend met "{0}"',Animation_UknownAnimationName:'Sys.Extended.UI.Animation.createAnimation kon geen Animation vinden corresponderend met de naam "{0}"',Calendar_Today:"Vandaag: {0}",CascadingDropDown_MethodError:"[Methodefout {0}]",CascadingDropDown_MethodTimeout:"[Methodetimeout]",CascadingDropDown_NoParentElement:'Kon geen bovenliggend element "{0}" vinden',CollapsiblePanel_NoControlID:'Kon element "{0}"niet vinden',Common_DateTime_InvalidFormat:"Ongeldige notatie",Common_DateTime_InvalidTimeSpan:'De eenheid "{0}"\' is niet geldig voor parseBorderWidth',Common_InvalidBorderWidthUnit:'A unit type of "{0}"\' is invalid for parseBorderWidth',Common_InvalidPaddingUnit:'De eenheid "{0}" is niet geldig voor parsePadding',Common_UnitHasNoDigits:"Geen cijfers",DynamicPopulate_WebServiceError:"Web Service-aanroep mislukt: {0}",DynamicPopulate_WebServiceTimeout:"Web Service heeft niet tijdig gereageerd",ExtenderBase_CannotSetClientStateField:"clientStateField kan alleen vóór initialisatie worden ingesteld",ExtenderBase_ControlNotRegisteredForCallbacks:"Deze control is niet geregistreerd voor callbacks",ExtenderBase_InvalidClientStateType:"saveClientState moet een waarde van het type string retourneren",ExtenderBase_PageNotRegisteredForCallbacks:"Deze pagina is niet geregistreerd voor callbacks",ListSearch_DefaultPrompt:"Typ om te zoeken",PasswordStrength_DefaultStrengthDescriptions:"Geen enkel;Zeer zwak;Zwak;Matig;Bijna in orde;Net voldoende;Gemiddeld;Goed;Sterk;Uitstekend;Onbreekbaar!",PasswordStrength_GetHelpRequirements:"Hulp voor wachtwoord-vereisten",PasswordStrength_InvalidStrengthDescriptions:"Ongeldig aantal tekststerkte-beschrijvingen opgegeven",PasswordStrength_InvalidStrengthDescriptionStyles:"Text Strength beschrijvingsstijl-klassen moeten met het aantal tekstbeschrijvingen overeenkomen.",PasswordStrength_InvalidWeightingRatios:"Strength Weighting ratio's moeten 4 elementen hebben",PasswordStrength_RemainingCharacters:"nog {0} tekens",PasswordStrength_RemainingMixedCase:"Hoofd- en kleine letters",PasswordStrength_RemainingNumbers:"nog {0} cijfers",PasswordStrength_RemainingSymbols:"nog {0} symbooltekens",PasswordStrength_Satisfied:"Niets meer benodigd",PasswordStrength_StrengthPrompt:"Sterkte:",PopupControl_NoDefaultProperty:'Geen standaard-eigenschap ondersteund voor control "{0}" van type "{1}"',PopupExtender_NoParentElement:'Kon geen bovenliggend element "{0}" vinden',Rating_CallbackError:"Een niet-afgehandelde uitzondering is opgetreden:\\r\\n{0}",ReorderList_DropWatcherBehavior_CallbackError:"Herschikken mislukt; zie details hieronder.\\r\\n\\r\\n{0}",ReorderList_DropWatcherBehavior_NoChild:'Kon geen onderliggend element van lijst met id "{0}" vinden',ResizableControlBehavior_CannotChangeProperty:"Veranderingen voor {0} niet ondersteund",ResizableControlBehavior_InvalidHandler:"{0} handler is geen functie, functienaam of functietekst",Shared_BrowserSecurityPreventsPaste:"De beveiligingsinstellingen van uw browser staan het automatisch uitvoeren van de plak-bewerking niet toe. Gebruik in plaats hiervan de toetsencombinatie Ctrl+V.",Slider_NoSizeProvided:"Stel geldige waarden in voor de height en width-CSS-attributen van de sliders CSS-klassen",Tabs_ActiveTabArgumentOutOfRange:"Het opgegeven argument maakt geen deel uit van de tabverzameling",Tabs_OwnerExpected:"owner moet ingesteld worden vóór initialisatie",Tabs_PropertySetAfterInitialization:"{0} kan na initialisatie niet meer worden gewijzigd",Tabs_PropertySetBeforeInitialization:"{0} kan vóór initialisatie niet worden gewijzigd",ValidatorCallout_DefaultErrorMessage:"Deze control is niet geldig"},Sys.Extended.UI.Localization.pl={Calendar_Today:"Dzisiaj: {0}"},Sys.Extended.UI.Localization.pt={Calendar_Today:"Hoje: {0}"},Sys.Extended.UI.Localization.ru={AlwaysVisible_ElementRequired:"Sys.Extended.UI.AlwaysVisibleControlBehavior: элемент должен быть указан",Animation_CannotNestSequence:"Sys.Extended.UI.Animation.SequenceAnimation не может быть вложен в Sys.Extended.UI.Animation.ParallelAnimation",Animation_ChildrenNotAllowed:'Sys.Extended.UI.Animation.createAnimation не может добавить дочернюю анимацию к типу "{0}", который не является производным от Sys.Extended.UI.Animation.ParentAnimation',Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation может регистрировать только типы, которые наследуются от Sys.Extended.UI.Animation.Animation",Animation_InvalidColor:'Цвето должен быть в 7-ми символьном шестнадцатеричном представлении (т.е. #246ACF), но не "{0}"',Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation требует объект со свойством AnimationName",Animation_NoDynamicPropertyFound:'Sys.Extended.UI.Animation.createAnimation не нашел свойство, относящееся к "{0}" или "{1}"',Animation_NoPropertyFound:'Sys.Extended.UI.Animation.createAnimation не нашел свойство, относящееся к "{0}"',Animation_TargetNotFound:'Sys.Extended.UI.Animation.Animation.set_animationTarget требует ID типа Sys.UI.DomElement or Sys.UI.Control.  Невозможно найти элемент или контрол, соответствующий "{0}"',Animation_UknownAnimationName:'Sys.Extended.UI.Animation.createAnimation невозможно найти Animation, относящуюся к имени "{0}"',Calendar_Today:"Сегодня: {0}",CascadingDropDown_MethodError:"[Ошибка метода {0}]",CascadingDropDown_MethodTimeout:"[Превышено время ожидания в методе]",CascadingDropDown_NoParentElement:'Невозможно найти родителя элемента "{0}"',CollapsiblePanel_NoControlID:'Невозможно найти элемент "{0}"',Common_DateTime_InvalidFormat:"Неверный формат",Common_DateTime_InvalidTimeSpan:'"{0}" не является правильным TimeSpan форматом',Common_InvalidBorderWidthUnit:'Единица типа "{0}"\' не является правильной для parseBorderWidth',Common_InvalidPaddingUnit:'Единица типа "{0}" не является правильной для parsePadding',Common_UnitHasNoDigits:"Нет цифр",DynamicPopulate_WebServiceError:"Неудачный вызов вебсервиса: {0}",DynamicPopulate_WebServiceTimeout:"Превышено время ожидания вебсервиса",ExtenderBase_CannotSetClientStateField:"clientStateField может быть установлено только перед инициализацией",ExtenderBase_ControlNotRegisteredForCallbacks:"Этот Control не был зарегистрирован для обратных вызовов",ExtenderBase_InvalidClientStateType:"saveClientState должен возвращать значение типа String",ExtenderBase_PageNotRegisteredForCallbacks:"Этот Page не был зарегистрирован для обратных вызовов",ListSearch_DefaultPrompt:"Тип для поиска",PasswordStrength_DefaultStrengthDescriptions:"Отсутствует;Очень слабый;Слабый;Неподходящий;Почти хороший;Примерно нормальный;Нормальный;Хороший;Сильный;Замечательный;Первокласный!",PasswordStrength_GetHelpRequirements:"Получить помощь по требованиям к паролю",PasswordStrength_InvalidStrengthDescriptions:"Указано неверное кол-во описаний для уровней защищенности пароля",PasswordStrength_InvalidWeightingRatios:"Кол-во весовых коэффициентов защищенности пароля должно быть равно 4.",PasswordStrength_RemainingCharacters:"Еще {0} букв(ы)",PasswordStrength_RemainingMixedCase:"Требуются символ(ы) в разных регистрах",PasswordStrength_RemainingNumbers:"Еще {0} цифр(ы)",PasswordStrength_RemainingSymbols:"Еще {0} символ(а|ов)",PasswordStrength_Satisfied:"Все ок.",PasswordStrength_StrengthPrompt:"Пароль: ",PopupControl_NoDefaultProperty:'Свойство по умолчанию типа "{1}" для control "{0}" не поддерживается.',PopupExtender_NoParentElement:'Невозможно найти родителя элемента "{0}"',Rating_CallbackError:"Возникло необработанное исключение:\\r\\n{0}",ReorderList_DropWatcherBehavior_CallbackError:"Ошибка пересортировки, дополнительная информация ниже.\\r\\n\\r\\n{0}",ReorderList_DropWatcherBehavior_NoChild:'Невозможно найти ребенка листа с id "{0}"',ResizableControlBehavior_CannotChangeProperty:"Изменения для {0} не поддерживаются",ResizableControlBehavior_InvalidHandler:"{0} обработчик не является функцией, именем функции или текстом функции",Shared_BrowserSecurityPreventsPaste:"Настройки безопасности Вашего браузера не позволяют автоматическое выполнение операции вставки. Пожалуйста, воспользуйтесь комбинацией Ctrl+V.",Slider_NoSizeProvided:"Пожалуйста, установите правильные значения высоты и ширины для CSS класса ползунка",Tabs_ActiveTabArgumentOutOfRange:"Аргумент не является цленом коллекции закладок",Tabs_OwnerExpected:"Владелец должен быть установлен перед инициализацией",Tabs_PropertySetAfterInitialization:"{0} не может быть изменен после инициализации",Tabs_PropertySetBeforeInitialization:"{0} не может быть изменен перед инициализацией",ValidatorCallout_DefaultErrorMessage:"Данный элемент не является валидным"},Sys.Extended.UI.Localization.tr={AlwaysVisible_ElementRequired:"Sys.Extended.UI.AlwaysVisibleControlBehavior element içermek zorundadır",Animation_CannotNestSequence:"Sys.Extended.UI.Animation.SequenceAnimation Sys.Extended.UI.Animation.ParallelAnimation içinde yer alamaz",Animation_ChildrenNotAllowed:'Sys.Extended.UI.Animation.createAnimation Sys.Extended.UI.Animation.ParentAnimation dan türetilmeyen alt animasyonları "{0}" tipine ekleyemez',Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation sadece Sys.Extended.UI.Animation.Animation dan türetilmiş tipleri kayıt edebilir",Animation_InvalidColor:'Renk tanımı "{0}" şeklinde değil 7-karakter 16\'lık sayı düzeninde belirtilmelidir (örneğin #246ACF)',Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation AnimationName özelliği olan bir objeye ihtiyaç duyar",Animation_NoDynamicPropertyFound:'Sys.Extended.UI.Animation.createAnimation "{0}" veya "{1}" ile uygun bir özellik bulamadı',Animation_NoPropertyFound:'Sys.Extended.UI.Animation.createAnimation "{0}" ile uygun bir özellik bulamadı',Animation_TargetNotFound:'"{0}" ile uygun element veya kontrol bulunamadı. Sys.Extended.UI.Animation.Animation.set_animationTarget Sys.UI.DomElement veya Sys.UI.Control ID ye ihtiyaç duyar.',Animation_UknownAnimationName:'Sys.Extended.UI.Animation.createAnimation "{0}" isminde bir Animasyon bulamadı',Calendar_Today:"Bugün: {0}",CascadingDropDown_MethodError:"[Metot hatası {0}]",CascadingDropDown_MethodTimeout:"[Metot zaman aşımı]",CascadingDropDown_NoParentElement:'"{0}" kök elementi bulunamadı',CollapsiblePanel_NoControlID:'"{0}" elementi bulunamadı',Common_DateTime_InvalidFormat:"Yanlış format",Common_DateTime_InvalidTimeSpan:'"{0}" geçerli bir TimeSpan formatı değil',Common_InvalidBorderWidthUnit:'"{0}" birim tipi parseBorderWidth için geçersiz',Common_InvalidPaddingUnit:'"{0}" birim tipi parsePadding için geçersiz',Common_UnitHasNoDigits:"Rakam yok",DynamicPopulate_WebServiceError:"Web Servis çağrısı başarısız oldu: {0}",DynamicPopulate_WebServiceTimeout:"Web Servis çağrısı zaman aşımına uğradı",ExtenderBase_CannotSetClientStateField:"clientStateField sadece başlangıç noktasından önce ayarlanabilir",ExtenderBase_ControlNotRegisteredForCallbacks:"Bu kontrol geri arama işlemleri için kaydedilmedi",ExtenderBase_InvalidClientStateType:"saveClientState String tipinde bir değer döndürmelidir",ExtenderBase_PageNotRegisteredForCallbacks:"Bu sayfa geri arama işlemleri için kaydedilmedi",ListSearch_DefaultPrompt:"Arama için yazın",PasswordStrength_DefaultStrengthDescriptions:"Kabul Edilemez;Çok Zayıf;Zayıf;Biraz Zayıf;Vasat;Kabul Edilebilir;Ortalama;İyi;Güçlü;Mükemmel;Kırılamaz!",PasswordStrength_GetHelpRequirements:"Şifre gereksinimleri hakkında yardım al",PasswordStrength_InvalidStrengthDescriptions:"Yanlış sayıda şifre yetkinliği tanımı belirlendi",PasswordStrength_InvalidStrengthDescriptionStyles:"Şifre yetkinliği tanımlama stil sınıfları yazım tariflerinin sayısına eşit olmalıdır",PasswordStrength_InvalidWeightingRatios:"Şifre yetkinliği oranı 4 elemente sahip olmalıdır",PasswordStrength_RemainingCharacters:"{0} harf daha",PasswordStrength_RemainingMixedCase:"Karmaşık tipte harf",PasswordStrength_RemainingNumbers:"{0} sayı daha",PasswordStrength_RemainingSymbols:"{0} sembol daha",PasswordStrength_Satisfied:"Şifre yetkinliği sağlandı",PasswordStrength_StrengthPrompt:"Şifre yetkinliği:",PopupControl_NoDefaultProperty:'"{1}" tipindeki "{0}" kontrolü için varsayılan bir özellik belirlenmedi',PopupExtender_NoParentElement:'"{0}" kök elementi bulunamadı',Rating_CallbackError:"İşlenemez bir hata oluştu:\\r\\n{0}",ReorderList_DropWatcherBehavior_CallbackError:"Yeniden düzenleme başarısız oldu, detayı aşağıda.\\r\\n\\r\\n{0}",ReorderList_DropWatcherBehavior_NoChild:'Listede id "{0}" olan bir alt birim bulunamadı',ResizableControlBehavior_CannotChangeProperty:"{0} üstündeki değişiklikleri desteklenmemektedir",ResizableControlBehavior_InvalidHandler:"{0} işleyicisi fonksiyon, fonksiyon ismi veya fonksiyon metni değil",Shared_BrowserSecurityPreventsPaste:"Tarayıcınızın güvenlik ayarları otomatik yapıştırma işlemine izin vermemektedir. Lütfen Ctrl+V klavye kısayolunu kullanın.",Slider_NoSizeProvided:"Lütfen kaydırıcının (slider) CSS sınıflarında genişlik ve yükseklik için geçerli değerler kullanın",Tabs_ActiveTabArgumentOutOfRange:"Argüman sekme koleksiyonunun bir üyesi değil",Tabs_OwnerExpected:"Başlangıç noktasına gelmeden önce sahip belirlenmelidir",Tabs_PropertySetAfterInitialization:"Başlangıç noktası geçildikten sonra {0} değiştirilemez",Tabs_PropertySetBeforeInitialization:"Başlangıç noktasına varılmadan önce {0} değiştirilemez",ValidatorCallout_DefaultErrorMessage:"Bu kontrol geçersiz"},Sys.Extended.UI.Localization["zh-CHS"]={AlwaysVisible_ElementRequired:"必须为 Sys.Extended.UI.AlwaysVisibleControlBehavior 指定一个元素",Animation_CannotNestSequence:"Sys.Extended.UI.Animation.ParallelAnimation 不能内含 Sys.Extended.UI.Animation.SequenceAnimation",Animation_ChildrenNotAllowed:"Sys.Extended.UI.Animation.createAnimation 无法加入一个不是派生自 Sys.Extended.UI.Animation.ParentAnimation 且类型为 {0} 的子动画",Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation 只能注册那些继承自 Sys.Extended.UI.Animation.Animation 的类型",Animation_InvalidColor:"标记名称 Color 必须是 7 个字符的 16 进位字符串（例如：#246ACF），不能是 {0}",Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation 必须持有一个 AnimationName 属性的对象",Animation_NoDynamicPropertyFound:"Sys.Extended.UI.Animation.createAnimation 找不到相对应的  {0} 或 {1} 属性",Animation_NoPropertyFound:"Sys.Extended.UI.Animation.createAnimation 找不到相对应的 {0} 属性",Animation_TargetNotFound:"Sys.Extended.UI.Animation.Animation.set_animationTarget 需要一个 Sys.UI.DomElement 或 Sys.UI.Control 类的控件  ID。找不到相对应的  {0} 之元素或控件",Animation_UknownAnimationName:"Sys.Extended.UI.Animation.createAnimation 找不到名称为 {0} 的动画",Calendar_Today:"今天:  {0}",CascadingDropDown_MethodError:"[方法错误 {0}]",CascadingDropDown_MethodTimeout:"[方法逾时]",CascadingDropDown_NoParentElement:"无法找到父元素 {0}",CollapsiblePanel_NoControlID:"无法找到元素 {0}",Common_DateTime_InvalidFormat:"格式无效",Common_DateTime_InvalidTimeSpan:"{0} 的 TimeSpan 格式无效",Common_InvalidBorderWidthUnit:"单位类型 {0} 对 parseBorderWidth 而言无效",Common_InvalidPaddingUnit:"单位类型 {0} 对 parsePadding 而言无效",Common_UnitHasNoDigits:"没有数字",DynamicPopulate_WebServiceError:"无法调用 Web 服务：{0}",DynamicPopulate_WebServiceTimeout:"调用 Web 服务超时",ExtenderBase_CannotSetClientStateField:"只能在初始化之前设定 clientStateField",ExtenderBase_ControlNotRegisteredForCallbacks:"这个控件尚未注册，无法提供回调",ExtenderBase_InvalidClientStateType:"saveClientState 必须返回 String 类型的值",ExtenderBase_PageNotRegisteredForCallbacks:"这个页面尚未注册，无法提供回调",ListSearch_DefaultPrompt:"请键入以便搜寻",PasswordStrength_DefaultStrengthDescriptions:"没有;很弱;弱;差;差强人意;尚可;普通;好;很好;非常好;臻于完美！",PasswordStrength_GetHelpRequirements:"取得密码强度的要求说明",PasswordStrength_InvalidStrengthDescriptions:"所指定的密码强度文字内容个数无效",PasswordStrength_InvalidStrengthDescriptionStyles:"密码强度文字说明的样式表，必须符合文字内容之个数",PasswordStrength_InvalidWeightingRatios:"密码强度的权重比例必须有 4 种",PasswordStrength_RemainingCharacters:"还需要 {0} 个字符",PasswordStrength_RemainingMixedCase:"大小写混合",PasswordStrength_RemainingNumbers:"还需要 {0} 个数字",PasswordStrength_RemainingSymbols:"还需要 {0} 个符号",PasswordStrength_Satisfied:"密码强度已经足够",PasswordStrength_StrengthPrompt:"强度：",PopupControl_NoDefaultProperty:"类型 {1} 的 控件 {0} 不支持预设属性",PopupExtender_NoParentElement:"无法找到父元素 {0}",Rating_CallbackError:"发生未处理的异常状况：\\r\\n{0}",ReorderList_DropWatcherBehavior_CallbackError:"无法重新排列，请参考下面的说明：\\r\\n\\r\\n{0}",ReorderList_DropWatcherBehavior_NoChild:"无法找到 ID 为 {0} 的子清单",ResizableControlBehavior_CannotChangeProperty:"不支持对 {0} 的变更",ResizableControlBehavior_InvalidHandler:"{0} 处理例程不是函数、函数名称、或是函数文字",Shared_BrowserSecurityPreventsPaste:"您的浏览器安全性设定，不允许执行自动粘贴的操作。请改用键盘快捷键 Ctrl + V。",Slider_NoSizeProvided:"请在 Slider 的 CSS Class 中，设定高度与宽度属性的有效值",Tabs_ActiveTabArgumentOutOfRange:"参数不是索引标签 (Tab) 集合的成员",Tabs_OwnerExpected:"于初始化之前，必须设定拥有者",Tabs_PropertySetAfterInitialization:"于初始化之后，无法变更 {0}",Tabs_PropertySetBeforeInitialization:"于初始化之前，无法变更 {0}",ValidatorCallout_DefaultErrorMessage:"这个控件无效"},Sys.Extended.UI.Localization["zh-CHT"]={AlwaysVisible_ElementRequired:"必須替 Sys.Extended.UI.AlwaysVisibleControlBehavior 指定一個項目",Animation_CannotNestSequence:"Sys.Extended.UI.Animation.ParallelAnimation 不能內含 Sys.Extended.UI.Animation.SequenceAnimation",Animation_ChildrenNotAllowed:"Sys.Extended.UI.Animation.createAnimation 無法加入一個不是衍生自 Sys.Extended.UI.Animation.ParentAnimation 且類型為 {0} 的子動畫",Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation 只能註冊那些繼承自 Sys.Extended.UI.Animation.Animation 的類型",Animation_InvalidColor:"標記名稱 Color 必須是 7 個字元的 16 進位字串（例如：#246ACF），不能是 {0}",Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation 必須持有一個 AnimationName 屬性的物件",Animation_NoDynamicPropertyFound:"Sys.Extended.UI.Animation.createAnimation 找不到相對應的  {0} 或 {1} 屬性",Animation_NoPropertyFound:"Sys.Extended.UI.Animation.createAnimation 找不到相對應的 {0} 屬性",Animation_TargetNotFound:"Sys.Extended.UI.Animation.Animation.set_animationTarget 需要一個 Sys.UI.DomElement 或 Sys.UI.Control 類別的控制項  ID。找不到相對應的  {0} 之項目或控制項",Animation_UknownAnimationName:"Sys.Extended.UI.Animation.createAnimation 找不到名稱為 {0} 的動畫",Calendar_Today:"今天:  {0}",CascadingDropDown_MethodError:"[方法錯誤 {0}]",CascadingDropDown_MethodTimeout:"[方法逾時]",CascadingDropDown_NoParentElement:"無法找到父項目 {0}",CollapsiblePanel_NoControlID:"無法找到項目 {0}",Common_DateTime_InvalidFormat:"格式無效",Common_DateTime_InvalidTimeSpan:"{0} 的 TimeSpan 格式無效",Common_InvalidBorderWidthUnit:"單位類型 {0} 對 parseBorderWidth 而言無效",Common_InvalidPaddingUnit:"單位類型 {0} 對 parsePadding 而言無效",Common_UnitHasNoDigits:"沒有數字",DynamicPopulate_WebServiceError:"無法呼叫 Web 服務：{0}",DynamicPopulate_WebServiceTimeout:"呼叫 Web 服務逾時",ExtenderBase_CannotSetClientStateField:"只能在初始化之前設定 clientStateField",ExtenderBase_ControlNotRegisteredForCallbacks:"這個控制項尚未註冊，無法提供回呼",ExtenderBase_InvalidClientStateType:"saveClientState 必須傳回 String 型別的值",ExtenderBase_PageNotRegisteredForCallbacks:"這個頁面尚未註冊，無法提供回呼",ListSearch_DefaultPrompt:"請鍵入以便搜尋",PasswordStrength_DefaultStrengthDescriptions:"沒有;很弱;弱;差;差強人意;尚可;普通;好;很好;非常好;臻於完美！",PasswordStrength_GetHelpRequirements:"取得密碼複雜性的要求說明",PasswordStrength_InvalidStrengthDescriptions:"所指定的密碼複雜性文字內容個數無效",PasswordStrength_InvalidStrengthDescriptionStyles:"密碼複雜性文字說明的樣式表，必須符合文字內容之個數",PasswordStrength_InvalidWeightingRatios:"密碼複雜性的權重比例必須有 4 種",PasswordStrength_RemainingCharacters:"還需要 {0} 個字元",PasswordStrength_RemainingMixedCase:"大小寫混合",PasswordStrength_RemainingNumbers:"還需要 {0} 個數字",PasswordStrength_RemainingSymbols:"還需要 {0} 個符號",PasswordStrength_Satisfied:"密碼複雜性已經足夠",PasswordStrength_StrengthPrompt:"複雜性：",PopupControl_NoDefaultProperty:"類型 {1} 的 控制項 {0} 不支援預設屬性",PopupExtender_NoParentElement:"無法找到父項目 {0}",Rating_CallbackError:"發生未處理的例外狀況：\\r\\n{0}",ReorderList_DropWatcherBehavior_CallbackError:"無法重新排列，請參考下面的說明：\\r\\n\\r\\n{0}",ReorderList_DropWatcherBehavior_NoChild:"無法找到 ID 為 {0} 的子清單",ResizableControlBehavior_CannotChangeProperty:"不支援對 {0} 的變更",ResizableControlBehavior_InvalidHandler:"{0} 處理常式不是函式、函式名稱、或是函式文字",Shared_BrowserSecurityPreventsPaste:"您的瀏覽器安全性設定，不允許執行自動貼上的操作。請改用鍵盤快速鍵 Ctrl + V。",Slider_NoSizeProvided:"請在 Slider 的 CSS Class 中，設定高度與寬度屬性的有效值",Tabs_ActiveTabArgumentOutOfRange:"參數不是索引標籤 (Tab) 集合的成員",Tabs_OwnerExpected:"於初始化之前，必須設定擁有者",Tabs_PropertySetAfterInitialization:"於初始化之後，無法變更 {0}",Tabs_PropertySetBeforeInitialization:"於初始化之前，無法變更 {0}",ValidatorCallout_DefaultErrorMessage:"這個控制項無效"},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("Sys.Extended.UI.BoxSide",!1),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(n,t,i){var r=null,u;return n&&(n.currentStyle?r=n.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(u=document.defaultView.getComputedStyle(n,null),u&&(r=u[t])),!r&&n.style.getPropertyValue?r=n.style.getPropertyValue(t):!r&&n.style.getAttribute&&(r=n.style.getAttribute(t))),r&&""!=r&&"undefined"!=typeof r||(r="undefined"!=typeof i?i:null),r},getInheritedBackgroundColor:function(n){if(!n)return"#FFFFFF";var t=this.getCurrentStyle(n,"backgroundColor");try{for(;!t||""==t||"transparent"==t||"rgba(0, 0, 0, 0)"==t;)n=n.parentNode,t=n?this.getCurrentStyle(n,"backgroundColor"):"#FFFFFF"}catch(n){t="#FFFFFF"}return t},getLocation:function(n){return Sys.UI.DomElement.getLocation(n)},setLocation:function(n,t){Sys.UI.DomElement.setLocation(n,t.x,t.y)},getContentSize:function(n){if(!n)throw Error.argumentNull("element");var t=this.getSize(n),i=this.getBorderBox(n),r=this.getPaddingBox(n);return{width:t.width-i.horizontal-r.horizontal,height:t.height-i.vertical-r.vertical}},getSize:function(n){if(!n)throw Error.argumentNull("element");return{width:n.offsetWidth,height:n.offsetHeight}},setContentSize:function(n,t){if(!n)throw Error.argumentNull("element");if(!t)throw Error.argumentNull("size");if("border-box"==this.getCurrentStyle(n,"MozBoxSizing")||"border-box"==this.getCurrentStyle(n,"BoxSizing")){var i=this.getBorderBox(n),r=this.getPaddingBox(n);t={width:t.width+i.horizontal+r.horizontal,height:t.height+i.vertical+r.vertical}}n.style.width=t.width.toString()+"px";n.style.height=t.height.toString()+"px"},setSize:function(n,t){if(!n)throw Error.argumentNull("element");if(!t)throw Error.argumentNull("size");var i=this.getBorderBox(n),r=this.getPaddingBox(n),u={width:t.width-i.horizontal-r.horizontal,height:t.height-i.vertical-r.vertical};this.setContentSize(n,u)},getBounds:function(n){return Sys.UI.DomElement.getBounds(n)},setBounds:function(n,t){if(!n)throw Error.argumentNull("element");if(!t)throw Error.argumentNull("bounds");this.setSize(n,t);$common.setLocation(n,t)},getClientBounds:function(){var n,t;return"CSS1Compat"==document.compatMode?(n=document.documentElement.clientWidth,t=document.documentElement.clientHeight):(n=document.body.clientWidth,t=document.body.clientHeight),new Sys.UI.Bounds(0,0,n,t)},getMarginBox:function(n){if(!n)throw Error.argumentNull("element");var t={top:this.getMargin(n,Sys.Extended.UI.BoxSide.Top),right:this.getMargin(n,Sys.Extended.UI.BoxSide.Right),bottom:this.getMargin(n,Sys.Extended.UI.BoxSide.Bottom),left:this.getMargin(n,Sys.Extended.UI.BoxSide.Left)};return t.horizontal=t.left+t.right,t.vertical=t.top+t.bottom,t},getBorderBox:function(n){if(!n)throw Error.argumentNull("element");var t={top:this.getBorderWidth(n,Sys.Extended.UI.BoxSide.Top),right:this.getBorderWidth(n,Sys.Extended.UI.BoxSide.Right),bottom:this.getBorderWidth(n,Sys.Extended.UI.BoxSide.Bottom),left:this.getBorderWidth(n,Sys.Extended.UI.BoxSide.Left)};return t.horizontal=t.left+t.right,t.vertical=t.top+t.bottom,t},getPaddingBox:function(n){if(!n)throw Error.argumentNull("element");var t={top:this.getPadding(n,Sys.Extended.UI.BoxSide.Top),right:this.getPadding(n,Sys.Extended.UI.BoxSide.Right),bottom:this.getPadding(n,Sys.Extended.UI.BoxSide.Bottom),left:this.getPadding(n,Sys.Extended.UI.BoxSide.Left)};return t.horizontal=t.left+t.right,t.vertical=t.top+t.bottom,t},isBorderVisible:function(n,t){if(!n)throw Error.argumentNull("element");if(t<Sys.Extended.UI.BoxSide.Top||t>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var i=this._borderStyleNames[t],r=this.getCurrentStyle(n,i);return"none"!=r},getMargin:function(n,t){if(!n)throw Error.argumentNull("element");if(t<Sys.Extended.UI.BoxSide.Top||t>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var i=this._marginWidthNames[t],r=this.getCurrentStyle(n,i);try{return this.parsePadding(r)}catch(n){return 0}},getBorderWidth:function(n,t){if(!n)throw Error.argumentNull("element");if(t<Sys.Extended.UI.BoxSide.Top||t>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));if(!this.isBorderVisible(n,t))return 0;var i=this._borderWidthNames[t],r=this.getCurrentStyle(n,i);return this.parseBorderWidth(r)},getPadding:function(n,t){if(!n)throw Error.argumentNull("element");if(t<Sys.Extended.UI.BoxSide.Top||t>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var i=this._paddingWidthNames[t],r=this.getCurrentStyle(n,i);return this.parsePadding(r)},parseBorderWidth:function(n){var r,t,i,u,f;if(this._borderThicknesses||(r={},t=document.createElement("div"),t.style.visibility="hidden",t.style.position="absolute",t.style.fontSize="1px",document.body.appendChild(t),i=document.createElement("div"),i.style.height="0px",i.style.overflow="hidden",t.appendChild(i),u=t.offsetHeight,i.style.borderTop="solid black",i.style.borderTopWidth="thin",r.thin=t.offsetHeight-u,i.style.borderTopWidth="medium",r.medium=t.offsetHeight-u,i.style.borderTopWidth="thick",r.thick=t.offsetHeight-u,t.removeChild(i),document.body.removeChild(t),this._borderThicknesses=r),n){switch(n){case"thin":case"medium":case"thick":return this._borderThicknesses[n];case"inherit":return 0}return f=this.parseUnit(n),Sys.Debug.assert("px"==f.type,String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit,f.type)),f.size}return 0},parsePadding:function(n){if(n){if("inherit"==n)return 0;var t=this.parseUnit(n);return"px"!==t.type&&Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit,t.type)),t.size}return 0},parseUnit:function(n){var t,f,u;if(!n)throw Error.argumentNull("value");n=n.trim().toLowerCase();for(var e=n.length,i=-1,r=0;r<e;r++){if(t=n.substr(r,1),(t<"0"||t>"9")&&"-"!=t&&"."!=t&&","!=t)break;i=r}if(i==-1)throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits);return f=i<e-1?n.substring(i+1).trim():"px",u=parseFloat(n.substr(0,i+1)),"px"==f&&(u=Math.floor(u)),{size:u,type:f}},getElementOpacity:function(n){var i,t,r,u;if(!n)throw Error.argumentNull("element");return t=!1,n.filters?(r=n.filters,0!==r.length&&(u=r["DXImageTransform.Microsoft.Alpha"],u&&(i=u.opacity/100,t=!0))):(i=this.getCurrentStyle(n,"opacity",1),t=!0),t===!1?1:parseFloat(i)},setElementOpacity:function(n,t){var i,r,u;if(!n)throw Error.argumentNull("element");n.filters?(i=n.filters,r=!0,0!==i.length&&(u=i["DXImageTransform.Microsoft.Alpha"],u&&(r=!1,u.opacity=100*t)),r&&(n.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+100*t+")")):n.style.opacity=t},getVisible:function(n){return n&&"none"!=$common.getCurrentStyle(n,"display")&&"hidden"!=$common.getCurrentStyle(n,"visibility")},setVisible:function(n,t){n&&(t?n.style.removeAttribute?n.style.removeAttribute("display"):n.style.removeProperty("display"):n.style.display="none",n.style.visibility=t?"visible":"hidden")},resolveFunction:function(value){if(value){if(value instanceof Function)return value;if(String.isInstanceOfType(value)&&value.length>0){var func;if((func=window[value])instanceof Function||(func=eval(value))instanceof Function)return func}}return null},addCssClasses:function(n,t){for(var i=0;i<t.length;i++)Sys.UI.DomElement.addCssClass(n,t[i])},removeCssClasses:function(n,t){for(var i=0;i<t.length;i++)Sys.UI.DomElement.removeCssClass(n,t[i])},setStyle:function(n,t){$common.applyProperties(n.style,t)},removeHandlers:function(n,t){for(var i in t)$removeHandler(n,i,t[i])},overlaps:function(n,t){return n.x<t.x+t.width&&t.x<n.x+n.width&&n.y<t.y+t.height&&t.y<n.y+n.height},containsPoint:function(n,t,i){return t>=n.x&&t<n.x+n.width&&i>=n.y&&i<n.y+n.height},isKeyDigit:function(n){return 48<=n&&n<=57},isKeyNavigation:function(n){return Sys.UI.Key.left<=n&&n<=Sys.UI.Key.down},padLeft:function(n,t,i,r){return $common._pad(n,t||2,i||" ","l",r||!1)},padRight:function(n,t,i,r){return $common._pad(n,t||2,i||" ","r",r||!1)},_pad:function(n,t,i,r,u){var o,e,f;for(n=n.toString(),o=n.length,e=new Sys.StringBuilder,"r"==r&&e.append(n);o<t;)e.append(i),o++;return"l"==r&&e.append(n),f=e.toString(),u&&f.length>t&&(f="l"==r?f.substr(f.length-t,t):f.substr(0,t)),f},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("focusin",!0,!1,window,1)}},focusout:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("focusout",!0,!1,window,1)}},activate:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("activate",!0,!0,window,1)}},focus:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("focus",!1,!1,window,1)}},blur:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("blur",!1,!1,window,1)}},click:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("click",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("click",!0,!0,window,2,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mousedown",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mouseup",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mouseover",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mousemove",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mousemove",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("load",!1,!1)}},unload:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("unload",!1,!1)}},select:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("select",!0,!1)}},change:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("change",!0,!1)}},submit:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("submit",!0,!0)}},reset:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("reset",!0,!1)}},resize:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("resize",!0,!1)}},scroll:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("scroll",!0,!1)}}},tryFireRawEvent:function(n,t){try{if(n.fireEvent)return n.fireEvent("on"+t.type,t),!0;if(n.dispatchEvent)return n.dispatchEvent(t),!0}catch(n){}return!1},tryFireEvent:function(n,t,i){var u,r;try{if(document.createEventObject)return r=document.createEventObject(),$common.applyProperties(r,i||{}),n.fireEvent("on"+t,r),!0;if(document.createEvent&&(u=$common.__DOMEvents[t],u))return r=document.createEvent(u.eventGroup),u.init(r,i||{}),n.dispatchEvent(r),!0}catch(n){}return!1},wrapElement:function(n,t,i){var r=n.parentNode;r.replaceChild(t,n);(i||t).appendChild(n)},unwrapElement:function(n,t){var i=t.parentNode;null!=i&&($common.removeElement(n),i.replaceChild(n,t))},removeElement:function(n){var t=n.parentNode;null!=t&&t.removeChild(n)},applyProperties:function(n,t){var r,i,u;for(r in t)i=t[r],null!=i&&Object.getType(i)===Object?(u=n[r],$common.applyProperties(u,i)):n[r]=i},createElementFromTemplate:function(n,t,i){var f,h,r,e,s,c,o,u;if("undefined"!=typeof n.nameTable&&(f=n.nameTable,String.isInstanceOfType(f)&&(f=i[f]),null!=f&&(i=f)),h=null,"undefined"!=typeof n.name&&(h=n.name),r=document.createElement(n.nodeName),("undefined"!=typeof n.name&&i&&(i[n.name]=r),"undefined"!=typeof n.parent&&null==t)&&(e=n.parent,String.isInstanceOfType(e)&&(e=i[e]),null!=e&&(t=e)),"undefined"!=typeof n.properties&&null!=n.properties&&$common.applyProperties(r,n.properties),"undefined"!=typeof n.cssClasses&&null!=n.cssClasses&&$common.addCssClasses(r,n.cssClasses),"undefined"!=typeof n.events&&null!=n.events&&$addHandlers(r,n.events),"undefined"!=typeof n.visible&&null!=n.visible&&this.setVisible(r,n.visible),t&&t.appendChild(r),"undefined"!=typeof n.opacity&&null!=n.opacity&&$common.setElementOpacity(r,n.opacity),"undefined"!=typeof n.children&&null!=n.children)for(s=0;s<n.children.length;s++)c=n.children[s],$common.createElementFromTemplate(c,r,i);return o=r,("undefined"!=typeof n.contentPresenter&&null!=n.contentPresenter&&(o=i[o]),"undefined"!=typeof n.content&&null!=n.content)&&(u=n.content,String.isInstanceOfType(u)&&(u=i[u]),u.parentNode?$common.wrapElement(u,r,o):o.appendChild(u)),r},prepareHiddenElementForATDeviceUpdate:function(){var n=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");n||(n=document.createElement("input"),n.setAttribute("type","hidden"),n.setAttribute("value","1"),n.setAttribute("id","hiddenInputToUpdateATBuffer_CommonToolkitScripts"),n.setAttribute("name","hiddenInputToUpdateATBuffer_CommonToolkitScripts"),document.forms[0]&&document.forms[0].appendChild(n))},updateFormToRefreshATDeviceBuffer:function(){var n=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");n&&("1"==n.getAttribute("value")?n.setAttribute("value","0"):n.setAttribute("value","1"))},appendElementToFormOrBody:function(n){document.forms&&document.forms[0]?document.forms[0].appendChild(n):document.body.appendChild(n)},setText:function(n,t){document.all?n.innerText=t:n.textContent=t}},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(n,t){for(var i=t.parentNode;null!=i;i=i.parentNode)if(i==n)return!0;return!1},isDescendantOrSelf:function(n,t){return n===t||Sys.Extended.UI.DomUtility.isDescendant(n,t)},isAncestor:function(n,t){return Sys.Extended.UI.DomUtility.isDescendant(t,n)},isAncestorOrSelf:function(n,t){return n===t||Sys.Extended.UI.DomUtility.isDescendant(t,n)},isSibling:function(n,t){for(var r=n.parentNode,i=0;i<r.childNodes.length;i++)if(r.childNodes[i]==t)return!0;return!1}},Sys.Extended.UI._DomUtility.registerClass("Sys.Extended.UI._DomUtility"),Sys.Extended.UI.DomUtility=new Sys.Extended.UI._DomUtility,Sys.Extended.UI.TextBoxWrapper=function(n){Sys.Extended.UI.TextBoxWrapper.initializeBase(this,[n]);this._current=n.value;this._watermark=null;this._isWatermarked=!1},Sys.Extended.UI.TextBoxWrapper.prototype={dispose:function(){this.get_element().TextBoxWrapper=null;Sys.Extended.UI.TextBoxWrapper.callBaseMethod(this,"dispose")},get_Current:function(){return this._current=this.get_element().value,this._current},set_Current:function(n){this._current=n;this._updateElement()},get_Value:function(){return this.get_IsWatermarked()?"":this.get_Current()},set_Value:function(n){this.set_Current(n);n&&0!=n.length?this.set_IsWatermarked(!1):null!=this._watermark&&this.set_IsWatermarked(!0)},get_Watermark:function(){return this._watermark},set_Watermark:function(n){this._watermark=n;this._updateElement()},get_IsWatermarked:function(){return this._isWatermarked},set_IsWatermarked:function(n){this._isWatermarked!=n&&(this._isWatermarked=n,this._updateElement(),this._raiseWatermarkChanged())},_updateElement:function(){var n=this.get_element();this._isWatermarked?n.value!=this._watermark&&(n.value=this._watermark):n.value!=this._current&&(n.value=this._current)},add_WatermarkChanged:function(n){this.get_events().addHandler("WatermarkChanged",n)},remove_WatermarkChanged:function(n){this.get_events().removeHandler("WatermarkChanged",n)},_raiseWatermarkChanged:function(){var n=this.get_events().getHandler("WatermarkChanged");n&&n(this,Sys.EventArgs.Empty)}},Sys.Extended.UI.TextBoxWrapper.get_Wrapper=function(n){return null==n.TextBoxWrapper&&(n.TextBoxWrapper=new Sys.Extended.UI.TextBoxWrapper(n)),n.TextBoxWrapper},Sys.Extended.UI.TextBoxWrapper.registerClass("Sys.Extended.UI.TextBoxWrapper",Sys.UI.Behavior),Sys.Extended.UI.TextBoxWrapper.validatorGetValue=function(n){var t=$get(n);return t&&t.TextBoxWrapper?t.TextBoxWrapper.get_Value():Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue(n)},"function"==typeof ValidatorGetValue&&(Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue=ValidatorGetValue,ValidatorGetValue=Sys.Extended.UI.TextBoxWrapper.validatorGetValue),Sys.CultureInfo&&Sys.CultureInfo.prototype._getAbbrMonthIndex&&(Sys.CultureInfo.prototype._getAbbrMonthIndex=function(n){return this._upperAbbrMonths||(this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames)),Array.indexOf(this._upperAbbrMonths,this._toUpper(n))},Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex,Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex),Sys.Extended.UI.ScrollBars=function(){throw Error.invalidOperation();},Sys.Extended.UI.ScrollBars.prototype={None:0,Horizontal:1,Vertical:2,Both:3,Auto:4},Sys.Extended.UI.ScrollBars.registerEnum("Sys.Extended.UI.ScrollBars",!1),isUnminified=/param/.test(function(){}),Sys.Extended.Deprecated=function(n,t){isUnminified&&window.console&&console.warn&&(1==arguments.length?console.warn(n+" is deprecated."):console.warn(n+" is deprecated. Use "+t+" instead."))},Sys.Extended.UI.zIndex=function(){},Sys.Extended.UI.zIndex.BubbleChartTooltip=1e4,Sys.Extended.UI.zIndex.ComboBoxList=1e4,Sys.Extended.UI.zIndex.DropWatcherDragVisual=99999,Sys.Extended.UI.zIndex.LineChartTooltip=1e4,Sys.Extended.UI.zIndex.MaskedEditDivTip=99999,Sys.Extended.UI.zIndex.ModalPopupBackground=1e4,Sys.Extended.UI.zIndex.PasswordStrengthTextDisplay=10001,Sys.Extended.UI.zIndex.Popup=1e3,Sys.Extended.UI.zIndex.SeadragonContainer=99999999,Sys.Extended.UI.zIndex.SliderDragHandle=999,Sys.ComponentSet=function(n,t,i){this._elementSet=n||(n=new Sys.ElementSet);this._components=this._execute(n,t,i)},Sys.ComponentSet.prototype={__class:!0,setProperties:function(n){return this.each(function(){Sys._set(this,n)})},get:function(n){var t=this._components;return"undefined"==typeof n?Array.apply(null,t):t[n||0]||null},each:function(n){return foreach(this._components,function(t,i){if(n.call(t,i)===!1)return!0}),this},elements:function(){return this._elementSet},_execute:function(n,t,i){function u(n){var i;return n instanceof t||(i=n.constructor)&&(i===t||i.inheritsFrom&&i.inheritsFrom(t)||i.implementsInterface&&i.implementsInterface(t))}var r=[];return t instanceof Array?r.push.apply(r,t):n.each(function(){var n=this.control;n&&(!t||u(n))&&r.push(n);foreach(this._behaviors,function(n){t&&!u(n)||r.push(n)})}),"undefined"!=typeof i&&(r=r[i]?[r[i]]:[]),r}},Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.TimeSpan=function(){if(0==arguments.length)this._ctor$0.apply(this,arguments);else if(1==arguments.length)this._ctor$1.apply(this,arguments);else if(3==arguments.length)this._ctor$2.apply(this,arguments);else if(4==arguments.length)this._ctor$3.apply(this,arguments);else{if(5!=arguments.length)throw Error.parameterCount();this._ctor$4.apply(this,arguments)}},Sys.Extended.UI.TimeSpan.prototype={_ctor$0:function(){this._ticks=0},_ctor$1:function(n){this._ctor$0();this._ticks=n},_ctor$2:function(n,t,i){this._ctor$0();this._ticks=n*Sys.Extended.UI.TimeSpan.TicksPerHour+t*Sys.Extended.UI.TimeSpan.TicksPerMinute+i*Sys.Extended.UI.TimeSpan.TicksPerSecond},_ctor$3:function(n,t,i,r){this._ctor$0();this._ticks=n*Sys.Extended.UI.TimeSpan.TicksPerDay+t*Sys.Extended.UI.TimeSpan.TicksPerHour+i*Sys.Extended.UI.TimeSpan.TicksPerMinute+r*Sys.Extended.UI.TimeSpan.TicksPerSecond},_ctor$4:function(n,t,i,r,u){this._ctor$0();this._ticks=n*Sys.Extended.UI.TimeSpan.TicksPerDay+t*Sys.Extended.UI.TimeSpan.TicksPerHour+i*Sys.Extended.UI.TimeSpan.TicksPerMinute+r*Sys.Extended.UI.TimeSpan.TicksPerSecond+u*Sys.Extended.UI.TimeSpan.TicksPerMillisecond},getDays:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerDay)},getHours:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerHour)%24},getMinutes:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerMinute)%60},getSeconds:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerSecond)%60},getMilliseconds:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerMillisecond)%1e3},getDuration:function(){return new Sys.Extended.UI.TimeSpan(Math.abs(this._ticks))},getTicks:function(){return this._ticks},getTotalDays:function(){Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerDay)},getTotalHours:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerHour)},getTotalMinutes:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerMinute)},getTotalSeconds:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerSecond)},getTotalMilliseconds:function(){return Math.floor(this._ticks/Sys.Extended.UI.TimeSpan.TicksPerMillisecond)},add:function(n){return new Sys.Extended.UI.TimeSpan(this._ticks+n.getTicks())},subtract:function(n){return new Sys.Extended.UI.TimeSpan(this._ticks-n.getTicks())},negate:function(){return new Sys.Extended.UI.TimeSpan(-this._ticks)},equals:function(n){return this._ticks==n.getTicks()},compareTo:function(n){return this._ticks>n.getTicks()?1:this._ticks<n.getTicks()?-1:0},toString:function(){return this.format("F")},format:function(n){var f,t;if(n||(n="F"),1==n.length)switch(n){case"t":n=Sys.Extended.UI.TimeSpan.ShortTimeSpanPattern;break;case"T":n=Sys.Extended.UI.TimeSpan.LongTimeSpanPattern;break;case"F":n=Sys.Extended.UI.TimeSpan.FullTimeSpanPattern;break;default:throw Error.createError(String.format(Sys.Extended.UI.Resources.Common_DateTime_InvalidTimeSpan,n));}var u=/dd|d|hh|h|mm|m|ss|s|nnnn|nnn|nn|n/g,i=new Sys.StringBuilder,r=this._ticks;for(r<0&&(i.append("-"),r=-r);;){if(f=u.lastIndex,t=u.exec(n),i.append(n.slice(f,t?t.index:n.length)),!t)break;switch(t[0]){case"dd":case"d":i.append($common.padLeft(Math.floor(r/Sys.Extended.UI.TimeSpan.TicksPerDay,t[0].length,"0")));break;case"hh":case"h":i.append($common.padLeft(Math.floor(r/Sys.Extended.UI.TimeSpan.TicksPerHour)%24,t[0].length,"0"));break;case"mm":case"m":i.append($common.padLeft(Math.floor(r/Sys.Extended.UI.TimeSpan.TicksPerMinute)%60,t[0].length,"0"));break;case"ss":case"s":i.append($common.padLeft(Math.floor(r/Sys.Extended.UI.TimeSpan.TicksPerSecond)%60,t[0].length,"0"));break;case"nnnn":case"nnn":case"nn":case"n":i.append($common.padRight(Math.floor(r/Sys.Extended.UI.TimeSpan.TicksPerMillisecond)%1e3,t[0].length,"0",!0));break;default:Sys.Debug.assert(!1)}}return i.toString()}},Sys.Extended.UI.TimeSpan.parse=function(n){var t=n.split(":"),s=0,u=0,f=0,r=0,e=0,o=0,i;switch(t.length){case 1:t[0].indexOf(".")!=-1?(i=t[0].split("."),r=parseInt(i[0]),e=parseInt(i[1])):o=parseInt(t[0]);break;case 2:u=parseInt(t[0]);f=parseInt(t[1]);break;case 3:(u=parseInt(t[0]),f=parseInt(t[1]),t[2].indexOf(".")!=-1)?(i=t[2].split("."),r=parseInt(i[0]),e=parseInt(i[1])):r=parseInt(t[2]);break;case 4:(s=parseInt(t[0]),u=parseInt(t[1]),f=parseInt(t[2]),t[3].indexOf(".")!=-1)?(i=t[3].split("."),r=parseInt(i[0]),e=parseInt(i[1])):r=parseInt(t[3])}if(o+=s*Sys.Extended.UI.TimeSpan.TicksPerDay+u*Sys.Extended.UI.TimeSpan.TicksPerHour+f*Sys.Extended.UI.TimeSpan.TicksPerMinute+r*Sys.Extended.UI.TimeSpan.TicksPerSecond+e*Sys.Extended.UI.TimeSpan.TicksPerMillisecond,!isNaN(o))return new Sys.Extended.UI.TimeSpan(o);throw Error.create(Sys.Extended.UI.Resources.Common_DateTime_InvalidFormat);},Sys.Extended.UI.TimeSpan.fromTicks=function(n){return new Sys.Extended.UI.TimeSpan(n)},Sys.Extended.UI.TimeSpan.fromDays=function(n){return new Sys.Extended.UI.TimeSpan(n*Sys.Extended.UI.TimeSpan.TicksPerDay)},Sys.Extended.UI.TimeSpan.fromHours=function(n){return new Sys.Extended.UI.TimeSpan(n*Sys.Extended.UI.TimeSpan.TicksPerHour)},Sys.Extended.UI.TimeSpan.fromMinutes=function(n){return new Sys.Extended.UI.TimeSpan(n*Sys.Extended.UI.TimeSpan.TicksPerMinute)},Sys.Extended.UI.TimeSpan.fromSeconds=function(){return new Sys.Extended.UI.TimeSpan(minutes*Sys.Extended.UI.TimeSpan.TicksPerSecond)},Sys.Extended.UI.TimeSpan.fromMilliseconds=function(){return new Sys.Extended.UI.TimeSpan(minutes*Sys.Extended.UI.TimeSpan.TicksPerMillisecond)},Sys.Extended.UI.TimeSpan.TicksPerDay=864e9,Sys.Extended.UI.TimeSpan.TicksPerHour=36e9,Sys.Extended.UI.TimeSpan.TicksPerMinute=6e8,Sys.Extended.UI.TimeSpan.TicksPerSecond=1e7,Sys.Extended.UI.TimeSpan.TicksPerMillisecond=1e4,Sys.Extended.UI.TimeSpan.FullTimeSpanPattern="dd:hh:mm:ss.nnnn",Sys.Extended.UI.TimeSpan.ShortTimeSpanPattern="hh:mm",Sys.Extended.UI.TimeSpan.LongTimeSpanPattern="hh:mm:ss",Date.prototype.getTimeOfDay=function(){return new Sys.Extended.UI.TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())},Date.prototype.getDateOnly=function(){var n=new Date(this.getFullYear(),this.getMonth(),this.getDate());return this.getMonth()===n.getMonth()&&this.getDate()===n.getDate()||n.setMinutes(120),n},Date.prototype.add=function(n){return new Date(this.getTime()+n.getTotalMilliseconds())},Date.prototype.subtract=function(n){return this.add(n.negate())},Date.prototype.getTicks=function(){return this.getTime()*Sys.Extended.UI.TimeSpan.TicksPerMillisecond},Sys.Extended.UI.FirstDayOfWeek=function(){},Sys.Extended.UI.FirstDayOfWeek.prototype={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6,Default:7},Sys.Extended.UI.FirstDayOfWeek.registerEnum("Sys.Extended.UI.FirstDayOfWeek"),Sys.Timer=function(){Sys.Timer.initializeBase(this);this._interval=1e3;this._enabled=!1;this._timer=null},Sys.Timer.prototype={get_interval:function(){return this._interval},set_interval:function(n){this._interval!==n&&(this._interval=n,this.raisePropertyChanged("interval"),this.get_isUpdating()||null===this._timer||(this._stopTimer(),this._startTimer()))},get_enabled:function(){return this._enabled},set_enabled:function(n){n!==this.get_enabled()&&(this._enabled=n,this.raisePropertyChanged("enabled"),this.get_isUpdating()||(n?this._startTimer():this._stopTimer()))},add_tick:function(n){this.get_events().addHandler("tick",n)},remove_tick:function(n){this.get_events().removeHandler("tick",n)},dispose:function(){this.set_enabled(!1);this._stopTimer();Sys.Timer.callBaseMethod(this,"dispose")},updated:function(){Sys.Timer.callBaseMethod(this,"updated");this._enabled&&(this._stopTimer(),this._startTimer())},_timerCallback:function(){var n=this.get_events().getHandler("tick");n&&n(this,Sys.EventArgs.Empty)},_startTimer:function(){this._timer=window.setInterval(Function.createDelegate(this,this._timerCallback),this._interval)},_stopTimer:function(){window.clearInterval(this._timer);this._timer=null}},Sys.Timer.descriptor={properties:[{name:"interval",type:Number},{name:"enabled",type:Boolean}],events:[{name:"tick"}]},Sys.Timer.registerClass("Sys.Timer",Sys.Component),Type.registerNamespace("Sys.Extended.UI.Animation"),$AA=Sys.Extended.UI.Animation,$AA.registerAnimation=function(n,t){if(!t||!(t===$AA.Animation||t.inheritsFrom&&t.inheritsFrom($AA.Animation)))throw Error.argumentType("type",t,$AA.Animation,Sys.Extended.UI.Resources.Animation_InvalidBaseType);$AA.__animations||($AA.__animations={});$AA.__animations[n.toLowerCase()]=t;t.play=function(){var n=new t,i;t.apply(n,arguments);n.initialize();i=Function.createDelegate(n,function(){n.remove_ended(i);i=null;n.dispose()});n.add_ended(i);n.play()}},$AA.buildAnimation=function(n,t){if(!n||""===n)return null;var i;if(n="("+n+")",Sys.Debug.isDebug)i=Sys.Serialization.JavaScriptSerializer.deserialize(n);else try{i=Sys.Serialization.JavaScriptSerializer.deserialize(n)}catch(n){}return $AA.createAnimation(i,t)},$AA.createAnimation=function(n,t){var i,u,s,l,o,h,f,e,c,r;if(!n||!n.AnimationName)throw Error.argument("obj",Sys.Extended.UI.Resources.Animation_MissingAnimationName);if(i=$AA.__animations[n.AnimationName.toLowerCase()],!i)throw Error.argument("type",String.format(Sys.Extended.UI.Resources.Animation_UknownAnimationName,n.AnimationName));if(u=new i,t&&u.set_target(t),n.AnimationChildren&&n.AnimationChildren.length){if(!$AA.ParentAnimation.isInstanceOfType(u))throw Error.argument("obj",String.format(Sys.Extended.UI.Resources.Animation_ChildrenNotAllowed,i.getName()));for(s=0;s<n.AnimationChildren.length;s++)l=$AA.createAnimation(n.AnimationChildren[s]),l&&u.add(l)}if(o=i.__animationProperties,!o){i.__animationProperties={};i.resolveInheritance();for(h in i.prototype)h.startsWith("set_")&&(i.__animationProperties[h.substr(4).toLowerCase()]=h);delete i.__animationProperties.id;o=i.__animationProperties}for(f in n)if(e=f.toLowerCase(),"animationname"!=e&&"animationchildren"!=e)if(c=n[f],r=o[e],r&&String.isInstanceOfType(r)&&u[r])if(Sys.Debug.isDebug)u[r](c);else try{u[r](c)}catch(n){}else if(e.endsWith("script")){if(r=o[e.substr(0,f.length-6)],r&&String.isInstanceOfType(r)&&u[r])u.DynamicProperties[r]=c;else if(Sys.Debug.isDebug)throw Error.argument("obj",String.format(Sys.Extended.UI.Resources.Animation_NoDynamicPropertyFound,f,f.substr(0,f.length-5)));}else if(Sys.Debug.isDebug)throw Error.argument("obj",String.format(Sys.Extended.UI.Resources.Animation_NoPropertyFound,f));return u},$AA.Animation=function(n,t,i){$AA.Animation.initializeBase(this);this._duration=1;this._fps=25;this._target=null;this._tickHandler=null;this._timer=null;this._percentComplete=0;this._percentDelta=null;this._owner=null;this._parentAnimation=null;this.DynamicProperties={};n&&this.set_target(n);t&&this.set_duration(t);i&&this.set_fps(i)},$AA.Animation.prototype={dispose:function(){this._timer&&(this._timer.dispose(),this._timer=null);this._tickHandler=null;this._target=null;$AA.Animation.callBaseMethod(this,"dispose")},play:function(){if(!this._owner){var n=!0;this._timer||(n=!1,this._tickHandler||(this._tickHandler=Function.createDelegate(this,this._onTimerTick)),this._timer=new Sys.Timer,this._timer.add_tick(this._tickHandler),this.onStart(),this._timer.set_interval(1e3/this._fps),this._percentDelta=100/(this._duration*this._fps),this._updatePercentComplete(0,!0));this._timer.set_enabled(!0);this.raisePropertyChanged("isPlaying");n||this.raisePropertyChanged("isActive")}},pause:function(){this._owner||this._timer&&(this._timer.set_enabled(!1),this.raisePropertyChanged("isPlaying"))},stop:function(n){if(!this._owner){var t=this._timer;this._timer=null;t&&(t.dispose(),100!==this._percentComplete&&(this._percentComplete=100,this.raisePropertyChanged("percentComplete"),(n||void 0===n)&&this.onStep(100)),this.onEnd(),this.raisePropertyChanged("isPlaying"),this.raisePropertyChanged("isActive"))}},onStart:function(){this.raise_started();for(var property in this.DynamicProperties)try{this[property](eval(this.DynamicProperties[property]))}catch(t){if(Sys.Debug.isDebug)throw t;}},onStep:function(n){this.setValue(this.getAnimatedValue(n));this.raise_step()},onEnd:function(){this.raise_ended()},getAnimatedValue:function(){throw Error.notImplemented();},setValue:function(){throw Error.notImplemented();},interpolate:function(n,t,i){return n+(t-n)*(i/100)},_onTimerTick:function(){this._updatePercentComplete(this._percentComplete+this._percentDelta,!0)},_updatePercentComplete:function(n,t){n>100&&(n=100);this._percentComplete=n;this.raisePropertyChanged("percentComplete");t&&this.onStep(n);100===n&&this.stop(!1)},setOwner:function(n){this._owner=n},add_started:function(n){this.get_events().addHandler("started",n)},remove_started:function(n){this.get_events().removeHandler("started",n)},raise_started:function(){var n=this.get_events().getHandler("started");n&&n(this,Sys.EventArgs.Empty)},raiseStarted:function(){Sys.Extended.Deprecated("raiseStarted()","raise_started()");this.raise_started()},add_ended:function(n){this.get_events().addHandler("ended",n)},remove_ended:function(n){this.get_events().removeHandler("ended",n)},raise_ended:function(){var n=this.get_events().getHandler("ended");n&&n(this,Sys.EventArgs.Empty)},raiseEnded:function(){Sys.Extended.Deprecated("raiseEnded()","raise_ended()");this.raise_ended()},add_step:function(n){this.get_events().addHandler("step",n)},remove_step:function(n){this.get_events().removeHandler("step",n)},raise_step:function(){var n=this.get_events().getHandler("step");n&&n(this,Sys.EventArgs.Empty)},raiseStep:function(){Sys.Extended.Deprecated("raiseStep()","raise_step()");this.raise_ended()},get_target:function(){return!this._target&&this._parentAnimation?this._parentAnimation.get_target():this._target},set_target:function(n){this._target!=n&&(this._target=n,this.raisePropertyChanged("target"))},setAnimationTarget:function(n){var i=null,t=$get(n),r;if(t?i=t:(r=$find(n),r&&(t=r.get_element(),t&&(i=t))),!i)throw Error.argument("id",String.format(Sys.Extended.UI.Resources.Animation_TargetNotFound,n));this.set_target(i)},set_animationTarget:function(n){Sys.Extended.Deprecated("setAnimationTarget(id)","set_animationTarget(id)");this.setAnimationTarget(n)},get_duration:function(){return this._duration},set_duration:function(n){n=this._getFloat(n);this._duration!=n&&(this._duration=n,this.raisePropertyChanged("duration"))},get_fps:function(){return this._fps},set_fps:function(n){n=this._getInteger(n);this.fps!=n&&(this._fps=n,this.raisePropertyChanged("fps"))},get_isActive:function(){return null!==this._timer},get_isPlaying:function(){return null!==this._timer&&this._timer.get_enabled()},get_percentComplete:function(){return this._percentComplete},_getBoolean:function(n){return String.isInstanceOfType(n)?Boolean.parse(n):n},_getInteger:function(n){return String.isInstanceOfType(n)?parseInt(n):n},_getFloat:function(n){return String.isInstanceOfType(n)?parseFloat(n):n},_getEnum:function(n,t){return String.isInstanceOfType(n)&&t&&t.parse?t.parse(n):n}},$AA.Animation.registerClass("Sys.Extended.UI.Animation.Animation",Sys.Component),$AA.registerAnimation("animation",$AA.Animation),$AA.ParentAnimation=function(n,t,i,r){if($AA.ParentAnimation.initializeBase(this,[n,t,i]),this._animations=[],r&&r.length)for(var u=0;u<r.length;u++)this.add(r[u])},$AA.ParentAnimation.prototype={initialize:function(){var n,t;if($AA.ParentAnimation.callBaseMethod(this,"initialize"),this._animations)for(n=0;n<this._animations.length;n++)t=this._animations[n],t&&!t.get_isInitialized&&t.initialize()},dispose:function(){this.clear();this._animations=null;$AA.ParentAnimation.callBaseMethod(this,"dispose")},get_animations:function(){return this._animations},add:function(n){this._animations&&(n&&(n._parentAnimation=this),Array.add(this._animations,n),this.raisePropertyChanged("animations"))},remove:function(n){this._animations&&(n&&n.dispose(),Array.remove(this._animations,n),this.raisePropertyChanged("animations"))},removeAt:function(n){if(this._animations){var t=this._animations[n];t&&t.dispose();Array.removeAt(this._animations,n);this.raisePropertyChanged("animations")}},clear:function(){if(this._animations){for(var n=this._animations.length-1;n>=0;n--)this._animations[n].dispose(),this._animations[n]=null;Array.clear(this._animations);this._animations=[];this.raisePropertyChanged("animations")}}},$AA.ParentAnimation.registerClass("Sys.Extended.UI.Animation.ParentAnimation",$AA.Animation),$AA.registerAnimation("parent",$AA.ParentAnimation),$AA.ParallelAnimation=function(n,t,i,r){$AA.ParallelAnimation.initializeBase(this,[n,t,i,r])},$AA.ParallelAnimation.prototype={add:function(n){$AA.ParallelAnimation.callBaseMethod(this,"add",[n]);n.setOwner(this)},onStart:function(){$AA.ParallelAnimation.callBaseMethod(this,"onStart");for(var t=this.get_animations(),n=0;n<t.length;n++)t[n].onStart()},onStep:function(n){for(var i=this.get_animations(),t=0;t<i.length;t++)i[t].onStep(n)},onEnd:function(){for(var t=this.get_animations(),n=0;n<t.length;n++)t[n].onEnd();$AA.ParallelAnimation.callBaseMethod(this,"onEnd")}},$AA.ParallelAnimation.registerClass("Sys.Extended.UI.Animation.ParallelAnimation",$AA.ParentAnimation),$AA.registerAnimation("parallel",$AA.ParallelAnimation),$AA.SequenceAnimation=function(n,t,i,r,u){$AA.SequenceAnimation.initializeBase(this,[n,t,i,r]);this._handler=null;this._paused=!1;this._playing=!1;this._index=0;this._remainingIterations=0;this._iterations=void 0!==u?u:1},$AA.SequenceAnimation.prototype={dispose:function(){this._handler=null;$AA.SequenceAnimation.callBaseMethod(this,"dispose")},stop:function(){var n,t;if(this._playing){if(n=this.get_animations(),this._index<n.length)for(n[this._index].remove_ended(this._handler),t=this._index;t<n.length;t++)n[t].stop();this._playing=!1;this._paused=!1;this.raisePropertyChanged("isPlaying");this.onEnd()}},pause:function(){if(this.get_isPlaying()){var n=this.get_animations()[this._index];null!=n&&n.pause();this._paused=!0;this.raisePropertyChanged("isPlaying")}},play:function(){var i=this.get_animations(),t,n;this._playing||((this._playing=!0,this._paused)?(this._paused=!1,t=i[this._index],null!=t&&(t.play(),this.raisePropertyChanged("isPlaying"))):(this.onStart(),this._index=0,n=i[this._index],n?(n.add_ended(this._handler),n.play(),this.raisePropertyChanged("isPlaying")):this.stop()))},onStart:function(){$AA.SequenceAnimation.callBaseMethod(this,"onStart");this._remainingIterations=this._iterations-1;this._handler||(this._handler=Function.createDelegate(this,this._onEndAnimation))},_onEndAnimation:function(){var n=this.get_animations(),r=n[this._index++],t,i;(r&&r.remove_ended(this._handler),this._index<n.length)?(t=n[this._index],t.add_ended(this._handler),t.play()):this._remainingIterations>=1||this._iterations<=0?(this._remainingIterations--,this._index=0,i=n[0],i.add_ended(this._handler),i.play()):this.stop()},onStep:function(){throw Error.invalidOperation(Sys.Extended.UI.Resources.Animation_CannotNestSequence);},onEnd:function(){this._remainingIterations=0;$AA.SequenceAnimation.callBaseMethod(this,"onEnd")},get_isActive:function(){return!0},get_isPlaying:function(){return this._playing&&!this._paused},get_iterations:function(){return this._iterations},set_iterations:function(n){n=this._getInteger(n);this._iterations!=n&&(this._iterations=n,this.raisePropertyChanged("iterations"))},get_isInfinite:function(){return this._iterations<=0}},$AA.SequenceAnimation.registerClass("Sys.Extended.UI.Animation.SequenceAnimation",$AA.ParentAnimation),$AA.registerAnimation("sequence",$AA.SequenceAnimation),$AA.SelectionAnimation=function(n,t,i,r){$AA.SelectionAnimation.initializeBase(this,[n,t,i,r]);this._selectedIndex=-1;this._selected=null},$AA.SelectionAnimation.prototype={getSelectedIndex:function(){throw Error.notImplemented();},onStart:function(){$AA.SelectionAnimation.callBaseMethod(this,"onStart");var n=this.get_animations();this._selectedIndex=this.getSelectedIndex();this._selectedIndex>=0&&this._selectedIndex<n.length&&(this._selected=n[this._selectedIndex],this._selected&&(this._selected.setOwner(this),this._selected.onStart()))},onStep:function(n){this._selected&&this._selected.onStep(n)},onEnd:function(){this._selected&&(this._selected.onEnd(),this._selected.setOwner(null));this._selected=null;this._selectedIndex=null;$AA.SelectionAnimation.callBaseMethod(this,"onEnd")}},$AA.SelectionAnimation.registerClass("Sys.Extended.UI.Animation.SelectionAnimation",$AA.ParentAnimation),$AA.registerAnimation("selection",$AA.SelectionAnimation),$AA.ConditionAnimation=function(n,t,i,r,u){$AA.ConditionAnimation.initializeBase(this,[n,t,i,r]);this._conditionScript=u},$AA.ConditionAnimation.prototype={getSelectedIndex:function(){var selected=-1;if(this._conditionScript&&this._conditionScript.length>0)try{selected=eval(this._conditionScript)?0:1}catch(t){}return selected},get_conditionScript:function(){return this._conditionScript},set_conditionScript:function(n){this._conditionScript!=n&&(this._conditionScript=n,this.raisePropertyChanged("conditionScript"))}},$AA.ConditionAnimation.registerClass("Sys.Extended.UI.Animation.ConditionAnimation",$AA.SelectionAnimation),$AA.registerAnimation("condition",$AA.ConditionAnimation),$AA.CaseAnimation=function(n,t,i,r,u){$AA.CaseAnimation.initializeBase(this,[n,t,i,r]);this._selectScript=u},$AA.CaseAnimation.prototype={getSelectedIndex:function(){var selected=-1,result;if(this._selectScript&&this._selectScript.length>0)try{result=eval(this._selectScript);void 0!==result&&(selected=result)}catch(t){}return selected},get_selectScript:function(){return this._selectScript},set_selectScript:function(n){this._selectScript!=n&&(this._selectScript=n,this.raisePropertyChanged("selectScript"))}},$AA.CaseAnimation.registerClass("Sys.Extended.UI.Animation.CaseAnimation",$AA.SelectionAnimation),$AA.registerAnimation("case",$AA.CaseAnimation),$AA.FadeEffect=function(){throw Error.invalidOperation();},$AA.FadeEffect.prototype={FadeIn:0,FadeOut:1},$AA.FadeEffect.registerEnum("Sys.Extended.UI.Animation.FadeEffect",!1),$AA.FadeAnimation=function(n,t,i,r,u,f,e){$AA.FadeAnimation.initializeBase(this,[n,t,i]);this._effect=void 0!==r?r:$AA.FadeEffect.FadeIn;this._max=void 0!==f?f:1;this._min=void 0!==u?u:0;this._start=this._min;this._end=this._max;this._layoutCreated=!1;this._forceLayoutInIE=void 0===e||null===e||e;this._currentTarget=null;this._resetOpacities()},$AA.FadeAnimation.prototype={_resetOpacities:function(){this._effect==$AA.FadeEffect.FadeIn?(this._start=this._min,this._end=this._max):(this._start=this._max,this._end=this._min)},_createLayout:function(){var n=this._currentTarget,t;n&&(this._originalWidth=$common.getCurrentStyle(n,"width"),t=$common.getCurrentStyle(n,"height"),this._originalBackColor=$common.getCurrentStyle(n,"backgroundColor"),this._originalWidth&&""!=this._originalWidth&&"auto"!=this._originalWidth||t&&""!=t&&"auto"!=t||(n.style.width=n.offsetWidth+"px"),this._originalBackColor&&""!=this._originalBackColor&&"transparent"!=this._originalBackColor&&"rgba(0, 0, 0, 0)"!=this._originalBackColor||(n.style.backgroundColor=$common.getInheritedBackgroundColor(n)),this._layoutCreated=!0)},onStart:function(){$AA.FadeAnimation.callBaseMethod(this,"onStart");this._currentTarget=this.get_target();this.setValue(this._start);this._forceLayoutInIE&&!this._layoutCreated&&Sys.Browser.agent==Sys.Browser.InternetExplorer&&this._createLayout()},getAnimatedValue:function(n){return this.interpolate(this._start,this._end,n)},setValue:function(n){this._currentTarget&&$common.setElementOpacity(this._currentTarget,n)},get_effect:function(){return this._effect},set_effect:function(n){n=this._getEnum(n,$AA.FadeEffect);this._effect!=n&&(this._effect=n,this._resetOpacities(),this.raisePropertyChanged("effect"))},get_minimumOpacity:function(){return this._min},set_minimumOpacity:function(n){n=this._getFloat(n);this._min!=n&&(this._min=n,this._resetOpacities(),this.raisePropertyChanged("minimumOpacity"))},get_maximumOpacity:function(){return this._max},set_maximumOpacity:function(n){n=this._getFloat(n);this._max!=n&&(this._max=n,this._resetOpacities(),this.raisePropertyChanged("maximumOpacity"))},get_forceLayoutInIE:function(){return this._forceLayoutInIE},set_forceLayoutInIE:function(n){n=this._getBoolean(n);this._forceLayoutInIE!=n&&(this._forceLayoutInIE=n,this.raisePropertyChanged("forceLayoutInIE"))},setStartValue:function(n){n=this._getFloat(n);this._start=n},set_startValue:function(n){Sys.Extended.Deprecated("setStartValue(value)","set_startValue(value)");this.setStartValue(n)}},$AA.FadeAnimation.registerClass("Sys.Extended.UI.Animation.FadeAnimation",$AA.Animation),$AA.registerAnimation("fade",$AA.FadeAnimation),$AA.FadeInAnimation=function(n,t,i,r,u,f){$AA.FadeInAnimation.initializeBase(this,[n,t,i,$AA.FadeEffect.FadeIn,r,u,f])},$AA.FadeInAnimation.prototype={onStart:function(){$AA.FadeInAnimation.callBaseMethod(this,"onStart");this._currentTarget&&this.set_startValue($common.getElementOpacity(this._currentTarget))}},$AA.FadeInAnimation.registerClass("Sys.Extended.UI.Animation.FadeInAnimation",$AA.FadeAnimation),$AA.registerAnimation("fadeIn",$AA.FadeInAnimation),$AA.FadeOutAnimation=function(n,t,i,r,u,f){$AA.FadeOutAnimation.initializeBase(this,[n,t,i,$AA.FadeEffect.FadeOut,r,u,f])},$AA.FadeOutAnimation.prototype={onStart:function(){$AA.FadeOutAnimation.callBaseMethod(this,"onStart");this._currentTarget&&this.set_startValue($common.getElementOpacity(this._currentTarget))}},$AA.FadeOutAnimation.registerClass("Sys.Extended.UI.Animation.FadeOutAnimation",$AA.FadeAnimation),$AA.registerAnimation("fadeOut",$AA.FadeOutAnimation),$AA.PulseAnimation=function(n,t,i,r,u,f,e){$AA.PulseAnimation.initializeBase(this,[n,t,i,null,void 0!==r?r:3]);this._out=new $AA.FadeOutAnimation(n,t,i,u,f,e);this.add(this._out);this._in=new $AA.FadeInAnimation(n,t,i,u,f,e);this.add(this._in)},$AA.PulseAnimation.prototype={get_minimumOpacity:function(){return this._out.get_minimumOpacity()},set_minimumOpacity:function(n){n=this._getFloat(n);this._out.set_minimumOpacity(n);this._in.set_minimumOpacity(n);this.raisePropertyChanged("minimumOpacity")},get_maximumOpacity:function(){return this._out.get_maximumOpacity()},set_maximumOpacity:function(n){n=this._getFloat(n);this._out.set_maximumOpacity(n);this._in.set_maximumOpacity(n);this.raisePropertyChanged("maximumOpacity")},get_forceLayoutInIE:function(){return this._out.get_forceLayoutInIE()},set_forceLayoutInIE:function(n){n=this._getBoolean(n);this._out.set_forceLayoutInIE(n);this._in.set_forceLayoutInIE(n);this.raisePropertyChanged("forceLayoutInIE")},setDuration:function(n){n=this._getFloat(n);$AA.PulseAnimation.callBaseMethod(this,"set_duration",[n]);this._in.set_duration(n);this._out.set_duration(n)},set_duration:function(n){Sys.Extended.Deprecated("setDuration(value)","set_duration(value)");this.setDuration(n)},setFps:function(n){n=this._getInteger(n);$AA.PulseAnimation.callBaseMethod(this,"set_fps",[n]);this._in.set_fps(n);this._out.set_fps(n)},set_fps:function(n){Sys.Extended.Deprecated("setFps(value)","set_fps(value)");this.setFps(n)}},$AA.PulseAnimation.registerClass("Sys.Extended.UI.Animation.PulseAnimation",$AA.SequenceAnimation),$AA.registerAnimation("pulse",$AA.PulseAnimation),$AA.PropertyAnimation=function(n,t,i,r,u){$AA.PropertyAnimation.initializeBase(this,[n,t,i]);this._property=r;this._propertyKey=u;this._currentTarget=null},$AA.PropertyAnimation.prototype={onStart:function(){$AA.PropertyAnimation.callBaseMethod(this,"onStart");this._currentTarget=this.get_target()},setValue:function(n){var t=this._currentTarget;t&&this._property&&this._property.length>0&&(this._propertyKey&&this._propertyKey.length>0&&t[this._property]?t[this._property][this._propertyKey]=n:t[this._property]=n)},getValue:function(){var t=this.get_target(),n;return t&&this._property&&this._property.length>0&&(n=t[this._property],n)?this._propertyKey&&this._propertyKey.length>0?n[this._propertyKey]:n:null},get_property:function(){return this._property},set_property:function(n){this._property!=n&&(this._property=n,this.raisePropertyChanged("property"))},get_propertyKey:function(){return this._propertyKey},set_propertyKey:function(n){this._propertyKey!=n&&(this._propertyKey=n,this.raisePropertyChanged("propertyKey"))}},$AA.PropertyAnimation.registerClass("Sys.Extended.UI.Animation.PropertyAnimation",$AA.Animation),$AA.registerAnimation("property",$AA.PropertyAnimation),$AA.DiscreteAnimation=function(n,t,i,r,u,f){$AA.DiscreteAnimation.initializeBase(this,[n,t,i,r,u]);this._values=f&&f.length?f:[]},$AA.DiscreteAnimation.prototype={getAnimatedValue:function(n){var t=Math.floor(this.interpolate(0,this._values.length-1,n));return this._values[t]},get_values:function(){return this._values},set_values:function(n){this._values!=n&&(this._values=n,this.raisePropertyChanged("values"))}},$AA.DiscreteAnimation.registerClass("Sys.Extended.UI.Animation.DiscreteAnimation",$AA.PropertyAnimation),$AA.registerAnimation("discrete",$AA.DiscreteAnimation),$AA.InterpolatedAnimation=function(n,t,i,r,u,f,e){$AA.InterpolatedAnimation.initializeBase(this,[n,t,i,void 0!==r?r:"style",u]);this._startValue=f;this._endValue=e},$AA.InterpolatedAnimation.prototype={get_startValue:function(){return this._startValue},set_startValue:function(n){n=this._getFloat(n);this._startValue!=n&&(this._startValue=n,this.raisePropertyChanged("startValue"))},get_endValue:function(){return this._endValue},set_endValue:function(n){n=this._getFloat(n);this._endValue!=n&&(this._endValue=n,this.raisePropertyChanged("endValue"))}},$AA.InterpolatedAnimation.registerClass("Sys.Extended.UI.Animation.InterpolatedAnimation",$AA.PropertyAnimation),$AA.registerAnimation("interpolated",$AA.InterpolatedAnimation),$AA.ColorAnimation=function(n,t,i,r,u,f,e){$AA.ColorAnimation.initializeBase(this,[n,t,i,r,u,f,e]);this._start=null;this._end=null;this._interpolateRed=!1;this._interpolateGreen=!1;this._interpolateBlue=!1},$AA.ColorAnimation.prototype={onStart:function(){$AA.ColorAnimation.callBaseMethod(this,"onStart");this._start=$AA.ColorAnimation.getRGB(this.get_startValue());this._end=$AA.ColorAnimation.getRGB(this.get_endValue());this._interpolateRed=this._start.Red!=this._end.Red;this._interpolateGreen=this._start.Green!=this._end.Green;this._interpolateBlue=this._start.Blue!=this._end.Blue},getAnimatedValue:function(n){var t=this._start.Red,i=this._start.Green,r=this._start.Blue;return this._interpolateRed&&(t=Math.round(this.interpolate(t,this._end.Red,n))),this._interpolateGreen&&(i=Math.round(this.interpolate(i,this._end.Green,n))),this._interpolateBlue&&(r=Math.round(this.interpolate(r,this._end.Blue,n))),$AA.ColorAnimation.toColor(t,i,r)},set_startValue:function(n){this._startValue!=n&&(this._startValue=n,this.raisePropertyChanged("startValue"))},set_endValue:function(n){this._endValue!=n&&(this._endValue=n,this.raisePropertyChanged("endValue"))}},$AA.ColorAnimation.getRGB=function(n){if(!n||7!=n.length)throw String.format(Sys.Extended.UI.Resources.Animation_InvalidColor,n);return{Red:parseInt(n.substr(1,2),16),Green:parseInt(n.substr(3,2),16),Blue:parseInt(n.substr(5,2),16)}},$AA.ColorAnimation.toColor=function(n,t,i){var r=n.toString(16),u=t.toString(16),f=i.toString(16);return 1==r.length&&(r="0"+r),1==u.length&&(u="0"+u),1==f.length&&(f="0"+f),"#"+r+u+f},$AA.ColorAnimation.registerClass("Sys.Extended.UI.Animation.ColorAnimation",$AA.InterpolatedAnimation),$AA.registerAnimation("color",$AA.ColorAnimation),$AA.LengthAnimation=function(n,t,i,r,u,f,e,o){$AA.LengthAnimation.initializeBase(this,[n,t,i,r,u,f,e]);this._unit=null!=o?o:"px"},$AA.LengthAnimation.prototype={getAnimatedValue:function(n){var t=this.interpolate(this.get_startValue(),this.get_endValue(),n);return Math.round(t)+this._unit},get_unit:function(){return this._unit},set_unit:function(n){this._unit!=n&&(this._unit=n,this.raisePropertyChanged("unit"))}},$AA.LengthAnimation.registerClass("Sys.Extended.UI.Animation.LengthAnimation",$AA.InterpolatedAnimation),$AA.registerAnimation("length",$AA.LengthAnimation),$AA.MoveAnimation=function(n,t,i,r,u,f,e){$AA.MoveAnimation.initializeBase(this,[n,t,i,null]);this._horizontal=r?r:0;this._vertical=u?u:0;this._relative=void 0===f||f;this._horizontalAnimation=new $AA.LengthAnimation(n,t,i,"style","left",null,null,e);this._verticalAnimation=new $AA.LengthAnimation(n,t,i,"style","top",null,null,e);this.add(this._verticalAnimation);this.add(this._horizontalAnimation)},$AA.MoveAnimation.prototype={onStart:function(){$AA.MoveAnimation.callBaseMethod(this,"onStart");var n=this.get_target();this._horizontalAnimation.set_startValue(n.offsetLeft);this._horizontalAnimation.set_endValue(this._relative?n.offsetLeft+this._horizontal:this._horizontal);this._verticalAnimation.set_startValue(n.offsetTop);this._verticalAnimation.set_endValue(this._relative?n.offsetTop+this._vertical:this._vertical)},get_horizontal:function(){return this._horizontal},set_horizontal:function(n){n=this._getFloat(n);this._horizontal!=n&&(this._horizontal=n,this.raisePropertyChanged("horizontal"))},get_vertical:function(){return this._vertical},set_vertical:function(n){n=this._getFloat(n);this._vertical!=n&&(this._vertical=n,this.raisePropertyChanged("vertical"))},get_relative:function(){return this._relative},set_relative:function(n){n=this._getBoolean(n);this._relative!=n&&(this._relative=n,this.raisePropertyChanged("relative"))},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(n){var t=this._horizontalAnimation.get_unit();t!=n&&(this._horizontalAnimation.set_unit(n),this._verticalAnimation.set_unit(n),this.raisePropertyChanged("unit"))}},$AA.MoveAnimation.registerClass("Sys.Extended.UI.Animation.MoveAnimation",$AA.ParallelAnimation),$AA.registerAnimation("move",$AA.MoveAnimation),$AA.ResizeAnimation=function(n,t,i,r,u,f){$AA.ResizeAnimation.initializeBase(this,[n,t,i,null]);this._width=r;this._height=u;this._horizontalAnimation=new $AA.LengthAnimation(n,t,i,"style","width",null,null,f);this._verticalAnimation=new $AA.LengthAnimation(n,t,i,"style","height",null,null,f);this.add(this._horizontalAnimation);this.add(this._verticalAnimation)},$AA.ResizeAnimation.prototype={onStart:function(){$AA.ResizeAnimation.callBaseMethod(this,"onStart");var n=this.get_target();this._horizontalAnimation.set_startValue(n.offsetWidth);this._verticalAnimation.set_startValue(n.offsetHeight);this._horizontalAnimation.set_endValue(null!==this._width&&void 0!==this._width?this._width:n.offsetWidth);this._verticalAnimation.set_endValue(null!==this._height&&void 0!==this._height?this._height:n.offsetHeight)},get_width:function(){return this._width},set_width:function(n){n=this._getFloat(n);this._width!=n&&(this._width=n,this.raisePropertyChanged("width"))},get_height:function(){return this._height},set_height:function(n){n=this._getFloat(n);this._height!=n&&(this._height=n,this.raisePropertyChanged("height"))},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(n){var t=this._horizontalAnimation.get_unit();t!=n&&(this._horizontalAnimation.set_unit(n),this._verticalAnimation.set_unit(n),this.raisePropertyChanged("unit"))}},$AA.ResizeAnimation.registerClass("Sys.Extended.UI.Animation.ResizeAnimation",$AA.ParallelAnimation),$AA.registerAnimation("resize",$AA.ResizeAnimation),$AA.ScaleAnimation=function(n,t,i,r,u,f,e,o){$AA.ScaleAnimation.initializeBase(this,[n,t,i]);this._scaleFactor=void 0!==r?r:1;this._unit=void 0!==u?u:"px";this._center=f;this._scaleFont=e;this._fontUnit=void 0!==o?o:"pt";this._element=null;this._initialHeight=null;this._initialWidth=null;this._initialTop=null;this._initialLeft=null;this._initialFontSize=null},$AA.ScaleAnimation.prototype={getAnimatedValue:function(n){return this.interpolate(1,this._scaleFactor,n)},onStart:function(){$AA.ScaleAnimation.callBaseMethod(this,"onStart");this._element=this.get_target();this._element&&(this._initialHeight=this._element.offsetHeight,this._initialWidth=this._element.offsetWidth,this._center&&(this._initialTop=this._element.offsetTop,this._initialLeft=this._element.offsetLeft),this._scaleFont&&(this._initialFontSize=parseFloat($common.getCurrentStyle(this._element,"fontSize"))))},setValue:function(n){var i,r,t;this._element&&(i=Math.round(this._initialWidth*n),r=Math.round(this._initialHeight*n),(this._element.style.width=i+this._unit,this._element.style.height=r+this._unit,this._center&&(this._element.style.top=this._initialTop+Math.round((this._initialHeight-r)/2)+this._unit,this._element.style.left=this._initialLeft+Math.round((this._initialWidth-i)/2)+this._unit),this._scaleFont)&&(t=this._initialFontSize*n,"px"!=this._fontUnit&&"pt"!=this._fontUnit||(t=Math.round(t)),this._element.style.fontSize=t+this._fontUnit))},onEnd:function(){this._element=null;this._initialHeight=null;this._initialWidth=null;this._initialTop=null;this._initialLeft=null;this._initialFontSize=null;$AA.ScaleAnimation.callBaseMethod(this,"onEnd")},get_scaleFactor:function(){return this._scaleFactor},set_scaleFactor:function(n){n=this._getFloat(n);this._scaleFactor!=n&&(this._scaleFactor=n,this.raisePropertyChanged("scaleFactor"))},get_unit:function(){return this._unit},set_unit:function(n){this._unit!=n&&(this._unit=n,this.raisePropertyChanged("unit"))},get_center:function(){return this._center},set_center:function(n){n=this._getBoolean(n);this._center!=n&&(this._center=n,this.raisePropertyChanged("center"))},get_scaleFont:function(){return this._scaleFont},set_scaleFont:function(n){n=this._getBoolean(n);this._scaleFont!=n&&(this._scaleFont=n,this.raisePropertyChanged("scaleFont"))},get_fontUnit:function(){return this._fontUnit},set_fontUnit:function(n){this._fontUnit!=n&&(this._fontUnit=n,this.raisePropertyChanged("fontUnit"))}},$AA.ScaleAnimation.registerClass("Sys.Extended.UI.Animation.ScaleAnimation",$AA.Animation),$AA.registerAnimation("scale",$AA.ScaleAnimation),$AA.Action=function(n,t,i){$AA.Action.initializeBase(this,[n,t,i]);void 0===t&&this.set_duration(0)},$AA.Action.prototype={onEnd:function(){this.doAction();$AA.Action.callBaseMethod(this,"onEnd")},doAction:function(){throw Error.notImplemented();},getAnimatedValue:function(){},setValue:function(){}},$AA.Action.registerClass("Sys.Extended.UI.Animation.Action",$AA.Animation),$AA.registerAnimation("action",$AA.Action),$AA.EnableAction=function(n,t,i,r){$AA.EnableAction.initializeBase(this,[n,t,i]);this._enabled=void 0===r||r},$AA.EnableAction.prototype={doAction:function(){var n=this.get_target();n&&(n.disabled=!this._enabled)},get_enabled:function(){return this._enabled},set_enabled:function(n){n=this._getBoolean(n);this._enabled!=n&&(this._enabled=n,this.raisePropertyChanged("enabled"))}},$AA.EnableAction.registerClass("Sys.Extended.UI.Animation.EnableAction",$AA.Action),$AA.registerAnimation("enableAction",$AA.EnableAction),$AA.HideAction=function(n,t,i,r){$AA.HideAction.initializeBase(this,[n,t,i]);this._visible=r},$AA.HideAction.prototype={doAction:function(){var n=this.get_target();n&&$common.setVisible(n,this._visible)},get_visible:function(){return this._visible},set_visible:function(n){this._visible!=n&&(this._visible=n,this.raisePropertyChanged("visible"))}},$AA.HideAction.registerClass("Sys.Extended.UI.Animation.HideAction",$AA.Action),$AA.registerAnimation("hideAction",$AA.HideAction),$AA.StyleAction=function(n,t,i,r,u){$AA.StyleAction.initializeBase(this,[n,t,i]);this._attribute=r;this._value=u},$AA.StyleAction.prototype={doAction:function(){var n=this.get_target();n&&(n.style[this._attribute]=this._value)},get_attribute:function(){return this._attribute},set_attribute:function(n){this._attribute!=n&&(this._attribute=n,this.raisePropertyChanged("attribute"))},get_value:function(){return this._value},set_value:function(n){this._value!=n&&(this._value=n,this.raisePropertyChanged("value"))}},$AA.StyleAction.registerClass("Sys.Extended.UI.Animation.StyleAction",$AA.Action),$AA.registerAnimation("styleAction",$AA.StyleAction),$AA.OpacityAction=function(n,t,i,r){$AA.OpacityAction.initializeBase(this,[n,t,i]);this._opacity=r},$AA.OpacityAction.prototype={doAction:function(){var n=this.get_target();n&&$common.setElementOpacity(n,this._opacity)},get_opacity:function(){return this._opacity},set_opacity:function(n){n=this._getFloat(n);this._opacity!=n&&(this._opacity=n,this.raisePropertyChanged("opacity"))}},$AA.OpacityAction.registerClass("Sys.Extended.UI.Animation.OpacityAction",$AA.Action),$AA.registerAnimation("opacityAction",$AA.OpacityAction),$AA.ScriptAction=function(n,t,i,r){$AA.ScriptAction.initializeBase(this,[n,t,i]);this._script=r},$AA.ScriptAction.prototype={doAction:function(){try{eval(this._script)}catch(t){}},get_script:function(){return this._script},set_script:function(n){this._script!=n&&(this._script=n,this.raisePropertyChanged("script"))}},$AA.ScriptAction.registerClass("Sys.Extended.UI.Animation.ScriptAction",$AA.Action),$AA.registerAnimation("scriptAction",$AA.ScriptAction),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.BehaviorBase=function(n){Sys.Extended.UI.BehaviorBase.initializeBase(this,[n]);this._clientStateFieldID=null;this._pageRequestManager=null;this._partialUpdateBeginRequestHandler=null;this._partialUpdateEndRequestHandler=null},Sys.Extended.UI.BehaviorBase.prototype={initialize:function(){Sys.Extended.UI.BehaviorBase.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.BehaviorBase.callBaseMethod(this,"dispose");this._pageRequestManager&&(this._partialUpdateBeginRequestHandler&&(this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler),this._partialUpdateBeginRequestHandler=null),this._partialUpdateEndRequestHandler&&(this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler),this._partialUpdateEndRequestHandler=null),this._pageRequestManager=null)},get_ClientStateFieldID:function(){return this._clientStateFieldID},set_ClientStateFieldID:function(n){this._clientStateFieldID!=n&&(this._clientStateFieldID=n,this.raisePropertyChanged("ClientStateFieldID"))},get_ClientState:function(){if(this._clientStateFieldID){var n=document.getElementById(this._clientStateFieldID);if(n)return n.value}return null},set_ClientState:function(n){if(this._clientStateFieldID){var t=document.getElementById(this._clientStateFieldID);t&&(t.value=n)}},registerPartialUpdateEvents:function(){Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager&&(this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance(),this._pageRequestManager&&(this._partialUpdateBeginRequestHandler=Function.createDelegate(this,this._partialUpdateBeginRequest),this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler),this._partialUpdateEndRequestHandler=Function.createDelegate(this,this._partialUpdateEndRequest),this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler)))},_partialUpdateBeginRequest:function(){},_partialUpdateEndRequest:function(){}},Sys.Extended.UI.BehaviorBase.registerClass("Sys.Extended.UI.BehaviorBase",Sys.UI.Behavior),Sys.Extended.UI.DynamicPopulateBehaviorBase=function(n){Sys.Extended.UI.DynamicPopulateBehaviorBase.initializeBase(this,[n]);this._DynamicControlID=null;this._DynamicContextKey=null;this._DynamicServicePath=null;this._DynamicServiceMethod=null;this._cacheDynamicResults=!1;this._dynamicPopulateBehavior=null;this._populatingHandler=null;this._populatedHandler=null},Sys.Extended.UI.DynamicPopulateBehaviorBase.prototype={initialize:function(){Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(this,"initialize");this._populatingHandler=Function.createDelegate(this,this._onPopulating);this._populatedHandler=Function.createDelegate(this,this._onPopulated)},dispose:function(){this._populatedHandler&&(this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.remove_populated(this._populatedHandler),this._populatedHandler=null);this._populatingHandler&&(this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.remove_populating(this._populatingHandler),this._populatingHandler=null);this._dynamicPopulateBehavior&&(this._dynamicPopulateBehavior.dispose(),this._dynamicPopulateBehavior=null);Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(this,"dispose")},populate:function(n){this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.get_element()!=$get(this._DynamicControlID)&&(this._dynamicPopulateBehavior.dispose(),this._dynamicPopulateBehavior=null);!this._dynamicPopulateBehavior&&this._DynamicControlID&&this._DynamicServiceMethod&&(this._dynamicPopulateBehavior=$create(Sys.Extended.UI.DynamicPopulateBehavior,{id:this.get_id()+"_DynamicPopulateBehavior",ContextKey:this._DynamicContextKey,ServicePath:this._DynamicServicePath,ServiceMethod:this._DynamicServiceMethod,cacheDynamicResults:this._cacheDynamicResults},null,null,$get(this._DynamicControlID)),this._dynamicPopulateBehavior.add_populating(this._populatingHandler),this._dynamicPopulateBehavior.add_populated(this._populatedHandler));this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.populate(n?n:this._DynamicContextKey)},_onPopulating:function(n,t){this.raisePopulating(t)},_onPopulated:function(n,t){this.raisePopulated(t)},get_dynamicControlID:function(){return this._DynamicControlID},get_DynamicControlID:this.get_dynamicControlID,set_dynamicControlID:function(n){this._DynamicControlID!=n&&(this._DynamicControlID=n,this.raisePropertyChanged("dynamicControlID"),this.raisePropertyChanged("DynamicControlID"))},set_DynamicControlID:this.set_dynamicControlID,get_dynamicContextKey:function(){return this._DynamicContextKey},get_DynamicContextKey:this.get_dynamicContextKey,set_dynamicContextKey:function(n){this._DynamicContextKey!=n&&(this._DynamicContextKey=n,this.raisePropertyChanged("dynamicContextKey"),this.raisePropertyChanged("DynamicContextKey"))},set_DynamicContextKey:this.set_dynamicContextKey,get_dynamicServicePath:function(){return this._DynamicServicePath},get_DynamicServicePath:this.get_dynamicServicePath,set_dynamicServicePath:function(n){this._DynamicServicePath!=n&&(this._DynamicServicePath=n,this.raisePropertyChanged("dynamicServicePath"),this.raisePropertyChanged("DynamicServicePath"))},set_DynamicServicePath:this.set_dynamicServicePath,get_dynamicServiceMethod:function(){return this._DynamicServiceMethod},get_DynamicServiceMethod:this.get_dynamicServiceMethod,set_dynamicServiceMethod:function(n){this._DynamicServiceMethod!=n&&(this._DynamicServiceMethod=n,this.raisePropertyChanged("dynamicServiceMethod"),this.raisePropertyChanged("DynamicServiceMethod"))},set_DynamicServiceMethod:this.set_dynamicServiceMethod,get_cacheDynamicResults:function(){return this._cacheDynamicResults},set_cacheDynamicResults:function(n){this._cacheDynamicResults!=n&&(this._cacheDynamicResults=n,this.raisePropertyChanged("cacheDynamicResults"))},add_populated:function(n){this.get_events().addHandler("populated",n)},remove_populated:function(n){this.get_events().removeHandler("populated",n)},raisePopulated:function(n){var t=this.get_events().getHandler("populated");t&&t(this,n)},add_populating:function(n){this.get_events().addHandler("populating",n)},remove_populating:function(n){this.get_events().removeHandler("populating",n)},raisePopulating:function(n){var t=this.get_events().getHandler("populating");t&&t(this,n)}},Sys.Extended.UI.DynamicPopulateBehaviorBase.registerClass("Sys.Extended.UI.DynamicPopulateBehaviorBase",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.ControlBase=function(n){Sys.Extended.UI.ControlBase.initializeBase(this,[n]);this._clientStateField=null;this._callbackTarget=null;this._onsubmit$delegate=Function.createDelegate(this,this._onsubmit);this._oncomplete$delegate=Function.createDelegate(this,this._oncomplete);this._onerror$delegate=Function.createDelegate(this,this._onerror)},Sys.Extended.UI.ControlBase.__doPostBack=function(n,t){if(!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())for(var i=0;i<Sys.Extended.UI.ControlBase.onsubmitCollection.length;i++)Sys.Extended.UI.ControlBase.onsubmitCollection[i]();Function.createDelegate(window,Sys.Extended.UI.ControlBase.__doPostBackSaved)(n,t)},Sys.Extended.UI.ControlBase.prototype={initialize:function(){Sys.Extended.UI.ControlBase.callBaseMethod(this,"initialize");this._clientStateField&&this.loadClientState(this._clientStateField.value);"undefined"!=typeof Sys.WebForms&&"undefined"!=typeof Sys.WebForms.PageRequestManager?(Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate),null!=Sys.Extended.UI.ControlBase.__doPostBackSaved&&"undefined"!=typeof Sys.Extended.UI.ControlBase.__doPostBackSaved||(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,this._onsubmit$delegate)):$addHandler(document.forms[0],"submit",this._onsubmit$delegate)},dispose:function(){"undefined"!=typeof Sys.WebForms&&"undefined"!=typeof Sys.WebForms.PageRequestManager?(Array.remove(Sys.Extended.UI.ControlBase.onsubmitCollection,this._onsubmit$delegate),Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate)):$removeHandler(document.forms[0],"submit",this._onsubmit$delegate);Sys.Extended.UI.ControlBase.callBaseMethod(this,"dispose")},findElement:function(n){return $get(this.get_id()+"_"+n.split(":").join("_"))},get_clientStateField:function(){return this._clientStateField},set_clientStateField:function(n){if(this.get_isInitialized())throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_CannotSetClientStateField);this._clientStateField!=n&&(this._clientStateField=n,this.raisePropertyChanged("clientStateField"))},loadClientState:function(){},saveClientState:function(){return null},_invoke:function(n,t,i){var u,r,f,e;if(!this._callbackTarget)throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_ControlNotRegisteredForCallbacks);if("undefined"==typeof WebForm_DoCallback)throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_PageNotRegisteredForCallbacks);for(u=[],r=0;r<t.length;r++)u[r]=t[r];if(f=this.saveClientState(),null!=f&&!String.isInstanceOfType(f))throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_InvalidClientStateType);e=Sys.Serialization.JavaScriptSerializer.serialize({name:n,args:u,state:this.saveClientState()});WebForm_DoCallback(this._callbackTarget,e,this._oncomplete$delegate,i,this._onerror$delegate,!0)},_oncomplete:function(n,t){if(n=Sys.Serialization.JavaScriptSerializer.deserialize(n),n.error)throw Error.create(n.error);this.loadClientState(n.state);t(n.result)},_onerror:function(n){throw Error.create(n);},_onsubmit:function(){return this._clientStateField&&(this._clientStateField.value=this.saveClientState()),!0}},Sys.Extended.UI.ControlBase.registerClass("Sys.Extended.UI.ControlBase",Sys.UI.Control),Type.registerNamespace("Sys.Extended.UI.Animation"),Sys.Extended.UI.Animation.AnimationBehavior=function(n){Sys.Extended.UI.Animation.AnimationBehavior.initializeBase(this,[n]);this._onLoad=null;this._onClick=null;this._onMouseOver=null;this._onMouseOut=null;this._onHoverOver=null;this._onHoverOut=null;this._onClickHandler=null;this._onMouseOverHandler=null;this._onMouseOutHandler=null},Sys.Extended.UI.Animation.AnimationBehavior.prototype={initialize:function(){Sys.Extended.UI.Animation.AnimationBehavior.callBaseMethod(this,"initialize");var n=this.get_element();n&&(this._onClickHandler=Function.createDelegate(this,this.playOnClick),$addHandler(n,"click",this._onClickHandler),this._onMouseOverHandler=Function.createDelegate(this,this.playOnMouseOver),$addHandler(n,"mouseover",this._onMouseOverHandler),this._onMouseOutHandler=Function.createDelegate(this,this.playOnMouseOut),$addHandler(n,"mouseout",this._onMouseOutHandler))},dispose:function(){var n=this.get_element();n&&(this._onClickHandler&&($removeHandler(n,"click",this._onClickHandler),this._onClickHandler=null),this._onMouseOverHandler&&($removeHandler(n,"mouseover",this._onMouseOverHandler),this._onMouseOverHandler=null),this._onMouseOutHandler&&($removeHandler(n,"mouseout",this._onMouseOutHandler),this._onMouseOutHandler=null));this._onLoad=null;this._onClick=null;this._onMouseOver=null;this._onMouseOut=null;this._onHoverOver=null;this._onHoverOut=null;Sys.Extended.UI.Animation.AnimationBehavior.callBaseMethod(this,"dispose")},get_onLoad:function(){return this._onLoad?this._onLoad.get_json():null},get_OnLoad:function(){return Sys.Extended.Deprecated("get_OnLoad()","get_onLoad()"),this.get_onLoad()},set_onLoad:function(n){this._onLoad||(this._onLoad=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onLoad.initialize());this._onLoad.set_json(n);this.raisePropertyChanged("OnLoad");this._onLoad.play()},set_OnLoad:function(n){Sys.Extended.Deprecated("set_OnLoad(value)","set_onLoad(value)");this.set_onLoad(n)},get_onLoadBehavior:function(){return this._onLoad},get_OnLoadBehavior:function(){return Sys.Extended.Deprecated("get_OnLoadBehavior()","get_OnLoadBehavior()"),this.get_onLoadBehavior()},get_onClick:function(){return this._onClick?this._onClick.get_json():null},get_OnClick:function(){return Sys.Extended.Deprecated("get_OnClick()","get_onClick()"),this.get_onClick()},set_OnClick:function(n){Sys.Extended.Deprecated("set_OnClick(value)","set_onClick(value)");this.set_onClick(n)},set_onClick:function(n){this._onClick||(this._onClick=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onClick.initialize());this._onClick.set_json(n);this.raisePropertyChanged("OnClick")},get_onClickBehavior:function(){return this._onClick},get_OnClickBehavior:function(){return Sys.Extended.Deprecated("get_OnClickBehavior()","get_onClickBehavior()"),this.get_onClickBehavior()},OnClick:function(){Sys.Extended.Deprecated("OnClick()");this.playOnClick()},playOnClick:function(){this._onClick&&this._onClick.play()},get_onMouseOver:function(){return this._onMouseOver?this._onMouseOver.get_json():null},get_OnMouseOver:function(){return Sys.Extended.Deprecated("get_OnMouseOver()","get_onMouseOver()"),this.get_onMouseOver()},set_onMouseOver:function(n){this._onMouseOver||(this._onMouseOver=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onMouseOver.initialize());this._onMouseOver.set_json(n);this.raisePropertyChanged("OnMouseOver")},set_OnMouseOver:function(n){Sys.Extended.Deprecated("set_OnMouseOver(value)","set_onMouseOver(value)");this.set_onMouseOver(n)},get_onMouseOverBehavior:function(){return this._onMouseOver},get_OnMouseOverBehavior:function(){Sys.Extended.Deprecated("get_OnMouseOverBehavior()","get_onMouseOverBehavior()")},OnMouseOver:function(){Sys.Extended.Deprecated("OnMouseOver()");this.playOnMouseOver()},playOnMouseOver:function(){this._mouseHasEntered||(this._onMouseOver&&this._onMouseOver.play(),this._onHoverOver&&(this._onHoverOut&&this._onHoverOut.quit(),this._onHoverOver.play()),this._mouseHasEntered=!0)},get_onMouseOut:function(){return this._onMouseOut?this._onMouseOut.get_json():null},get_OnMouseOut:function(){return Sys.Extended.Deprecated("get_OnMouseOut()","get_onMouseOut()"),this.get_onMouseOut()},set_onMouseOut:function(n){this._onMouseOut||(this._onMouseOut=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onMouseOut.initialize());this._onMouseOut.set_json(n);this.raisePropertyChanged("OnMouseOut")},set_OnMouseOut:function(n){Sys.Extended.Deprecated("set_OnMouseOut(value)","set_OnMouseOut(value)");this.set_onMouseOut(n)},get_onMouseOutBehavior:function(){return this._onMouseOut},get_OnMouseOutBehavior:function(){return Sys.Extended.Deprecated("get_OnMouseOutBehavior()","get_onMouseOutBehavior"),this.get_onMouseOutBehavior()},OnMouseOut:function(){Sys.Extended.Deprecated("OnMouseOut()");this.playOnMouseOut()},playOnMouseOut:function(n){var r=n.rawEvent,t=this.get_element(),u=n.target,i;u.nodeName===t.nodeName&&(i=r.relatedTarget||r.toElement,t==i||this._isChild(t,i)||(this._mouseHasEntered=!1,this._onMouseOut&&this._onMouseOut.play(),this._onHoverOut&&(this._onHoverOver&&this._onHoverOver.quit(),this._onHoverOut.play())))},_isChild:function(n,t){for(var i=document.body;t&&n!=t&&i!=t;)try{t=t.parentNode}catch(n){return!1}return n==t},get_onHoverOver:function(){return this._onHoverOver?this._onHoverOver.get_json():null},get_OnHoverOver:function(){return Sys.Extended.Deprecated("get_OnHoverOver()","get_onHoverOver"),this.get_onHoverOver()},set_onHoverOver:function(n){this._onHoverOver||(this._onHoverOver=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onHoverOver.initialize());this._onHoverOver.set_json(n);this.raisePropertyChanged("OnHoverOver")},set_OnHoverOver:function(n){Sys.Extended.Deprecated("set_OnHoverOver(value)","set_OnHoverOver(value)");this.set_onHoverOver(n)},get_onHoverOverBehavior:function(){return this._onHoverOver},get_OnHoverOverBehavior:function(){return Sys.Extended.Deprecated("get_OnHoverOverBehavior()","get_onHoverOverBehavior()"),this.get_onHoverOverBehavior()},get_onHoverOut:function(){return this._onHoverOut?this._onHoverOut.get_json():null},get_OnHoverOut:function(){return Sys.Extended.Deprecated("get_OnHoverOut()","get_onHoverOut()"),this.get_onHoverOut()},set_onHoverOut:function(n){this._onHoverOut||(this._onHoverOut=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onHoverOut.initialize());this._onHoverOut.set_json(n);this.raisePropertyChanged("OnHoverOut")},set_OnHoverOut:function(n){Sys.Extended.Deprecated("set_OnHoverOut(value)","set_onHoverOut(value)");this.set_onHoverOut(n)},get_onHoverOutBehavior:function(){return this._onHoverOut},get_OnHoverOutBehavior:function(){return Sys.Extended.Deprecated("get_OnHoverOutBehavior()","get_onHoverOutBehavior()"),this.get_onHoverOutBehavior()}},Sys.Extended.UI.Animation.AnimationBehavior.registerClass("Sys.Extended.UI.Animation.AnimationBehavior",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.Animation.GenericAnimationBehavior=function(n){Sys.Extended.UI.Animation.GenericAnimationBehavior.initializeBase(this,[n]);this._json=null;this._animation=null},Sys.Extended.UI.Animation.GenericAnimationBehavior.prototype={dispose:function(){this.disposeAnimation();Sys.Extended.UI.Animation.GenericAnimationBehavior.callBaseMethod(this,"dispose")},disposeAnimation:function(){this._animation&&this._animation.dispose();this._animation=null},play:function(){this._animation&&!this._animation.get_isPlaying()&&(this.stop(),this._animation.play())},stop:function(){this._animation&&this._animation.get_isPlaying()&&this._animation.stop(!0)},quit:function(){this._animation&&this._animation.get_isPlaying()&&this._animation.stop(!1)},get_json:function(){return this._json},set_json:function(n){if(this._json!=n){this._json=n;this.raisePropertyChanged("json");this.disposeAnimation();var t=this.get_element();t&&(this._animation=Sys.Extended.UI.Animation.buildAnimation(this._json,t),this._animation&&this._animation.initialize(),this.raisePropertyChanged("animation"))}},get_animation:function(){return this._animation}},Sys.Extended.UI.Animation.GenericAnimationBehavior.registerClass("Sys.Extended.UI.Animation.GenericAnimationBehavior",Sys.Extended.UI.BehaviorBase),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.PopupBehavior=function(n){Sys.Extended.UI.PopupBehavior.initializeBase(this,[n]);this._x=0;this._y=0;this._positioningMode=Sys.Extended.UI.PositioningMode.Absolute;this._parentElement=null;this._parentElementID=null;this._moveHandler=null;this._firstPopup=!0;this._originalParent=null;this._visible=!1;this._unselectable=null;this._onShow=null;this._onHide=null;this._onShowEndedHandler=Function.createDelegate(this,this._onShowEnded);this._onHideEndedHandler=Function.createDelegate(this,this._onHideEnded)},Sys.Extended.UI.PopupBehavior.prototype={initialize:function(){Sys.Extended.UI.PopupBehavior.callBaseMethod(this,"initialize");this._hidePopup();this.get_element().style.position="absolute"},dispose:function(){var n=this.get_element();n&&(this._visible&&this.hide(),this._originalParent&&(n.parentNode.removeChild(n),this._originalParent.appendChild(n),this._originalParent=null),n._hideWindowedElementsIFrame=null);this._parentElement=null;this._onShow&&this._onShow.get_animation()&&this._onShow.get_animation().remove_ended(this._onShowEndedHandler);this._onShow=null;this._onHide&&this._onHide.get_animation()&&this._onHide.get_animation().remove_ended(this._onHideEndedHandler);this._onHide=null;Sys.Extended.UI.PopupBehavior.callBaseMethod(this,"dispose")},show:function(){var n,t;this._visible||(n=new Sys.CancelEventArgs,(this.raise_showing(n),n.get_cancel())||(this._visible=!0,t=this.get_element(),$common.setVisible(t,!0),this.setupPopup(),this._onShow?($common.setVisible(t,!1),this.onShow()):this.raise_shown(Sys.EventArgs.Empty)))},hide:function(){if(this._visible){var n=new Sys.CancelEventArgs;this.raise_hiding(n);n.get_cancel()||(this._visible=!1,this._onHide?this.onHide():(this._hidePopup(),this._hideCleanup()))}},getBounds:function(){var f,n,i=this.get_element(),s=i.offsetParent||document.documentElement,e,r,u,o,t;this.get_parentElement()?(n=$common.getBounds(this.get_parentElement()),e=$common.getLocation(s),f={x:n.x-e.x,y:n.y-e.y}):(n=$common.getBounds(s),f={x:0,y:0});r=i.offsetWidth-(i.clientLeft?2*i.clientLeft:0);u=i.offsetHeight-(i.clientTop?2*i.clientTop:0);this._firstpopup&&(i.style.width=r+"px",this._firstpopup=!1);switch(this._positioningMode){case Sys.Extended.UI.PositioningMode.Center:t={x:Math.round(n.width/2-r/2),y:Math.round(n.height/2-u/2),altX:Math.round(n.width/2-r/2),altY:Math.round(n.height/2-u/2)};break;case Sys.Extended.UI.PositioningMode.BottomLeft:t={x:0,y:n.height,altX:n.width-r,altY:0-u};break;case Sys.Extended.UI.PositioningMode.BottomRight:t={x:n.width-r,y:n.height,altX:0,altY:0-u};break;case Sys.Extended.UI.PositioningMode.TopLeft:t={x:0,y:-i.offsetHeight,altX:n.width-r,altY:n.height};break;case Sys.Extended.UI.PositioningMode.TopRight:t={x:n.width-r,y:-i.offsetHeight,altX:0,altY:n.height};break;case Sys.Extended.UI.PositioningMode.Right:t={x:n.width,y:0,altX:-i.offsetWidth,altY:n.height-u};break;case Sys.Extended.UI.PositioningMode.Left:t={x:-i.offsetWidth,y:0,altX:n.width,altY:n.height-u};break;default:t={x:0,y:0,altX:0,altY:0}}return t.x+=this._x+f.x,t.altX+=this._x+f.x,t.y+=this._y+f.y,t.altY+=this._y+f.y,o=this._verifyPosition(t,r,u,n),new Sys.UI.Bounds(o.x,o.y,r,u)},_verifyPosition:function(n,t,i){var u=0,f=0,r=this._getWindowBounds(),e;return n.x+t>r.x+r.width||n.x<r.x?(u=n.altX,n.altX<r.x)?n.x>n.altX&&(u=n.x):r.width+r.x-n.altX<t&&(e=n.x>n.altX?Math.abs(r.x-n.x):r.x-n.x,e<t-r.width-r.x+n.altX&&(u=n.x)):u=n.x,n.y+i>r.y+r.height||n.y<r.y?(f=n.altY,n.altY<r.y?r.y-n.altY>i-r.height-r.y+n.y&&(f=n.y):r.height+r.y-n.altY<i&&r.y-n.y<i-r.height-r.y+n.altY&&(f=n.y)):f=n.y,{x:u,y:f}},_getWindowBounds:function(){return{x:this._getWindowScrollLeft(),y:this._getWindowScrollTop(),width:this._getWindowWidth(),height:this._getWindowHeight()}},_getWindowHeight:function(){var n=0;return document.documentElement&&document.documentElement.clientHeight?n=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(n=document.body.clientHeight),n},_getWindowWidth:function(){var n=0;return document.documentElement&&document.documentElement.clientWidth?n=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(n=document.body.clientWidth),n},_getWindowScrollTop:function(){var n=0;return"number"==typeof window.pageYOffset&&(n=window.pageYOffset),document.body&&document.body.scrollTop?n=document.body.scrollTop:document.documentElement&&document.documentElement.scrollTop&&(n=document.documentElement.scrollTop),n},_getWindowScrollLeft:function(){var n=0;return"number"==typeof window.pageXOffset?n=window.pageXOffset:document.body&&document.body.scrollLeft?n=document.body.scrollLeft:document.documentElement&&document.documentElement.scrollLeft&&(n=document.documentElement.scrollLeft),n},adjustPopupPosition:function(n){var r=this.get_element(),t,i;n||(n=this.getBounds());t=$common.getBounds(r);i=!1;t.x<0&&(n.x-=t.x,i=!0);t.y<0&&(n.y-=t.y,i=!0);i&&$common.setLocation(r,n)},addBackgroundIFrame:function(){var t=this.get_element(),n;Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7&&(n=t._hideWindowedElementsIFrame,n||(n=document.createElement("iframe"),n.src="javascript:'<html><\/html>';",n.style.position="absolute",n.style.display="none",n.scrolling="no",n.frameBorder="0",n.tabIndex="-1",n.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)",t.parentNode.insertBefore(n,t),t._hideWindowedElementsIFrame=n,this._moveHandler=Function.createDelegate(this,this._onMove),Sys.UI.DomEvent.addHandler(t,"move",this._moveHandler)),$common.setBounds(n,$common.getBounds(t)),n.style.left=t.style.left,n.style.top=t.style.top,n.style.display=t.style.display,t.currentStyle&&t.currentStyle.zIndex?n.style.zIndex=t.currentStyle.zIndex:t.style.zIndex&&(n.style.zIndex=t.style.zIndex))},setupPopup:function(){var n=this.get_element(),t=this.getBounds();$common.setLocation(n,t);this.adjustPopupPosition(t);n.style.zIndex=Sys.Extended.UI.zIndex.Popup;this.addBackgroundIFrame()},_hidePopup:function(){var n=this.get_element();$common.setVisible(n,!1);n.originalWidth&&(n.style.width=n.originalWidth+"px",n.originalWidth=null)},_hideCleanup:function(){var t=this.get_element(),n;(this._moveHandler&&(Sys.UI.DomEvent.removeHandler(t,"move",this._moveHandler),this._moveHandler=null),Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(n=t._hideWindowedElementsIFrame,n&&(n.style.display="none"));this.raise_hidden(Sys.EventArgs.Empty)},_onMove:function(){var n=this.get_element();n._hideWindowedElementsIFrame&&(n.parentNode.insertBefore(n._hideWindowedElementsIFrame,n),n._hideWindowedElementsIFrame.style.top=n.style.top,n._hideWindowedElementsIFrame.style.left=n.style.left)},get_onShow:function(){return this._onShow?this._onShow.get_json():null},set_onShow:function(n){this._onShow||(this._onShow=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onShow.initialize());this._onShow.set_json(n);var t=this._onShow.get_animation();t&&t.add_ended(this._onShowEndedHandler);this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._onShow},onShow:function(){this._onShow&&(this._onHide&&this._onHide.quit(),this._onShow.play())},_onShowEnded:function(){this.adjustPopupPosition();this.addBackgroundIFrame();this.raise_shown(Sys.EventArgs.Empty)},get_onHide:function(){return this._onHide?this._onHide.get_json():null},set_onHide:function(n){this._onHide||(this._onHide=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onHide.initialize());this._onHide.set_json(n);var t=this._onHide.get_animation();t&&t.add_ended(this._onHideEndedHandler);this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._onHide},onHide:function(){this._onHide&&(this._onShow&&this._onShow.quit(),this._onHide.play())},_onHideEnded:function(){this._hideCleanup()},get_parentElement:function(){return!this._parentElement&&this._parentElementID&&this.set_parentElement($get(this._parentElementID)),this._parentElement},set_parentElement:function(n){this._parentElement=n;this.raisePropertyChanged("parentElement")},get_parentElementID:function(){return this._parentElement?this._parentElement.id:this._parentElementID},set_parentElementID:function(n){this._parentElementID=n;this.get_isInitialized()&&this.set_parentElement($get(n))},get_positioningMode:function(){return this._positioningMode},set_positioningMode:function(n){this._positioningMode=n;this.raisePropertyChanged("positioningMode")},get_x:function(){return this._x},set_x:function(n){n!=this._x&&(this._x=n,this._visible&&this.setupPopup(),this.raisePropertyChanged("x"))},get_y:function(){return this._y},set_y:function(n){n!=this._y&&(this._y=n,this._visible&&this.setupPopup(),this.raisePropertyChanged("y"))},get_visible:function(){return this._visible},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raise_showing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},raiseShowing:function(n){Sys.Extended.Deprecated("raiseShowing(eventArgs)","raise_showing(eventArgs)");this.raise_showing(n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raise_shown:function(n){var t=this.get_events().getHandler("shown");t&&t(this,n)},raiseShown:function(n){Sys.Extended.Deprecated("raiseShown(eventArgs)","raise_shown(eventArgs)");this.raise_shown(n)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raise_hiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},raiseHiding:function(n){Sys.Extended.Deprecated("raiseHiding(eventArgs)","raise_hiding(eventArgs)");this.raise_hiding(n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raise_hidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)},raiseHidden:function(n){Sys.Extended.Deprecated("raiseHidden(eventArgs)","raise_hidden(eventArgs)");this.raise_hidden(n)},get_unselectable:function(){return this._unselectable},set_unselectable:function(n){this._unselectable=n;this.raisePropertyChanged("unselectable")}},Sys.Extended.UI.PopupBehavior.registerClass("Sys.Extended.UI.PopupBehavior",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.PositioningMode=function(){throw Error.invalidOperation();},Sys.Extended.UI.PositioningMode.prototype={Absolute:0,Center:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5,Right:6,Left:7},Sys.Extended.UI.PositioningMode.registerEnum("Sys.Extended.UI.PositioningMode"),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.DeferredOperation=function(n,t,i){this._delay=n;this._context=t;this._callback=i;this._completeCallback=null;this._errorCallback=null;this._timer=null;this._callArgs=null;this._isComplete=!1;this._completedSynchronously=!1;this._asyncResult=null;this._exception=null;this._throwExceptions=!0;this._oncomplete$delegate=Function.createDelegate(this,this._oncomplete);this.post=Function.createDelegate(this,this.post)},Sys.Extended.UI.DeferredOperation.prototype={get_isPending:function(){return null!=this._timer},get_isComplete:function(){return this._isComplete},get_completedSynchronously:function(){return this._completedSynchronously},get_exception:function(){return this._exception},get_throwExceptions:function(){return this._throwExceptions},set_throwExceptions:function(n){this._throwExceptions=n},get_delay:function(){return this._delay},set_delay:function(n){this._delay=n},post:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.beginPost(t,null,null)},beginPost:function(n,t,i){if(this.cancel(),this._callArgs=Array.clone(n||[]),this._completeCallback=t,this._errorCallback=i,this._delay==-1)try{this._oncomplete()}finally{this._completedSynchronously=!0}else this._timer=setTimeout(this._oncomplete$delegate,this._delay)},cancel:function(){this._timer&&(clearTimeout(this._timer),this._timer=null);this._callArgs=null;this._isComplete=!1;this._asyncResult=null;this._completeCallback=null;this._errorCallback=null;this._exception=null;this._completedSynchronously=!1},call:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.cancel();this._callArgs=t;this._completeCallback=null;this._errorCallback=null;try{this._oncomplete()}finally{this._completedSynchronously=!0}if(this._exception)throw this._exception;return this._asyncResult},complete:function(){if(this._timer){try{this._oncomplete()}finally{this._completedSynchronously=!0}return this._asyncResult}if(this._isComplete)return this._asyncResult},_oncomplete:function(){var n=this._callArgs,t=this._completeCallback,i=this._errorCallback;this.cancel();try{this._asyncResult=n?this._callback.apply(this._context,n):this._callback.call(this._context);this._isComplete=!0;this._completedSynchronously=!1;t&&t(this)}catch(n){if(this._isComplete=!0,this._completedSynchronously=!1,this._exception=n,i&&i(this))return;if(this._throwExceptions)throw n;}}},Sys.Extended.UI.DeferredOperation.registerClass("Sys.Extended.UI.DeferredOperation"),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.CalendarBehavior=function(n){Sys.Extended.UI.CalendarBehavior.initializeBase(this,[n]);this._textbox=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n);this._format="d";this._todaysDateFormat="MMMM d, yyyy";this._daysModeTitleFormat="MMMM, yyyy";this._cssClass="ajax__calendar";this._enabled=!0;this._animated=!0;this._buttonID=null;this._layoutRequested=0;this._layoutSuspended=!1;this._button=null;this._popupMouseDown=!1;this._selectedDate=null;this._startDate=null;this._endDate=null;this._visibleDate=null;this._todaysDate=null;this._firstDayOfWeek=Sys.Extended.UI.FirstDayOfWeek.Default;this._firstPopUp=!0;this._container=null;this._popupDiv=null;this._header=null;this._prevArrow=null;this._nextArrow=null;this._title=null;this._body=null;this._today=null;this._days=null;this._daysTable=null;this._daysTableHeader=null;this._daysTableHeaderRow=null;this._daysBody=null;this._months=null;this._monthsTable=null;this._monthsBody=null;this._years=null;this._yearsTable=null;this._yearsBody=null;this._popupPosition=Sys.Extended.UI.CalendarPosition.BottomLeft;this._defaultView=Sys.Extended.UI.CalendarDefaultView.Days;this._popupBehavior=null;this._modeChangeAnimation=null;this._modeChangeMoveTopOrLeftAnimation=null;this._modeChangeMoveBottomOrRightAnimation=null;this._mode="days";this._selectedDateChanging=!1;this._isOpen=!1;this._isAnimating=!1;this._clearTime=!1;this._width=170;this._height=139;this._modes={days:null,months:null,years:null};this._modeOrder={days:0,months:1,years:2};this._blur=new Sys.Extended.UI.DeferredOperation(1,this,this.blur);this._button$delegates={click:Function.createDelegate(this,this._button_onclick),keypress:Function.createDelegate(this,this._button_onkeypress),blur:Function.createDelegate(this,this._button_onblur)};this._element$delegates={change:Function.createDelegate(this,this._element_onchange),keypress:Function.createDelegate(this,this._element_onkeypress),click:Function.createDelegate(this,this._element_onclick),focus:Function.createDelegate(this,this._element_onfocus),blur:Function.createDelegate(this,this._element_onblur)};this._popup$delegates={mousedown:Function.createDelegate(this,this._popup_onmousedown),mouseup:Function.createDelegate(this,this._popup_onmouseup),drag:Function.createDelegate(this,this._popup_onevent),dragstart:Function.createDelegate(this,this._popup_onevent)};this._cell$delegates={mouseover:Function.createDelegate(this,this._cell_onmouseover),mouseout:Function.createDelegate(this,this._cell_onmouseout),click:Function.createDelegate(this,this._cell_onclick)}},Sys.Extended.UI.CalendarBehavior.prototype={get_clearTime:function(){return this._clearTime},set_clearTime:function(n){this._clearTime!=n&&(this._clearTime=n,this.raisePropertyChanged("clearTime"))},get_animated:function(){return this._animated},set_animated:function(n){this._animated!=n&&(this._animated=n,this.raisePropertyChanged("animated"))},get_enabled:function(){return this._enabled},set_enabled:function(n){this._enabled!=n&&(this._enabled=n,this.raisePropertyChanged("enabled"))},get_button:function(){return this._button},set_button:function(n){this._button!=n&&(this._button&&this.get_isInitialized()&&$common.removeHandlers(this._button,this._button$delegates),this._button=n,this._button&&this.get_isInitialized()&&$addHandlers(this._button,this._button$delegates),this.raisePropertyChanged("button"))},get_popupPosition:function(){return this._popupPosition},set_popupPosition:function(n){this._popupPosition!=n&&(this._popupPosition=n,this.raisePropertyChanged("popupPosition"))},get_startDate:function(){return this._startDate},set_startDate:function(n){this._startDate!=n&&(this._startDate=this._parseDateSortableFormat(n),this.raisePropertyChanged("startDate"))},get_endDate:function(){return this._endDate},set_endDate:function(n){this._endDate!=n&&(this._endDate=this._parseDateSortableFormat(n),this.raisePropertyChanged("endDate"))},get_format:function(){return this._format},set_format:function(n){this._format!=n&&(this._format=n,this.raisePropertyChanged("format"))},get_todaysDateFormat:function(){return this._todaysDateFormat},set_todaysDateFormat:function(n){this._todaysDateFormat!=n&&(this._todaysDateFormat=n,this.raisePropertyChanged("todaysDateFormat"))},get_daysModeTitleFormat:function(){return this._daysModeTitleFormat},set_daysModeTitleFormat:function(n){this._daysModeTitleFormat!=n&&(this._daysModeTitleFormat=n,this.raisePropertyChanged("daysModeTitleFormat"))},get_selectedDate:function(){if(null==this._selectedDate){var n=this._textbox.get_Value();n&&(n=this._parseTextValue(n),n&&(this._selectedDate=n))}return this._selectedDate},set_selectedDate:function(n){var i,t;(n&&String.isInstanceOfType(n)&&0!=n.length&&(n=this._parseDateSortableFormat(n)),this._selectedDate!=n)&&(this._selectedDate=n,this._selectedDateChanging=!0,i="",n&&(i=n.localeFormat(this._format),!this._clearTime)&&(t=this._textbox.get_Value(),t&&(t=this._parseTextValue(t)),t&&n!=t.getDateOnly()&&(n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds()),n.setMilliseconds(t.getMilliseconds()),i=n.localeFormat(this._format))),i!=this._textbox.get_Value()&&(this._textbox.set_Value(i),this._fireChanged()),this._selectedDateChanging=!1,this.invalidate(),this.raisePropertyChanged("selectedDate"))},get_defaultView:function(){return this._defaultView},set_defaultView:function(n){this._defaultView!=n&&(this._defaultView=n,this.raisePropertyChanged("defaultView"))},get_visibleDate:function(){return this._visibleDate},set_visibleDate:function(n){n&&String.isInstanceOfType(n)&&0!=n.length&&(n=new Date(n));this._visibleDate!=n&&(this._switchView(n,Sys.Extended.UI.CalendarSwitchViewMode.RangeZoom,!this._isOpen),this.raisePropertyChanged("visibleDate"))},get_isOpen:function(){return this._isOpen},get_todaysDate:function(){return null!=this._todaysDate?this._todaysDate:new Date},set_todaysDate:function(n){this._todaysDate!=n&&(this._todaysDate=n,this.invalidate(),this.raisePropertyChanged("todaysDate"))},get_firstDayOfWeek:function(){return this._firstDayOfWeek},set_firstDayOfWeek:function(n){this._firstDayOfWeek!=n&&(this._firstDayOfWeek=n,this.invalidate(),this.raisePropertyChanged("firstDayOfWeek"))},get_cssClass:function(){return this._cssClass},set_cssClass:function(n){this._cssClass!=n&&(this._cssClass&&this.get_isInitialized()&&Sys.UI.DomElement.removeCssClass(this._container,this._cssClass),this._cssClass=n,this._cssClass&&this.get_isInitialized()&&Sys.UI.DomElement.addCssClass(this._container,this._cssClass),this.raisePropertyChanged("cssClass"))},get_todayButton:function(){return this._today},get_dayCell:function(n,t){return this._daysBody?this._daysBody.rows[n].cells[t].firstChild:null},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raise_showing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},raiseShowing:function(n){Sys.Extended.Deprecated("raiseShowing(eventArgs)","raise_showing(eventArgs)");this.raise_showing(n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raise_shown:function(){var n=this.get_events().getHandler("shown");n&&n(this,Sys.EventArgs.Empty)},raiseShown:function(){Sys.Extended.Deprecated("raiseShown","raise_shown");this.raise_shown()},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raise_hiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},raiseHiding:function(n){Sys.Extended.Deprecated("raiseHiding(eventArgs)","raise_hiding(eventArgs)");this.raise_hiding(n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raise_hidden:function(){var n=this.get_events().getHandler("hidden");n&&n(this,Sys.EventArgs.Empty)},raiseHidden:function(){Sys.Extended.Deprecated("raiseHidden","raise_hidden");this.raise_hidden()},add_dateSelectionChanged:function(n){this.get_events().addHandler("dateSelectionChanged",n)},remove_dateSelectionChanged:function(n){this.get_events().removeHandler("dateSelectionChanged",n)},raise_dateSelectionChanged:function(){var n=this.get_events().getHandler("dateSelectionChanged");n&&n(this,Sys.EventArgs.Empty)},raiseDateSelectionChanged:function(){Sys.Extended.Deprecated("raiseDateSelectionChanged","raise_dateSelectionChanged");this.raise_dateSelectionChanged()},initialize:function(){var t,n;Sys.Extended.UI.CalendarBehavior.callBaseMethod(this,"initialize");t=this.get_element();$addHandlers(t,this._element$delegates);this._button&&$addHandlers(this._button,this._button$delegates);this._modeChangeMoveTopOrLeftAnimation=new Sys.Extended.UI.Animation.LengthAnimation(null,null,null,"style",null,0,0,"px");this._modeChangeMoveBottomOrRightAnimation=new Sys.Extended.UI.Animation.LengthAnimation(null,null,null,"style",null,0,0,"px");this._modeChangeAnimation=new Sys.Extended.UI.Animation.ParallelAnimation(null,.25,null,[this._modeChangeMoveTopOrLeftAnimation,this._modeChangeMoveBottomOrRightAnimation]);n=this.get_selectedDate();n&&this.set_selectedDate(n)},dispose:function(){var n,i,t,r;if(this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null),this._modes=null,this._modeOrder=null,this._modeChangeMoveTopOrLeftAnimation&&(this._modeChangeMoveTopOrLeftAnimation.dispose(),this._modeChangeMoveTopOrLeftAnimation=null),this._modeChangeMoveBottomOrRightAnimation&&(this._modeChangeMoveBottomOrRightAnimation.dispose(),this._modeChangeMoveBottomOrRightAnimation=null),this._modeChangeAnimation&&(this._modeChangeAnimation.dispose(),this._modeChangeAnimation=null),this._container&&(this._container.parentNode&&this._container.parentNode.removeChild(this._container),this._container=null),this._popupDiv&&($common.removeHandlers(this._popupDiv,this._popup$delegates),this._popupDiv=null),this._prevArrow&&($common.removeHandlers(this._prevArrow,this._cell$delegates),this._prevArrow=null),this._nextArrow&&($common.removeHandlers(this._nextArrow,this._cell$delegates),this._nextArrow=null),this._title&&($common.removeHandlers(this._title,this._cell$delegates),this._title=null),this._today&&($common.removeHandlers(this._today,this._cell$delegates),this._today=null),this._button&&($common.removeHandlers(this._button,this._button$delegates),this._button=null),this._daysBody){for(n=0;n<this._daysBody.rows.length;n++)for(i=this._daysBody.rows[n],t=0;t<i.cells.length;t++)$common.removeHandlers(i.cells[t].firstChild,this._cell$delegates);this._daysBody=null}if(this._monthsBody){for(n=0;n<this._monthsBody.rows.length;n++)for(i=this._monthsBody.rows[n],t=0;t<i.cells.length;t++)$common.removeHandlers(i.cells[t].firstChild,this._cell$delegates);this._monthsBody=null}if(this._yearsBody){for(n=0;n<this._yearsBody.rows.length;n++)for(i=this._yearsBody.rows[n],t=0;t<i.cells.length;t++)$common.removeHandlers(i.cells[t].firstChild,this._cell$delegates);this._yearsBody=null}r=this.get_element();$common.removeHandlers(r,this._element$delegates);Sys.Extended.UI.CalendarBehavior.callBaseMethod(this,"dispose")},show:function(){if(this._ensureCalendar(),!this._isOpen){var n=new Sys.CancelEventArgs;if(this.raise_showing(n),n.get_cancel())return;if(this._isOpen=!0,this._popupBehavior.show(),this._firstPopUp){switch(this._switchView(null,Sys.Extended.UI.CalendarSwitchViewMode.RangeZoom,!0),this._defaultView){case Sys.Extended.UI.CalendarDefaultView.Months:this._switchMode("months",!0);break;case Sys.Extended.UI.CalendarDefaultView.Years:this._switchMode("years",!0)}this._firstPopUp=!1}this.raise_shown()}},hide:function(){if(this._isOpen){var n=new Sys.CancelEventArgs;if(this.raise_hiding(n),n.get_cancel())return;this._container&&this._popupBehavior.hide();this._isOpen=!1;this.raise_hidden();this._popupMouseDown=!1}},focus:function(){this._button?this._button.focus():this.get_element().focus()},blur:function(n){n||Sys.Browser.agent!==Sys.Browser.Opera?(this._popupMouseDown||this.hide(),this._popupMouseDown=!1):this._blur.post(!0)},suspendLayout:function(){this._layoutSuspended++},resumeLayout:function(){this._layoutSuspended--;this._layoutSuspended<=0&&(this._layoutSuspended=0,this._layoutRequested&&this._performLayout())},invalidate:function(){this._layoutSuspended>0?this._layoutRequested=!0:this._performLayout()},_buildCalendar:function(){var t=this.get_element(),n=this.get_id();this._container=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_container"},cssClasses:[this._cssClass],visible:!1},t.parentNode);this._popupDiv=$common.createElementFromTemplate({nodeName:"div",events:this._popup$delegates,properties:{id:n+"_popupDiv"},cssClasses:["ajax__calendar_container"]},this._container)},_buildHeader:function(){var n=this.get_id(),t,i,r;this._header=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_header"},cssClasses:["ajax__calendar_header"]},this._popupDiv);t=$common.createElementFromTemplate({nodeName:"div"},this._header);this._prevArrow=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_prevArrow",mode:"prev"},events:this._cell$delegates,cssClasses:["ajax__calendar_prev"]},t);i=$common.createElementFromTemplate({nodeName:"div"},this._header);this._nextArrow=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_nextArrow",mode:"next"},events:this._cell$delegates,cssClasses:["ajax__calendar_next"]},i);r=$common.createElementFromTemplate({nodeName:"div"},this._header);this._title=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_title",mode:"title"},events:this._cell$delegates,cssClasses:["ajax__calendar_title"]},r)},_buildBody:function(){this._body=$common.createElementFromTemplate({nodeName:"div",properties:{id:this.get_id()+"_body"},cssClasses:["ajax__calendar_body"]},this._popupDiv);this._buildDays();this._buildMonths();this._buildYears()},_buildFooter:function(){var n=$common.createElementFromTemplate({nodeName:"div"},this._popupDiv);this._today=$common.createElementFromTemplate({nodeName:"div",properties:{id:this.get_id()+"_today",mode:"today"},events:this._cell$delegates,cssClasses:["ajax__calendar_footer","ajax__calendar_today"]},n)},_buildDays:function(){var t=(Sys.CultureInfo.CurrentCulture.dateTimeFormat,this.get_id()),n,u,r,i;for(this._days=$common.createElementFromTemplate({nodeName:"div",properties:{id:t+"_days"},cssClasses:["ajax__calendar_days"]},this._body),this._modes.days=this._days,this._daysTable=$common.createElementFromTemplate({nodeName:"table",properties:{id:t+"_daysTable",style:{margin:"auto"}}},this._days),this._daysTableHeader=$common.createElementFromTemplate({nodeName:"thead",properties:{id:t+"_daysTableHeader"}},this._daysTable),this._daysTableHeaderRow=$common.createElementFromTemplate({nodeName:"tr",properties:{id:t+"_daysTableHeaderRow"}},this._daysTableHeader),n=0;n<7;n++)i=$common.createElementFromTemplate({nodeName:"td"},this._daysTableHeaderRow),$common.createElementFromTemplate({nodeName:"div",cssClasses:["ajax__calendar_dayname"]},i);for(this._daysBody=$common.createElementFromTemplate({nodeName:"tbody",properties:{id:t+"_daysBody"}},this._daysTable),n=0;n<6;n++)for(u=$common.createElementFromTemplate({nodeName:"tr"},this._daysBody),r=0;r<7;r++)i=$common.createElementFromTemplate({nodeName:"td"},u),$common.createElementFromTemplate({nodeName:"div",properties:{mode:"day",id:t+"_day_"+n+"_"+r,innerHTML:"&nbsp;"},events:this._cell$delegates,cssClasses:["ajax__calendar_day"]},i)},_buildMonths:function(){var f=Sys.CultureInfo.CurrentCulture.dateTimeFormat,i=this.get_id(),n,r,t,u;for(this._months=$common.createElementFromTemplate({nodeName:"div",properties:{id:i+"_months"},cssClasses:["ajax__calendar_months"],visible:!1},this._body),this._modes.months=this._months,this._monthsTable=$common.createElementFromTemplate({nodeName:"table",properties:{id:i+"_monthsTable",style:{margin:"auto"}}},this._months),this._monthsBody=$common.createElementFromTemplate({nodeName:"tbody",properties:{id:i+"_monthsBody"}},this._monthsTable),n=0;n<3;n++)for(r=$common.createElementFromTemplate({nodeName:"tr"},this._monthsBody),t=0;t<4;t++)u=$common.createElementFromTemplate({nodeName:"td"},r),$common.createElementFromTemplate({nodeName:"div",properties:{id:i+"_month_"+n+"_"+t,mode:"month",month:4*n+t,innerHTML:"<br />"+f.AbbreviatedMonthNames[4*n+t]},events:this._cell$delegates,cssClasses:["ajax__calendar_month"]},u)},_buildYears:function(){var i=this.get_id(),n,r,t,u;for(this._years=$common.createElementFromTemplate({nodeName:"div",properties:{id:i+"_years"},cssClasses:["ajax__calendar_years"],visible:!1},this._body),this._modes.years=this._years,this._yearsTable=$common.createElementFromTemplate({nodeName:"table",properties:{id:i+"_yearsTable",style:{margin:"auto"}}},this._years),this._yearsBody=$common.createElementFromTemplate({nodeName:"tbody",properties:{id:i+"_yearsBody"}},this._yearsTable),n=0;n<3;n++)for(r=$common.createElementFromTemplate({nodeName:"tr"},this._yearsBody),t=0;t<4;t++)u=$common.createElementFromTemplate({nodeName:"td"},r),$common.createElementFromTemplate({nodeName:"div",properties:{id:i+"_year_"+n+"_"+t,mode:"year",year:4*n+t-1},events:this._cell$delegates,cssClasses:["ajax__calendar_year"]},u)},_isInDateRange:function(n,t,i){var r,u;switch(t){case"d":if(this._startDate&&this._getDateOnly(n)<this._getDateOnly(this._startDate)||this._endDate&&this._getDateOnly(n)>this._getDateOnly(this._endDate))return!1;break;case"M":if(this._startDate&&this._getMonthOnly(n)<this._getMonthOnly(this._startDate)||this._endDate&&this._getMonthOnly(n)>this._getMonthOnly(this._endDate))return!1;break;case"y":if(this._startDate&&n.getFullYear()<this._startDate.getFullYear()||this._endDate&&n.getFullYear()>this._endDate.getFullYear())return!1;break;case"yy":return this._startDate&&this._endDate?this._isInYearsDateRange(n,i):!this._startDate&&!this._endDate?!0:(r=this._getRangeStartYear(n),this._endDate&&r<this._endDate.getFullYear())?!0:(u=this._getRangeEndYear(n),!!(this._startDate&&u>this._startDate.getFullYear()))}return!0},_isInYearsDateRange:function(n,t){var i=this._getRangeStartYear(n),r=this._getRangeEndYear(n);switch(t){case Sys.Extended.UI.CalendarSwitchViewMode.PreviousRange:return r>this._startDate.getFullYear();case Sys.Extended.UI.CalendarSwitchViewMode.NextRange:return i<this._endDate.getFullYear();case Sys.Extended.UI.CalendarSwitchViewMode.RangeZoom:return i>this._startDate.getFullYear()&&r<this._endDate.getFullYear();default:throw Error.invalidOperation();}},_getRangeStartYear:function(n){return n.getFullYear()},_getRangeEndYear:function(n){return n.getFullYear()+9},_getDateOnly:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())},_getMonthOnly:function(n){return new Date(n.getFullYear(),n.getMonth(),1)},_performLayout:function(){var p=this.get_element(),v,s,h,u,c,y,l,t,o,r,e,f,n;if(p&&this.get_isInitialized()&&this._isOpen){var w=Sys.CultureInfo.CurrentCulture.dateTimeFormat,i=(this.get_selectedDate(),this._getEffectiveVisibleDate()),a=this.get_todaysDate();switch(this._mode){case"days":for(v=this._getFirstDayOfWeek(),s=i.getDay()-v,s<=0&&(s+=7),h=new Date(i),h.setDate(h.getDate()-s),u=new Date(h),r=0;r<7;r++)t=this._daysTableHeaderRow.cells[r].firstChild,t.firstChild&&t.removeChild(t.firstChild),t.appendChild(document.createTextNode(w.ShortestDayNames[(r+v)%7]));for(c=0;c<6;c++)for(y=this._daysBody.rows[c],l=0;l<7;l++)t=y.cells[l].firstChild,t.firstChild&&t.removeChild(t.firstChild),t.appendChild(document.createTextNode(u.getDate())),t.title=u.localeFormat("D"),t.date=u,$common.removeCssClasses(t.parentNode,["ajax__calendar_other","ajax__calendar_active","ajax__calendar_today"]),this._isInDateRange(u,"d")?($common.removeCssClasses(t.parentNode,["ajax__calendar_invalid","ajax__calendar_other","ajax__calendar_active",""]),Sys.UI.DomElement.addCssClass(t.parentNode,this._getCssClass(t.date,"d"))):($common.removeCssClasses(t.parentNode,["ajax__calendar_other","ajax__calendar_active"]),Sys.UI.DomElement.addCssClass(t.parentNode,"ajax__calendar_invalid")),u=new Date(u),u.setDate(u.getDate()+1);this._prevArrow.date=new Date(i.getFullYear(),i.getMonth()-1,1);this._nextArrow.date=new Date(i.getFullYear(),i.getMonth()+1,1);this._title.firstChild&&this._title.removeChild(this._title.firstChild);this._title.appendChild(document.createTextNode(i.localeFormat(this.get_daysModeTitleFormat())));this._title.date=i;break;case"months":for(r=0;r<this._monthsBody.rows.length;r++)for(e=this._monthsBody.rows[r],f=0;f<e.cells.length;f++)n=e.cells[f].firstChild,n.date=new Date(i.getFullYear(),n.month,1),n.title=n.date.localeFormat("Y"),this._isInDateRange(n.date,"M")?($common.removeCssClasses(n.parentNode,["ajax__calendar_invalid","ajax__calendar_other","ajax__calendar_active"]),Sys.UI.DomElement.addCssClass(n.parentNode,this._getCssClass(n.date,"M"))):($common.removeCssClasses(n.parentNode,["ajax__calendar_other","ajax__calendar_active"]),Sys.UI.DomElement.addCssClass(n.parentNode,"ajax__calendar_invalid"));this._title.firstChild&&this._title.removeChild(this._title.firstChild);this._title.appendChild(document.createTextNode(i.localeFormat("yyyy")));this._title.date=i;this._prevArrow.date=new Date(i.getFullYear()-1,0,1);this._nextArrow.date=new Date(i.getFullYear()+1,0,1);break;case"years":for(o=10*Math.floor(i.getFullYear()/10),r=0;r<this._yearsBody.rows.length;r++)for(e=this._yearsBody.rows[r],f=0;f<e.cells.length;f++)n=e.cells[f].firstChild,n.date=new Date(o+n.year,0,1),n.firstChild?n.removeChild(n.lastChild):n.appendChild(document.createElement("br")),n.appendChild(document.createTextNode(o+n.year)),this._isInDateRange(n.date,"y")?($common.removeCssClasses(n.parentNode,["ajax__calendar_invalid","ajax__calendar_other","ajax__calendar_active"]),Sys.UI.DomElement.addCssClass(n.parentNode,this._getCssClass(n.date,"y"))):($common.removeCssClasses(n.parentNode,["ajax__calendar_other","ajax__calendar_active"]),Sys.UI.DomElement.addCssClass(n.parentNode,"ajax__calendar_invalid"));this._title.firstChild&&this._title.removeChild(this._title.firstChild);this._title.appendChild(document.createTextNode(o.toString()+"-"+(o+9).toString()));this._title.date=i;this._prevArrow.date=new Date(o-10,0,1);this._nextArrow.date=new Date(o+10,0,1)}this._today.firstChild&&this._today.removeChild(this._today.firstChild);$common.removeCssClasses(this._today.parentNode,["ajax__calendar_invalid"]);this._today.appendChild(document.createTextNode(String.format(Sys.Extended.UI.Resources.Calendar_Today,a.localeFormat(this.get_todaysDateFormat()))));this._isInDateRange(a,"d")||Sys.UI.DomElement.addCssClass(this._today.parentNode,"ajax__calendar_invalid");this._today.date=a}},_ensureCalendar:function(){if(!this._container){var n=this.get_element();this._buildCalendar();this._buildHeader();this._buildBody();this._buildFooter();this._popupBehavior=new $create(Sys.Extended.UI.PopupBehavior,{parentElement:n},{},{},this._container);this._popupPosition==Sys.Extended.UI.CalendarPosition.TopLeft?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopLeft):this._popupPosition==Sys.Extended.UI.CalendarPosition.TopRight?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopRight):this._popupPosition==Sys.Extended.UI.CalendarPosition.BottomRight?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomRight):this._popupPosition==Sys.Extended.UI.CalendarPosition.Right?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Right):this._popupPosition==Sys.Extended.UI.CalendarPosition.Left?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Left):this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomLeft)}},_fireChanged:function(){var t=this.get_element(),n;document.createEventObject?t.fireEvent("onchange"):document.createEvent&&(n=document.createEvent("HTMLEvents"),n.initEvent("change",!0,!0),t.dispatchEvent(n))},_switchView:function(n,t,i){if(!this._isAnimating&&(!n||this._canSwitchMonth(n,t))){var r=this._getEffectiveVisibleDate();n&&n.getFullYear()==r.getFullYear()&&n.getMonth()==r.getMonth()&&(i=!0);this._animated&&!i?this._animateViewSwitch(n,r):(this._visibleDate=n,this.invalidate())}},_animateViewSwitch:function(n,t){var r,i,u;this._isAnimating=!0;r=this._modes[this._mode];i=r.cloneNode(!0);this._body.appendChild(i);t>n?($common.setLocation(r,{x:-162,y:0}),$common.setVisible(r,!0),this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("left"),this._modeChangeMoveTopOrLeftAnimation.set_target(r),this._modeChangeMoveTopOrLeftAnimation.set_startValue(-this._width),this._modeChangeMoveTopOrLeftAnimation.set_endValue(0),$common.setLocation(i,{x:0,y:0}),$common.setVisible(i,!0),this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("left"),this._modeChangeMoveBottomOrRightAnimation.set_target(i),this._modeChangeMoveBottomOrRightAnimation.set_startValue(0),this._modeChangeMoveBottomOrRightAnimation.set_endValue(this._width)):($common.setLocation(i,{x:0,y:0}),$common.setVisible(i,!0),this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("left"),this._modeChangeMoveTopOrLeftAnimation.set_target(i),this._modeChangeMoveTopOrLeftAnimation.set_endValue(-this._width),this._modeChangeMoveTopOrLeftAnimation.set_startValue(0),$common.setLocation(r,{x:162,y:0}),$common.setVisible(r,!0),this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("left"),this._modeChangeMoveBottomOrRightAnimation.set_target(r),this._modeChangeMoveBottomOrRightAnimation.set_endValue(0),this._modeChangeMoveBottomOrRightAnimation.set_startValue(this._width));this._visibleDate=n;this.invalidate();u=Function.createDelegate(this,function(){this._body.removeChild(i);i=null;this._isAnimating=!1;this._modeChangeAnimation.remove_ended(u)});this._modeChangeAnimation.add_ended(u);this._modeChangeAnimation.play()},_canSwitchMonth:function(n,t){switch(this._mode){case"days":if(!this._isInDateRange(n,"M",t))return!1;break;case"months":if(!this._isInDateRange(n,"y",t))return!1;break;case"years":if(!this._isInDateRange(n,"yy",t))return!1}return!0},_switchMode:function(n,t){var u;if(!this._isAnimating&&this._mode!=n){var f=this._modeOrder[this._mode]<this._modeOrder[n],r=this._modes[this._mode],i=this._modes[n];(this._mode=n,this._animated&&!t)?(this._isAnimating=!0,this.invalidate(),f?($common.setLocation(i,{x:0,y:-this._height}),$common.setVisible(i,!0),this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("top"),this._modeChangeMoveTopOrLeftAnimation.set_target(i),this._modeChangeMoveTopOrLeftAnimation.set_startValue(-this._height),this._modeChangeMoveTopOrLeftAnimation.set_endValue(0),$common.setLocation(r,{x:0,y:0}),$common.setVisible(r,!0),this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("top"),this._modeChangeMoveBottomOrRightAnimation.set_target(r),this._modeChangeMoveBottomOrRightAnimation.set_startValue(0),this._modeChangeMoveBottomOrRightAnimation.set_endValue(this._height)):($common.setLocation(r,{x:0,y:0}),$common.setVisible(r,!0),this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("top"),this._modeChangeMoveTopOrLeftAnimation.set_target(r),this._modeChangeMoveTopOrLeftAnimation.set_endValue(-this._height),this._modeChangeMoveTopOrLeftAnimation.set_startValue(0),$common.setLocation(i,{x:0,y:139}),$common.setVisible(i,!0),this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("top"),this._modeChangeMoveBottomOrRightAnimation.set_target(i),this._modeChangeMoveBottomOrRightAnimation.set_endValue(0),this._modeChangeMoveBottomOrRightAnimation.set_startValue(this._height)),u=Function.createDelegate(this,function(){this._isAnimating=!1;this._modeChangeAnimation.remove_ended(u)}),this._modeChangeAnimation.add_ended(u),this._modeChangeAnimation.play()):(this._mode=n,$common.setVisible(r,!1),this.invalidate(),$common.setVisible(i,!0),$common.setLocation(i,{x:0,y:0}))}},_isSelected:function(n,t){var i=this.get_selectedDate();if(!i)return!1;switch(t){case"d":if(n.getDate()!=i.getDate())return!1;case"M":if(n.getMonth()!=i.getMonth())return!1;case"y":if(n.getFullYear()!=i.getFullYear())return!1}return!0},_isOther:function(n,t){var i=this._getEffectiveVisibleDate(),r;switch(t){case"d":return n.getFullYear()!=i.getFullYear()||n.getMonth()!=i.getMonth();case"M":return!1;case"y":return r=10*Math.floor(i.getFullYear()/10),n.getFullYear()<r||r+10<=n.getFullYear()}return!1},_isTodaysDate:function(n){return this._getDateOnly(this.get_todaysDate()).valueOf()===this._getDateOnly(n).valueOf()},_getCssClass:function(n,t){return this._isSelected(n,t)?"ajax__calendar_active":this._isOther(n,t)?"ajax__calendar_other":this._isTodaysDate(n)?"ajax__calendar_today":""},_getEffectiveVisibleDate:function(){var n=this.get_visibleDate();return null==n&&(n=this.get_selectedDate()),null==n&&(n=this.get_todaysDate()),this._endDate&&n>this._endDate?n=this._endDate:this._startDate&&n<this._startDate&&(n=this._startDate),n=new Date(n),n.setDate(1),this._getDateOnly(n)},getMonthStartDate:function(n){var t=new Date(n);return t.setDate(1),this._getDateOnly(t)},_getFirstDayOfWeek:function(){return this.get_firstDayOfWeek()!=Sys.Extended.UI.FirstDayOfWeek.Default?this.get_firstDayOfWeek():Sys.CultureInfo.CurrentCulture.dateTimeFormat.FirstDayOfWeek},_parseTextValue:function(n){var t=null;return n&&(t=Date.parseLocale(n,this.get_format()),t.getFullYear()<100&&t.setYear(t.getFullYear())),isNaN(t)&&(t=null),t},_element_onfocus:function(){this._enabled&&(this._button||(this.show(),this._popupMouseDown=!1))},_element_onblur:function(){this._enabled&&(this._button||this.blur())},_element_onchange:function(){if(!this._selectedDateChanging){var n=this._parseTextValue(this._textbox.get_Value());this._selectedDate=n;this._isOpen&&this._switchView(this._selectedDate,Sys.Extended.UI.CalendarSwitchViewMode.RangeZoom,null==this._selectedDate)}},_element_onkeypress:function(n){this._enabled&&(this._button||n.charCode!=Sys.UI.Key.esc||(n.stopPropagation(),n.preventDefault(),this.hide()))},_element_onclick:function(){this._enabled&&(this._button||(this.show(),this._popupMouseDown=!1))},_popup_onevent:function(n){n.stopPropagation();n.preventDefault()},_popup_onmousedown:function(){this._popupMouseDown=!0},_popup_onmouseup:function(){Sys.Browser.agent===Sys.Browser.Opera&&this._blur.get_isPending()&&this._blur.cancel();this._popupMouseDown=!1;this.focus()},_cell_onmouseover:function(n){var t,r,i,u;if(n.stopPropagation(),Sys.Browser.agent===Sys.Browser.Safari)for(t=0;t<this._daysBody.rows.length;t++)for(r=this._daysBody.rows[t],i=0;i<r.cells.length;i++)Sys.UI.DomElement.removeCssClass(r.cells[i].firstChild.parentNode,"ajax__calendar_hover");u=n.target;Sys.UI.DomElement.addCssClass(u.parentNode,"ajax__calendar_hover")},_cell_onmouseout:function(n){n.stopPropagation();var t=n.target;Sys.UI.DomElement.removeCssClass(t.parentNode,"ajax__calendar_hover")},_cell_onclick:function(n){var t,i;if((n.stopPropagation(),n.preventDefault(),this._enabled)&&(t=n.target,t.parentNode.className.indexOf("ajax__calendar_invalid")==-1)){i=this._getEffectiveVisibleDate();switch(Sys.UI.DomElement.removeCssClass(t.parentNode,"ajax__calendar_hover"),t.mode){case"prev":this._switchView(t.date,Sys.Extended.UI.CalendarSwitchViewMode.PreviousRange);break;case"next":this._switchView(t.date,Sys.Extended.UI.CalendarSwitchViewMode.NextRange);break;case"title":switch(this._mode){case"days":this._switchMode("months");break;case"months":this._switchMode("years")}break;case"month":t.month==i.getMonth()?this._switchMode("days"):(this._visibleDate=t.date,this._switchMode("days"));break;case"year":t.date.getFullYear()==i.getFullYear()?this._switchMode("months"):(this._visibleDate=t.date,this._switchMode("months"));break;case"day":this.set_selectedDate(t.date);this._switchView(t.date,Sys.Extended.UI.CalendarSwitchViewMode.RangeZoom);this._blur.post(!0);this.raise_dateSelectionChanged();break;case"today":this.set_selectedDate(t.date);this._switchView(t.date,Sys.Extended.UI.CalendarSwitchViewMode.RangeZoom);this._blur.post(!0);this.raise_dateSelectionChanged()}}},_button_onclick:function(n){n.preventDefault();n.stopPropagation();this._enabled&&0!=n.clientX&&(this._isOpen?this.hide():this.show(),this.focus(),this._popupMouseDown=!1,this._visibleDate!=this._selectedDate&&(this._visibleDate=this._selectedDate,this.invalidate()))},_button_onblur:function(){this._enabled&&(this._popupMouseDown||this.hide(),this._popupMouseDown=!1)},_button_onkeypress:function(n){this._enabled&&(n.charCode==Sys.UI.Key.esc&&(n.stopPropagation(),n.preventDefault(),this.hide()),this._popupMouseDown=!1)},_parseDateSortableFormat:function(n){var t=/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.?(\d{0,7})?/.exec(n);return new Date(t[1],t[2]-1,t[3],t[4],t[5],t[6])}},Sys.Extended.UI.CalendarBehavior.registerClass("Sys.Extended.UI.CalendarBehavior",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.CalendarPosition={BottomLeft:0,BottomRight:1,TopLeft:2,TopRight:3,Right:4,Left:5},Sys.Extended.UI.CalendarDefaultView={Days:0,Months:1,Years:2},Sys.Extended.UI.CalendarSwitchViewMode={PreviousRange:0,NextRange:1,RangeZoom:2},Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.MaskedEditBehavior=function(n){Sys.Extended.UI.MaskedEditBehavior.initializeBase(this,[n]);this._mask="";this._maskType=Sys.Extended.UI.MaskedEditType.None;this._filtered="";this._promptCharacter="_";this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight;this._messageValidatorTip=!0;this._showMessageErrorFloat=!1;this._cssMessageErrorFloat="";this._autoComplete=!0;this._autoCompleteValue="";this._clearTextOnInvalid=!1;this._clearMaskOnLostfocus=!0;this._acceptAmPm=Sys.Extended.UI.MaskedEditShowSymbol.None;this._acceptNegative=Sys.Extended.UI.MaskedEditShowSymbol.None;this._displayMoney=Sys.Extended.UI.MaskedEditShowSymbol.None;this._onFocusCssClass="MaskedEditFocus";this._onInvalidCssClass="MaskedEditError";this._onFocusCssNegative="MaskedEditFocusNegative";this._onBlurCssNegative="MaskedEditBlurNegative";this._cultureName=Sys.CultureInfo.CurrentCulture.name;this._userDateFormat=Sys.Extended.UI.MaskedEditUserDateFormat.None;this._userTimeFormat=Sys.Extended.UI.MaskedEditUserTimeFormat.None;this._cultureDatePlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.DateSeparator;this._cultureTimePlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.TimeSeparator;this._cultureDecimalPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator;this._cultureThousandsPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.NumberGroupSeparator;this._cultureDateFormat="MDY";var t=Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern.split(this._cultureDatePlaceholder);t.length>=3&&(this._cultureDateFormat=t[0].substr(0,1).toUpperCase()+t[1].substr(0,1).toUpperCase()+t[2].substr(0,1).toUpperCase());this._cultureCurrencySymbolPlaceholder=Sys.CultureInfo.CurrentCulture.numberFormat.CurrencySymbol;this._cultureAMPMPlaceholder=Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator+";"+Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator;this._AMPMPlaceholderSeparator=";";this._century=1900;this._allowCopyPaste=!0;this._clipboardText=Sys.Extended.UI.Resources&&Sys.Extended.UI.Resources.Shared_BrowserSecurityPreventsPaste||"Your browser security settings don't permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead.";this._CharsEditMask="9L$CAN?";this._CharsSpecialMask="/:.,";this._maskConv="";this._EmptyMask="";this._maskvalid="";this._DirectSelText="";this._initialvalue="";this._LogicSymbol="";this._LogicTextMask="";this._LogicMask="";this._LogicMaskConv="";this._LogicPrompt=String.fromCharCode(1);this._LogicEscape=String.fromCharCode(2);this._LogicFirstPos=-1;this._LogicLastPos=-1;this._LogicLastInt=-1;this._LogicDateTimeSepPos=-1;this._QtdValidInput=0;this._InLostfocus=!1;this._ExternalMessageError="";this._CurrentMessageError="";this._FiringOnChange=!1;this._ErroOnEnter=!1;this._charLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZ";this._charNumbers="0123456789";this._charEscape="\\";this._DelimitStartDup="{";this._DelimitEndDup="}";this._focusHandler=null;this._keypressdown=null;this._keypressHandler=null;this._blurHandler=null;this._mouseOutHandler=null;this._mouseOutHandler=null;this._mouseMoveHandler=null;this._mouseEnterHandler=null;this._changeHandler=null;this._timer=null;this._timerHandler=null;this._SaveSymb="";this._SaveText="";this._SavePosi=-1;this._SaveMask="";this._SaveKeyDown=0},Sys.Extended.UI.MaskedEditBehavior.prototype={initialize:function(){var n=this.get_element(),t,i,r,u;this._InLostfocus=!0;Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(this,"initialize");this._createMask();t=!1;i=this.get_ClientState();null!=i&&""!=i&&(t="Focused"==i,this.set_ClientState(null));try{n===document.activeElement&&(t=!0)}catch(n){}this._showMessageErrorFloat&&(this._mouseOutHandler=Function.createDelegate(this,this._onMouseOut),$addHandler(n,"mouseout",this._mouseOutHandler),this._mouseMoveHandler=Function.createDelegate(this,this._onMouseMove),$addHandler(n,"mousemove",this._mouseMoveHandler),this._mouseEnterHandler=Function.createDelegate(this,this._onMouseover),$addHandler(n,"mouseover",this._mouseEnterHandler));n.readOnly||(this._keypressdown=Function.createDelegate(this,this._onKeyPressdown),$addHandler(n,"keydown",this._keypressdown),this._keypressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"keypress",this._keypressHandler));this._focusHandler=Function.createDelegate(this,this._onFocus);$addHandler(n,"focus",this._focusHandler);this._blurHandler=Function.createDelegate(this,this._onBlur);$addHandler(n,"blur",this._blurHandler);this._changeHandler=Function.createDelegate(this,this._onChange);$addHandler(n,"change",this._changeHandler);Sys.Browser.agent==Sys.Browser.Opera&&(this._timerHandler=Function.createDelegate(this,this._OnTimerTicket),this._timer=new Sys.Timer,this._timer.set_enabled(!1),this._timer.set_interval(100),this._timer.add_tick(this._timerHandler),this._SaveText="",this._SavePosi=-1,this._timer.set_enabled(!0));r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n);(this._InitValue(r.get_Value(),!0),t)?this._onFocus():(this._clearMaskOnLostfocus&&r.set_Value(this._getClearMask(r.get_Value())),u=this._CaptureServerValidators(),u||""!=this._onInvalidCssClass&&this.addCssClassMaskedEdit(this._onInvalidCssClass))},dispose:function(){var n=this.get_element();this._mouseOutHandler&&($removeHandler(n,"mouseout",this._mouseOutHandler),this._mouseOutHandler=null);this._mouseMoveHandler&&($removeHandler(n,"mousemove",this._mouseMoveHandler),this._mouseMoveHandler=null);this._mouseEnterHandler&&($removeHandler(n,"mouseover",this._mouseEnterHandler),this._mouseEnterHandler=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._blurHandler&&($removeHandler(n,"blur",this._blurHandler),this._blurHandler=null);this._changeHandler&&($removeHandler(n,"change",this._changeHandler),this._changeHandler=null);this._keypressdown&&($removeHandler(n,"keydown",this._keypressdown),this._keypressdown=null);this._keypressHandler&&($removeHandler(n,"keypress",this._keypressHandler),this._keypressHandler=null);this._timerHandler&&(this._timer.set_enabled(!1),this._timerHandler=null,this._timer.dispose(),this._timer=null);Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(this,"dispose")},_OnTimerTicket:function(){if(this._SaveSymb="",!this._InLostfocus){this._timer.set_enabled(!1);var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());""!=this._SaveText?(n.set_Value(this._SaveText),this.setSelectionRange(this._SavePosi,this._SavePosi),this._SaveText="",this._SavePosi=-1,this._SaveMask=n.get_Value()):(n.get_Value().length!=this._EmptyMask.length&&n.set_Value(this._SaveMask),100!=this._timer.get_interval()&&this._timer.set_interval(100));this._timer.set_enabled(!0)}},_onChange:function(){this._FiringOnChange||this._onFocus()},_onFocus:function(){var n=this.get_element(),i,t,r,u;n.readOnly||n.disabled||(this._keypressdown||(this._keypressdown=Function.createDelegate(this,this._onKeyPressdown),$addHandler(n,"keydown",this._keypressdown)),this._keypressHandler||(this._keypressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"keypress",this._keypressHandler)),this._InLostfocus=!1,this._RemoveDivToolTip(),""!=this._onFocusCssClass&&this.addCssClassMaskedEdit(this._onFocusCssClass),i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),this._initialvalue=i.get_Value(),this._InitValue(i.get_Value(),!1),t=this._getClearMask(),r=!1,(this._messageValidatorTip&&""==t&&(r=!0),this._maskType!=Sys.Extended.UI.MaskedEditType.Time&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime||""==this.get_cultureAMPMPlaceholder()||""!=t?this._maskType==Sys.Extended.UI.MaskedEditType.Number&&""!=t&&"-"==this._LogicSymbol&&""!=this._onFocusCssNegative&&this.addCssClassMaskedEdit(this._onFocusCssNegative):this._acceptAmPm&&this.insertAMPM(this.get_cultureAMPMPlaceholder().substring(0,1)),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)?this._LogicLastInt!=-1?this.setSelectionRange(this._LogicLastInt,this._LogicLastInt):this.setSelectionRange(this._LogicLastPos+1,this._LogicLastPos+1):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&""!=t?(u=this._getLastEmptyPosition()+1,this.setSelectionRange(u,u)):this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos),this.showTooltipMessage(!1),r&&this.showTooltipMessage(!0))},_PeforformValidLostFocus:function(n){var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t=this._getClearMask(i.get_Value()),r;return""==t&&this._maskType==Sys.Extended.UI.MaskedEditType.Number&&"-"==this._LogicSymbol&&this.insertSignal("+"),""!=t&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.Date?this.AutoFormatDate():""!=t&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.Time?this.AutoFormatTime():""!=t&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?this.AutoFormatDateTime():""!=t&&this._autoComplete&&this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this.AutoFormatNumber(),(this._clearMaskOnLostfocus&&""!=t||n&&this._clearMaskOnLostfocus)&&i.set_Value(this._getClearMask(i.get_Value())),this.addCssClassMaskedEdit(""),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&"-"==this._LogicSymbol&&""!=this._onBlurCssNegative&&this.addCssClassMaskedEdit(this._onBlurCssNegative),this.showTooltipMessage(!1),this._RemoveDivToolTip(),r=this._CaptureClientsValidators(),r||(""!=this._onInvalidCssClass&&this.addCssClassMaskedEdit(this._onInvalidCssClass),this._clearTextOnInvalid&&(this._createMask(),i.set_Value(this._EmptyMask))),r},_onBlur:function(n){var t,i;this._InLostfocus=!0;t=this._PeforformValidLostFocus(!0);t&&(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),!this.get_element().readOnly&&this._initialvalue!=i.get_Value()&&n&&this._fireChanged())},_fireChanged:function(){var n,t;this._FiringOnChange=!0;n=this.get_element();document.createEventObject?n.fireEvent("onchange"):document.createEvent&&(t=document.createEvent("HTMLEvents"),t.initEvent("change",!0,!0),n.dispatchEvent(t));this._FiringOnChange=!1},_onKeyPress:function(n){var u=this._KeyCode(n),f,o,t,i,e,r;return 9==u?!0:13==u?(f=this._PeforformValidLostFocus(!1),(this._ErroOnEnter=!1,f||(this._ErroOnEnter=!0),Sys.Browser.agent==Sys.Browser.Opera)&&(o=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=o.get_Value(),this._SavePosi=this._getCurrentPosition(),this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)),f):(""!=this._onFocusCssClass&&this._ErroOnEnter&&this.addCssClassMaskedEdit(this._onFocusCssClass),this._ErroOnEnter=!1,!this._isNormalChar(n,u))?(this._ExecuteNav(n,u),!1):(t=this._deleteTextSelection(),t==-1&&(t=this._getCurrentPosition()),i=String.fromCharCode(u),this._maskType==Sys.Extended.UI.MaskedEditType.Date&&i==this.get_cultureDatePlaceholder()?this._AdjustElementDate():this._maskType==Sys.Extended.UI.MaskedEditType.Time&&i==this.get_cultureTimePlaceholder()?this._AdjustElementTime():this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime||i!=this.get_cultureTimePlaceholder()&&i!=this.get_cultureDatePlaceholder()?this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&i==this.get_cultureDecimalPlaceholder()&&t==this._LogicLastInt?this._AdjustElementDecimalLTR():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&i==this.get_cultureDecimalPlaceholder()&&t==this._LogicLastInt?this._AdjustElementDecimalRTL():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&i==this.get_cultureDecimalPlaceholder()&&t!=this._LogicLastInt?this._MoveDecimalPos():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&i==this.get_cultureThousandsPlaceholder()?this._MoveThousandLTR():this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&i==this.get_cultureThousandsPlaceholder()?this._MoveThousandRTL():this._maskType!=Sys.Extended.UI.MaskedEditType.Time&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime||this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())==-1?this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1?Sys.Browser.agent!=Sys.Browser.Opera?(this.insertSignal(i),this.setSelectionRange(t,t)):""==this._SaveSymb?(this.insertSignal(i),this.setSelectionRange(t,t),this._SaveSymb=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)):this._SaveSymb="":(e=t,t=this._getNextPosition(t),r=t,this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?e==this._LogicLastInt&&(r=this._getLastEmptyPosition()):t>=this._LogicLastPos+1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(r=this._getLastEmptyPosition()),this._processKey(r,i)&&(this._messageValidatorTip&&this.showTooltipMessage(!1),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight?(this._insertContent(i,r),t=this._getNextPosition(r+1)):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(this._LogicLastInt==-1?t<this._LogicLastPos+1?(this._insertContent(i,r),t=this._getNextPosition(r+1)):(this._insertContentRight(i),t=this._LogicLastPos+1):e!=this._LogicLastInt?(this._insertContent(i,r),t=this._getNextPosition(r+1)):(this._insertContentRight(i),t=this._LogicLastInt)),this.setSelectionRange(t,t))):this._acceptAmPm&&(this.insertAMPM(i),this.setSelectionRange(t,t)):this._AdjustElementDateTime(i),this._SetCancelEvent(n),!1)},_onKeyPressdown:function(n){var t,i;if((this._InLostfocus&&this._onFocus(n),t=this._KeyCode(n),9==t)||13==t)return!0;this._isNormalChar(n,t)?Sys.Browser.agent!=Sys.Browser.Opera||!n.rawEvent.shiftKey||n.rawEvent.ctrlKey||n.rawEvent.altKey||45!=n.rawEvent.keyCode||(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=i.get_Value(),this._SavePosi=this._getCurrentPosition(),this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)):this._ExecuteNav(n,t)},_onMouseOut:function(){this._RemoveDivToolTip()},_onMouseMove:function(n){(this._InLostfocus||this._ErroOnEnter)&&""!=this._ExternalMessageError&&this._ShowDivToolTip(n)},_onMouseover:function(n){$get("DivMaskedEditTip_"+this.get_element().id)||this._CaptureServerValidators();(this._InLostfocus||this._ErroOnEnter)&&""!=this._ExternalMessageError&&this._createDivToolTip(n,this._ExternalMessageError)},_ShowDivToolTip:function(n){var t=$get("DivMaskedEditTip_"+this.get_element().id),i;t||(this._createDivToolTip(n,this._ExternalMessageError),t=$get("DivMaskedEditTip_"+this.get_element().id));i=this._GetMousePos(n);t.style.left=i.x+1+"px";t.style.top=i.y+1+"px"},_GetMousePos:function(n){var t=0,i=0,r,u;return"number"==typeof window.pageYOffset?(i=window.pageYOffset,t=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(i=document.body.scrollTop,t=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(i=document.documentElement.scrollTop,t=document.documentElement.scrollLeft),r=0,u=0,"number"==typeof n.pageX?(r=n.pageX,u=n.pageY):"number"==typeof n.clientX&&(r=n.clientX,u=n.clientY),{x:r+t,y:u+i}},_RemoveDivToolTip:function(){var n=$get("DivMaskedEditTip_"+this.get_element().id);n&&document.body.removeChild(n)},_createDivToolTip:function(n,t){var u=$get("DivMaskedEditTip_"+this.get_element().id),i,r;u||(r=this._GetMousePos(n),i=document.createElement("div"),i.id="DivMaskedEditTip_"+this.get_element().id,i.style.position="absolute",i.style.left=r.x+2+"px",i.style.top=r.y+2+"px",i.style.zIndex=Sys.Extended.UI.zIndex.MaskedEditDivTip,""==this._cssMessageErrorFloat?(i.style.padding="3px 3px 3px 3px",i.style.border="Solid 1px #000000",i.style.backgroundColor="#FFFFEA",i.style.fontWeight="normal",i.style.fontSize="12px",i.style.fontFamily="Arial"):i.className=this._cssMessageErrorFloat,i.innerHTML=t,i=document.body.insertBefore(i,document.body.firstChild))},_ExecuteNav:function(n,t){var i,f,e,u,r;if("keydown"==n.type&&this._isInternetExplorer()&&((86==t||118==t)&&!n.shiftKey&&n.ctrlKey&&!n.altKey||n.shiftKey&&!n.ctrlKey&&!n.altKey&&45==n.keyCode)||(!this._isInternetExplorer()||"keypress"==n.type)&&(n.rawEvent.shiftKey&&!n.rawEvent.ctrlKey&&!n.rawEvent.altKey&&45==n.rawEvent.keyCode||"keydown"==n.type&&(86==t||118==t)&&!n.shiftKey&&n.ctrlKey&&!n.altKey))return this._SetCancelEvent(n),void this._PasteFromClipBoard();if(Sys.Browser.agent==Sys.Browser.InternetExplorer||"keypress"==n.type||"keydown"==n.type)if(8==t)this._SetCancelEvent(n),i=this._deleteTextSelection(),i!=-1?this.setSelectionRange(i,i):(i=this._getCurrentPosition(),this._backspace(i),i=this._getPreviousPosition(i-1),this.setSelectionRange(i,i)),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._messageValidatorTip&&r.get_Value()==this._EmptyMask&&this.showTooltipMessage(!0),Sys.Browser.agent==Sys.Browser.Opera&&(this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0));else if(46==t||127==t)this._SetCancelEvent(n),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),(i=this._deleteTextSelection(),i==-1)?(i=this._getCurrentPosition(),this._isValidMaskedEditPosition(i)||i!=this._LogicLastInt&&this._inputDirection!=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(i=this._getNextPosition(i)),this._deleteAtPosition(i,!1)):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(f=this._getClearMask(r.get_Value()),""!=f&&(f=f.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",f.substring(f.length-1,f.length)==this.get_cultureDecimalPlaceholder()?(f=f.substring(0,f.length-1),this.loadValue(f,this._LogicLastInt)):this.loadValue(f,this._LogicLastPos))),this.setSelectionRange(i,i),this._messageValidatorTip&&r.get_Value()==this._EmptyMask&&this.showTooltipMessage(!0),Sys.Browser.agent==Sys.Browser.Opera&&(this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0));else if(n.ctrlKey){if(39==t||35==t||34==t){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);i=this._getCurrentPosition();this.setSelectionRange(i,this._LogicLastPos+1)}else if(37==t||36==t||33==t){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);i=this._getCurrentPosition();this.setSelectionRange(this._LogicFirstPos,i)}}else if(35==t||34==t){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(i=this._getCurrentPosition(),this.setSelectionRange(i,this._LogicLastPos+1)):this.setSelectionRange(this._LogicLastPos+1,this._LogicLastPos+1)}else if(36==t||33==t){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(i=this._getCurrentPosition(),this.setSelectionRange(this._LogicFirstPos,i)):this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos)}else if(37==t){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;(this._SetCancelEvent(n),n.shiftKey)?(u=this._GetBoundSelection(),u?(u.left>this._LogicFirstPos&&u.left--,this.setSelectionRange(u.left,u.right)):(e=this._getCurrentPosition(),e>this._LogicFirstPos&&this.setSelectionRange(e-1,e))):(i=this._getCurrentPosition()-1,i<this._LogicFirstPos&&(i=this._LogicFirstPos),this.setSelectionRange(i,i));Sys.Browser.agent==Sys.Browser.Opera&&(r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))}else if(39==t){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;(this._SetCancelEvent(n),n.shiftKey)?(u=this._GetBoundSelection(),u?(u.right<this._LogicLastPos+1&&u.right++,this.setSelectionRange(u.left,u.right)):(e=this._getCurrentPosition(),e<this._LogicLastPos+1&&this.setSelectionRange(e,e+1))):(i=this._getCurrentPosition()+1,i>this._LogicLastPos+1&&(i=this._LogicLastPos+1),this.setSelectionRange(i,i));Sys.Browser.agent==Sys.Browser.Opera&&(r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))}else 27==t&&(this._SetCancelEvent(n),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._EmptyMask==this._initialvalue?r.set_Value(""):r.set_Value(this._initialvalue),this._onFocus());this._SetCancelEvent(n)},_backspace:function(n){var t=!1,i;return n>this._LogicFirstPos&&(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i.get_Value(),n=this._getPreviousPosition(n-1),this._deleteAtPosition(n,!0),t=!0),t},_deleteAtPosition:function(n,t){var p=!1,w=this._LogicLastPos+1,c,i,o,e,v,a,y,u,h,b;if(this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(w=this._LogicLastInt),c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),0==t&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&n==w)i=this._getClearMask(c.get_Value()),""!=i&&(p=!0,i=i.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",i.substring(i.length-1,i.length)==this.get_cultureDecimalPlaceholder()&&(i=i.substring(0,i.length-1)),o=i.split(this.get_cultureDecimalPlaceholder()),this._LogicLastInt!=-1&&""!=o[0]?(o[0]=o[0].substring(0,o[0].length-1),i=o[0],2==o.length&&(i+=this.get_cultureDecimalPlaceholder()+o[1])):i=i.substring(0,i.length-1),i+=this._LogicSymbol,this.loadValue(i,w));else{var r=c.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),f=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),s=0,l=n-this._LogicFirstPos;if(this._isValidMaskedEditPosition(n)){for((p=!0,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&(e=this._SplitDateTime(r),v=n-this._LogicFirstPos,v>e[0].length?(r=e[1],s=e[0].length+1,f=f.substring(s),l-=s):(r=e[0],f=f.substring(0,e[0].length))),a=r.substring(l+1),y=f.substring(l+1),r=r.substring(0,l)+this._promptCharacter,f=f.substring(0,l)+this._LogicPrompt,u=0;u<parseInt(a.length,10);u++)this._isValidMaskedEditPosition(n+1+u)?(r+=this._promptCharacter,f+=this._LogicPrompt):(r+=a.substring(u,u+1),f+=y.substring(u,u+1));for(h=this._getNextPosition(n),u=0;u<parseInt(a.length,10);u++)this._isValidMaskedEditPosition(n+1+u)&&y.substring(u,u+1)!=this._LogicPrompt&&(r=r.substring(0,h-this._LogicFirstPos-s)+a.substring(u,u+1)+r.substring(h+1-this._LogicFirstPos-s),f=f.substring(0,h-this._LogicFirstPos-s)+y.substring(u,u+1)+f.substring(h+1-this._LogicFirstPos-s),h=this._getNextPosition(h+1));if(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){var d=c.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),k=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),e=this._SplitDateTime(d),v=n-this._LogicFirstPos;v>e[0].length?(r=e[0]+" "+r,f=k.substring(0,s)+f):(r=r+" "+e[1],f+=k.substring(e[0].length))}b=c.get_Value();r=b.substring(0,this._LogicFirstPos)+r+b.substring(this._LogicLastPos+1);this._LogicTextMask=this._LogicTextMask.substring(0,this._LogicFirstPos)+f+this._LogicTextMask.substring(this._LogicLastPos+1);c.set_Value(r)}}return p},_SplitDateTime:function(n){var t=[];return" "==n.charAt(this._LogicDateTimeSepPos)?(t[0]=n.substring(this._LogicFirstPos,this._LogicDateTimeSepPos),t[1]=n.substring(this._LogicDateTimeSepPos+1)):t[0]=n,t},_isInternetExplorer:function(){return Sys.Browser.agent==Sys.Browser.InternetExplorer||null==Sys.Browser.agent&&"Netscape"==Sys.Browser.name&&5==Sys.Browser.version},_ShowModalClipBoardInput:function(){return prompt(this._clipboardText,"")},_PasteFromClipBoard:function(){var n,r=null,e,u,i,o,t;if(this._isInternetExplorer())r=window.clipboardData.getData("Text");else{var s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),h=s.get_Value(),f=this._GetBoundSelection(),n=this._getCurrentPosition(),c=this._autoComplete,l=this._clearTextOnInvalid,a=this._clearMaskOnLostfocus;this._DirectSelText;this._autoComplete=!1;this._clearTextOnInvalid=!1;this._clearMaskOnLostfocus=!1;r=this._ShowModalClipBoardInput();this._autoComplete=c;this._clearTextOnInvalid=l;this._clearMaskOnLostfocus=a;s.set_Value(h);f?this.setSelectionRange(f.left,f.right):this.setSelectionRange(n,n)}if(null!=r&&""!=r){for(r.length>this._maskvalid.length&&(r=r.substring(0,this._maskvalid.length)),n=this._deleteTextSelection(),n==-1&&(n=this._getCurrentPosition(),f&&(n=f.left)),this.setSelectionRange(n,n),e=!1,this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicLastInt!=-1&&(e=!0),u=0,u=0;u<r.length;u++)i=r.substring(u,u+1),t=n,(e&&(t=this._getLastEmptyPosition()),this._maskType!=Sys.Extended.UI.MaskedEditType.Time&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime||this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())==-1)?this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1?(this.insertSignal(i),this.setSelectionRange(n,n)):(o=n,n=this._getNextPosition(n),t=n,this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?o==this._LogicLastInt&&(t=this._getLastEmptyPosition()):n>=this._LogicLastPos+1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(t=this._getLastEmptyPosition()),this._processKey(t,i)&&(this._messageValidatorTip&&this.showTooltipMessage(!1),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight?(this._insertContent(i,t),n=this._getNextPosition(t+1)):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(this._LogicLastInt==-1?n<this._LogicLastPos+1?(this._insertContent(i,t),n=this._getNextPosition(t+1)):(this._insertContentRight(i),n=this._LogicLastPos+1):o!=this._LogicLastInt?(this._insertContent(i,t),n=this._getNextPosition(t+1)):(this._insertContentRight(i),n=this._LogicLastInt)),this.setSelectionRange(n,n))):this._acceptAmPm&&(this.insertAMPM(i),this.setSelectionRange(n,n));e&&this.setSelectionRange(this._LogicLastInt,this._LogicLastInt)}},_MoveDecimalPos:function(){for(var i=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i),n=this._LogicFirstPos,u=this._LogicLastPos,t=-1;n<u;){if(r.get_Value().substring(n,n+1)==this.get_cultureDecimalPlaceholder()){t=n;break}n++}t!=-1&&this.setSelectionRange(t,t)},_MoveThousandLTR:function(){for(var f=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f),u=this._getCurrentPosition(),i=this._LogicLastPos,n=u+1,t=-1;n<i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n++}if(t==-1){for(n=0,i=u;n<i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n++}if(t==-1)return}this.setSelectionRange(t,t)},_MoveThousandRTL:function(){for(var f=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f),u=this._getCurrentPosition(),i=this._LogicFirstPos,n=u-1,t=-1;n>i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n--}if(t==-1){for(n=this._LogicLastPos,i=u;n>i;){if(r.get_Value().substring(n,n+1)==this.get_cultureThousandsPlaceholder()){t=n;break}n--}if(t==-1)return}this.setSelectionRange(t,t)},_AdjustElementDecimalLTR:function(){var o=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o),s=this._getCurrentPosition(),u,t,n,i,f,e;if(r.get_Value().substring(s).indexOf(this.get_cultureDecimalPlaceholder())!=-1&&(u=r.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),t=u.indexOf(this.get_cultureDecimalPlaceholder()),t!=-1)){for(i=this._getClearMask(r.get_Value()),""!=i?(i=i.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",n=i.split(this.get_cultureDecimalPlaceholder())):n=this.get_cultureDecimalPlaceholder().split(this.get_cultureDecimalPlaceholder()),""==n[0]&&(n[0]="0"),f=u.length-t-1;n[1].length<f;)n[1]+="0";e=this._inputDirection;this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;this.loadValue(n[0]+this.get_cultureDecimalPlaceholder()+n[1],this._LogicLastPos);this._inputDirection=e;t+=this._LogicFirstPos+1;this.setSelectionRange(t,t)}},_AdjustElementDecimalRTL:function(){var r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),u=r.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),t=u.indexOf(this.get_cultureDecimalPlaceholder()),f,n,i,e,o;if(t!=-1){if(f=this._getCurrentPosition(),t+this._LogicFirstPos>=f)return void this._AdjustElementDecimalLTR();for(i=this._getClearMask(r.get_Value()),""!=i?(i=i.replace(new RegExp("(\\"+this.get_cultureThousandsPlaceholder()+")","g"),"")+"",n=i.split(this.get_cultureDecimalPlaceholder())):n=this.get_cultureDecimalPlaceholder().split(this.get_cultureDecimalPlaceholder()),""==n[0]&&(n[0]="0"),e=u.length-t-1;n[1].length<e;)n[1]+="0";o=this._inputDirection;this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;this.loadValue(n[0]+this.get_cultureDecimalPlaceholder()+n[1],this._LogicLastPos);this._inputDirection=o;t+=this._LogicFirstPos+1;this.setSelectionRange(t,t)}},_AdjustTime:function(n,t){for(var r=!0,u,i=0;i<parseInt(n.length,10);i++)n.substring(i,i+1)!=this._promptCharacter&&(r=!1);if(r)return t;for(u=n.length,n=n.replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"";n.length<u;)n="0"+n;return n},_AdjustElementTime:function(){var c=this.get_element(),h=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c),n="",r=this._getCurrentPosition()-this._LogicFirstPos,u=this._maskvalid,t=r+this._LogicFirstPos,i=0,o,f,e,s;if(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){if(i=u.split(" ")[0].length+1,r<i)return t=i+this._LogicFirstPos,void this.setSelectionRange(t,t);u=u.split(" ")[1];r-=i}(u=u.split(":"),r<=1?(n="H",t=this._LogicFirstPos+i+3):2==r&&2==u.length?(n="M",t=this._LogicFirstPos+i+3):r>=3&&r<=5&&2==u.length?(n="M",t=this._LogicFirstPos+i):r>=2&&r<=4&&3==u.length?(n="M",t=this._LogicFirstPos+i+6):3==u.length&&(n="S",t=this._LogicFirstPos+i),""!=n)&&(o=h.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(o=this._SplitDateTime(o)[1]),e=o.split(this.get_cultureTimePlaceholder()),s=this._GetTimeElementText(n),"H"==n?(f=s+this.get_cultureTimePlaceholder()+e[1],3==e.length&&(f+=this.get_cultureTimePlaceholder()+e[2])):"M"==n?(f=e[0]+this.get_cultureTimePlaceholder()+s,3==e.length&&(f+=this.get_cultureTimePlaceholder()+e[2])):"S"==n&&(f=e[0]+this.get_cultureTimePlaceholder()+e[1],f+=this.get_cultureTimePlaceholder()+s),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(f=h.get_Value().substring(this._LogicFirstPos,i)+f),this.loadMaskValue(f,this._LogicFirstPos,this._LogicSymbol),this.setSelectionRange(t,t))},_GetTimeElementText:function(n){var t,r=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),i;return this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.substring(this._maskvalid.split(" ")[0].length+1)),i=r.split(this.get_cultureTimePlaceholder()),i[0]=i[0].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[0].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",""!=t&&t.length<2&&(t="0"+t,i[0]=t),i[1]=i[1].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[1].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",""!=t&&t.length<2&&(t="0"+t,i[1]=t),3==i.length&&(i[2]=i[2].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[2].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",""!=t&&t.length<2&&(t="0"+t,i[2]=t)),"H"==n?i[0]:"M"==n?i[1]:i[2]},_AdjustElementDateTime:function(n){n==this.get_cultureDatePlaceholder()&&this._AdjustElementDate();n==this.get_cultureTimePlaceholder()&&this._AdjustElementTime()},_AdjustElementDate:function(){var l=this.get_element(),s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(l),f=s.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),h,e;this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(f=this._SplitDateTime(f)[0]);var u=f.split(this.get_cultureDatePlaceholder()),t="",n=this._getCurrentPosition()-this._LogicFirstPos,i=n+this._LogicFirstPos,r=this._maskvalid.indexOf("9999")!=-1?2:0;if("DMY"==this.get_cultureDateFormat())if(n<=1)t="D",i=3+this._LogicFirstPos;else if(n>=2&&n<=4)t="M",i=6+this._LogicFirstPos;else{if(n>8+r&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)return void this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos);t="Y";i=this._LogicFirstPos}else if("MDY"==this.get_cultureDateFormat())if(n<=1)t="M",i=3+this._LogicFirstPos;else if(n>=2&&n<=4)t="D",i=6+this._LogicFirstPos;else{if(n>8+r&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)return void this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos);t="Y";i=this._LogicFirstPos}else"DYM"==this.get_cultureDateFormat()?n<=1?(t="D",i=3+this._LogicFirstPos):n>=2&&n<=4+r?(t="Y",i=6+r+this._LogicFirstPos):(t="M",i=this._LogicFirstPos):"MYD"==this.get_cultureDateFormat()?n<=1?(t="M",i=3+this._LogicFirstPos):n>=2&&n<=4+r?(t="Y",i=6+r+this._LogicFirstPos):(t="D",i=this._LogicFirstPos):"YMD"==this.get_cultureDateFormat()?n<=1+r?(t="Y",i=3+r+this._LogicFirstPos):n>=2+r&&n<=4+r?(t="M",i=6+r+this._LogicFirstPos):(t="D",i=this._LogicFirstPos):"YDM"==this.get_cultureDateFormat()&&(n<=1+r?(t="Y",i=3+r+this._LogicFirstPos):n>=2+r&&n<=4+r?(t="D",i=6+r+this._LogicFirstPos):(t="M",i=this._LogicFirstPos));if(h=this._GetDateElementText(t),u[this.get_cultureDateFormat().indexOf(t)]=h,e=u[0]+this.get_cultureDatePlaceholder()+u[1]+this._cultureDatePlaceholder+u[2],this._maskType==Sys.Extended.UI.MaskedEditType.DateTime){var a=s.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),c=this._SplitDateTime(a),o=c[1].split(" ");e+=2==o.length?" "+o[0]+" "+o[1]:" "+c[1]}this.loadMaskValue(e,this._LogicFirstPos,this._LogicSymbol);this.setSelectionRange(i,i)},_GetDateElementText:function(n){var t,i,r,u;return this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(r=this._SplitDateTime(this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1))[0],i=r.split(this.get_cultureDatePlaceholder())):i=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1).split(this.get_cultureDatePlaceholder()),i[this.get_cultureDateFormat().indexOf("D")]=i[this.get_cultureDateFormat().indexOf("D")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[this.get_cultureDateFormat().indexOf("D")].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",""!=t&&t.length<2&&(t="0"+t,i[this.get_cultureDateFormat().indexOf("D")]=t),i[this.get_cultureDateFormat().indexOf("M")]=i[this.get_cultureDateFormat().indexOf("M")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[this.get_cultureDateFormat().indexOf("M")].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",""!=t&&t.length<2&&(t="0"+t,i[this.get_cultureDateFormat().indexOf("M")]=t),u=this._maskvalid.indexOf("9999")!=-1,i[this.get_cultureDateFormat().indexOf("Y")]=i[this.get_cultureDateFormat().indexOf("Y")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._promptCharacter)+"",t=i[this.get_cultureDateFormat().indexOf("Y")].replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",u?""!=t&&t.length<4&&(t=this._century.toString().substr(0,t.length)+t,i[this.get_cultureDateFormat().indexOf("Y")]=t):""!=t&&t.length<2&&(t="0"+t,i[this.get_cultureDateFormat().indexOf("Y")]=t),i[this.get_cultureDateFormat().indexOf(n)]},_GetBoundSelection:function(){var i=null,n=this.get_element(),t,f,r,e,u;return n.setSelectionRange?n.selectionStart!=n.selectionEnd&&(i={left:parseInt(n.selectionStart,10),right:parseInt(n.selectionEnd,10)}):document.selection&&(t=document.selection.createRange(),""!=t.text&&(f=parseInt(t.text.length,10),t.text=String.fromCharCode(3)+t.text,r=n.createTextRange(),r.findText(String.fromCharCode(3)),r.select(),e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),u=parseInt(e.get_Value().indexOf(String.fromCharCode(3)),10),document.selection.clear(),i={left:u,right:u+f})),i},_deleteTextSelection:function(){var n=this.get_element(),o=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),u=o.get_Value(),f=-1,t=-1,s=!1,c,l,e,r,h,i;if(n.setSelectionRange?n.selectionStart!=n.selectionEnd&&(c=parseInt(n.selectionStart,10),l=parseInt(n.selectionEnd,10),s=!0,f=l-c,t=n.selectionStart,n.selectionEnd=n.selectionStart):document.selection&&(e=document.selection.createRange(),""!=e.text&&(s=!0,r=e.text+String.fromCharCode(3),e.text=r,h=n.createTextRange(),h.findText(r),h.select(),t=o.get_Value().indexOf(r),document.selection.clear(),f=parseInt(r.length,10)-1)),s){for(i=0;i<f;i++)this._isValidMaskedEditPosition(t+i)&&(u=u.substring(0,t+i)+this._promptCharacter+u.substring(t+i+1),this._LogicTextMask=this._LogicTextMask.substring(0,t+i)+this._LogicPrompt+this._LogicTextMask.substring(t+i+1));o.set_Value(u);this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(t+=f)}return this._DirectSelText="",t},_isNormalChar:function(n,t){var i=!0;if(Sys.Browser.agent==Sys.Browser.Opera&&"keydown"==n.type&&(this._SaveKeyDown=t),t<32)i=!1;else if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||"keydown"==n.type)switch(t){case 33:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&0==n.rawEvent.which&&(i=!1);break;case 34:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&0==n.rawEvent.which&&(i=!1);break;case 35:Sys.Browser.agent==Sys.Browser.Opera&&"keypress"==n.type?35==this._SaveKeyDown&&(i=!1):i=!1;break;case 36:Sys.Browser.agent==Sys.Browser.Opera&&"keypress"==n.type?36==this._SaveKeyDown&&(i=!1):i=!1;break;case 37:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&0==n.rawEvent.which&&(i=!1);break;case 38:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&0==n.rawEvent.which&&(i=!1);break;case 39:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&0==n.rawEvent.which&&(i=!1);break;case 40:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&0==n.rawEvent.which&&(i=!1);break;case 45:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&Sys.Browser.agent!=Sys.Browser.Opera?0==n.rawEvent.which&&(i=!1):i=Sys.Browser.agent==Sys.Browser.Opera;break;case 86:case 118:n.rawEvent.shiftKey||!n.rawEvent.ctrlKey||n.rawEvent.altKey||(i=!1);break;case 46:"undefined"!=typeof n.rawEvent.which&&null!=n.rawEvent.which&&Sys.Browser.agent!=Sys.Browser.Opera?0==n.rawEvent.which&&(i=!1):Sys.Browser.agent==Sys.Browser.Opera&&"keypress"==n.type?127==this._SaveKeyDown&&(i=!1):i=!1;break;case 127:i=!1}return i},_KeyCode:function(n){var t=0;return n.keyIdentifier&&(63272==n.charCode?t=46:63302==n.charCode?t=45:63233==n.charCode?t=40:63235==n.charCode?t=39:63232==n.charCode?t=38:63234==n.charCode?t=37:63273==n.charCode?t=36:63275==n.charCode?t=35:63277==n.charCode?t=34:63276==n.charCode?t=33:3==n.charCode&&(t=13)),0==t&&n.charCode&&(t=n.charCode),0==t&&(t=n.keyCode),t},_InitValue:function(n,t){this._LogicSymbol="";var i=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i);r.set_Value(this._EmptyMask);n==this._EmptyMask||""==n?this.loadValue("",this._LogicFirstPos):this._maskType==Sys.Extended.UI.MaskedEditType.Date&&""!=n?n=this.ConvFmtDate(n,t):this._maskType==Sys.Extended.UI.MaskedEditType.Time&&""!=n?n=this.ConvFmtTime(n,t):this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&""!=n?n=this.ConvFmtDateTime(n,t):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&""!=n&&(n=this.ConvFmtNumber(n,t));this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&""!=n?this._maskType==Sys.Extended.UI.MaskedEditType.Number?(this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft,this.loadValue(n,this._LogicLastPos),this._inputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight):this.loadValue(n,this._LogicFirstPos):this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&""!=n&&this.loadValue(n,this._LogicLastPos);this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._InLostfocus&&"-"==this._LogicSymbol&&""!=this._onBlurCssNegative&&this.addCssClassMaskedEdit(this._onBlurCssNegative)},loadMaskValue:function(n,t,i){var f,r,u;for(this._createMask(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f.set_Value(this._EmptyMask),this._maskType!=Sys.Extended.UI.MaskedEditType.Time&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime||this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase().substring(0,1))==-1?this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i):this._acceptAmPm&&this.insertAMPM(i.toUpperCase().substring(0,1)),r=0,r=0;r<parseInt(n.length,10);r++)u=n.substring(r+t,r+t+1),this._processKey(t+r,u)&&this._insertContent(u,t+r)},containsAMPMLetters:function(n,t){n.substring(t)},getMaskCharPositions:function(){for(var r,t=[],i=this.get_clearMaskOnLostFocus()?this.getVisibleMask():this._LogicMaskConv,n=0;n<i.length;n++)r=i[n],this.isMaskChar(r)&&t.push(n);return t},getVisibleMask:function(){var n=this.replaceAll(this._LogicMaskConv,this._LogicPrompt,"");return this.replaceAll(n,this._LogicEscape,"")},isMaskChar:function(n){return"9L$CAN?".indexOf(n)==-1},loadValue:function(n,t){var r,e,f,u,o,s,i;if(this._createMask(),e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),e.set_Value(this._EmptyMask),f=this.getMaskCharPositions(),this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight)for(r=0;r<parseInt(n.length,10);r++){if(i=n.substring(r,r+1),this._maskType!=Sys.Extended.UI.MaskedEditType.Time&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime||this.getCultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())==-1)this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i);else if(this._acceptAmPm){this.insertAMPM(i);break}this._processKey(t,i)&&(this._maskType!=Sys.Extended.UI.MaskedEditType.Number&&this._insertContent(i,t),t=this._getNextPosition(t+1))}else if(this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(t==this._LogicLastInt){for(t=this._getPreviousPosition(t),u=n.split(this.get_cultureDecimalPlaceholder()),r=parseInt(u[0].length,10);r>0;r--)i=u[0].substring(r-1,r),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getPreviousPosition(t-1));if(u.length>1)for(t=this._getNextPosition(this._LogicLastInt),r=0;r<parseInt(u[1].length,10);r++)i=u[1].substring(r,r+1),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.insertSignal(i),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getNextPosition(t+1))}else for(o=n.length,s=this.get_clearMaskOnLostFocus()?this.getVisibleMask().length:this._EmptyMask.length,f.splice(0,s-o),r=parseInt(n.length,10);r>0;r--)(this.get_clearMaskOnLostFocus()||this._maskType!==Sys.Extended.UI.MaskedEditType.Number||f.indexOf(r-1)==-1)&&(i=n.substring(r-1,r),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&("-"==this._LogicSymbol&&(this._LogicSymbol=" "),this.insertSignal(i)),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getPreviousPosition(t-1)))},AutoFormatNumber:function(){var n,u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i,r,t;for(ValueText=u.get_Value(),i=this._autoCompleteValue,r=!1,n=this._LogicFirstPos;n<=this._LogicLastPos;n++)this._LogicTextMask.substring(n,n+1)==this._LogicPrompt?(t="0",""!=i&&(t=i.substring(n-this._LogicFirstPos,n+1-this._LogicFirstPos)),r&&(this._LogicTextMask=this._LogicTextMask.substring(0,n)+t+this._LogicTextMask.substring(n+1),ValueText=ValueText.substring(0,n)+t+ValueText.substring(n+1))):this._LogicMask.substring(n,n+1)==this._LogicPrompt&&"123456789".indexOf(this._LogicTextMask.substring(n,n+1))!=-1&&(r=!0);return u.set_Value(ValueText),ValueText},getCurrentHour:function(n){return n.getHours().toString()},AutoFormatTime:function(){var g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),n,d,s,p,c,w,t,b,r,k,e,u,f,v,y,o;ValueText=g.get_Value();n=this._autoCompleteValue;(n.indexOf(this.get_cultureTimePlaceholder())==-1&&(n=""),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&(d=this._SplitDateTime(ValueText),s=d[1].split(" "),(ValueText=2==s.length?s[0]+" "+s[1]:s[0],""!=n)&&(n.indexOf(this.get_cultureDatePlaceholder())==-1&&(n=" "+n),p=this._SplitDateTime(n),c=p[1].split(" "),n=2==c.length?c[0]+" "+c[1]:p[0]));w=new Date;t=this.getCurrentHour(w);t.length<2&&(t="0"+t);""!=n&&(t=n.substring(0,2));var l=!1,h=!1,a="",i="",r="";return""!=this.get_cultureAMPMPlaceholder()&&(b=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),(a=b[0],i=b[1],""==n)?(r=a,t>12&&(t=(parseInt(t,10)-12).toString(),t.length<2&&(t="0"+t),r=i)):(r=a,n.indexOf(i)!=-1&&(r=i)),(l=!0,ValueText.indexOf(i)!=-1&&""!=i&&(h=!0),this._acceptAmPm)?(k=!0,ValueText.substring(0,1)==this._promptCharacter&&ValueText.substring(1,2)==this._promptCharacter||(k=!1),k&&""!=r&&(l=!0,h=!1,i==r&&(h=!0))):(r="",h=!1,l=!1)),e=w.getMinutes().toString(),e.length<2&&(e="0"+e),""!=n&&(e=n.substring(3,5)),v="00",this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(u=ValueText.substring(0,2),u=this._AdjustTime(u,t),f=ValueText.substring(3,5),f=this._AdjustTime(f,e)):(u=ValueText.substring(this._LogicFirstPos,this._LogicFirstPos+2),u=this._AdjustTime(u,t),f=ValueText.substring(this._LogicFirstPos+3,this._LogicFirstPos+5),f=this._AdjustTime(f,e)),y=this._maskvalid,(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(y=y.split(" ")[1]),"99:99:99"==y)?(""!=n&&(v=n.substring(6)),this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(o=ValueText.substring(6,8),o=this._AdjustTime(o,v)):(o=ValueText.substring(this._LogicFirstPos+6,this._LogicFirstPos+8),o=this._AdjustTime(o,v)),ValueText=u+this.get_cultureTimePlaceholder()+f+this.get_cultureTimePlaceholder()+o):ValueText=u+this.get_cultureTimePlaceholder()+f,h?ValueText+=" "+i:l&&(ValueText+=" "+a),this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime&&this.loadValue(ValueText,this._LogicFirstPos),ValueText},AutoFormatDateTime:function(){var n=this.AutoFormatDate(),t=this.AutoFormatTime();return this.loadValue(n+" "+t,this._LogicFirstPos),n+" "+t},AutoFormatDate:function(){var u=this._GetDateElementText("D").replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",f=this._GetDateElementText("M").replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",e=this._GetDateElementText("Y").replace(new RegExp("(\\"+this._promptCharacter+")","g"),"")+"",c=this._maskvalid.indexOf("9999")!=-1,s=this._autoCompleteValue,i,r,t,h,n,l,o;if(s.indexOf(this.get_cultureDatePlaceholder())==-1&&(s=""),""==s)h=new Date,i=h.getUTCDate().toString(),i.length<2&&(i="0"+i),r=(h.getUTCMonth()+1).toString(),r.length<2&&(r="0"+r),t=h.getUTCFullYear().toString(),c||(t=h.getUTCFullYear().toString().substring(2));else if(this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?(s.indexOf(this.get_cultureTimePlaceholder())==-1&&(s+=" "),l=this._SplitDateTime(s)[0],n=l.split(this.get_cultureDatePlaceholder())):n=s.split(this.get_cultureDatePlaceholder()),"DMY"==this.get_cultureDateFormat()?(i=n[0],r=n[1],t=n[2]):"MDY"==this.get_cultureDateFormat()?(i=n[1],r=n[0],t=n[2]):"DYM"==this.get_cultureDateFormat()?(i=n[0],r=n[2],t=n[1]):"MYD"==this.get_cultureDateFormat()?(i=n[2],r=n[0],t=n[1]):"YMD"==this.get_cultureDateFormat()?(i=n[2],r=n[1],t=n[0]):"YDM"==this.get_cultureDateFormat()&&(i=n[1],r=n[2],t=n[0]),i.length<2&&(i="0"+i),r.length<2&&(r="0"+r),c)for(;t.length<4;)t="0"+t;else for(;t.length<2;)t="0"+t;return""==u&&(u=i),""==f&&(f=r),""==e&&(e=t),"DMY"==this.get_cultureDateFormat()?o=u+this.get_cultureDatePlaceholder()+f+this._cultureDatePlaceholder+e:"MDY"==this.get_cultureDateFormat()?o=f+this.get_cultureDatePlaceholder()+u+this._cultureDatePlaceholder+e:"DYM"==this.get_cultureDateFormat()?o=u+this.get_cultureDatePlaceholder()+e+this._cultureDatePlaceholder+f:"MYD"==this.get_cultureDateFormat()?o=f+this.get_cultureDatePlaceholder()+e+this._cultureDatePlaceholder+u:"YMD"==this.get_cultureDateFormat()?o=e+this.get_cultureDatePlaceholder()+f+this._cultureDatePlaceholder+u:"YDM"==this.get_cultureDateFormat()&&(o=e+this.get_cultureDatePlaceholder()+u+this._cultureDatePlaceholder+f),this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime&&this.loadValue(o,this._LogicFirstPos),o},ConvFmtNumber:function(n){return 2==this._maskvalid.split(this.get_cultureDecimalPlaceholder()).length&&n.substring(n.length-1,n.length)==this.get_cultureDecimalPlaceholder()&&(n=n.substring(0,n.length-1)),n},ConvFmtTime:function(n,t){var a=0,v=!1,y=!1,f="",e="",l,c,i,r,u,o,s,h;if((""!=this.get_cultureAMPMPlaceholder()&&(f=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator)[0],e=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator)[1]),t)&&(l="",c="",""!=this._cultureAMPMPlaceholder&&(l=this._cultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[0],c=this._cultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[1]),this.get_userTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour&&(n=n.replace(new RegExp("(\\"+l+")","g"),""),n.indexOf(c)!=-1&&(a=12),n=n.replace(new RegExp("(\\"+c+")","g"),""))),n.indexOf(f)!=-1&&""!=f?v=!0:n.indexOf(e)!=-1&&""!=e&&(y=!0),""!=f&&(n=n.replace(new RegExp("(\\"+f+")","g"),"")),""!=e&&(n=n.replace(new RegExp("(\\"+e+")","g"),"")),n=n.replace(new RegExp("(\\ )","g"),""),i=n.split(this.get_cultureTimePlaceholder()),r=this._maskvalid,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.split(" ")[1]),r=r.split(":"),parseInt(i.length,10)<2||parseInt(i.length,10)>3)return"";if(u=parseInt(i[0],10)+a,u=u.toString(),u.length<r[0].length)for(;u.length<r[0].length;)u="0"+u;if(i[0]=u,o=parseInt(i[1],10)+"",o.length<r[1].length)for(;o.length<r[1].length;)o="0"+o;if(i[1]=o,s="",3==parseInt(i.length,10)){if(h=parseInt(i[2],10)+"",h.length<r[2].length)for(;h.length<r[2].length;)h="0"+h;i[2]=h;s=i[0]+this.get_cultureTimePlaceholder()+i[1]+this.get_cultureTimePlaceholder()+i[2]}else s=i[0]+this.get_cultureTimePlaceholder()+i[1];return v?s+=" "+f:y&&(s+=" "+e),s},ConvFmtDateTime:function(n,t){var u=this._SplitDateTime(n),r=u[0],i=u[1];return 2==i.split(" ").length&&(i+=" "+i.split(" ")[1]),r=this.ConvFmtDate(r,t),i=this.ConvFmtTime(i,t),r+" "+i},_filter:function(n,t){for(var r=[],i=0;i<n.length;i++)t(n[i])&&r.push(n[i]);return r},_map:function(n,t){for(var r=[],i=0;i<n.length;i++)r.push(t(n[i]));return r},ConvFmtDate:function(n,t){var o,i,r,u,f,e;if(i=this._filter(n.split(this.get_cultureDatePlaceholder()),function(n){return""!=n}),i=this._map(i,function(n){return n.replace(/[^\/\d]/g,"")}),t&&(o=n.split(this.get_cultureDatePlaceholder()),this.get_userDateFormat()!=Sys.Extended.UI.MaskedEditUserDateFormat.None&&(this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear&&(this._cultureDateFormat="DMY"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth&&(this._cultureDateFormat="DYM"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear&&(this._cultureDateFormat="MDY"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay&&(this._cultureDateFormat="MYD"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth&&(this._cultureDateFormat="YDM"),this.get_userDateFormat()==Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay&&(this._cultureDateFormat="YMD"),i[this.get_cultureDateFormat().indexOf("D")]=o[this._cultureDateFormat.indexOf("D")],i[this.get_cultureDateFormat().indexOf("M")]=o[this._cultureDateFormat.indexOf("M")],i[this.get_cultureDateFormat().indexOf("Y")]=o[this._cultureDateFormat.indexOf("Y")])),r=this._maskvalid,this._maskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.split(" ")[0]),r=r.split("/"),3!=parseInt(i.length,10))return"";if(u=parseInt(i[this.get_cultureDateFormat().indexOf("D")],10)+"",u.length<r[this.get_cultureDateFormat().indexOf("D")].length)for(;u.length<r[this.get_cultureDateFormat().indexOf("D")].length;)u="0"+u;if(i[this.get_cultureDateFormat().indexOf("D")]=u,f=parseInt(i[this.get_cultureDateFormat().indexOf("M")],10)+"",f.length<r[this.get_cultureDateFormat().indexOf("M")].length)for(;f.length<r[this.get_cultureDateFormat().indexOf("M")].length;)f="0"+f;for(i[this.get_cultureDateFormat().indexOf("M")]=f,e=parseInt(i[this.get_cultureDateFormat().indexOf("Y")],10)+"";e.length<r[this.get_cultureDateFormat().indexOf("Y")].length;)e="0"+e;return i[this.get_cultureDateFormat().indexOf("Y")]=e,i[0]+this.get_cultureDatePlaceholder()+i[1]+this.get_cultureDatePlaceholder()+i[2]},addCssClassMaskedEdit:function(n){var t=this.get_element();Sys.UI.DomElement.removeCssClass(t,this._onBlurCssNegative);Sys.UI.DomElement.removeCssClass(t,this._onFocusCssClass);Sys.UI.DomElement.removeCssClass(t,this._onFocusCssNegative);Sys.UI.DomElement.removeCssClass(t,this._onInvalidCssClass);""!=n&&Sys.UI.DomElement.addCssClass(t,n)},AddCssClassMaskedEdit:function(n){Sys.Extended.Deprecated("AddCssClassMaskedEdit(CssClass)","addCssClassMaskedEdit(cssClass)");this.addCssClassMaskedEdit(n)},_SetCancelEvent:function(n){"undefined"!=typeof n.returnValue&&(n.returnValue=!1);"undefined"!=typeof n.cancelBubble&&(n.cancelBubble=!0);"undefined"!=typeof n.preventDefault&&n.preventDefault();"undefined"!=typeof n.stopPropagation&&n.stopPropagation()},_CaptureServerValidators:function(){var r=!0,t=this._ExternalMessageError;if("undefined"!=typeof Page_Validators)for(var n=null,u=!0,i=0;i<Page_Validators.length;i++)n=Page_Validators[i],"undefined"!=typeof n.enabled&&0==n.enabled||n.TargetValidator==this.get_element().id&&(n.isvalid||(u&&(u=!1,t=""),"string"==typeof n.errormessage&&(""!=t&&(t+=", "),t+=n.errormessage),r=!1));return this._ExternalMessageError=t,r},_CaptureClientsValidators:function(){var ret=!0,msg="",ctrval,i,crtret;if(this._ExternalMessageError=msg,"undefined"!=typeof Page_Validators)for(ctrval=null,i=0;i<Page_Validators.length;i++)(ctrval=Page_Validators[i],("undefined"==typeof ctrval.enabled||0!=ctrval.enabled)&&ctrval.TargetValidator==this.get_element().id)&&("function"==typeof ctrval.evaluationfunction?(crtret=ctrval.evaluationfunction(ctrval),crtret||(ret=!1,"string"==typeof ctrval.errormessage&&(""!=msg&&(msg+=", "),msg+=ctrval.errormessage))):"string"==typeof ctrval.evaluationfunction&&(eval("crtret = "+ctrval.evaluationfunction+"("+ctrval.id+")"),crtret||(ret=!1,"string"==typeof ctrval.errormessage&&(""!=msg&&(msg+=", "),msg+=ctrval.errormessage))));return this._ExternalMessageError=msg,ret},showTooltipMessage:function(n){var r,i,t;if("undefined"!=typeof Page_Validators)for(r="",n||(r=this._CurrentMessageError,this._CurrentMessageError=""),i=0,t=null,i=0;i<Page_Validators.length;i++)if(t=Page_Validators[i],t.TargetValidator==this.get_element().id&&"true"==t.IsMaskedEdit){if(!n){if(t.innerHTML=r,"string"==typeof t.display){if("None"==t.display)return;if("Dynamic"==t.display)return void(t.style.display=t.isvalid?"none":"inline")}return}if(this._CurrentMessageError=t.innerHTML,t.innerHTML=t.TooltipMessage,"string"==typeof t.display){if("None"==t.display)return;if("Dynamic"==t.display)return void(t.style.display="inline")}return void(t.style.visibility="visible")}},ShowTooltipMessage:function(n){Sys.Extended.Deprecated("ShowTooltipMessage(Visible)","showTooltipMessage(visible)");this.showTooltipMessage(n)},_insertContent:function(n,t){var r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=r.get_Value();i=i.substring(0,t)+n+i.substring(t+1);this._LogicTextMask=this._LogicTextMask.substring(0,t)+n+this._LogicTextMask.substring(t+1);r.set_Value(i)},_insertContentRight:function(n){var c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=c.get_Value(),u=this._getLastEmptyPosition(),t,e,s,r,f,h,o;if(!(u<0)){if(e=i.substring(u+1),s=this._LogicTextMask.substring(u+1),i=i.substring(0,u)+this._promptCharacter,this._LogicTextMask=this._LogicTextMask.substring(0,u)+this._LogicPrompt,this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft){for(f=e.split(this.get_cultureDecimalPlaceholder()),h=s.split(this.get_cultureDecimalPlaceholder()),t=0;t<parseInt(f[0].length,10);t++)this._isValidMaskedEditPosition(u+1+t)?(i+=this._promptCharacter,this._LogicTextMask+=this._LogicPrompt):(i+=f[0].substring(t,t+1),this._LogicTextMask+=h[0].substring(t,t+1));for(2==f.length&&(i+=this.get_cultureDecimalPlaceholder()+f[1],this._LogicTextMask+=this.get_cultureDecimalPlaceholder()+h[1]),r=this._getNextPosition(u),t=0;t<parseInt(f[0].length,10);t++)this._isValidMaskedEditPosition(u+1+t)&&h[0].substring(t,t+1)!=this._LogicPrompt&&(i=i.substring(0,r)+f[0].substring(t,t+1)+i.substring(r+1),this._LogicTextMask=this._LogicTextMask.substring(0,r)+h[0].substring(t,t+1)+this._LogicTextMask.substring(r+1),r=this._getNextPosition(r+1))}else{for(t=0;t<parseInt(e.length,10);t++)this._isValidMaskedEditPosition(u+1+t)?(i+=this._promptCharacter,this._LogicTextMask+=this._LogicPrompt):(i+=e.substring(t,t+1),this._LogicTextMask+=s.substring(t,t+1));for(r=this._getNextPosition(u),t=0;t<parseInt(e.length,10);t++)this._isValidMaskedEditPosition(u+1+t)&&s.substring(t,t+1)!=this._LogicPrompt&&(i=i.substring(0,r)+e.substring(t,t+1)+i.substring(r+1),this._LogicTextMask=this._LogicTextMask.substring(0,r)+s.substring(t,t+1)+this._LogicTextMask.substring(r+1),r=this._getNextPosition(r+1))}o=0;this._LogicLastInt!=-1&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(o=this._LogicLastPos-this._LogicLastInt+1);i=i.substring(0,this._LogicLastPos-o)+n+i.substring(this._LogicLastPos-o+1);this._LogicTextMask=this._LogicTextMask.substring(0,this._LogicLastPos-o)+n+this._LogicTextMask.substring(this._LogicLastPos-o+1);c.set_Value(i)}},insertAMPM:function(n){var u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=u.get_Value(),r=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),t="";2==r.length&&(n.toUpperCase()==this.getCultureFirstLetterAM().toUpperCase()?t=r[0]:n.toUpperCase()==this.getCultureFirstLetterPM().toUpperCase()&&(t=r[1]),this._LogicSymbol=t);i=i.substring(0,this._LogicLastPos+2)+t+i.substring(this._LogicLastPos+2+t.length);u.set_Value(i)},InsertAMPM:function(n){Sys.Extended.Deprecated("InsertAMPM(value)","insertAMPM(value)");this.insertAMPM(n)},insertSignal:function(n){var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t=i.get_Value();"-"==n&&"-"==this._LogicSymbol&&(n="+");"+"==n?(n=" ",this._LogicSymbol="",this._InLostfocus||""==this._onFocusCssClass?this._InLostfocus||this.addCssClassMaskedEdit(""):this.addCssClassMaskedEdit(this._onFocusCssClass)):(this._LogicSymbol="-",this._InLostfocus||""==this._onFocusCssNegative||this.addCssClassMaskedEdit(this._onFocusCssNegative));this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left?t=t.substring(0,this._LogicFirstPos-1)+n+t.substring(this._LogicFirstPos):this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right&&(t=t.substring(0,this._LogicLastPos+1)+n+t.substring(this._LogicLastPos+2));i.set_Value(t)},InsertSignal:function(n){Sys.Extended.Deprecated("InsertSignal(value)","insertSignal(value)");this.insertSignal(n)},setSelectionRange:function(n,t){var r=this.get_element(),i;r.setSelectionRange?r.setSelectionRange(n,t):r.createTextRange&&(i=r.createTextRange(),i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",n),i.select())},_getLastEmptyPosition:function(){var n=this._LogicLastPos,t;for(this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicLastInt!=-1&&(t=this._getCurrentPosition(),t<=this._LogicLastInt&&(n=this._LogicLastInt));n>=0&&this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt;)n--;return n},_isValidMaskedEditPosition:function(n){return this._LogicMask.substring(n,n+1)==this._LogicPrompt},_getNextPosition:function(n){for(;!this._isValidMaskedEditPosition(n)&&n<this._LogicLastPos+1;)n++;return n>this._LogicLastPos+1&&(n=this._LogicLastPos+1),n},_getPreviousPosition:function(n){for(;!this._isValidMaskedEditPosition(n)&&n>this._LogicFirstPos;)n--;return n<this._LogicFirstPos&&(n=this._LogicFirstPos),n},_getCurrentPosition:function(){var n=0,i=this.get_element(),t,r,u,f;return i.setSelectionRange?n=parseInt(i.selectionStart,10):document.selection&&(t=document.selection.createRange(),""!=t.text?(r="","R"==this._DirectSelText?r=t.text+String.fromCharCode(3):"L"==this._DirectSelText&&(r=String.fromCharCode(3)+t.text),t.text=r,""==this._DirectSelText):(t.text=String.fromCharCode(3),""==this._DirectSelText),u=i.createTextRange(),u.findText(String.fromCharCode(3)),u.select(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i),n=f.get_Value().indexOf(String.fromCharCode(3)),document.selection.clear()),n>this._LogicLastPos+1&&(n=this._LogicLastPos+1),n<this._LogicFirstPos&&(n=this._LogicFirstPos),n},_processKey:function(n,t){var i,r=this._LogicMaskConv;if("9"==r.substring(n,n+1))i=this._charNumbers;else if("L"==r.substring(n,n+1).toUpperCase())i=this._charLetters+this._charLetters.toLowerCase();else if("$"==r.substring(n,n+1))i=this._charLetters+this._charLetters.toLowerCase()+" ";else if("C"==r.substring(n,n+1).toUpperCase())i=this._filtered;else if("A"==r.substring(n,n+1).toUpperCase())i=this._charLetters+this._charLetters.toLowerCase()+this._filtered;else if("N"==r.substring(n,n+1).toUpperCase())i=this._charNumbers+this._filtered;else{if("?"!=r.substring(n,n+1))return!1;i=""}return""==i||!i||0==i.length||i.indexOf(t)!=-1},_createMask:function(){""==this._maskConv&&""!=this._mask&&this._convertMask();var t=this._maskConv,n=0,i="",r="",u=!1;for(this._LogicTextMask="",this._QtdValidInput=0;n<parseInt(t.length,10);)t.substring(n,n+1)==this._charEscape&&0==u?u=!0:this._CharsEditMask.indexOf(t.substring(n,n+1))==-1?1==u?(u=!1,i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicEscape):this._CharsSpecialMask.indexOf(t.substring(n,n+1))!=-1?(this._QtdValidInput++,"/"==t.substring(n,n+1)?(i+=this.get_cultureDatePlaceholder(),r+="/",this._LogicTextMask+=this.get_cultureDatePlaceholder()):":"==t.substring(n,n+1)?(i+=this.get_cultureTimePlaceholder(),r+=":",this._LogicTextMask+=this.get_cultureTimePlaceholder()):","==t.substring(n,n+1)?(i+=this.get_cultureThousandsPlaceholder(),r+=".",this._LogicTextMask+=this.get_cultureThousandsPlaceholder()):"."==t.substring(n,n+1)&&(i+=this.get_cultureDecimalPlaceholder(),r+=",",this._LogicTextMask+=this.get_cultureDecimalPlaceholder())):(i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=t.substring(n,n+1)):1==u?(u=!1,i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicEscape):(this._QtdValidInput++,i+=this._promptCharacter,r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicPrompt),n++;for(this._LogicFirstPos=-1,this._LogicLastPos=-1,this._LogicLastInt=-1,this._LogicMask=this._LogicTextMask,n=0;n<parseInt(this._LogicMask.length,10);n++)this._LogicFirstPos==-1&&this._LogicMask.substring(n,n+1)==this._LogicPrompt&&(this._LogicFirstPos=n),this._LogicMask.substring(n,n+this.get_cultureDatePlaceholder().length)!=this.get_cultureDatePlaceholder()&&(" "==this._LogicMask.substring(n,n+1)&&(this._LogicDateTimeSepPos=n),this._LogicMask.substring(n,n+1)==this._LogicPrompt&&(this._LogicLastPos=n),this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._inputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicMask.substring(n,n+1)==this.get_cultureDecimalPlaceholder()&&(this._LogicLastInt=n));this._maskvalid=r.substring(this._LogicFirstPos,this._LogicLastPos+1);this._EmptyMask=i},replaceAll:function(n,t,i){return n.split(t).join(i)},getTextWithoutMask:function(n){var t=this.replaceAll(this._LogicMask,this._LogicPrompt,""),r,i,u;for(t=this.replaceAll(t,this._LogicEscape,""),r="",i=0;i<n.length;i++)u=n[i],u==t[0]?t=t.substring(1):r+=u;return r},isDataCharacter:function(n){return n==this._LogicEscape||n==this._LogicPrompt},_getClearMask:function(){for(var n=0,t="",r=0,i=!1;n<parseInt(this._LogicTextMask.length,10);)r<this._QtdValidInput&&(this._isValidMaskedEditPosition(n)&&this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt?(""==t&&i&&(t+="0"+this.get_cultureDecimalPlaceholder(),i=!1),t+=this._LogicTextMask.substring(n,n+1),r++):this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt&&this._LogicTextMask.substring(n,n+1)!=this._LogicEscape&&(this._LogicTextMask.substring(n,n+this.get_cultureDatePlaceholder().length)!=this.get_cultureDatePlaceholder()||this._maskType!=Sys.Extended.UI.MaskedEditType.Date&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime?this._LogicTextMask.substring(n,n+1)!=this.get_cultureTimePlaceholder()||this._maskType!=Sys.Extended.UI.MaskedEditType.Time&&this._maskType!=Sys.Extended.UI.MaskedEditType.DateTime?" "==this._LogicTextMask.substring(n,n+1)&&this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?t+=""==t?"":" ":this._LogicTextMask.substring(n,n+1)==this.get_cultureThousandsPlaceholder()&&this._maskType==Sys.Extended.UI.MaskedEditType.Number?t+=""==t?"":this.get_cultureThousandsPlaceholder():this._LogicTextMask.substring(n,n+1)==this.get_cultureDecimalPlaceholder()&&this._maskType==Sys.Extended.UI.MaskedEditType.Number&&(t+=""==t?"":this.get_cultureDecimalPlaceholder(),""==t&&(i=!0)):t+=""==t?"":this.get_cultureTimePlaceholder():(t+=""==t?"":this.get_cultureDatePlaceholder(),n+=this.get_cultureDatePlaceholder().length-1))),n++;return""!=this._LogicSymbol&&""!=t&&(this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime?t+=" "+this._LogicSymbol:this._maskType==Sys.Extended.UI.MaskedEditType.Number&&(t=this._LogicSymbol+t)),t},_convertMask:function(){var n,i,f,o,s,h,t;for(this._maskConv="",i="",f="",n=0;n<parseInt(this._mask.length,10);n++)if(this._CharsEditMask.indexOf(this._mask.substring(n,n+1))!=-1)0==i.length?(this._maskConv+=this._mask.substring(n,n+1),i="",f=this._mask.substring(n,n+1)):"9"==this._mask.substring(n,n+1)?i+="9":"0"==this._mask.substring(n,n+1)&&(i+="0");else if(this._CharsEditMask.indexOf(this._mask.substring(n,n+1))==-1&&this._mask.substring(n,n+1)!=this._DelimitStartDup&&this._mask.substring(n,n+1)!=this._DelimitEndDup)0==i.length?(this._maskConv+=this._mask.substring(n,n+1),i="",f=""):this._charNumbers.indexOf(this._mask.substring(n,n+1))!=-1&&(i+=this._mask.substring(n,n+1));else if(this._mask.substring(n,n+1)==this._DelimitStartDup&&""==i)i="0";else if(this._mask.substring(n,n+1)==this._DelimitEndDup&&""!=i){if(o=parseInt(i,10)-1,o>0)for(s=0;s<o;s++)this._maskConv+=f;i="";f=""}var u=-1,r=-1,e=!1;for(n=0;n<parseInt(this._maskConv.length,10);n++)this._maskConv.substring(n,n+1)!=this._charEscape||e?this._CharsEditMask.indexOf(this._maskConv.substring(n,n+1))==-1||e?e&&(e=!1):(u==-1&&(u=n),r=n):e=!0;if((this._maskType==Sys.Extended.UI.MaskedEditType.Time||this._maskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this._acceptAmPm){if(h=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),t="",2==h.length)for(t=this._charEscape+" ",n=0;n<parseInt(h[0].length,10);n++)t+=this._charEscape+" ";this._maskConv=this._maskConv.substring(0,r+1)+t+this._maskConv.substring(r+1)}else if(this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._displayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Left){for(t="",n=0;n<parseInt(this.get_cultureCurrencySymbolPlaceholder().length,10);n++)t+=this._CharsEditMask.indexOf(this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1))==-1?this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1):this._charEscape+this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1);t+=this._charEscape+" ";this._maskConv=this._maskConv.substring(0,u)+t+this._maskConv.substring(u);u+=t.length;r+=t.length}else if(this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._displayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Right){for(t=this._charEscape+" ",n=0;n<parseInt(this.get_cultureCurrencySymbolPlaceholder().length,10);n++)t+=this._CharsEditMask.indexOf(this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1))==-1?this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1):this._charEscape+this.get_cultureCurrencySymbolPlaceholder().substring(n,n+1);this._maskConv=this._maskConv.substring(0,r+1)+t+this._maskConv.substring(r+1)}this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right?this._maskConv=this._maskConv.substring(0,r+1)+this._charEscape+" "+this._maskConv.substring(r+1):this._maskType==Sys.Extended.UI.MaskedEditType.Number&&this._acceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left&&(this._maskConv=this._maskConv.substring(0,u)+this._charEscape+" "+this._maskConv.substring(u));this._convertMaskNotEscape()},_convertMaskNotEscape:function(){this._LogicMaskConv="";for(var t=this._maskConv.replace(/(\/)/g,this.get_cultureDatePlaceholder()),i=!1,n=0;n<parseInt(t.length,10);n++)t.substring(n,n+1)==this._charEscape?i=!0:i?(this._LogicMaskConv+=this._LogicEscape,i=!1):this._LogicMaskConv+=t.substring(n,n+1)},get_mask:function(){return""==this._maskConv&&""!=this._mask&&this._convertMask(),this._maskConv},set_mask:function(n){this._mask=n;this.raisePropertyChanged("mask")},get_Mask:function(){return Sys.Extended.Deprecated("get_Mask()","get_mask()"),this.get_mask()},set_Mask:function(n){Sys.Extended.Deprecated("set_Mask(value)","set_mask(value)");this.set_mask(n)},get_filtered:function(){return this._filtered},set_filtered:function(n){this._filtered=n;this.raisePropertyChanged("filtered")},get_Filtered:function(){return Sys.Extended.Deprecated("get_Filtered()","get_filtered()"),this.get_filtered()},set_Filtered:function(n){Sys.Extended.Deprecated("set_Filtered(value)","set_filtered(value)");this.set_filtered(n)},get_inputDirection:function(){return this._inputDirection},set_inputDirection:function(n){this._inputDirection=n;this.raisePropertyChanged("inputDirection")},get_InputDirection:function(){return Sys.Extended.Deprecated("get_InputDirection()","get_inputDirection()"),this.get_inputDirection()},set_InputDirection:function(n){Sys.Extended.Deprecated("set_InputDirection(value)","set_inputDirection(value)");this.set_inputDirection(n)},get_promptCharacter:function(){return this._promptCharacter},set_promptCharacter:function(n){this._promptCharacter=n;this.raisePropertyChanged("promptCharacter")},get_PromptCharacter:function(){return Sys.Extended.Deprecated("get_PromptCharacter()","get_promptCharacter()"),this.get_promptCharacter()},set_PromptCharacter:function(n){Sys.Extended.Deprecated("set_PromptCharacter(value)","set_promptCharacter(value)");this.set_promptCharacter(n)},get_onFocusCssClass:function(){return this._onFocusCssClass},set_onFocusCssClass:function(n){this._onFocusCssClass=n;this.raisePropertyChanged("onFocusCssClass")},get_OnFocusCssClass:function(){return Sys.Extended.Deprecated("get_OnFocusCssClass()","get_onFocusCssClass()"),this.get_onFocusCssClass()},set_OnFocusCssClass:function(n){Sys.Extended.Deprecated("set_OnFocusCssClass(value)","set_onFocusCssClass(value)");this.set_onFocusCssClass(n)},get_onInvalidCssClass:function(){return this._onInvalidCssClass},set_onInvalidCssClass:function(n){this._onInvalidCssClass=n;this.raisePropertyChanged("onInvalidCssClass")},get_OnInvalidCssClass:function(){return Sys.Extended.Deprecated("get_OnInvalidCssClass()","get_onInvalidCssClass()"),this.get_onInvalidCssClass()},set_OnInvalidCssClass:function(n){Sys.Extended.Deprecated("set_OnInvalidCssClass(value)","set_onInvalidCssClass(value)");this.set_onInvalidCssClass(n)},get_cultureName:function(){return this._cultureName},set_cultureName:function(n){this._cultureName=n;this.raisePropertyChanged("cultureName")},get_CultureName:function(){return Sys.Extended.Deprecated("get_CultureName()","get_cultureName()"),this.get_cultureName()},set_CultureName:function(n){Sys.Extended.Deprecated("set_CultureName(value)","set_cultureName(value)");this.set_cultureName(n)},get_cultureDatePlaceholder:function(){return this._cultureDatePlaceholder},set_cultureDatePlaceholder:function(n){this._cultureDatePlaceholder=n;this.raisePropertyChanged("cultureDatePlaceholder")},get_CultureDatePlaceholder:function(){return Sys.Extended.Deprecated("get_CultureDatePlaceholder()","get_cultureDatePlaceholder()"),this.get_cultureDatePlaceholder()},set_CultureDatePlaceholder:function(n){Sys.Extended.Deprecated("set_CultureDatePlaceholder(value)","set_cultureDatePlaceholder(value)");this.set_cultureDatePlaceholder(n)},get_cultureTimePlaceholder:function(){return this._cultureTimePlaceholder},set_cultureTimePlaceholder:function(n){this._cultureTimePlaceholder=n;this.raisePropertyChanged("cultureTimePlaceholder")},get_CultureTimePlaceholder:function(){return Sys.Extended.Deprecated("get_CultureTimePlaceholder()","get_cultureTimePlaceholder()"),this.get_cultureTimePlaceholder()},set_CultureTimePlaceholder:function(n){Sys.Extended.Deprecated("set_CultureTimePlaceholder(value)","set_cultureTimePlaceholder(value)");this.set_cultureTimePlaceholder(n)},get_cultureDecimalPlaceholder:function(){return this._cultureDecimalPlaceholder},set_cultureDecimalPlaceholder:function(n){this._cultureDecimalPlaceholder=n;this.raisePropertyChanged("cultureDecimalPlaceholder")},get_CultureDecimalPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureDecimalPlaceholder()","get_cultureDecimalPlaceholder()"),this.get_cultureDecimalPlaceholder()},set_CultureDecimalPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureDecimalPlaceholder(value)","set_cultureDecimalPlaceholder(value)");this.set_cultureDecimalPlaceholder(n)},get_cultureThousandsPlaceholder:function(){return this._cultureThousandsPlaceholder},set_cultureThousandsPlaceholder:function(n){this._cultureThousandsPlaceholder=n;this.raisePropertyChanged("cultureThousandsPlaceholder")},get_CultureThousandsPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureThousandsPlaceholder()","get_cultureThousandsPlaceholder()"),this.get_cultureThousandsPlaceholder()},set_CultureThousandsPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureThousandsPlaceholder(value)","set_cultureThousandsPlaceholder(value)");this.set_cultureThousandsPlaceholder(n)},get_cultureDateFormat:function(){var n=this._cultureDateFormat;switch(this.get_userDateFormat()){case Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear:n="DMY";break;case Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth:n="DYM";break;case Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear:n="MDY";break;case Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay:n="MYD";break;case Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth:n="YDM";break;case Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay:n="YMD"}return n},set_cultureDateFormat:function(n){this._cultureDateFormat=n;this.raisePropertyChanged("cultureDateFormat")},get_CultureDateFormat:function(){return Sys.Extended.Deprecated("get_CultureDateFormat()","get_cultureDateFormat()"),this.get_cultureDateFormat()},set_CultureDateFormat:function(n){Sys.Extended.Deprecated("set_CultureDateFormat(value)","set_cultureDateFormat(value)");this.set_cultureDateFormat(n)},get_cultureCurrencySymbolPlaceholder:function(){return this._cultureCurrencySymbolPlaceholder},set_cultureCurrencySymbolPlaceholder:function(n){this._cultureCurrencySymbolPlaceholder=n;this.raisePropertyChanged("cultureCurrencySymbolPlaceholder")},get_CultureCurrencySymbolPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureCurrencySymbolPlaceholder()","get_cultureCurrencySymbolPlaceholder()"),this.get_cultureCurrencySymbolPlaceholder()},set_CultureCurrencySymbolPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureCurrencySymbolPlaceholder(value)","set_cultureCurrencySymbolPlaceholder(value)");this.set_cultureCurrencySymbolPlaceholder(n)},get_cultureAMPMPlaceholder:function(){var n=this._cultureAMPMPlaceholder;return 2==n.split(this._AMPMPlaceholderSeparator).length&&n!=this._AMPMPlaceholderSeparator||(n=""),this.get_userTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour&&(n=""),n},set_cultureAMPMPlaceholder:function(n){this._cultureAMPMPlaceholder=n;this.raisePropertyChanged("cultureAMPMPlaceholder")},get_CultureAMPMPlaceholder:function(){return Sys.Extended.Deprecated("get_CultureAMPMPlaceholder()","get_cultureAMPMPlaceholder()"),this.get_cultureAMPMPlaceholder()},set_CultureAMPMPlaceholder:function(n){Sys.Extended.Deprecated("set_CultureAMPMPlaceholder(value)","set_cultureAMPMPlaceholder(value)");this.set_cultureAMPMPlaceholder(n)},getCultureFirstLettersAMPM:function(){if(""!=this.get_cultureAMPMPlaceholder()){var n=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[0].substring(0,1)+n[1].substring(0,1)}return""},get_CultureFirstLettersAMPM:function(){return Sys.Extended.Deprecated("get_CultureFirstLettersAMPM()","getCultureFirstLettersAMPM()"),this.getCultureFirstLettersAMPM()},getCultureFirstLetterAM:function(){if(""!=this.get_cultureAMPMPlaceholder()){var n=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[0].substring(0,1)}return""},get_CultureFirstLetterAM:function(){return Sys.Extended.Deprecated("get_CultureFirstLetterAM()","getCultureFirstLetterAM()"),this.getCultureFirstLetterAM()},getCultureFirstLetterPM:function(){if(""!=this.get_cultureAMPMPlaceholder()){var n=this.get_cultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[1].substring(0,1)}return""},get_CultureFirstLetterPM:function(){return Sys.Extended.Deprecated("get_CultureFirstLetterPM()","getCultureFirstLetterPM()"),this.getCultureFirstLetterPM()},get_clearMaskOnLostFocus:function(){return this._clearMaskOnLostfocus},set_clearMaskOnLostFocus:function(n){this._clearMaskOnLostfocus=n;this.raisePropertyChanged("clearMaskOnLostFocus")},get_ClearMaskOnLostFocus:function(){return Sys.Extended.Deprecated("get_ClearMaskOnLostFocus()","get_clearMaskOnLostFocus()"),this.get_clearMaskOnLostFocus()},set_ClearMaskOnLostFocus:function(n){Sys.Extended.Deprecated("set_ClearMaskOnLostFocus(value)","set_clearMaskOnLostFocus(value)");this.set_clearMaskOnLostFocus(n)},get_messageValidatorTip:function(){return this._messageValidatorTip},set_messageValidatorTip:function(n){this._messageValidatorTip=n;this.raisePropertyChanged("messageValidatorTip")},get_MessageValidatorTip:function(){return Sys.Extended.Deprecated("get_MessageValidatorTip()","get_messageValidatorTip()"),this.get_messageValidatorTip()},set_MessageValidatorTip:function(n){Sys.Extended.Deprecated("set_MessageValidatorTip(value)","set_messageValidatorTip(value)");this.set_messageValidatorTip(n)},get_acceptAMPM:function(){return this._acceptAmPm},set_acceptAMPM:function(n){this._acceptAmPm=n;this.raisePropertyChanged("acceptAMPM")},get_AcceptAMPM:function(){return Sys.Extended.Deprecated("get_AcceptAMPM()","get_acceptAMPM()"),this.get_acceptAMPM()},set_AcceptAMPM:function(n){Sys.Extended.Deprecated("set_AcceptAMPM(value)","set_acceptAMPM(value)");this.set_acceptAMPM(n)},get_acceptNegative:function(){return this._acceptNegative},set_acceptNegative:function(n){this._acceptNegative=n;this.raisePropertyChanged("acceptNegative")},get_AcceptNegative:function(){return Sys.Extended.Deprecated("get_AcceptNegative()","get_acceptNegative()"),this.get_acceptNegative()},set_AcceptNegative:function(n){Sys.Extended.Deprecated("set_AcceptNegative(value)","set_acceptNegative(value)");this.set_acceptNegative(n)},get_displayMoney:function(){return this._displayMoney},set_displayMoney:function(n){this._displayMoney=n;this.raisePropertyChanged("displayMoney")},get_DisplayMoney:function(){return Sys.Extended.Deprecated("get_DisplayMoney()","get_displayMoney()"),this.get_displayMoney()},set_DisplayMoney:function(n){Sys.Extended.Deprecated("set_DisplayMoney(value)","set_displayMoney(value)");this.set_displayMoney(n)},get_onFocusCssNegative:function(){return this._onFocusCssNegative},set_onFocusCssNegative:function(n){this._onFocusCssNegative=n;this.raisePropertyChanged("onFocusCssNegative")},get_OnFocusCssNegative:function(){return Sys.Extended.Deprecated("get_OnFocusCssNegative()","get_onFocusCssNegative()"),this.get_onFocusCssNegative()},set_OnFocusCssNegative:function(n){Sys.Extended.Deprecated("set_OnFocusCssNegative(value)","set_onFocusCssNegative(value)");this.set_onFocusCssNegative(n)},get_onBlurCssNegative:function(){return this._onBlurCssNegative},set_onBlurCssNegative:function(n){this._onBlurCssNegative=n;this.raisePropertyChanged("onBlurCssNegative")},get_OnBlurCssNegative:function(){return Sys.Extended.Deprecated("get_OnBlurCssNegative()","get_onBlurCssNegative()"),this.get_onBlurCssNegative()},set_OnBlurCssNegative:function(n){Sys.Extended.Deprecated("set_OnBlurCssNegative(value)","set_onBlurCssNegative(value)");this.set_onBlurCssNegative(n)},get_century:function(){return this._century},set_century:function(n){this._century=n;this.raisePropertyChanged("century")},get_Century:function(){return Sys.Extended.Deprecated("get_Century()","get_century()"),this.get_century()},set_Century:function(n){Sys.Extended.Deprecated("set_Century(value)","set_century(value)");this.set_century(n)},get_autoComplete:function(){return this._autoComplete},set_autoComplete:function(n){this._autoComplete=n;this.raisePropertyChanged("autoComplete")},get_AutoComplete:function(){return Sys.Extended.Deprecated("get_AutoComplete()","get_autoComplete()"),this.get_autoComplete()},set_AutoComplete:function(n){Sys.Extended.Deprecated("set_AutoComplete(value)","set_autoComplete(value)");this.set_autoComplete(n)},get_autoCompleteValue:function(){return this._autoCompleteValue},set_autoCompleteValue:function(n){this._autoCompleteValue=n;this.raisePropertyChanged("autoCompleteValue")},get_AutoCompleteValue:function(){return Sys.Extended.Deprecated("get_AutoCompleteValue()","get_autoCompleteValue()"),this.get_autoCompleteValue()},set_AutoCompleteValue:function(n){Sys.Extended.Deprecated("set_AutoCompleteValue(value)","set_autoCompleteValue(value)");this.set_autoCompleteValue(n)},get_maskType:function(){return this._maskType},set_maskType:function(n){this._maskType=n;this.raisePropertyChanged("maskType")},get_MaskType:function(){return Sys.Extended.Deprecated("get_MaskType()","get_maskType()"),this.get_maskType()},set_MaskType:function(n){Sys.Extended.Deprecated("set_MaskType(value)","set_maskType(value)");this.set_maskType(n)},get_clearTextOnInvalid:function(){return this._clearTextOnInvalid},set_clearTextOnInvalid:function(n){this._clearTextOnInvalid!==n&&(this._clearTextOnInvalid=n,this.raisePropertyChanged("clearTextOnInvalid"))},get_ClearTextOnInvalid:function(){return Sys.Extended.Deprecated("get_ClearTextOnInvalid()","get_clearTextOnInvalid()"),this.get_clearTextOnInvalid()},set_ClearTextOnInvalid:function(n){Sys.Extended.Deprecated("set_ClearTextOnInvalid(value)","set_clearTextOnInvalid(value)");this.set_clearTextOnInvalid(n)},get_clipboardText:function(){return this._clipboardText},set_clipboardText:function(n){this._clipboardText=n;this.raisePropertyChanged("clipboardText")},get_ClipboardText:function(){return Sys.Extended.Deprecated("get_ClipboardText()","get_clipboardText()"),this.get_clipboardText()},set_ClipboardText:function(n){Sys.Extended.Deprecated("set_ClipboardText(value)","set_clipboardText(value)");this.set_clipboardText(n)},get_clipboardEnabled:function(){return this._allowCopyPaste},set_clipboardEnabled:function(n){this._allowCopyPaste=n;this.raisePropertyChanged("clipboardEnabled")},get_ClipboardEnabled:function(){return Sys.Extended.Deprecated("get_ClipboardEnabled()","get_clipboardEnabled()"),this.get_clipboardEnabled()},set_ClipboardEnabled:function(n){Sys.Extended.Deprecated("set_ClipboardEnabled(value)","set_clipboardEnabled(value)");this.set_clipboardEnabled(n)},get_errorTooltipEnabled:function(){return this._showMessageErrorFloat},set_errorTooltipEnabled:function(n){this._showMessageErrorFloat=n;this.raisePropertyChanged("errorTooltipEnabled")},get_ErrorTooltipEnabled:function(){return Sys.Extended.Deprecated("get_ErrorTooltipEnabled()","get_errorTooltipEnabled()"),this.get_errorTooltipEnabled()},set_ErrorTooltipEnabled:function(n){Sys.Extended.Deprecated("set_ErrorTooltipEnabled(value)","set_errorTooltipEnabled(value)");this.set_errorTooltipEnabled(n)},get_errorTooltipCssClass:function(){return this._cssMessageErrorFloat},set_errorTooltipCssClass:function(n){this._cssMessageErrorFloat=n;this.raisePropertyChanged("errorTooltipCssClass")},get_ErrorTooltipCssClass:function(){return Sys.Extended.Deprecated("get_ErrorTooltipCssClass()","get_errorTooltipCssClass()"),this.get_errorTooltipCssClass()},set_ErrorTooltipCssClass:function(n){Sys.Extended.Deprecated("set_ErrorTooltipCssClass(value)","set_errorTooltipCssClass(value)");this.set_errorTooltipCssClass(n)},get_userDateFormat:function(){return this._userDateFormat},set_userDateFormat:function(n){this._userDateFormat=n;this.raisePropertyChanged("userDateFormat")},get_UserDateFormat:function(){return Sys.Extended.Deprecated("get_UserDateFormat()","get_userDateFormat()"),this.get_userDateFormat()},set_UserDateFormat:function(n){Sys.Extended.Deprecated("set_UserDateFormat(value)","set_userDateFormat(value)");this.set_userDateFormat(n)},get_userTimeFormat:function(){return this._userTimeFormat},set_userTimeFormat:function(n){this._userTimeFormat=n;this.raisePropertyChanged("userTimeFormat")},get_UserTimeFormat:function(){return Sys.Extended.Deprecated("get_UserTimeFormat()","get_userTimeFormat()"),this.get_userTimeFormat()},set_UserTimeFormat:function(n){Sys.Extended.Deprecated("set_UserTimeFormat(value)","set_userTimeFormat(value)");this.set_userTimeFormat(n)}},Sys.Extended.UI.MaskedEditBehavior.registerClass("Sys.Extended.UI.MaskedEditBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase),Sys.Extended.UI.MaskedEditType=function(){throw Error.invalidOperation();},Sys.Extended.UI.MaskedEditInputDirections=function(){throw Error.invalidOperation();},Sys.Extended.UI.MaskedEditShowSymbol=function(){throw Error.invalidOperation();},Sys.Extended.UI.MaskedEditUserDateFormat=function(){throw Error.invalidOperation();},Sys.Extended.UI.MaskedEditUserTimeFormat=function(){throw Error.invalidOperation();},Sys.Extended.UI.MaskedEditType.prototype={None:0,Date:1,Number:2,Time:3,DateTime:4},Sys.Extended.UI.MaskedEditInputDirections.prototype={LeftToRight:0,RightToLeft:1},Sys.Extended.UI.MaskedEditShowSymbol.prototype={None:0,Left:1,Right:2},Sys.Extended.UI.MaskedEditUserDateFormat.prototype={None:0,DayMonthYear:1,DayYearMonth:2,MonthDayYear:3,MonthYearDay:4,YearDayMonth:5,YearMonthDay:6},Sys.Extended.UI.MaskedEditUserTimeFormat.prototype={None:0,TwentyFourHour:1},Sys.Extended.UI.MaskedEditType.registerEnum("Sys.Extended.UI.MaskedEditType"),Sys.Extended.UI.MaskedEditInputDirections.registerEnum("Sys.Extended.UI.MaskedEditInputDirections"),Sys.Extended.UI.MaskedEditShowSymbol.registerEnum("Sys.Extended.UI.MaskedEditShowSymbol"),Sys.Extended.UI.MaskedEditUserDateFormat.registerEnum("Sys.Extended.UI.MaskedEditUserDateFormat"),Sys.Extended.UI.MaskedEditUserTimeFormat.registerEnum("Sys.Extended.UI.MaskedEditUserTimeFormat"),Type.registerNamespace("Sys.Extended.UI.HtmlEditor"),Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs=function(n,t,i){if(3!=arguments.length)throw Error.parameterCount();Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs.initializeBase(this);this._oldMode=n;this._newMode=t;this._editPanel=i},Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs.prototype={get_oldMode:function(){return this._oldMode},get_newMode:function(){return this._newMode},get_editPanel:function(){return this._editPanel}},Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs.registerClass("Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs",Sys.EventArgs),Type.registerNamespace("Sys.Extended.UI.HtmlEditor"),Sys.Extended.UI.HtmlEditor.ActiveModeType=function(){},Sys.Extended.UI.HtmlEditor.ActiveModeType.prototype={Design:0,Html:1,Preview:2},Sys.Extended.UI.HtmlEditor.ActiveModeType_checkValue=function(n){return n>=0&&n<=2},Sys.Extended.UI.HtmlEditor.ActiveModeType.registerEnum("Sys.Extended.UI.HtmlEditor.ActiveModeType",!0),Type.registerNamespace("Sys.Extended.UI.HtmlEditor"),Sys.Extended.UI.HtmlEditor.Trim=function(n){return n.replace(/[\x00-\x1F]+/g,"")},Sys.Extended.UI.HtmlEditor.TrimAll=function(n){return n.replace(/[\x00-\x1F]/g,"").replace(/^[\x20]+/g,"").replace(/[\x20]+$/g,"")},Sys.Extended.UI.HtmlEditor.isIE=Sys.Browser.agent==Sys.Browser.InternetExplorer,Sys.Extended.UI.HtmlEditor.isSafari=Sys.Browser.agent==Sys.Browser.Safari||null==Sys.Browser.agent&&5==Sys.Browser.version&&"Netscape"==Sys.Browser.name,Sys.Extended.UI.HtmlEditor.isOpera=Sys.Browser.agent==Sys.Browser.Opera,Sys.Extended.UI.HtmlEditor.tryReplaceRgb=function(n){function t(n){return n<16?"0"+n.toString(16):n.toString(16)}function r(n,i,r,u,f){var e=parseInt(r),o=parseInt(u),s=parseInt(f);return"#"+t(e)+t(o)+t(s)}var i=n;try{i=i.replace(/(rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\))/gi,r)}catch(n){}return i},Sys.Extended.UI.HtmlEditor._getScrollTop=function(n){var t=n.document,i=0;return"number"==typeof n.pageYOffset&&(i=n.pageYOffset),t.body&&t.body.scrollTop?i=t.body.scrollTop:t.documentElement&&t.documentElement.scrollTop&&(i=t.documentElement.scrollTop),i},Sys.Extended.UI.HtmlEditor._getScrollLeft=function(n){var t=n.document,i=0;return"number"==typeof n.pageXOffset?i=n.pageXOffset:t.body&&t.body.scrollLeft?i=t.body.scrollLeft:t.documentElement&&t.documentElement.scrollLeft&&(i=t.documentElement.scrollLeft),i},Sys.Extended.UI.HtmlEditor.addFormOnSubmit=function(n,t){var i=window.theForm;null!=window.theForm&&"undefined"!=typeof window.theForm&&(null!=i.HtmlEditor_editPanels&&"undefined"!=typeof i.HtmlEditor_editPanels||(i.originalOnSubmit_HtmlEditor=window.theForm.onsubmit,i.HtmlEditor_editPanels=[],window.theForm.onsubmit=Sys.Extended.UI.HtmlEditor.EditPanelsOnSubmit,null!=window.__doPostBack&&"undefined"!=typeof window.__doPostBack&&(null!=window.__doPostBack_HtmlEditor_original&&"undefined"!=typeof window.__doPostBack_HtmlEditor_original||(window.__doPostBack_HtmlEditor_original=window.__doPostBack,window.__doPostBack=Sys.Extended.UI.HtmlEditor.EditPanelsOnPostBack)),null!=window.ValidatorGetValue&&"undefined"!=typeof window.ValidatorGetValue&&(null!=window.ValidatorGetValue_HtmlEditor_original&&"undefined"!=typeof window.ValidatorGetValue_HtmlEditor_original||(window.ValidatorGetValue_HtmlEditor_original=window.ValidatorGetValue,window.ValidatorGetValue=Sys.Extended.UI.HtmlEditor.ValidatorGetValue))),i.HtmlEditor_editPanels.push({handler:n,editPanel:t}))},Sys.Extended.UI.HtmlEditor.removeFormOnSubmit=function(n){var t=window.theForm,f,r,i,u;if(null!=window.theForm&&"undefined"!=typeof window.theForm&&(f=t.originalOnSubmit_HtmlEditor,null!=t.HtmlEditor_editPanels&&"undefined"!=typeof t.HtmlEditor_editPanels)){for(r=[],i=0;i<t.HtmlEditor_editPanels.length;i++)u=t.HtmlEditor_editPanels[i],u.handler!=n&&r.push(u);t.HtmlEditor_editPanels=r;0==t.HtmlEditor_editPanels.length&&(window.theForm.onsubmit=f,t.originalOnSubmit_HtmlEditor=null,t.HtmlEditor_editPanels=null,null!=window.__doPostBack_HtmlEditor_original&&"undefined"!=typeof window.__doPostBack_HtmlEditor_original&&(window.__doPostBack=window.__doPostBack_HtmlEditor_original,window.__doPostBack_HtmlEditor_original=null),null!=window.ValidatorGetValue_HtmlEditor_original&&"undefined"!=typeof window.ValidatorGetValue_HtmlEditor_original&&(window.ValidatorGetValue=window.ValidatorGetValue_HtmlEditor_original,window.ValidatorGetValue_HtmlEditor_original=null))}},Sys.Extended.UI.HtmlEditor.EditPanelsOnSubmit=function(n){for(var i=window.theForm,r=!0,t=0;t<i.HtmlEditor_editPanels.length;t++)if(r=i.HtmlEditor_editPanels[t].handler(n),!r)break;if(r&&null!=i.originalOnSubmit_HtmlEditor&&"undefined"!=typeof i.originalOnSubmit_HtmlEditor&&(r=i.originalOnSubmit_HtmlEditor(n)),!r||!window.Page_IsValid)for(t=0;t<i.HtmlEditor_editPanels.length;t++)i.HtmlEditor_editPanels[t].editPanel._contentPrepared=!1;return r},Sys.Extended.UI.HtmlEditor.ValidatorGetValue=function(n){var i=$find(n),t,r;return null!=i&&(t=null,Sys.Extended.UI.HtmlEditor.Editor.isInstanceOfType(i)?t=i.get_editPanel():Sys.Extended.UI.HtmlEditor.EditPanel.isInstanceOfType(i)&&(t=i),null!=t)?(r=t._contentForValidation,null!=r&&"undefined"!=typeof r||(r=t.get_content()),r):window.ValidatorGetValue_HtmlEditor_original(n)},Sys.Extended.UI.HtmlEditor.EditPanelsOnPostBack=function(n,t){for(var u,r=window.theForm,i=0;i<r.HtmlEditor_editPanels.length;i++)if(u=r.HtmlEditor_editPanels[i].handler(null),!u)return!1;return null==window.__doPostBack_HtmlEditor_original||"undefined"==typeof window.__doPostBack_HtmlEditor_original||window.__doPostBack_HtmlEditor_original(n,t)},Sys.Extended.UI.HtmlEditor.getRealAttributeIE=function(n,t,i){function f(n,t){r=t}var u=i,r="";return n.outerHTML.replace(new RegExp("^(?:<[^>]*?"+t+'=")([^"]*?)"',"ig"),f),""==r&&n.outerHTML.replace(new RegExp("^(?:<[^>]*?"+t+"=')([^']*?)'","ig"),f),""==r&&n.outerHTML.replace(new RegExp("^(?:<[^>]*?"+t+"=)([^s>]*?)","ig"),f),u!=r&&""!=r&&(u=r,u=u.replace(/&amp;/g,"&")),u},Sys.Extended.UI.HtmlEditor.getRealAttribute=function(n,t){var e=t.toLowerCase(),f=n.attributes,r="",u,t;for(i=0;i<f.length;++i)if(u=f.item(i),u.specified&&(t=u.name.toLowerCase(),t==e)){r=u.value;Sys.Extended.UI.HtmlEditor.isIE&&(r=Sys.Extended.UI.HtmlEditor.getRealAttributeIE(n,t,r));"src"!=t&&"href"!=t||(r=r.replace(/(\(S\([A-Za-z0-9_]+\)\)\/)/,""));break}return r},Sys.Extended.UI.HtmlEditor.enabledWordTags=["img","strong","p","b","i","u","a","h1","h2","h3","h4","h5","h6","table","tbody","tr","td","ul","ol","li","span","div","font","xml","del","ins","em","sub","sup","hr","br"],Sys.Extended.UI.HtmlEditor.cleanUp=function(n){function u(n){for(var t,e,o,a,f=n.childNodes.length,i=0;i<n.childNodes.length;i++)if(t=n.childNodes.item(i),1==t.nodeType)if(t.tagName.indexOf("/")>=0)i--,t.parentNode.removeChild(t);else{for(var r=t.tagName.toLowerCase(),c=!1,v=Sys.Extended.UI.HtmlEditor.enabledWordTags.length,s=0;s<v;s++)if(Sys.Extended.UI.HtmlEditor.enabledWordTags[s]==r){c=!0;break}if(u(t),c){e=t.style.backgroundColor;o=t.style.color;t.style.cssText="";t.removeAttribute("style");t.getAttribute("width")&&t.getAttribute("width").length>0&&(t.style.width=t.getAttribute("width"));t.width&&t.width.length>0&&(t.style.width=t.width);t.width="";try{t.removeAttribute("width")}catch(n){}t.getAttribute("height")&&t.getAttribute("height").length>0&&(t.style.height=t.getAttribute("height"));t.height&&t.height.length>0&&(t.style.height=t.height);t.height="";try{t.removeAttribute("height")}catch(n){}if("table"==r&&(t.style.borderLeftWidth="1px",t.style.borderLeftColor="black",t.style.borderLeftStyle="solid",t.style.borderTopWidth="1px",t.style.borderTopColor="black",t.style.borderTopStyle="solid",t.style.backgroundColor=e,t.style.color=o),"td"==r&&(t.style.borderRightWidth="1px",t.style.borderRightColor="black",t.style.borderRightStyle="solid",t.style.borderBottomWidth="1px",t.style.borderBottomColor="black",t.style.borderBottomStyle="solid",t.style.backgroundColor=e,t.style.color=o),"font"==r||"span"==r){t.style.backgroundColor=e;t.style.color=o;for(var l=t.attributes,f=0,h=0;h<l.length;++h)a=l.item(h),a.specified&&f++;if(0==f&&""==t.style.cssText){for(i+=t.childNodes.length;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t);i--}}}else{for(i+=t.childNodes.length;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t);i--}}}var r,t=Sys.Extended.UI.HtmlEditor.Trim(n.replace(/[\x00-\x1F]+/g," ")).replace(/^[^\u0000]+?<html(?:[^>]*?)>/gi,"").replace(/<\/html(?:[^>]*?)>[^\u0000]*$/gi,"").replace(/<head(?:[^>]*?)>[^\u0000]*?<\/head(?:[^>]*?)>/gi,"").replace(/<body[^>]*?>([^\u0000]*?)<\/body(?:[^>]*?)>/gi,"$1").replace(/<\/?html(?:[^>]*?)>/gi,"").replace(/<\/?head(?:[^>]*?)>/gi,"").replace(/<\/?body(?:[^>]*?)>/gi,"").replace(/<!--(\w|\W)+?-->/gi,"").replace(/(<[\/]?)(?:o|v|x|p|w|\?xml):(\w+)([^>]*?>)/gi,"$1$2$3").replace(/<(IMAGEDATA)([^>]*?)>/gi,"<img$2>").replace(/<p[^>]*><p>&nbsp;<\/p><\/p>/gi,"<br>").replace(/<p[^>]*?\/>/gi,"").replace(/<(p|div)[^>]*?>&nbsp;<\/(\1)[^>]*?>/gi,"").replace(/<(p|div)[^>]*?><\/(\1)[^>]*?>/gi,""),i;do r=t,t=t.replace(/<([^>]*)(?:class|size|lang|face|start|type|border|[ovwxp]:\w+)=(?:\'[^\']*\'|\"[^\"]*\"|[^> ]+)([^>]*)>/gi,"<$1$2>");while(t!=r);i=document.createElement("div");i.innerHTML=t;u(i);t=Sys.Extended.UI.HtmlEditor.Trim(i.innerHTML);delete i;t=t.replace(/<[\/]?(xml|del|ins)[^>]*?>/gi,"").replace(/<(p|div)[^>]*?>/gi,"").replace(/<\/(p|div)[^>]*?>/gi,"<br>");do r=t,t=t.replace(/<b><\/b>/gi,"").replace(/<i><\/i>/gi,"").replace(/<u><\/u>/gi,"").replace(/<strong><\/strong>/gi,"").replace(/<em><\/em>/gi,"").replace(/<sub><\/sub>/gi,"").replace(/<sup><\/sup>/gi,""),t=t.replace(/<span[^>]*?><\/span>/gi,"").replace(/<span>([^<]+?)<\/span>/gi,"$1"),t=t.replace(/<font[^>]*?><\/font>/gi,"").replace(/<font>([^<]+?)<\/font>/gi,"$1");while(t!=r);return t=t.replace(/&rsquo;/g,"'").replace(/&lsquo;/g,"'").replace(/&ndash;/g,"-").replace(/&mdash;/g,"-").replace(/&hellip;/g,"...").replace(/&quot;/g,'"').replace(/&ldquo;/g,'"').replace(/&rdquo;/g,'"').replace(//g,"").replace(/&bull;/g,"").replace(/[ \s]+/g," ").replace(/((&nbsp;)+)/g,"&nbsp;"),document.all&&(t=t.replace(/^[\x00-\x1F]*&nbsp;/,"")),t},Sys.Extended.UI.HtmlEditor.spanJoiner=function(n,t,i,r,u){var y=0,h=n.childNodes.length,l,f,p,w,v,o,b,e,c,s;for("undefined"!=typeof i&&null!=i&&(y=i),"undefined"!=typeof r&&null!=r&&(h=r),l=y;l<h&&l<n.childNodes.length;l++)if(f=n.childNodes.item(l),f.parentNode==n)switch(f.nodeType){case 1:if(0==f.childNodes.length&&Sys.Extended.UI.HtmlEditor.isStyleTag(f.tagName)&&"A"!=f.tagName.toUpperCase()&&!(f.className.length>0||f.getAttribute("class")&&f.getAttribute("class").length>0)&&!Sys.Extended.UI.HtmlEditor.isTempElement(f)){n.removeChild(f);l--;h--;continue}if("SPAN"==f.tagName.toUpperCase()){for(;1==f.childNodes.length&&1==f.firstChild.nodeType;){if("SPAN"!=f.firstChild.tagName.toUpperCase()||Sys.Extended.UI.HtmlEditor.isTempElement(f.firstChild)){"SPAN"==f.firstChild.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isTempElement(f.firstChild)&&(p=f.firstChild,f.parentNode.insertBefore(f.firstChild,f),f.parentNode.removeChild(f),f=p);break}var c=Sys.Extended.UI.HtmlEditor.differAttr(f.firstChild,[]),s=Sys.Extended.UI.HtmlEditor.differStyle(f.firstChild),a=f.firstChild;for(a.childNodes;null!=a.firstChild;)f.insertBefore(a.firstChild,a);for(e=0;e<s.length;e++)if(s[e][1])try{if(f.style[s[e][0]])if(s[e][0].toLowerCase().indexOf("color")>=0)f.style[s[e][0]]=s[e][1];else try{w=f.style[s[e][0]];f.style[s[e][0]]=f.style[s[e][0]]+" "+s[e][1];w==f.style[s[e][0]]&&(f.style[s[e][0]]=s[e][1])}catch(n){f.style[s[e][0]]=s[e][1]}else f.style[s[e][0]]=s[e][1]}catch(n){}for(e=0;e<c.length;e++)c[e][1]&&f.setAttribute(c[e][0],c[e][1]);f.removeChild(a)}for(v=[],o=f.nextSibling;!Sys.Extended.UI.HtmlEditor.isTempElement(f)&&o&&l+1<h&&(3==o.nodeType||1==o.nodeType&&("SPAN"==o.tagName.toUpperCase()||"BR"==o.tagName.toUpperCase()&&"undefined"==typeof u)&&!Sys.Extended.UI.HtmlEditor.isTempElement(o));)if(3==o.nodeType){if(0!=(""+o.data).length)break;o.parentNode.removeChild(o);o=f.nextSibling;h--}else if("BR"==o.tagName.toUpperCase())v.push(o),o=o.nextSibling;else{if(c=Sys.Extended.UI.HtmlEditor.differAttr(f,[],o),s=Sys.Extended.UI.HtmlEditor.differStyle(f,o),0!=c.length||0!=s.length||f.className!=o.className)break;for(b=v.length,e=0;e<b;e++)f.appendChild(v[e]),h--;for(v=[];o.firstChild;)f.appendChild(o.firstChild);o.parentNode.removeChild(o);o=f.nextSibling;h--}if(!Sys.Extended.UI.HtmlEditor.isTempElement(f)&&0==f.className.length&&(c=Sys.Extended.UI.HtmlEditor.differAttr(f,[]),s=Sys.Extended.UI.HtmlEditor.differStyle(f),0==c.length&&0==s.length)){for(l--,h--;f.firstChild;)f.parentNode.insertBefore(f.firstChild,f),h++;f.parentNode.removeChild(f);continue}}if(null!=f.parentNode){if(0==f.childNodes.length&&Sys.Extended.UI.HtmlEditor.isStyleTag(f.tagName)&&"A"!=f.tagName.toUpperCase()&&!(f.className.length>0||f.getAttribute("class")&&f.getAttribute("class").length>0)&&!Sys.Extended.UI.HtmlEditor.isTempElement(f)){n.removeChild(f);l--;h--;continue}Sys.Extended.UI.HtmlEditor.spanJoiner(f,t)}}},Sys.Extended.UI.HtmlEditor._styleTags=["strong","em","u","strike","s","span","font","b","sub","sup","a","i"],Sys.Extended.UI.HtmlEditor.isStyleTag=function(n){if(!n)return!1;for(var t=0;t<Sys.Extended.UI.HtmlEditor._styleTags.length;t++)if(Sys.Extended.UI.HtmlEditor._styleTags[t].toLowerCase()==n.toLowerCase())return!0;return!1},Sys.Extended.UI.HtmlEditor.smartClassName="MSIEparagraph",Sys.Extended.UI.HtmlEditor.noContextMenuAttribute="obout-no-contextmenu",Sys.Extended.UI.HtmlEditor.isTempElement=function(n){return!!(n.id&&n.id.length>0&&n.id.indexOf(Sys.Extended.UI.HtmlEditor.smartClassName)>=0)},Sys.Extended.UI.HtmlEditor.differAttr=function(n,t,i){var o=[],u=n.parentNode,f,e;if("undefined"!=typeof i&&(u=i),u&&u.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(u.tagName)||(u=null),n.attributes)for(f=0;f<n.attributes.length;f++){for(var r=n.attributes[f],h=!1,s=0;s<t.length;s++)if(r.name.toUpperCase()==t[s].toUpperCase()){h=!0;break}if(!h&&"STYLE"!=r.name.toUpperCase()&&"_MOZ"!=r.name.toUpperCase().substr(0,4)&&r.specified)if(u&&u.attributes&&u.attributes[r.name])e=u.attributes[r.name],e&&(r.name==e.name&&r.value==e.value||o.push([r.name,r.value]));else{if("CLASS"==r.name.toUpperCase()&&""==r.value)continue;o.push([r.name,r.value])}}return o},Sys.Extended.UI.HtmlEditor.differStyle=function(n,t){function o(n,t){if(t=""+t,"textdecoration"==n.toLowerCase())for(var r=t.split(" "),i=0;i<r.length;i++)s.push([n,Sys.Extended.UI.HtmlEditor.Trim(r[i])]);else s.push([n,t])}var s=[],f=n.parentNode,r,i,u,e;"undefined"!=typeof t&&(f=t);f&&f.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(f.tagName)||(f=null);for(r in n.style)if(r&&"string"==typeof r&&"accelerator"!=r){if(i=r,!isNaN(parseInt(r))){if(!Sys.Extended.UI.HtmlEditor.isSafari)continue;i=n.style[r]}u=n.style[i];u&&"string"==typeof u&&"accelerator"!=u&&(f&&f.style?(e=f.style[i],"csstext"!=i.toLowerCase()&&"length"!=i.toLowerCase()&&u!=e&&o(i,u)):"csstext"!=i.toLowerCase()&&"length"!=i.toLowerCase()&&o(i,u))}if("undefined"!=typeof t)for(r in f.style)if(r&&"string"==typeof r&&"accelerator"!=r){if(i=r,!isNaN(parseInt(r))){if(!Sys.Extended.UI.HtmlEditor.isSafari)continue;i=n.style[r]}u=f.style[i];u&&"string"==typeof u&&"accelerator"!=u&&(e=n.style[i],"csstext"!=r.toLowerCase()&&"length"!=i.toLowerCase()&&u!=e&&o(i,u))}return s},Sys.Extended.UI.HtmlEditor.brXHTML=function(n){return n.replace(/<br>/gi,"<br/>")},Sys.Extended.UI.HtmlEditor._needsClosingTag=function(n){return" script style div span a del strong em u strike font b sub sup p iframe li ul ol placeholder textarea td tr ".indexOf(" "+n.tagName.toLowerCase()+" ")!=-1},Sys.Extended.UI.HtmlEditor._encodeText_=function(n){return n.replace(/&/gi,"&amp;").replace(/</gi,"&lt;").replace(/>/gi,"&gt;").replace(/\"/gi,"&quot;").replace(/\xA0/gi,"&nbsp;")},Sys.Extended.UI.HtmlEditor._noNeedsClosingTag=function(n){return" hr br ".indexOf(" "+n.tagName.toLowerCase()+" ")!=-1},Sys.Extended.UI.HtmlEditor.canBeInsideP=function(n,t){var r,i;if(n&&n.style&&n.style.display&&"inline"==n.style.display.toLowerCase())return!0;if(r=n.tagName.toUpperCase(),2==r.length&&"H"==r.substr(0,1)&&parseInt(r.substr(1,1))>0)return!1;switch(r){case"TBODY":case"TR":case"TD":if("undefined"!=typeof t){for(i=n.parentNode;i&&i.tagName&&"TABLE"!=i.tagName.toUpperCase();)i=i.parentNode;if("TABLE"==i.tagName.toUpperCase()&&i.style&&i.style.display&&"inline"==i.style.display.toLowerCase())return!0}case"P":case"PRE":case"TABLE":case"OL":case"UL":case"LI":case"HR":case"DIV":case"BLOCKQUOTE":case"FORM":case"FIELDSET":case"LEGEND":return!1;default:return!0}},Sys.Extended.UI.HtmlEditor.convertAlign=function(n){var t,i;try{i=parseInt(n)-1}catch(t){return n}switch(i){case 1:t="left";break;case 2:t="right";break;case 3:t="texttop";break;case 4:t="absmiddle";break;case 5:t="baseline";break;case 6:t="absbottom";break;case 7:t="bottom";break;case 8:t="middle";break;case 9:t="top";break;default:t=n.replace(/\"/g,"&quot;")}return t},Sys.Extended.UI.HtmlEditor.getHTML=function(n,t,i){try{if("undefined"==typeof i){if(!t&&1==n.nodeType)return n.innerHTML;if(t&&1==n.nodeType&&Sys.Extended.UI.HtmlEditor.isIE)return n.outerHTML}}catch(n){}var r=new Sys.Extended.UI.HtmlEditor.jsDocument(!0);return Sys.Extended.UI.HtmlEditor._getHTML_(r,n,t),r.toString()},Sys.Extended.UI.HtmlEditor._getHTML_=function(n,t,i){function nt(n,t){g.push(t)}function tt(){var n=g[k];return k++,n}function it(n,t,i,r){return t+i.replace(/(,)/g,"")+r}function rt(n,t,i,r){return t+i.replace(/(['"])/g,"")+r}var h,l,y,e,f,p,c,w,b,v,a,u,r,o,k,s;switch(t.nodeType){case 1:case 11:if(t.tagName&&t.tagName.indexOf("/")>=0){if(Sys.Extended.UI.HtmlEditor.isIE){if(f=t.tagName.toLowerCase().substr(t.tagName.indexOf("/")+1),h=t.previousSibling,"embed"==f)return;for(;null!=h;){if(h.nodeType==t.nodeType&&h.tagName&&h.tagName.toLowerCase()==f)return void n.append("<\/teo"+Sys.Extended.UI.HtmlEditor.smartClassName+":"+t.tagName.toLowerCase().substr(t.tagName.indexOf("/")+1)+">");h=h.previousSibling}}return}if(i&&t.tagName.length>0){if(f=t.tagName.toLowerCase(),l=!(t.hasChildNodes()||Sys.Extended.UI.HtmlEditor._needsClosingTag(t)),y=!0,p="",Sys.Extended.UI.HtmlEditor.isIE&&t.scopeName&&"undefined"!=typeof t.scopeName&&(p="HTML"==t.scopeName.toUpperCase()?"":t.scopeName+":"),Sys.Extended.UI.HtmlEditor.isIE&&(l||"placeholder"==f)&&!Sys.Extended.UI.HtmlEditor._noNeedsClosingTag(t)&&"embed"!=f)for(c=t.nextSibling;null!=c;){if(c.nodeType==t.nodeType&&c.tagName&&(w=c.tagName,w.indexOf("/")>=0&&w.toLowerCase().substr(w.indexOf("/")+1)==f)){l=!1;y=!1;break}c=c.nextSibling}for(Sys.Extended.UI.HtmlEditor.canBeInsideP(t)||n.append("\n"),n.append("<"+(l||y?p:"teo"+Sys.Extended.UI.HtmlEditor.smartClassName+":")+f),Sys.Extended.UI.HtmlEditor.isIE&&t.name&&t.name.length>0&&n.append(' name="'+t.name.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.value&&t.value.length>0&&"textarea"!=f&&n.append(' value="'+t.value.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.className&&t.className.length>0&&n.append(' class="'+t.className.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.align&&t.align.length>0&&n.append(' align="'+t.align.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.color&&t.color.length>0&&n.append(' color="'+t.color.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.size&&t.size.length>0&&"+0"!=t.size&&n.append(' size="'+t.size.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.shape&&t.shape.length>0&&n.write(' shape="'+t.shape.replace(/\"/g,"&quot;")+'"'),Sys.Extended.UI.HtmlEditor.isIE&&t.coords&&t.coords.length>0&&n.write(' coords="'+t.coords.replace(/\"/g,"&quot;")+'"'),b=t.attributes,v=null,e=0;e<b.length;++e)if(a=b.item(e),a.specified&&(u=a.name.toLowerCase(),"_moz"!=u.substr(0,4)&&"teoalign"!=u))if("style"!=u){if("width"==u)(r=t.width,Sys.Extended.UI.HtmlEditor.isIE&&0==r)&&(o=0,t.outerHTML.replace(new RegExp("^(?:<[^>]*?width=)([\\d]+)","ig"),function(n,t){o=t}),r!=o&&(r=o));else if("height"==u)(r=t.height,Sys.Extended.UI.HtmlEditor.isIE&&0==r)&&(o=0,t.outerHTML.replace(new RegExp("^(?:<[^>]*?height=)([\\d]+)","ig"),function(n,t){o=t}),r!=o&&(r=o));else{if(Sys.Extended.UI.HtmlEditor.isIE&&"name"==u&&t.name&&t.name.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"value"==u&&t.value&&t.value.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"align"==u&&t.align&&t.align.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"class"==u&&t.className&&t.className.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"color"==u&&t.color&&t.color.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"size"==u&&t.size&&t.size.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"shape"==u&&t.shape&&t.shape.length>0)continue;if(Sys.Extended.UI.HtmlEditor.isIE&&"coords"==u&&t.coords&&t.coords.length>0)continue;if("embed"==f&&"align"==u&&Sys.Extended.UI.HtmlEditor.isIE)r=Sys.Extended.UI.HtmlEditor.convertAlign(a.value);else{if(r=a.value,Sys.Extended.UI.HtmlEditor.isSafari&&"class"==u&&/apple-style/gi.test(r))continue;"src"!=u&&"href"!=u||(Sys.Extended.UI.HtmlEditor.isIE&&(r=Sys.Extended.UI.HtmlEditor.getRealAttributeIE(t,u,r)),r=r.replace(/(\(S\([A-Za-z0-9_]+\)\)\/)/,""));r=r.replace(/\"/g,"&quot;")}}s='"';(""+r).indexOf('"')>=0&&(s="'");null!=u&&n.append(" "+u+"="+s+r+s)}else Sys.Extended.UI.HtmlEditor.isSafari&&(v=a.value);if(t.style.cssText.length>0||null!=v){var u="style",d=/(url\((?:[^\)]*)\))/gi,g=[],r=(null!=v?v:t.style.cssText).toLowerCase();r.replace(d,nt);k=0;(r=Sys.Extended.UI.HtmlEditor.tryReplaceRgb(r.replace(d,tt)).replace(/(font-weight\s*:\s*)(700)/gi,"$1bold").replace(/([\s]*-moz-[^;]*[;][\s]*)/gi,"").replace(/(-moz-.*)$/i,"").replace(/(background-position: 0% 0%[;]*[\s]*)/gi,""),Sys.Extended.UI.HtmlEditor.isSafari&&(r=r.replace(/(text-decoration:)([^;$]+)([;$])/gi,it)),(Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)&&(r=r.replace(/(font-family:)([^;]+)([;]*)/gi,rt)),r.length>0)&&(s='"',(""+r).indexOf('"')>=0&&(s="'"),n.append(" "+u+"="+s+r+s))}n.append(l?" />":">");"br"==f&&n.append("\n")}if(t.tagName&&"SCRIPT"==t.tagName.toUpperCase()&&n.append(t.text),t.tagName&&"STYLE"==t.tagName.toUpperCase())n.append(t.innerHTML);else for(e=t.firstChild;e;e=e.nextSibling)Sys.Extended.UI.HtmlEditor._getHTML_(n,e,!0);i&&t.tagName.length>0&&!l&&y&&n.append("<\/"+p+t.tagName.toLowerCase()+">");break;case 3:n.append(Sys.Extended.UI.HtmlEditor._encodeText_(""+t.data));break;case 8:t.length>0?n.append("<!--"+t.data+"-->"):n.append("<!---->")}},Sys.Extended.UI.HtmlEditor.RemoveContextMenu=function(){var n=this,t=n._contextElement.parentNode.removeChild(n._contextElement);t&&delete t;n._contextElement=null;n._contextTable=null;n.__saved_range__&&(n.__saved_range__.select(),n.__saved_range__=null)},Sys.Extended.UI.HtmlEditor.contentEditable=function(n,t){for(var i,r;null!=n;){try{if(i=null,null==n.contentEditable||"undefined"==typeof n.contentEditable||Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera?(r=n.getAttribute("contenteditable"),"boolean"==typeof r?i=r:"string"==typeof r&&"false"==r.toLowerCase()&&(i=!1)):i=!(!n.contentEditable||"false"==n.contentEditable),null!=i&&"boolean"==typeof i&&!i)return n}catch(n){}if("undefined"!=typeof t&&t)return null;if(null!=n.tagName&&"undefined"!=typeof n.tagName&&("BODY"==n.tagName.toUpperCase()||"HTML"==n.tagName.toUpperCase()))break;n=n.parentNode}return null},Sys.Extended.UI.HtmlEditor.getSelParent=function(n){var r=n._getSelection(),i=n._createRange(r),t=null,u;return Sys.Extended.UI.HtmlEditor.isIE?t="control"==r.type.toLowerCase()?i.item(0):n._getParent(i):(t=n._getParent(i),3!=t.nodeType&&i.startContainer==i.endContainer)&&(u=t,t=t.childNodes.item(i.startOffset),null==t&&(t=u)),t},Sys.Extended.UI.HtmlEditor.__getIndex=function(n){var t=0;if(n.parentNode)for(;t<n.parentNode.childNodes.length&&n.parentNode.childNodes.item(t)!=n;t++);return t},Sys.Extended.UI.HtmlEditor.isInlineElement=function(n){if(3==n.nodeType)return!0;if(1!=n.nodeType||!n.tagName||0==n.tagName.length)return!1;if(n&&n.style&&n.style.display&&"inline"==n.style.display.toLowerCase())return!0;var t=n.tagName.toUpperCase();if(2==t.length&&"H"==t.substr(0,1)&&parseInt(t.substr(1,1))>0)return!1;switch(t){case"BR":case"TBODY":case"TR":case"TD":case"P":case"PRE":case"TABLE":case"OL":case"UL":case"LI":case"HR":case"DIV":case"BLOCKQUOTE":case"FORM":case"FIELDSET":case"LEGEND":return!1;default:return!0}},Sys.Extended.UI.HtmlEditor.capLock=function(n){var t=n.charCode,i=n.shiftKey?n.shiftKey:16==t;return!!(t>=65&&t<=90&&!i||t>=97&&t<=122&&i)},Sys.Extended.UI.HtmlEditor.operateAnchors=function(n,t,i){for(var r,e,o,u,f,h=t.getElementsByTagName("A"),c=!1,s=0;s<h.length;s++)if(r=h[s],r.name&&r.name.length>0){for(e=[],o=0;o<r.childNodes.length;o++)u=r.childNodes.item(o),1==u.nodeType&&u.tagName&&"IMG"==u.tagName.toUpperCase()&&u.src==n._editPanel.get_imagePath_anchor()&&(e.push(u),c=!0);for(;e.length>0;)r.removeChild(e.pop());i||(f=t.createElement("IMG"),f.title=r.name,f.src=n._editPanel.get_imagePath_anchor(),f.setAttribute(n.noContextMenuAttributeName(),"yes"),r.appendChild(f))}return c},Sys.Extended.UI.HtmlEditor.operatePlaceHolders=function(n,t,i){var v=!1,c,l,e,r,u,a,o,s;if(i){for(var h=t.getElementsByTagName("IMG"),f=[],r=0;r<h.length;r++)f.push(h[r]);for(r=0;r<f.length;r++)u=f[r],c=u.getAttribute("dummytag"),c&&c.length>0&&"placeholder"==c.toLowerCase()&&(l=t.createElement("PLACEHOLDER"),e=u.title,null!=e&&"undefined"!=typeof e||(e=u.getAttribute("title")),l.name=e,l.setAttribute("name",e),u.parentNode.insertBefore(l,u),u.parentNode.removeChild(u),v=!0)}else{for(var h=t.getElementsByTagName("PLACEHOLDER"),f=[],r=0;r<h.length;r++)f.push(h[r]);for(r=0;r<f.length;r++){u=f[r];a=!0;try{u.childNodes.length>0&&(a=!1)}catch(n){}a&&(o=u.name,null!=o&&"undefined"!=typeof o||(o=u.getAttribute("name")),s=t.createElement("IMG"),s.title=o,s.src=n._editPanel.get_imagePath_placeHolder(),s.setAttribute("dummytag","placeholder"),s.setAttribute("title",o),u.parentNode.insertBefore(s,u),u.parentNode.removeChild(u))}}return v},Sys.Extended.UI.HtmlEditor.inspectForShadows=function(n){for(var i=n.getElementsByTagName("IMG"),t=0;t<i.length;t++)if(i[t].getAttribute(Sys.Extended.UI.HtmlEditor.attachedIdAttribute)&&i[t].getAttribute(Sys.Extended.UI.HtmlEditor.attachedIdAttribute).length>0){try{Sys.Extended.UI.HtmlEditor.isIE?$removeHandler(i[t],"dragstart",Sys.Extended.UI.HtmlEditor.stopDrag):$removeHandler(i[t],"draggesture",Sys.Extended.UI.HtmlEditor.stopDrag)}catch(n){}Sys.Extended.UI.HtmlEditor.isIE?$addHandler(i[t],"dragstart",Sys.Extended.UI.HtmlEditor.stopDrag):$addHandler(i[t],"draggesture",Sys.Extended.UI.HtmlEditor.stopDrag)}},Sys.Extended.UI.HtmlEditor.attachedIdAttribute="obout-attached-id",Sys.Extended.UI.HtmlEditor.stopDrag=function(n){return n&&n.stopPropagation(),n.preventDefault(),!1},Sys.Extended.UI.HtmlEditor.replacingRules=[["strong","font-weight","bold"],["b","font-weight","bold"],["strong","font-weight","700"],["em","font-style","italic"],["i","font-style","italic"],["u","text-decoration","underline"],["strike","text-decoration","line-through"]],Sys.Extended.UI.HtmlEditor.replaceOldTags=function(n,t){for(var l,o,i,r,s,e,h=n.innerHTML,c=!1,u=0;u<Sys.Extended.UI.HtmlEditor.replacingRules.length;u++)if(l=new RegExp("<"+Sys.Extended.UI.HtmlEditor.replacingRules[u][0]+"[s>]","ig"),l.test(h)){c=!0;break}if(c||/<font[\s>]/gi.test(h))for(o=0;o<n.childNodes.length;o++)if(i=n.childNodes.item(o),1==i.nodeType){for(var f=null,a=i.tagName.toLowerCase(),u=0;u<Sys.Extended.UI.HtmlEditor.replacingRules.length;u++)if(Sys.Extended.UI.HtmlEditor.replacingRules[u][0].toLowerCase()==a){f=Sys.Extended.UI.HtmlEditor.replacingRules[u];break}if(f){for(r=t._doc.createElement("SPAN"),r.style.cssText=i.style.cssText,Sys.Extended.UI.HtmlEditor.isIE?r.style[f[1]]=f[2]:r.style[f[1].replace(/\-(\w)/g,function(n,t){return t.toUpperCase()})]=f[2];i.firstChild;)r.appendChild(i.firstChild);n.insertBefore(r,i);n.removeChild(i);i=r}else if("font"==a){for(r=t._doc.createElement("SPAN"),s=i.size,r.style.cssText=i.style.cssText,i.color&&(r.style.color=i.color),i.face&&(r.style.fontFamily=i.face);i.firstChild;)r.appendChild(i.firstChild);if(n.insertBefore(r,i),n.removeChild(i),s)if(e=t._doc.createElement("FONT"),e.size=s,n.insertBefore(e,r),r.style.cssText.length>0)e.appendChild(r),i=r;else{for(;r.firstChild;)e.appendChild(r.firstChild);n.removeChild(r);i=e}else i=r}Sys.Extended.UI.HtmlEditor.replaceOldTags(i,t)}},Sys.Extended.UI.HtmlEditor.getStyle=function(n,t){var i="";if(1==n.nodeType)if(n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.getComputedStyle)i=n.ownerDocument.defaultView.getComputedStyle(n,"").getPropertyValue(t);else if(n.currentStyle)try{t=t.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()});i=n.currentStyle[t]}catch(r){i=n.style[t]}else i=n.style[t];return i},Sys.Extended.UI.HtmlEditor._Marker=function(n,t,i){var r,u;if(Sys.Extended.UI.HtmlEditor.isIE)if(this._nArr=Sys.Extended.UI.HtmlEditor.getNames(n._doc.body),this._save=n._doc.body.innerHTML,this._tree=null,"control"==i.type.toLowerCase())try{for(r=t.item(0),this._tree=[];r&&(3==r.nodeType||!r.tagName||"BODY"!=r.tagName.toUpperCase());){for(u=0;r.previousSibling;)u++,r=r.previousSibling;this._tree.push(u);r=r.parentNode}}catch(n){}else this._offsetLeft=t.offsetLeft,this._offsetTop=t.offsetTop;else{this._save=Sys.Extended.UI.HtmlEditor.isOpera?Sys.Extended.UI.HtmlEditor.Trim(n._doc.body.innerHTML):n._doc.body.cloneNode(!0);this._tree=[];this._offset=0;try{for(r=t.startContainer,this._offset=t.startOffset,r&&1==r.nodeType&&"HTML"==r.tagName.toUpperCase()&&(r=n._doc.body,setTimeout(function(){try{i=n._getSelection();t=n._createRange();n._removeAllRanges(i);t.setStart(r,0);t.setEnd(r,0);n._selectRange(i,t)}catch(n){}},0));r&&r.nodeType&&(3==r.nodeType||!r.tagName||"BODY"!=r.tagName.toUpperCase());){for(u=0;r.previousSibling;)u++,Sys.Extended.UI.HtmlEditor.isOpera&&3==r.nodeType&&null!=r.previousSibling&&3==r.previousSibling.nodeType&&u--,r=r.previousSibling;this._tree.push(u);r=r.parentNode}}catch(n){}}},Sys.Extended.UI.HtmlEditor.__stackMaxSize=30,Sys.Extended.UI.HtmlEditor.getNames=function(n){for(var t,f=n.all,e=[],o=[],u=0;u<f.length;u++)if(t=f[u],t.name&&t.name.length>0){for(var i=t.tagName,s=n.getElementsByTagName(i),h=0,r=0;r<s.length;r++)if(s[r]==t){h=r;break}o[i]=h;e.push([i,o[i],t.name])}return e},Sys.Extended.UI.HtmlEditor.setNames=function(n,t){for(var i=0;i<t.length;i++)n.getElementsByTagName(t[i][0]).length>t[i][1]&&(n.getElementsByTagName(t[i][0])[t[i][1]].name=t[i][2])},Sys.Extended.UI.HtmlEditor._lookChild=function(n,t){for(var r,i=0;i<n.childNodes.length;i++)if((r=n.childNodes.item(i),r==t)||1==r.nodeType&&Sys.Extended.UI.HtmlEditor._lookChild(r,t)>=0)return i;return-1},Sys.Extended.UI.HtmlEditor.getHrefsText=function(n){function i(n,i,r,u,f,e){for(var s=i.replace(/^<([^\s>]+)/,"$1"),h=!0,o=0;o<t.length;o++)if(t[o][0]==s){h=!1;break}h&&(t[o]=[s]);t[o].push(e)}var t=[],r=new RegExp("(<[^\\s><]+)([^><]*?)(href=)(\"|')([^\\4]*?)(\\4)((?:[^><]*?)>)","ig");return n.replace(r,i),t},Sys.Extended.UI.HtmlEditor.setHrefsText=function(n,t){for(var e,i=0;i<t.length;i++)for(var u=n.getElementsByTagName(t[i][0]),f=1,r=0;r<u.length;r++)u[r].href&&(t[i][f]&&t[i][f].length>0&&(Sys.Extended.UI.HtmlEditor.isIE&&(e=u[r].innerHTML),u[r].href=t[i][f].replace(/&amp;/gi,"&"),Sys.Extended.UI.HtmlEditor.isIE&&(u[r].innerHTML=e)),f++)},Sys.Extended.UI.HtmlEditor.getImagesText=function(n){function i(n,i,r,u){return t.push(u),n}var t=[];return n.replace(/(<img(?:.*?))(src=")(.*?)(")((?:.*?)>)/gi,i),t},Sys.Extended.UI.HtmlEditor.setImagesText=function(n,t){for(var u=n.getElementsByTagName("IMG"),i=0,r=0;r<u.length;r++)u[r].src&&(t[i]&&t[i].length>0&&(u[r].src=t[i].replace(/&amp;/gi,"&")),i++)},Sys.Extended.UI.HtmlEditor.canHaveChildren=function(n){return Sys.Extended.UI.HtmlEditor.isIE?n.canHaveChildren:!/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(n.tagName.toLowerCase())},Sys.Extended.UI.HtmlEditor._setCursor=function(n,t){var u=n,f,e,r,i;if(Sys.Extended.UI.HtmlEditor.isIE){r=t._getSelection();i=t._createRange(r);"control"==r.type.toLowerCase()&&(i.remove(0),r.empty(),i=t._createRange());e=3==u.nodeType;e&&(f=t._doc.createElement("SPAN"),f.innerHTML="&nbsp;",u.parentNode.insertBefore(f,u),u=f);var o=$common.getLocation(u),s=o.x,h=o.y;e&&f.parentNode.removeChild(f);try{i.moveToPoint(s,h)}catch(n){}i.select()}else r=t._getSelection(),i=t._createRange(),i.setStart(u,0),i.setEnd(u,0),t._removeAllRanges(r),t._selectRange(r,i),t.focusEditor()},Sys.Extended.UI.HtmlEditor.myClone=function(n,t,i){var r,u;if(Sys.Extended.UI.HtmlEditor.isIE&&n.tagName&&("EMBED"==n.tagName.toUpperCase()||"OBJECT"==n.tagName.toUpperCase())){u=t.createElement("DIV");try{u.innerHTML=n.outerHTML;r=u.firstChild}catch(t){r=n}delete u}else r=n.cloneNode(i);return r},Sys.Extended.UI.HtmlEditor.unStyle=function(n){function o(n,t,r,u,f){var e=r.cloneNode(!1),h,v,l,c,a,s;if(n)if(n.push&&"function"==typeof n.push)for(h=0;h<n.length;h++)e.appendChild(n[h]);else e.appendChild(n);if(f)e.appendChild(t);else for(;t;)v=u?t.previousSibling:t.nextSibling,(1==t.nodeType||3==t.nodeType&&Sys.Extended.UI.HtmlEditor.Trim(""+t.data).length>0)&&(1==t.nodeType&&t.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(t.tagName)&&0==t.childNodes.length&&!Sys.Extended.UI.HtmlEditor.isTempElement(t)&&(t=null),t&&(0!=e.childNodes.length&&u?e.insertBefore(t,e.firstChild):e.appendChild(t))),t=v;if(0==e.childNodes.length)delete e,e=null;else if(1==e.childNodes.length&&3==e.firstChild.nodeType&&0==(""+e.firstChild.data).length)delete e,e=null;else if(!f&&e.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(e.tagName)&&"A"!=e.tagName.toUpperCase()&&!Sys.Extended.UI.HtmlEditor.isTempElement(e)){for(l=e.childNodes.length,c=0;c<e.childNodes.length;c++)s=e.childNodes.item(c),1==s.nodeType&&s.tagName&&!Sys.Extended.UI.HtmlEditor.isStyleTag(s.tagName)&&("BR"==s.tagName.toUpperCase()||"TABLE"==s.tagName.toUpperCase()||Sys.Extended.UI.HtmlEditor.isTempElement(s))&&l--;if(0==l){for(a=[];e.firstChild;)s=e.removeChild(e.firstChild),a.push(s);e=a}}return r==i?e:f?o(null,e,r.parentNode,u,f):o(e,u?r.previousSibling:r.nextSibling,r.parentNode,u,f)}var t=null!=n.parentNode&&"undefined"!=typeof n.parentNode?n.parentNode:null,i,s,r;if(t){for(i=null;t&&t.tagName&&"BODY"!=t.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(t.tagName)&&"A"!=t.tagName.toUpperCase();)i=t,t=t.parentNode;if(i){t=n.parentNode;null==n.previousSibling&&null==n.nextSibling&&t&&t.tagName&&"BODY"!=t.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(t.tagName)&&Sys.Extended.UI.HtmlEditor.differAttr(t,["class","color","face","size"]).length>0&&(n=t);var f=o(null,n.previousSibling,n.parentNode,!0,!1),e=o(null,n.nextSibling,n.parentNode,!1,!1),u=i.parentNode;if(f)if(f.push&&"function"==typeof f.push)for(r=0;r<f.length;r++)u.insertBefore(f[r],i);else u.insertBefore(f,i);if(1==n.nodeType&&n.tagName&&("BR"==n.tagName.toUpperCase()||"TABLE"==n.tagName.toUpperCase()||Sys.Extended.UI.HtmlEditor.isTempElement(n))?u.insertBefore(n,i):(s=o(null,n,n.parentNode,!1,!0),u.insertBefore(s,i)),e)if(e.push&&"function"==typeof e.push)for(r=0;r<e.length;r++)u.insertBefore(e[r],i);else u.insertBefore(e,i);u.removeChild(i)}}},Sys.Extended.UI.HtmlEditor.isTempElement=function(n){return!!(n.id&&n.id.length>0&&n.id.indexOf(Sys.Extended.UI.HtmlEditor.smartClassName)>=0)},Sys.Extended.UI.HtmlEditor._moveTagsUp=function(n,t){function r(n){var t,i;if(Sys.Extended.UI.HtmlEditor.isInlineElement(n)&&3!=n.nodeType){if(n.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName)&&"A"!=n.tagName.toUpperCase()&&!Sys.Extended.UI.HtmlEditor.isTempElement(n))for(t=n.firstChild;null!=t;)i=t.nextSibling,r(t),t=i}else Sys.Extended.UI.HtmlEditor.unStyle(n)}for(var u,i=n;null!=i&&i!=t;)u=i.nextSibling,r(i),i=u},Sys.Extended.UI.HtmlEditor._commonTotalParent=function(n,t){for(var u,f,r,i=n.parentNode,e=n;i;){if(i.tagName&&!Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName)&&(u=Sys.Extended.UI.HtmlEditor._lookChild(i,t),u>=0)){for(f=0,r=0;r<i.childNodes.length;r++)if(i.childNodes.item(r)==e){f=r;break}return{parent:i,indexFirst:f,indexLast:u}}e=i;i=i.parentNode}return null},Sys.Extended.UI.HtmlEditor._commonParent=function(n,t){for(var u,f,r,i=n.parentNode,e=n;i&&"BODY"!=i.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName);){if(u=Sys.Extended.UI.HtmlEditor._lookChild(i,t),u>=0){for(f=0,r=0;r<i.childNodes.length;r++)if(i.childNodes.item(r)==e){f=r;break}return{parent:i,indexFirst:f,indexLast:u}}e=i;i=i.parentNode}return null},Sys.Extended.UI.HtmlEditor.positionInParagraph=function(n,t,i,r,u){for(;;){var f=Sys.Extended.UI.HtmlEditor.positionInParagraphLevel(n,t,i,u);if(null!=f)return f;if(!r.tagName||!Sys.Extended.UI.HtmlEditor.isStyleTag(r.tagName)||"A"==r.tagName.toUpperCase()||Sys.Extended.UI.HtmlEditor.isTempElement(r))return i&&null!=r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n;t=i?r.previousSibling:r.nextSibling;r=r.parentNode}},Sys.Extended.UI.HtmlEditor.positionInParagraphLevel=function(n,t,i,r){for(var s,u,e,h,f,o;t;){if(s=i?t.previousSibling:t.nextSibling,!Sys.Extended.UI.HtmlEditor.isInlineElement(t))return f=t.parentNode,i?t.nextSibling?f.insertBefore(n,t.nextSibling):f.appendChild(n):f.insertBefore(n,t),n;if("function"==typeof r&&3==t.nodeType){if(e=""+t.data,i)for(u=e.length-1;u>=0&&!r(e.substr(u,1));u--);else for(u=0;u<e.length&&!r(e.substr(u,1));u++);if(u>=0&&u<e.length)return f=t.parentNode,(u>0||i&&0==u)&&(u<e.length-1||!i&&u==e.length-1)?(h=i?t.splitText(u+1):t.splitText(u),f.insertBefore(n,h)):i?t.nextSibling?f.insertBefore(n,t.nextSibling):f.appendChild(n):f.insertBefore(n,t),n}if((t=i?t.lastChild:t.firstChild)&&(o=Sys.Extended.UI.HtmlEditor.positionInParagraphLevel(n,t,i,r),null!=o))return o;t=s}return null},Sys.Extended.UI.HtmlEditor._addEvent=function(n,t,i){n.attachEvent?n.attachEvent("on"+t,i):n.addEventListener&&n.addEventListener(t,i,!0)},Sys.Extended.UI.HtmlEditor._addEvents=function(n,t,i){for(var r=0;r<t.length;r++)Sys.Extended.UI.HtmlEditor._addEvent(n,t[r],i)},Sys.Extended.UI.HtmlEditor._removeEvent=function(n,t,i){n.detachEvent?n.detachEvent("on"+t,i):n.removeEventListener&&n.removeEventListener(t,i,!0)},Sys.Extended.UI.HtmlEditor._removeEvents=function(n,t,i){for(var r=0;r<t.length;r++)Sys.Extended.UI.HtmlEditor._removeEvent(n,t[r],i)},Sys.Extended.UI.HtmlEditor._stopEvent=function(n){n&&(Sys.Extended.UI.HtmlEditor.isIE?(n.cancelBubble=!0,n.returnValue=!1):(n.preventDefault(),n.stopPropagation()))},Sys.Extended.UI.HtmlEditor.restrictedTags=["DIV","P","TD","TR","TABLE","TBODY","LI","OL","UL","FORM","INPUT"],Sys.Extended.UI.HtmlEditor.isRestricted=function(n){for(var i=n.tagName.toUpperCase(),t=0;t<Sys.Extended.UI.HtmlEditor.restrictedTags.length;t++)if(Sys.Extended.UI.HtmlEditor.restrictedTags[t].toUpperCase()==i)return!0;return!(!Sys.Extended.UI.HtmlEditor.isIE||"HTML"==n.scopeName.toUpperCase())},Sys.Extended.UI.HtmlEditor.jsDocument=function(n){this.noExtraLf="undefined"!=typeof n&&n;this.text=[];this.write=function(n){(!this.noExtraLf||0==this.text.length&&"\n"!=n||this.text.length>0&&("\n"!=this.text[this.text.length-1]||"\n"!=n))&&(this.text[this.text.length]=n)};this.append=this.write;this.writeln=function(n){this.text[this.text.length]=n+"\n"};this.toString=function(){return this.text.join("")};this.clear=function(){delete this.text;this.text=null;this.text=[]}},Sys.Extended.UI.HtmlEditor.isHeader=function(n){var t=n.tagName.toUpperCase();return 2==t.length&&"H"==t.substr(0,1)&&parseInt(t.substr(1,1))>0},Sys.Extended.UI.HtmlEditor._getReallyFirst=function(n){return"undefined"!=typeof n.firstChild&&null!=n.firstChild&&"undefined"!=typeof n.firstChild.childNodes&&null!=n.firstChild.childNodes?Sys.Extended.UI.HtmlEditor._getReallyFirst(n.firstChild):n},Sys.Extended.UI.HtmlEditor._getReallyLast=function(n){return"undefined"!=typeof n.lastChild&&null!=n.lastChild&&"undefined"!=typeof n.lastChild.childNodes&&null!=n.lastChild.childNodes?Sys.Extended.UI.HtmlEditor._getReallyLast(n.lastChild):n},Sys.Extended.UI.HtmlEditor._reallyFirst=function(n,t){if(n.firstChild){if(n.firstChild==t)return!0;if(n.firstChild.childNodes&&0==Sys.Extended.UI.HtmlEditor._lookChild(n.firstChild,t))return Sys.Extended.UI.HtmlEditor._reallyFirst(n.firstChild,t)}return!1},Sys.Extended.UI.HtmlEditor._reallyLast=function(n,t){if(n.lastChild){if(n.lastChild==t)return!0;if(n.lastChild.childNodes&&Sys.Extended.UI.HtmlEditor._lookChild(n.lastChild,t)==n.lastChild.childNodes.length-1)return Sys.Extended.UI.HtmlEditor._reallyLast(n.lastChild,t)}return!1},Sys.Extended.UI.HtmlEditor.getContainer=function(n,t){var r,i,u;if(t==n)return n;if(1==n.nodeType)for(r=0;r<n.childNodes.length;r++){if(i=n.childNodes.item(r),t==i)return i;if(1==i.nodeType&&(u=Sys.Extended.UI.HtmlEditor._lookChild(i,t),u>=0))return i.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName)&&"A"!=i.tagName.toUpperCase()&&!Sys.Extended.UI.HtmlEditor.isTempElement(i)?Sys.Extended.UI.HtmlEditor.getContainer(i,t):i}return null},Sys.Extended.UI.HtmlEditor._TryTransformFromPxToPt=function(n,t,i){var f=n.replace(/^(\d+)\.(\d+)px/i,"$1px"),e,o,r,s,u;if(!Sys.Extended.UI.HtmlEditor.isIE&&f&&f.length>0){if(e=f.toLowerCase().split(",")[0],"undefined"!=typeof i&&(o=document.getElementById(i),null!=o)){for(r=0;r<o.options.length;r++)if(s=Sys.Extended.UI.HtmlEditor.fontSizeSeek(o.options.item(r).value.toLowerCase().split(",")[0]),s==e)break;if(r==o.options.length){for(u=t._doc.createElement("SPAN"),t._doc.body.appendChild(u),r=1;r<100;r++)if(u.style.fontSize=r+"pt",Sys.Extended.UI.HtmlEditor.getStyle(u,"font-size").replace(/^(\d+)\.(\d+)px/i,"$1px")==e){e=r+"pt";break}u.parentNode.removeChild(u)}}f=e}return f},Sys.Extended.UI.HtmlEditor.fontSizeSeek=function(n){var t=n.toString();switch(t){case"1":t="8pt";break;case"2":t="10pt";break;case"3":t="12pt";break;case"4":t="14pt";break;case"5":t="18pt";break;case"6":t="24pt";break;case"7":t="36pt"}return t},Sys.Extended.UI.HtmlEditor.getOwnerDocument=function(n){return 9==n.nodeType?n:n.ownerDocument||n.document},Sys.Extended.UI.HtmlEditor.getClientViewportElement=function(n){var t;return t=9==n.nodeType?n:Sys.Extended.UI.HtmlEditor.getOwnerDocument(n),Sys.Extended.UI.HtmlEditor.isIE&&"CSS1Compat"!=t.compatMode?t.body:t.documentElement},Sys.Extended.UI.HtmlEditor.isReallyVisible=function(n){for(var t=n,i=!0;t;){if(t.style&&"none"==Sys.Extended.UI.HtmlEditor.getStyle(t,"display")){i=!1;break}t=t.parentNode}return i},Sys.Extended.UI.HtmlEditor.setSelectionRange=function(n,t,i){if(n.focus(),n.setSelectionRange)n.setSelectionRange(t,i);else if(n.createTextRange){var r=n.createTextRange();r.collapse(!0);r.moveEnd("character",i);r.moveStart("character",t);r.select()}},Sys.Extended.UI.HtmlEditor.setElementVisibility=function(n){for(var r,u,i=[],t=n;t&&1==t.nodeType&&"BODY"!=t.tagName.toUpperCase();)r=t.style.display,u=t.style.visibility,t.style&&("none"==r||"hidden"==u)&&(i.push({element:t,display:r,visibility:u}),t.style.display="",t.style.visibility="visible"),t=t.parentNode;return i},Sys.Extended.UI.HtmlEditor.restoreElementVisibility=function(n){for(var i,r,t=0;t<n.length;t++)i=n[t],r=i.element.style,r.display=i.display,r.visibility=i.visibility},!Sys.Extended.UI.HtmlEditor.isIE)try{Sys.Extended.UI.HtmlEditor.__MozillaGetInnerText=function(n,t){for(var i,f,e,u=n.childNodes,r=0;r<u.length;r++)i=u[r],(3==i.nodeType&&t.write(i.nodeValue.replace("\n","")),1==i.nodeType)&&(f=Sys.Extended.UI.HtmlEditor.getStyle(i,"display"),e=Sys.Extended.UI.HtmlEditor.getStyle(i,"visibility"),Sys.Extended.UI.HtmlEditor.__needLineBreakBefore(i)&&t.write("\n"),Sys.Extended.UI.HtmlEditor.__needTabBefore(i)&&t.write("\t"),"none"!=f&&"hidden"!=e&&Sys.Extended.UI.HtmlEditor.__MozillaGetInnerText(i,t),Sys.Extended.UI.HtmlEditor.__needLineBreakAfter(i)&&t.write("\n"))};Sys.Extended.UI.HtmlEditor.__needLineBreakBefore=function(n){return" div table p pre ol ul blockquote form fieldset ".indexOf(" "+n.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HtmlEditor.__needLineBreakAfter=function(n){return" br div table tr p pre ol ul li hr blockquote form fieldset legend ".indexOf(" "+n.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HtmlEditor.__needTabBefore=function(n){return" td li ".indexOf(" "+n.tagName.toLowerCase()+" ")!=-1}}catch(e){}Sys.Extended.UI.HtmlEditor.MSIE_list=function(n){function e(){var i,a,r,e,n;if(null!=t){for(i=t.cloneNode(!1),t.parentNode.insertBefore(i,t);t.firstChild!=u[0];)i.appendChild(t.firstChild);if(null==i.firstChild&&i.parentNode.removeChild(i),t.tagName.toUpperCase()==c)for(e=0;e<u.length;e++)if(n=u[e],1==n.nodeType&&n.tagName&&"LI"==n.tagName.toUpperCase()){if(a=!1,t.parentNode.insertBefore(n,t),""==n.style.textAlign&&(n.style.textAlign=t.style.textAlign),0==t.childNodes.length&&e==u.length-1&&(t.parentNode.removeChild(t),t=null),(""==n.style.textAlign||"left"==n.style.textAlign.toLowerCase()&&!f.rtlState()||"right"==n.style.textAlign.toLowerCase()&&f.rtlState())&&(a=f.tryUnWrap(n,o),a&&(v=!0)),!a){for(var h=f._doc.createElement(f.dfltBlockElement),l=n.attributes,s=0;s<l.length;++s)r=l.item(s),r.specified&&"style"!=r.name.toLowerCase()&&h.setAttribute(r.name,r.value);for(h.style.cssText=n.style.cssText,"P"==h.tagName.toUpperCase()&&(h.style.margin="0px");n.firstChild;)h.appendChild(n.firstChild);n.parentNode.insertBefore(h,n);n.parentNode.removeChild(n)}}else t.parentNode.insertBefore(n,t);else{for(var i=f._doc.createElement(c),l=t.attributes,s=0;s<l.length;++s)r=l.item(s),r.specified&&"style"!=r.name.toLowerCase()&&i.setAttribute(r.name,r.value);for(i.style.cssText=t.style.cssText,t.parentNode.insertBefore(i,t),e=0;e<u.length;e++)n=u[e],i.appendChild(n)}if(null!=t){for(i=t.cloneNode(!1),t.parentNode.insertBefore(i,t);t.firstChild;)i.appendChild(t.firstChild);null==i.firstChild&&i.parentNode.removeChild(i);t.parentNode.removeChild(t)}}t=null;u=[]}function a(){function d(){null!=s&&(1!=s.childNodes||s.firstChild!=o[0]&&s.firstChild!=o[1]||(s.parentNode.insertBefore(s.firstChild,s),s.parentNode.removeChild(s)));s=null}var ot=r.firstChild,st=r.lastChild,p=r.tagName.toUpperCase(),s,a,g,ft,v,nt,rt,ut,w,b,et,k,tt,it,l,y,n;if(Sys.Extended.UI.HtmlEditor.isInlineElement(r)||i[0][0]!=ot||i[i.length-1][i[i.length-1].length-1]!=st||"OL"!=p&&"UL"!=p&&"DL"!=p&&"LI"!=p&&("P"!=p&&"DIV"!=p&&!Sys.Extended.UI.HtmlEditor.isHeader(r)||"LI"!=p))if("LI"==p&&i.length<h.length)t!=r.parentNode&&(e(),t=r.parentNode,u=[]),u.push(r);else if("OL"==p||"UL"==p||"DL"==p){for(e(),t=r,u=[],l=0;l<i.length;l++)for(y=i[l],n=0;n<y.length;n++)u.push(y[n]);e()}else{if(s=null,a=null,null!=t&&e(),g="",1==i.length&&1==i[0].length&&1==i[0][0].nodeType&&i[0][0].tagName&&(g=i[0][0].tagName.toUpperCase()),"OL"==g||"UL"==g||"DL"==g){for(v=i[0][0],t=v,u=[],l=0;l<v.childNodes.length;l++)ft=v.childNodes.item(l),u.push(ft);e()}else for(l=0;l<i.length;l++){for(y=i[l],n=0;n<y.length;n++)v=y[n],nt=v.tagName?v.tagName.toUpperCase():"",(null==a&&(a=f._doc.createElement(c),v.parentNode.insertBefore(a,v)),Sys.Extended.UI.HtmlEditor.isInlineElement(v)||"BR"==nt)?(null==s&&(s=f._doc.createElement("LI"),a.appendChild(s)),rt=y[y.length-1]==o[1]?y.length-1:y.length,ut=y[0]==o[0]?1:0,"BR"==nt&&n==rt-1&&n==ut?Sys.Extended.UI.HtmlEditor.isIE?(s.appendChild(f._doc.createTextNode(String.fromCharCode(160))),v.parentNode.removeChild(v)):s.appendChild(v):"BR"==nt&&n==rt-1&&n>ut?v.parentNode.removeChild(v):s.appendChild(v),"BR"==nt&&n==y.length-1&&(d(),s=null),v==o[1]&&n==y.length-1&&(d(),s=null)):(s&&s.firstChild&&d(),null==s&&(s=f._doc.createElement("LI"),a.appendChild(s)),s.appendChild(v),d());s&&s.firstChild&&d()}if(null!=a){for(w=[],n=0;n<a.childNodes.length;n++)w.push(a.childNodes.item(n).style.textAlign);for(b=1;b<w.length&&w[b-1]==w[b];b++);if(b==w.length){for(et="left"==w[0]&&!f.rtlState()||"right"==w[0]&&f.rtlState()?"":w[0],n=0;n<a.childNodes.length;n++)a.childNodes.item(n).style.textAlign="";a.style.textAlign=et}}if(null!=a&&"P"==a.parentNode.tagName.toUpperCase()&&1==a.parentNode.childNodes.length)if(k=a.parentNode,tt=k.cloneNode(!1),k.parentNode.insertBefore(a,k),k.parentNode.removeChild(k),1==a.childNodes.length){for(it=a.firstChild;it.firstChild;)tt.appendChild(it.firstChild);it.appendChild(tt)}else delete tt}else{if(e(),u=[],"LI"==p)t=r.parentNode,u.push(r);else if("P"==p||"DIV"==p||Sys.Extended.UI.HtmlEditor.isHeader(r))t=r.parentNode.parentNode,u.push(r.parentNode);else for(t=r,l=0;l<i.length;l++)for(y=i[l],n=0;n<y.length;n++)u.push(y[n]);e()}}for(var s,h=this.get_paragraphs(),o=this.getSelectionAfterOperation(h),r=null,i=[],f=this,t=null,u=[],c=n.toUpperCase(),v=!1,l=0;l<h.length;l++)s=h[l],s.length>0&&(s[0].parentNode!=r&&(i.length>0&&a(),i=[],r=s[0].parentNode),i.push(s));i.length>0&&a();null!=t&&e();this.setSelectionAfterOperation(o,v)};Sys.Extended.UI.HtmlEditor.MSIE_justify=function(n,t,i){function a(n){null!=n&&(1!=n.childNodes||n.firstChild!=e[0]&&n.firstChild!=e[1]||(n.parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n)))}function p(){var w,vt=r.firstChild,yt=r.lastChild,at=!1,y,et,g,t,c,ct,lt,ot,rt,st,ut,ht,b,d,i,k;if(r.tagName&&!Sys.Extended.UI.HtmlEditor.isInlineElement(r)&&f[0][0]==vt&&f[f.length-1][f[f.length-1].length-1]==yt&&(w=r.tagName.toUpperCase(),"TD"!=w&&"TH"!=w&&"FIELDSET"!=w&&"LEGEND"!=w&&(at=!0)),at)if(d="",r.getAttribute("align")&&r.getAttribute("align").length>0&&(d=r.getAttribute("align")),r.align&&r.align.length>0&&(d=r.align),r.style.textAlign&&r.style.textAlign.length>0&&(d=r.style.textAlign),r.align="",r.setAttribute("align",""),r.removeAttribute("align"),("DIV"==w||"P"==w||Sys.Extended.UI.HtmlEditor.isHeader(r))&&"left"==n&&u)o.tryUnWrap(r,e,u)&&(l=!0);else{if("remain"!=n&&(r.style.textAlign="left"!=n||!u||"LI"==w&&r.parentNode.style.textAlign.length>0?n:""),u&&(r.style.margin="P"==w?"0px":""),"LI"==w){for(var v=r.parentNode,p=[],nt=0;nt<v.childNodes.length;nt++)1==v.childNodes.item(nt).nodeType&&p.push(v.childNodes.item(nt).style.textAlign);for(b=1;b<p.length&&p[b-1]==p[b];b++);if(b==p.length){for(d="left"==p[0]&&u?"":p[0],i=0;i<v.childNodes.length;i++)1==v.childNodes.item(i).nodeType&&(v.childNodes.item(i).style.textAlign="",u&&(v.childNodes.item(i).style.margin="P"==v.childNodes.item(i).tagName.toUpperCase()?"0px":""));v.style.textAlign=d}}if(("DIV"==w||"P"==w||Sys.Extended.UI.HtmlEditor.isHeader(r))&&s&&h.toUpperCase()!=w){for(var tt=o._doc.createElement(h),ft=r.attributes,it=0;it<ft.length;++it)k=ft.item(it),k.specified&&"style"!=k.name.toLowerCase()&&tt.setAttribute(k.name,k.value);for(tt.style.cssText=r.style.cssText;r.firstChild;)tt.appendChild(r.firstChild);r.parentNode.insertBefore(tt,r);r.parentNode.removeChild(r)}}else for(y=null,et=0;et<f.length;et++)for(s||(y=null),g=f[et],i=0;i<g.length;i++)if(t=g[i],c=1==t.nodeType&&t.tagName?t.tagName.toUpperCase():null,null!=c&&("UL"==c||"OL"==c||"DL"==c||"DIV"==c||Sys.Extended.UI.HtmlEditor.isHeader(t)||"P"==c||"LI"==c||"TABLE"==c)){if(a(y),y=null,"remain"!=n&&("TABLE"==c||u||(t.style.textAlign=n)),u&&(t.style.margin="P"==c?"0px":""),"UL"==c||"OL"==c||"DL"==c){for(ot=0;ot<t.childNodes.length;ot++)if(rt=t.childNodes.item(ot),1==rt.nodeType)for(rt.style.textAlign="",u&&(rt.style.margin="P"==rt.tagName.toUpperCase()?"0px":""),st=0;st<rt.childNodes.length;st++)ut=rt.childNodes.item(st),1==ut.nodeType&&ut.tagName&&(ht=ut.tagName.toUpperCase(),u&&(ut.style.margin="P"==ht?"0px":""),("DIV"==ht||"P"==ht||Sys.Extended.UI.HtmlEditor.isHeader(ut))&&o.tryUnWrap(ut,e,u)&&(l=!0));"left"==n&&u&&(t.style.textAlign="");continue}if("LI"==c){"remain"!=n&&(t.style.textAlign="left"!=n||!u||t.parentNode.style.textAlign.length>0?n:"");u&&(t.style.margin="P"==c?"0px":"");for(var v=t.parentNode,p=[],nt=0;nt<v.childNodes.length;nt++)1==v.childNodes.item(nt).nodeType&&p.push(v.childNodes.item(nt).style.textAlign);for(b=1;b<p.length&&p[b-1]==p[b];b++);if(b==p.length){for(d="left"==p[0]&&u?"":p[0],i=0;i<v.childNodes.length;i++)1==v.childNodes.item(i).nodeType&&(v.childNodes.item(i).style.textAlign="",u&&(v.childNodes.item(i).style.margin="P"==v.childNodes.item(i).tagName.toUpperCase()?"0px":""));v.style.textAlign=d}continue}if("TABLE"==c&&"remain"!=n&&("left"==n&&u?(t.align="",t.removeAttribute("align")):t.align=n),("DIV"==c||"P"==c||Sys.Extended.UI.HtmlEditor.isHeader(t))&&"left"==n&&u&&o.tryUnWrap(t,e,u)&&(l=!0),("DIV"==c||"P"==c||Sys.Extended.UI.HtmlEditor.isHeader(t))&&s&&h.toUpperCase()!=c){for(var tt=o._doc.createElement(h),ft=t.attributes,it=0;it<ft.length;++it)k=ft.item(it),k.specified&&"style"!=k.name.toLowerCase()&&tt.setAttribute(k.name,k.value);for(tt.style.cssText=t.style.cssText;t.firstChild;)tt.appendChild(t.firstChild);t.parentNode.insertBefore(tt,t);t.parentNode.removeChild(t)}}else("left"!=n||!u||s)&&(null==y&&(y=o._doc.createElement(s?h:o.dfltBlockElement),"P"!=o.dfltBlockElement.toUpperCase()||s||(y.style.margin="0px"),s||(y.style.textAlign=n),t.parentNode.insertBefore(y,t)),ct=g[g.length-1]==e[1]?g.length-1:g.length,lt=g[0]==e[0]?1:0,"BR"==c&&i==ct-1&&i==lt?Sys.Extended.UI.HtmlEditor.isIE?(y.appendChild(o._doc.createTextNode(String.fromCharCode(160))),t.parentNode.removeChild(t)):y.appendChild(t):"BR"==c&&i==ct-1&&i>lt&&(!s||null!=t.nextSibling&&t.nextSibling==e[1])?t.parentNode.removeChild(t):y.appendChild(t),"BR"!=c||i!=g.length-1||s||(a(y),y=null),t==e[1]&&i==g.length-1&&(a(y),y=null))}for(var c,v=this.get_paragraphs(),e=this.getSelectionAfterOperation(v),r=null,f=[],o=this,u=!("undefined"==typeof t||!t),s="string"==typeof i,h="string"==typeof i?i:"",l=!1,y=0;y<v.length;y++)c=v[y],c.length>0&&(c[0].parentNode!=r&&(f.length>0&&p(),f=[],r=c[0].parentNode),f.push(c));f.length>0&&p();this.setSelectionAfterOperation(e,l)};Sys.Extended.UI.HtmlEditor.MSIE_indent=function(n){function e(n){if(1==n.nodeType){var t=i.rtlState()?n.style.marginRight:n.style.marginLeft;if(t.length>0)return parseInt(t)}return 0}function r(n,t){1==n.nodeType&&("P"==n.tagName.toUpperCase()&&""==t&&(t="0px"),i.rtlState()?n.style.marginRight=t:n.style.marginLeft=t)}function h(t){n?r(t,e(t)+40+"px"):"P"==t.tagName.toUpperCase()?e(t)>=40?r(t,e(t)-40+"px"):r(t,"0px"):e(t)>40?r(t,e(t)-40+"px"):r(t,"")}function c(n){null!=n&&(1!=n.childNodes||n.firstChild!=f[0]&&n.firstChild!=f[1]||(n.parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n)))}function v(){var ht=t.firstChild,ct=t.lastChild,nt,rt,l,v,et,ot,ut,it,ft,g,st,w,tt,a,o;if(t.tagName&&!Sys.Extended.UI.HtmlEditor.isInlineElement(t)&&u[0][0]==ht&&u[u.length-1][u[u.length-1].length-1]==ct){if(o="",t.getAttribute("align")&&t.getAttribute("align").length>0&&(o=t.getAttribute("align")),t.align&&t.align.length>0&&(o=t.align),t.style.textAlign&&t.style.textAlign.length>0&&(o=t.style.textAlign),("left"==o.toLowerCase()&&!i.rtlState()||"right"==o.toLowerCase()&&i.rtlState())&&(o=""),t.align="",t.setAttribute("align",""),t.removeAttribute("align"),h(t),nt=t.tagName.toUpperCase(),("DIV"==nt||"P"==nt||Sys.Extended.UI.HtmlEditor.isHeader(t))&&""==o)i.tryUnWrap(t,f)&&(s=!0);else if(t.style.textAlign=""!=o||"LI"==nt&&t.parentNode.style.textAlign.length>0?o:"","LI"==nt){for(var b=t.parentNode,y=[],d=0;d<b.childNodes.length;d++)y.push(e(b.childNodes.item(d)));for(w=1;w<y.length&&y[w-1]==y[w];w++);if(w==y.length){for(tt=0==y[0]?"":y[0]+"px",a=0;a<b.childNodes.length;a++)r(b.childNodes.item(a),"");r(b,tt)}}}else for(rt=0;rt<u.length;rt++)for(var p=null,k=u[rt],a=0;a<k.length;a++)if(l=k[a],v=1==l.nodeType&&l.tagName?l.tagName.toUpperCase():null,null!=v&&("UL"==v||"OL"==v||"DL"==v||"DIV"==v||Sys.Extended.UI.HtmlEditor.isHeader(l)||"P"==v||"LI"==v)){if(c(p),p=null,h(l),"UL"==v||"OL"==v||"DL"==v){for(ut=0;ut<l.childNodes.length;ut++)if(it=l.childNodes.item(ut),1==it.nodeType)for(r(it,""),ft=0;ft<it.childNodes.length;ft++)g=it.childNodes.item(ft),o=1==g.nodeType?l.style.textAlign:"",(("left"==o.toLowerCase()&&!i.rtlState()||"right"==o.toLowerCase()&&i.rtlState())&&(o=""),1==g.nodeType&&(r(g,""),""==o&&g.tagName))&&(st=g.tagName.toUpperCase(),"DIV"!=st&&"P"!=st||i.tryUnWrap(g,f)&&(s=!0));continue}if("LI"==v){for(var b=l.parentNode,y=[],d=0;d<b.childNodes.length;d++)y.push(e(b.childNodes.item(d)));for(w=1;w<y.length&&y[w-1]==y[w];w++);if(w==y.length){for(tt=0==y[0]?"":y[0]+"px",a=0;a<b.childNodes.length;a++)r(b.childNodes.item(a),"");r(b,tt)}continue}o=l.style.textAlign;("left"==o.toLowerCase()&&!i.rtlState()||"right"==o.toLowerCase()&&i.rtlState())&&(o="");("DIV"==v||"P"==v||Sys.Extended.UI.HtmlEditor.isHeader(l))&&""==o&&i.tryUnWrap(l,f)&&(s=!0)}else n&&(null==p&&(p=i._doc.createElement(i.dfltBlockElement),"P"==i.dfltBlockElement.toUpperCase()&&(p.style.margin="0px"),h(p),l.parentNode.insertBefore(p,l)),et=k[k.length-1]==f[1]?k.length-1:k.length,ot=k[0]==f[0]?1:0,"BR"==v&&a==et-1&&a==ot?Sys.Extended.UI.HtmlEditor.isIE?(p.appendChild(i._doc.createTextNode(String.fromCharCode(160))),l.parentNode.removeChild(l)):p.appendChild(l):"BR"==v&&a==et-1&&a>ot?l.parentNode.removeChild(l):p.appendChild(l),"BR"==v&&a==k.length-1&&(c(p),p=null),l==f[1]&&a==k.length-1&&(c(p),p=null))}for(var o,l=this.get_paragraphs(),f=this.getSelectionAfterOperation(l),t=null,u=[],i=this,s=!1,a=0;a<l.length;a++)o=l[a],o.length>0&&(o[0].parentNode!=t&&(u.length>0&&v(),u=[],t=o[0].parentNode),u.push(o));u.length>0&&v();this.setSelectionAfterOperation(f,s)};Sys.Extended.UI.HtmlEditor.getSelectionAfterOperation=function(n){var f,e,o,i;if(0==n.length)return[];var u=this._doc.createElement("SPAN"),r=this._doc.createElement("SPAN"),s=n[0][0],t=n[n.length-1][n[n.length-1].length-1];if(s==t&&1==t.nodeType&&0==t.childNodes.length&&Sys.Extended.UI.HtmlEditor.canHaveChildren(t))t.appendChild(u),t.appendChild(r);else{if(f=Sys.Extended.UI.HtmlEditor._getReallyFirst(s),f.parentNode.insertBefore(u,f),f==s){for(e=[],e.push(u),o=0;o<n[0].length;o++)e.push(n[0][o]);n[0]=e}i=Sys.Extended.UI.HtmlEditor._getReallyLast(t);i.nextSibling?i.parentNode.insertBefore(r,i.nextSibling):i.parentNode.appendChild(r);i==t&&n[n.length-1].push(r)}return[u,r]};Sys.Extended.UI.HtmlEditor.setSelectionAfterOperation=function(n,t){var o,c,s,y,a,v,l,u;if(0!=n.length){var r=n[0],i=n[1],e=this._getSelection(),f=null,h=null;if(Sys.Extended.UI.HtmlEditor.isIE){e.empty();e=this._getSelection();o=this._createRange(e);c=this._createRange(e);try{null!=r&&null!=i&&r.nextSibling==i&&(f=this._doc.createTextNode(" "),i.parentNode.insertBefore(f,i));this._TcurrentFormat=null;null!=r&&o.moveToElementText(r);null!=i&&c.moveToElementText(i);null!=r&&null!=i?(o.setEndPoint("EndToStart",c),o.select(),null!=f&&(o.collapse(!1),o.select(),f.parentNode.removeChild(f))):null!=r?o.select():null!=i&&c.select()}catch(n){}}else try{s=r.nextSibling;y=i.previousSibling;(this._TcurrentFormat=null,s==y&&1==s.nodeType&&"BR"==s.tagName.toUpperCase())?(a=Sys.Extended.UI.HtmlEditor.__getIndex(s),u=this._doc.createRange(),u.setStart(s.parentNode,a),u.setEnd(s.parentNode,a)):(f=this._doc.createTextNode(""),h=this._doc.createTextNode(""),r.parentNode.insertBefore(f,r),i.parentNode.insertBefore(h,i),u=this._doc.createRange(),u.setStart(f,0),u.setEnd(h,0));this._removeAllRanges(e);this._selectRange(e,u)}catch(n){}v=Sys.Extended.UI.HtmlEditor._commonTotalParent(null==r?i:r,null==i?r:i);l=null;(null!=v&&(l=v.parent),null!=r&&r.parentNode.removeChild(r),null!=i&&i.parentNode.removeChild(i),t&&null!=l&&(Sys.Extended.UI.HtmlEditor.spanJoiner(l,this._doc),!Sys.Extended.UI.HtmlEditor.isIE&&null!=f&&null!=h))&&(u=this._doc.createRange(),u.setStart(f,0),u.setEnd(h,0),this._removeAllRanges(e),this._selectRange(e,u))}};Sys.Extended.UI.HtmlEditor.get_paragraphs=function(){var n,t;if(this._TcurrentFormat=null,n=this.getPseudoP(),0==n.length)try{t="<span id='"+Sys.Extended.UI.HtmlEditor.smartClassName+"_ll'><\/span><span id='"+Sys.Extended.UI.HtmlEditor.smartClassName+"_rr'><\/span><br>";this.insertHTML(t);var i=this._doc.getElementById(Sys.Extended.UI.HtmlEditor.smartClassName+"_ll"),r=this._doc.getElementById(Sys.Extended.UI.HtmlEditor.smartClassName+"_rr"),u=this._TcurrentFormat;this._TcurrentFormat=null;this.setSelectionAfterOperation([i,r],!1);this._TcurrentFormat=u;n=this.getPseudoP()}catch(n){}return n};Sys.Extended.UI.HtmlEditor.getPseudoP=function(){var w=[],n,t,c,l,k,nt,y,f,a,tt,i,it,p,d,r,ut,u;try{var e=this._getSelection(),o=this._createRange(e),v=Sys.Extended.UI.HtmlEditor.smartClassName+"_right",b=Sys.Extended.UI.HtmlEditor.smartClassName+"_left",s=null,h=null;if(Sys.Extended.UI.HtmlEditor.isIE?"control"!=e.type.toLowerCase()&&(s=o.duplicate(),h=o.duplicate(),s.setEndPoint("EndToStart",o),h.setEndPoint("StartToEnd",o)):(s=o.cloneRange(),h=o.cloneRange(),s.setEnd(s.startContainer,s.startOffset),h.setStart(h.endContainer,h.endOffset)),n=null,t=null,Sys.Extended.UI.HtmlEditor.isIE&&"control"==e.type.toLowerCase())l=o.item(0),c=this._doc.createElement("SPAN"),c.id=b,l.parentNode.insertBefore(c,l),c=this._doc.createElement("SPAN"),c.id=v,null==l.nextSibling?l.parentNode.appendChild(c):l.parentNode.insertBefore(c,l.nextSibling);else{if(!this.insertHTML("<span id='"+v+"'/>",h))return[];if(!this.insertHTML("<span id='"+b+"'/>",s))return k=this._doc.getElementById(v),null!=k&&(a=k.parentNode,a.removeChild(k)),[]}if(n=this._doc.getElementById(b),t=this._doc.getElementById(v),null!=n&&null!=t)for(;null==n.nextSibling;)n.parentNode.nextSibling?n.parentNode.parentNode.insertBefore(n,n.parentNode.nextSibling):n.parentNode.parentNode.appendChild(n);if(null!=n&&null!=t){for(;null==t.previousSibling;)t.parentNode.parentNode.insertBefore(t,t.parentNode);1==t.previousSibling.nodeType&&(nt=t.previousSibling.tagName.toUpperCase(),"BR"!=nt&&"IMG"!=nt&&(y=Sys.Extended.UI.HtmlEditor._getReallyLast(t.previousSibling),1==y.nodeType&&Sys.Extended.UI.HtmlEditor.canHaveChildren(y)?y.appendChild(t):y.parentNode.appendChild(t)));t.previousSibling&&1==t.previousSibling.nodeType&&"BR"==t.previousSibling.tagName.toUpperCase()&&t.parentNode.insertBefore(t,t.previousSibling)}for(null==n&&(r=this._doc.createElement("SPAN"),r.id=b,t.parentNode.insertBefore(r,t),n=r),null==t&&(r=this._doc.createElement("SPAN"),r.id=v,n.nextSibling?n.parentNode.insertBefore(r,n.nextSibling):n.parentNode.appendChild(r),t=r),null!=n&&null!=t&&(n.parentNode==t?t.parentNode.insertBefore(n,t):t.parentNode==n&&(null!=n.nextSibling?n.parentNode.insertBefore(t,n.nextSibling):n.parentNode.appendChild(t)));null!=n.nextSibling&&3==n.nextSibling.nodeType&&0==(""+n.nextSibling.data).length;)n.parentNode.removeChild(n.nextSibling);if(null==this._TcurrentFormat&&null!=n&&null!=t&&n.nextSibling==t){for(f=t.parentNode,this._TcurrentFormat=null;f&&"BODY"!=f.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(f.tagName);)"A"!=f.tagName.toUpperCase()&&(a=f.cloneNode(!1),null==this._TcurrentFormat?this._TcurrentFormat=a:(a.appendChild(this._TcurrentFormat),this._TcurrentFormat=a)),f=f.parentNode;this._TcurrentFormat&&(tt=this._doc.createElement("span"),tt.appendChild(this._TcurrentFormat),this._TcurrentFormat=tt.innerHTML)}for(i=n;i&&i.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName)&&"A"!=i.tagName.toUpperCase();)i=i.parentNode;for(null!=i&&"P"==i.tagName.toUpperCase()?null!=i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n):Sys.Extended.UI.HtmlEditor.positionInParagraph(n,n.previousSibling,!0,n.parentNode),i=t;i&&i.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName)&&"A"!=i.tagName.toUpperCase();)i=i.parentNode;if(null!=i&&"P"==i.tagName.toUpperCase()?i.appendChild(t):Sys.Extended.UI.HtmlEditor.positionInParagraph(t,t.nextSibling,!1,t.parentNode),w=this.getPseudoP_Recur(n,t,0),it=n.parentNode.tagName.toUpperCase(),0!=w.length||null!=n.previousSibling||null!=t.nextSibling||n.nextSibling!=t||"P"!=it&&"DIV"!=llpTagName&&"LI"!=it||(w=[[n.parentNode]]),Sys.Extended.UI.HtmlEditor.isIE){e.empty();e=this._getSelection();p=this._createRange(e);d=this._createRange(e);try{null!=n&&p.moveToElementText(n);null!=t&&d.moveToElementText(t);null!=n&&null!=t?(p.setEndPoint("EndToEnd",d),p.select()):null!=n?p.select():null!=t&&d.select()}catch(w){}}null!=n&&n.parentNode.removeChild(n);null!=t&&t.parentNode.removeChild(t)}catch(w){for(var rt=this._doc.getElementsByTagName("SPAN"),g=[],u=0;u<rt.length;u++)r=rt[u],r.id&&r.id.length>0&&(ut=new RegExp(Sys.Extended.UI.HtmlEditor.smartClassName,"ig"),ut.test(r.id)&&g.push(r));for(u=0;u<g.length;u++)g[u].parentNode.removeChild(g[u])}return w};Sys.Extended.UI.HtmlEditor.getPseudoP_Recur=function(n,t,i){function bt(n){var t,i;if(!Sys.Extended.UI.HtmlEditor.isInlineElement(n))return!0;if(n.tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName)&&"A"!=n.tagName.toUpperCase()&&!Sys.Extended.UI.HtmlEditor.isTempElement(n))for(t=n.firstChild;null!=t;){if(nnnNext=t.nextSibling,i=bt(t),i)return!0;t=nnnNext}return!1}var y=[],u=n,l=null!=t.nextSibling&&t.nextSibling.tagName&&"BR"==t.nextSibling.tagName.toUpperCase()?t.nextSibling:t,a=null,ft,et,kt,ot,d,pt,g,b,h,v,nt,tt,it,k,ut,wt,ii;if(null==u||null==l?(null!=u&&(a=Sys.Extended.UI.HtmlEditor._commonTotalParent(u,u)),null!=l&&(a=Sys.Extended.UI.HtmlEditor._commonTotalParent(l,l))):a=Sys.Extended.UI.HtmlEditor._commonTotalParent(u,l),null!=a){for(u=Sys.Extended.UI.HtmlEditor.getContainer(a.parent.childNodes.item(a.indexFirst),u),l=Sys.Extended.UI.HtmlEditor.getContainer(a.parent.childNodes.item(a.indexLast),l),Sys.Extended.UI.HtmlEditor.unStyle(u),Sys.Extended.UI.HtmlEditor.unStyle(l);u.parentNode!=a.parent;)u=u.parentNode;for(;l.parentNode!=a.parent;)l=l.parentNode;Sys.Extended.UI.HtmlEditor._moveTagsUp(u.nextSibling,l);a=null;null==n||null==t?(null!=n&&(a=Sys.Extended.UI.HtmlEditor._commonTotalParent(n,n)),null!=t&&(a=Sys.Extended.UI.HtmlEditor._commonTotalParent(t,t))):a=Sys.Extended.UI.HtmlEditor._commonTotalParent(n,t);null!=a&&Sys.Extended.UI.HtmlEditor.spanJoiner(a.parent,this._doc,a.indexFirst,a.indexLast+1,!0);var o=0,f=[],s=0;if(u.tagName&&l.tagName)if(ft=u.tagName.toUpperCase(),et=l.tagName.toUpperCase(),"TD"!=ft&&"TR"!=ft||"TD"!=et&&"TR"!=et)if("DD"!=ft&&"DT"!=ft||"DD"!=et&&"DT"!=et){if("LI"==ft&&"LI"==et){for(;"UL"!=ft&&"OL"!=ft;)u=u.parentNode,ft=u.tagName?u.tagName.toUpperCase():null;l=u}}else{for(;u.tagName&&"DL"!=u.tagName.toUpperCase();)u=u.parentNode;l=u}else{for(;"TABLE"!=u.tagName.toUpperCase();)u=u.parentNode;l=u}for(var p=n?n:t,w=t?t:n,r=u;;){if(!Sys.Extended.UI.HtmlEditor.isTempElement(r))if(kt=bt(r),kt)if(r.tagName&&"BR"==r.tagName.toUpperCase())f[s]=r,y[o]=f,o++,f=[],s=0;else if(r!=l&&r!=u||(r==l&&r==u?Sys.Extended.UI.HtmlEditor._reallyFirst(r,p)&&Sys.Extended.UI.HtmlEditor._reallyLast(r,w):Sys.Extended.UI.HtmlEditor._reallyFirst(r,p)||Sys.Extended.UI.HtmlEditor._reallyLast(r,w)))s>0&&(y[o]=f,o++,f=[],s=0),f[s]=r,y[o]=f,o++,f=[],s=0;else if(ot=r.tagName?r.tagName.toUpperCase():null,"TABLE"==ot||"TBODY"==ot){for(d=r;"TABLE"!=d.tagName.toUpperCase();)d=d.parentNode;for(var dt=0,vt=0,gt=d.rows.item(d.rows.length-1).cells.length-1,yt=d.rows.length-1,h=0;h<d.rows.length;h++)for(pt=d.rows.item(h),g=0;g<pt.cells.length;g++)b=pt.cells.item(g),Sys.Extended.UI.HtmlEditor._lookChild(b,p)>=0&&(dt=g,vt=h),Sys.Extended.UI.HtmlEditor._lookChild(b,w)>=0&&(gt=g,yt=h);for(h=vt;h<=yt;h++)for(g=h==vt?dt:0;g<=(h==yt?gt:d.rows.item(h).cells.length-1);g++)if(b=d.rows.item(h).cells.item(g),s>0&&(y[o]=f,o++,f=[],s=0),nt=Sys.Extended.UI.HtmlEditor._lookChild(b,p)>=0,tt=Sys.Extended.UI.HtmlEditor._lookChild(b,w)>=0,nt||tt){var e=p,c=w,st=Sys.Extended.UI.HtmlEditor.smartClassName+"_right_"+i,ht=Sys.Extended.UI.HtmlEditor.smartClassName+"_left_"+i;for(nt&&(c=this._doc.createElement("span"),c.id=st,b.appendChild(c)),tt&&(e=this._doc.createElement("span"),e.id=ht,b.firstChild?b.insertBefore(e,b.firstChild):b.appendChild(e)),it=this.getPseudoP_Recur(e,c,i+1),k=0;k<it.length;k++)y[o]=it[k],o++;e!=p&&e.parentNode.removeChild(e);c!=w&&c.parentNode.removeChild(c)}else{for(var ct=0,lt=b.childNodes.length,rt=ct;rt<lt;rt++)ut=b.childNodes.item(rt),Sys.Extended.UI.HtmlEditor.isTempElement(ut)||(f[s]=ut,s++);f.length>0&&(y[o]=f,o++,f=[],s=0)}}else if("UL"==ot||"OL"==ot||"DL"==ot){for(var at=r,ni=0,ti=at.childNodes.length-1,h=0;h<at.childNodes.length;h++)v=at.childNodes.item(h),1==v.nodeType&&((v==p||Sys.Extended.UI.HtmlEditor._lookChild(v,p)>=0)&&(ni=h),(v==w||Sys.Extended.UI.HtmlEditor._lookChild(v,w)>=0)&&(ti=h));for(h=ni;h<=ti;h++)if(v=at.childNodes.item(h),s>0&&(y[o]=f,o++,f=[],s=0),nt=Sys.Extended.UI.HtmlEditor._lookChild(v,p)>=0,tt=Sys.Extended.UI.HtmlEditor._lookChild(v,w)>=0,nt||tt){var e=p,c=w,st=Sys.Extended.UI.HtmlEditor.smartClassName+"_right_"+i,ht=Sys.Extended.UI.HtmlEditor.smartClassName+"_left_"+i;for(nt&&(c=this._doc.createElement("span"),c.id=st,v.appendChild(c)),tt&&(e=this._doc.createElement("span"),e.id=ht,v.firstChild?v.insertBefore(e,v.firstChild):v.appendChild(e)),it=this.getPseudoP_Recur(e,c,i+1),k=0;k<it.length;k++)y[o]=it[k],o++;e!=p&&e.parentNode.removeChild(e);c!=w&&c.parentNode.removeChild(c)}else{for(var ct=0,lt=v.childNodes.length,rt=ct;rt<lt;rt++)ut=v.childNodes.item(rt),Sys.Extended.UI.HtmlEditor.isTempElement(ut)||(f[s]=ut,s++);f.length>0&&(y[o]=f,o++,f=[],s=0)}}else if(nt=Sys.Extended.UI.HtmlEditor._lookChild(r,p)>=0,tt=Sys.Extended.UI.HtmlEditor._lookChild(r,w)>=0,s>0&&(y[o]=f,o++,f=[],s=0),nt||tt){var e=p,c=w,st=Sys.Extended.UI.HtmlEditor.smartClassName+"_right_"+i,ht=Sys.Extended.UI.HtmlEditor.smartClassName+"_left_"+i;for(nt&&(c=this._doc.createElement("span"),c.id=st,r.appendChild(c)),tt&&(e=this._doc.createElement("span"),e.id=ht,r.firstChild?r.insertBefore(e,r.firstChild):r.appendChild(e)),it=this.getPseudoP_Recur(e,c,i+1),k=0;k<it.length;k++)y[o]=it[k],o++;e!=p&&e.parentNode.removeChild(e);c!=w&&c.parentNode.removeChild(c)}else{for(var ct=0,lt=r.childNodes.length,rt=ct;rt<lt;rt++)ut=r.childNodes.item(rt),Sys.Extended.UI.HtmlEditor.isTempElement(ut)||(f[s]=ut,s++);f.length>0&&(y[o]=f,o++,f=[],s=0)}else{if(r.nodeType&&3==r.nodeType&&(wt=""+r.data,0==wt.length||/^[\n\r]+$/.test(wt))){if(ii=r.nextSibling,r.parentNode.removeChild(r),r==l)break;r=ii;continue}f[s]=r;s++}if(r==l)break;r=r.nextSibling}s>0&&(y[o]=f)}return y};Sys.Extended.UI.HtmlEditor.unWrap=function(n,t){var f=this,r,e,u,i;if(n.firstChild){for(;n.firstChild&&3==n.firstChild.nodeType&&""+n.firstChild.data=="";)n.removeChild(n.firstChild);for(r=[];n.firstChild;)n.firstChild!=t[0]&&n.firstChild!=t[1]&&r.push(n.firstChild),n.parentNode.insertBefore(n.firstChild,n);for(0==r.length&&(i=f._doc.createElement("BR"),n.parentNode.insertBefore(i,n)),Sys.Extended.UI.HtmlEditor.isIE&&1==r.length&&3==r[0].nodeType&&(e=""+r[0].data,1==e.length&&160==e.charCodeAt(0)&&(i=f._doc.createElement("BR"),r[0].parentNode.insertBefore(i,r[0]),r[0].parentNode.removeChild(r[0])));n.nextSibling&&3==n.nextSibling.nodeType&&""+n.nextSibling.data=="";)n.parentNode.removeChild(n.nextSibling);u=n.previousSibling&&t[1]==n.previousSibling?t[1].previousSibling:n.previousSibling;(u&&Sys.Extended.UI.HtmlEditor.isInlineElement(u)&&1==u.nodeType&&u.childNodes.length>0&&(u=Sys.Extended.UI.HtmlEditor._getReallyLast(u)),Sys.Extended.UI.HtmlEditor.isInlineElement(u)&&null!=n.nextSibling)&&(i=f._doc.createElement("BR"),n.parentNode.insertBefore(i,n))}else i=f._doc.createElement("BR"),n.parentNode.insertBefore(i,n);n.parentNode.removeChild(n)};Sys.Extended.UI.HtmlEditor.tryUnWrap=function(n,t,i){var c=this,o;n.style.textAlign="";for(var s=0,h=n.attributes,e=0;e<h.length;++e)o=h.item(e),o.specified&&"style"!=o.name.toLowerCase()&&s++;var r,l=n.style.cssText,u=0,f=n.tagName.toUpperCase();if(("undefined"==typeof i||!i)&&"LI"!=f)try{r=parseInt(Sys.Extended.UI.HtmlEditor.getStyle(n,"margin-top"));isNaN(r)&&(r="P"==f?1:0);u+=r;r=parseInt(Sys.Extended.UI.HtmlEditor.getStyle(n,"margin-bottom"));isNaN(r)&&(r="P"==f?1:0);u+=r;r=parseInt(Sys.Extended.UI.HtmlEditor.getStyle(n,"margin-right"));isNaN(r)&&(r="P"==f?1:0);u+=r;r=parseInt(Sys.Extended.UI.HtmlEditor.getStyle(n,"margin-left"));isNaN(r)&&(r="P"==f?1:0);u+=r}catch(n){u=1}return n.style.margin="",0==s&&0==n.style.cssText.length&&0==u||"undefined"!=typeof i&&i&&"LI"!=f?(c.unWrap(n,t),!0):(n.style.cssText=l,!1)};Sys.Extended.UI.HtmlEditor._queryCommandValue=function(n,t){var e=this._rangeStartEnd(),o,s,u,r,i,f,h,c;if(null==e)return"";try{if("backcolor"==n.toLowerCase()){for(o=e.start;o;){if(s=Sys.Extended.UI.HtmlEditor.getStyle(o,"background-color").toLowerCase(),s.length>0&&"transparent"!=s)return s;o=o.parentNode}return"#FFFFFF"}u="none";switch(n.toLowerCase()){case"forecolor":u="color";break;case"fontname":u="font-family";break;case"fontsize":u="font-size"}if(("font-size"==u||"font-family"==u)&&this._FontNotSet)for(r="",i=e.start;null!=i;){if("font-size"==u){if(i.style&&i.style.fontSize&&i.style.fontSize.length>0){r=i.style.fontSize;break}if(i.tagName&&"FONT"==i.tagName.toUpperCase()&&i.size&&i.size.length>0){r=Sys.Extended.UI.HtmlEditor.fontSizeSeek(i.size);break}}else{if(i.style&&i.style.fontFamily&&i.style.fontFamily.length>0){r=i.style.fontFamily;break}if(i.tagName&&"FONT"==i.tagName.toUpperCase()&&i.face&&i.face.length>0){r=i.face;break}}if(i.className&&i.className.length>0){r=Sys.Extended.UI.HtmlEditor.getStyle(i,u).toLowerCase();"font-size"==u&&(Sys.Extended.UI.HtmlEditor.isIE||(r=Sys.Extended.UI.HtmlEditor._TryTransformFromPxToPt(r,this,t)));break}if(f=i.tagName.toUpperCase(),"BODY"==f||"TD"==f)break;i=i.parentNode}else if(r=Sys.Extended.UI.HtmlEditor.getStyle(e.start,u).toLowerCase(),"font-size"==u&&!Sys.Extended.UI.HtmlEditor.isIE)for(r=Sys.Extended.UI.HtmlEditor._TryTransformFromPxToPt(r,this,t),i=e.start;null!=i;){if(i.style&&i.style.fontSize&&i.style.fontSize.length>0){r=i.style.fontSize;break}if(i.className&&i.className.length>0)break;if(f=i.tagName.toUpperCase(),"BODY"==f||"TD"==f)break;i=i.parentNode}if(null!=this._StyleForTyping&&this._StyleForTyping.length>0)for(h=0;h<this._StyleForTyping.length;h++)if(c=this._StyleForTyping[h],c.name==u){r=c.value;break}return r}catch(n){return""}};Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.DesignPanelEventHandler=function(n){function bi(){var i=t._createRange(t._getSelection()),n=i.parentElement();if(n&&1==n.nodeType&&"P"==n.tagName.toUpperCase()){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}function ki(){var n;for(h=t._createRange(t._getSelection()),n=h.parentElement();n&&n.tagName&&"BODY"!=n.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName);)n=n.parentNode;if(n&&1==n.nodeType&&"P"==n.tagName.toUpperCase()){for(var r=t._doc.createElement("span"),u=t._doc.createTextNode(" "),i=n;null!=i.firstChild&&1==i.firstChild.nodeType;)i=i.firstChild;if(1==i.nodeType)for(i.appendChild(u),i.appendChild(r);n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);else n.parentNode.insertBefore(u,n),n.parentNode.insertBefore(r,n);n.parentNode.removeChild(n);h.moveToElementText(r);h.select();r.parentNode.removeChild(r);t.onContentChanged()}}function di(){var i=t._getSelection(),n=t._createRange(i);null!=c&&(c.innerHTML="&nbsp;",n.moveToElementText(c),n.select(),c.parentNode.insertBefore(c.firstChild,c),c.parentNode.removeChild(c),t.onContentChanged())}function ui(){if(t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel)try{if(Sys.Extended.UI.HtmlEditor.isIE){try{t._doc.selection}catch(n){return!1}if("None"==t._getSelection().type&&0==t._doc.queryCommandValue("backcolor")&&0==t._doc.queryCommandValue("forecolor")&&(t._updateTimerLimit--,t._updateTimerLimit>0))return void(t._updateTimer=setTimeout(ui,100))}t._updated_now=!0;t._editPanel.updateToolbar();t._updated_now=!1;t._updateTimer=null;Sys.Extended.UI.HtmlEditor.isIE||t.focusEditor()}catch(n){}}var t,fi,yt,ei,pt,b,oi,wt,ct,nt,ut,f,hi,ci,et,dt,gt,yi,y,h,a,ot,g,it,st,e,tt,ti,ii,wi,o,vt,l,ri,s,at,rt,u,i;try{if(t=this,t._editPanel!=Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel)return!0;if(Sys.Extended.UI.HtmlEditor.isIE)try{fi=this._doc.selection;ei=this._createRange(fi)}catch(bi){return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}if("mousedown"!=n.type&&"dblclick"!=n.type||this._focus(!0),!Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type&&n.keyCode==Sys.UI.Key.tab&&this._editPanel.get_suppressTabInDesignMode())return Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel=null,!0;if(this.isPopup())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(yt=!1,t._contextElement&&null!=t._contextElement){if(Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.RemoveContextMenu)(),"keydown"==n.type||"keypress"==n.type)return void Sys.Extended.UI.HtmlEditor._stopEvent(n);yt=!0}if("function"==typeof t.captureInDesign&&t.captureInDesign(n)===!1)return void Sys.Extended.UI.HtmlEditor._stopEvent(n);if(Sys.Extended.UI.HtmlEditor.isIE&&"mousedown"==n.type&&n.ctrlKey){var u=t._getSelection(),gi=n.clientX,nr=n.clientY;return setTimeout(function(){var r=t._getSelection(),i,n;for("control"!=r.type.toLowerCase()&&(i=t._doc.body.createTextRange(),i.moveToPoint(gi,nr),i.select()),r=t._getSelection(),i=t._createRange(r),n=Sys.Extended.UI.HtmlEditor.getSelParent(t);null!=n&&"BODY"!=n.tagName.toUpperCase();){if("A"==n.tagName.toUpperCase()&&null!=n.href&&"undefined"!=typeof n.href&&n.href.length>0){window.open(n.href,"LinkViewWindow");break}n=n.parentNode}},0),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}if(f=Sys.Extended.UI.HtmlEditor.isIE?n.srcElement:n.target,null==f.tagName||"undefined"==typeof f.tagName||"HTML"!=f.tagName.toUpperCase()&&"BODY"!=f.tagName.toUpperCase()?null!=Sys.Extended.UI.HtmlEditor.contentEditable(f)&&setTimeout(function(){t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel&&t.toEndOfProtected()},0):1!=t.__kkoka&&(t.__kkoka=!0,setTimeout(function(){if(t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel&&!t.toEndOfProtected())try{t.focusEditor()}catch(n){}t.__kkoka=!1},0)),yt&&Sys.Extended.UI.HtmlEditor.isIE){pt=this._getSelection();try{if(ei=this._createRange(pt),"control"==pt.type.toLowerCase())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}catch(bi){return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}}if(b=Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type||"keypress"==n.type,n.type+"--"+b,b&&!this._editPanel.get_keyboardEnabled())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(o=String.fromCharCode(Sys.Extended.UI.HtmlEditor.isIE?n.keyCode:n.charCode).toLowerCase(),b&&null!=t._editPanel.get_hotkeys()&&t._editPanel.get_hotkeys().length>0)for(oi=t._editPanel.get_hotkeys().length,wt=o,18!=n.keyCode&&17!=n.keyCode&&16!=n.keyCode||(wt=null),ct=0;ct<oi;ct++)if(nt=t._editPanel.get_hotkeys()[ct],nt[1]==wt&&nt[2]==n.altKey&&nt[3]==n.shiftKey&&nt[4]==n.ctrlKey)return"function"==typeof nt[0]&&setTimeout(function(){nt[0](t);t.onContentChanged();t.focusEditor()},0),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(b&&n.shiftKey&&45==n.keyCode)this._commonPaste(n);else if(b&&n.ctrlKey&&n.altKey&&n.keyCode==Sys.UI.Key.home){for(ut=null,f=Sys.Extended.UI.HtmlEditor.getSelParent(t);f&&(3==f.nodeType||f.tagName&&"BODY"!=f.tagName.toUpperCase());)if(3!=f.nodeType&&f.tagName){if(a=f.tagName.toUpperCase(),!Sys.Extended.UI.HtmlEditor.canBeInsideP(f)&&"P"!=a){if("TD"==a)for(;"TABLE"!=a;)f=f.parentNode,a=f.tagName.toUpperCase();else if("LI"==a)for(;"OL"!=a&&"UL"!=a;)f=f.parentNode,a=f.tagName.toUpperCase();ut=f;break}f=f.parentNode}else f=f.parentNode;if(null!=ut){var u=t._getSelection(),i=t._createRange(u),v=t._doc.createTextNode("");if(ut.parentNode.insertBefore(v,ut),Sys.Extended.UI.HtmlEditor.isIE){var bt=t._createRange(u),si=t._createRange(u),kt=t._doc.createElement("span"),lt=t._doc.createElement("span");v.parentNode.insertBefore(kt,v);v.nextSibling?v.parentNode.insertBefore(lt,v.nextSibling):v.parentNode.appendChild(lt);try{bt.moveToElementText(kt);si.moveToElementText(lt);bt.setEndPoint("EndToEnd",si);bt.select()}catch(n){}v.parentNode.removeChild(kt);v.parentNode.removeChild(lt)}else t._removeAllRanges(u),i.setStart(v,0),i.setEnd(v,0),t._selectRange(u,i)}}else if(Sys.Extended.UI.HtmlEditor.isIE&&n.keyCode>=33&&n.keyCode<=40&&!n.shiftKey)hi=n.keyCode==Sys.UI.Key.pageDown||n.keyCode==Sys.UI.Key.end||n.keyCode==Sys.UI.Key.right||n.keyCode==Sys.UI.Key.down,setTimeout(function(){var u=t._getSelection(),r=t._createRange(u),n,i;"control"==u.type.toLowerCase()&&(n=r.item(0),n.contentEditable&&"false"!=n.contentEditable||(r.remove(0),u.empty(),r=t._createRange(u),i=t._doc.createElement("SPAN"),i.appendChild(t._doc.createTextNode("")),hi?null==n.nextSibling?n.parentNode.appendChild(i):n.parentNode.insertBefore(i,n.nextSibling):n.parentNode.insertBefore(i,n),r.moveToElementText(i),r.select(),setTimeout(function(){t.focusEditor();i.parentNode.removeChild(i)},0)))},0);else if((b&&!Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isSafari&&"keydown"==n.type)&&n.ctrlKey&&!n.altKey){t._a_prize=!1;var u=null,i=null,o=String.fromCharCode(Sys.Extended.UI.HtmlEditor.isIE||Sys.Extended.UI.HtmlEditor.isOpera||Sys.Extended.UI.HtmlEditor.isSafari?n.keyCode:n.charCode).toLowerCase(),p=null,ft=null;if((Sys.Extended.UI.HtmlEditor.isIE||Sys.Extended.UI.HtmlEditor.isSafari)&&17==n.keyCode)return!1;if(Sys.Extended.UI.HtmlEditor.isIE||n.keyCode!=Sys.UI.Key.end||n.shiftKey){if(46==n.keyCode&&this.isShadowed())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(46==n.keyCode||n.keyCode==Sys.UI.Key.backspace)(Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type||!Sys.Extended.UI.HtmlEditor.isIE&&"keypress"==n.type)&&this._saveContent();else switch(o){case"a":if(!Sys.Extended.UI.HtmlEditor.isIE)return u=this._getSelection(),this._removeAllRanges(u),i=this._createRange(),i.selectNodeContents(this._doc.body),this._selectRange(u,i),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;t._a_prize=!0;break;case"z":return this.undo(),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"p":if(!Sys.Extended.UI.HtmlEditor.isIE)return setTimeout(function(){t._contextMenuCallP()},0),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;break;case"y":return this.redo(),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"x":if(this.isShadowed())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(this._saveContent(),Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type)return t.openWait(),setTimeout(function(){t._copyCut(o,!1);t.closeWait()},0),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;break;case"c":if(this.isShadowed())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type)return t.openWait(),setTimeout(function(){t._copyCut(o,!1);t.closeWait();setTimeout(function(){t._ifShadow()},0)},0),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;break;case"v":if(this.isShadowed())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(Sys.Extended.UI.HtmlEditor.isIE)return this._saveContent(),!0;this._commonPaste(n);break;case"b":return this._execCommand("bold",!1,ft),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"i":return this._execCommand("italic",!1,ft),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"u":return this._execCommand("underline",!1,ft),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"s":return this._execCommand("strikethrough",!1,ft),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"l":p="justifyleft";break;case"e":p="justifycenter";break;case"r":p="justifyright";break;case"j":p="justifyfull";break;case"q":return alert(this._doc.body.innerHTML),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"0":return ci="Your browser:\n\n"+navigator.userAgent,alert(ci),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;case"9":if(Sys.Extended.UI.HtmlEditor.isIE)u=t._getSelection(),i=t._createRange(u),alert("boundingLeft: "+i.boundingLeft+" boundingTop: "+i.boundingTop+"\nboundingWidth: "+i.boundingWidth+" boundingHeight: "+i.boundingHeight);else{var u=t._getSelection(),i=t._createRange(u),r=i.startContainer,w=i.endContainer,k="";k+="startContainer: "+(1==r.nodeType?r.tagName:"text")+"\n";k+="endContainer  : "+(1==w.nodeType?w.tagName:"text")+"\n";r==w&&(k+="startOffset: "+i.startOffset+"\n",k+="endOffset  : "+i.endOffset+"\n",1==r.nodeType&&(r=r.childNodes.item(i.startOffset),r&&r.nodeType?(k+="startOffset node: "+(1==r.nodeType?r.tagName:"text")+"\n",i.startOffset!=i.endOffset&&(r=w.childNodes.item(i.endOffset),r&&r.nodeType&&(k+="endOffset node: "+(1==r.nodeType?r.tagName:"text")+"\n"))):k+=r));alert(k)}return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}}else t._setToEnd();p&&(this._execCommand(p,!1,ft),"formatblock"!=p||Sys.Extended.UI.HtmlEditor.isIE||(this._saveContent(),this._undo(!1)),Sys.Extended.UI.HtmlEditor._stopEvent(n),"delete"!=p&&"paste"!=p||this._clearP())}else if(b||(Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)&&"keydown"==n.type){if(Sys.Extended.UI.HtmlEditor.isIE&&this._tryForward&&(i=this._createRange(this._getSelection()),i.select(),this._tryForward=!1),o=String.fromCharCode(Sys.Extended.UI.HtmlEditor.isIE?n.keyCode:n.charCode).toLowerCase(),t._a_prize&&(t._a_prize=!1,setTimeout(bi,0)),this.isShadowed())return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;switch(n.keyCode){case Sys.UI.Key.tab:if((Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)&&"keydown"!=n.type)break;if(this._editPanel.get_suppressTabInDesignMode())return Sys.Extended.UI.HtmlEditor.isSafari&&Sys.Extended.UI.HtmlEditor._stopEvent(n),Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel=null,!0;this.isControl()||this.insertHTML("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");Sys.Extended.UI.HtmlEditor._stopEvent(n);break;case 46:case Sys.UI.Key.backspace:if((Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)&&"keydown"!=n.type)break;if(((Sys.Extended.UI.HtmlEditor.isIE||Sys.Extended.UI.HtmlEditor.isSafari)&&"keydown"==n.type||!Sys.Extended.UI.HtmlEditor.isIE&&"keypress"==n.type)&&this._saveContent(),Sys.Extended.UI.HtmlEditor.isIE){if(u=t._getSelection(),"control"==u.type.toLowerCase()){if(8==n.keyCode)return setTimeout(function(){t._ifShadow();t.onContentChanged()},0),void Sys.Extended.UI.HtmlEditor._stopEvent(n);if(h=t._createRange(u),et=h.item(0),"EMBED"==et.tagName.toUpperCase()){for(et.src="",et.parentNode.removeChild(et);h.length>0;)h.remove(0);try{h.collapse(!1)}catch(n){}return Sys.Extended.UI.HtmlEditor._stopEvent(n),t._saveContent(),void setTimeout(function(){t._undo(!1);t.onContentChanged()},0)}}dt=t._doc.body.getElementsByTagName("EMBED").length;dt>0&&(gt=t._body.ownerDocument.createElement("div"),t._body.appendChild(gt),n.keyCode,setTimeout(function(){t._body.removeChild(gt);var n=t._doc.body.getElementsByTagName("EMBED");dt!=n.length&&(t._saveContent(),setTimeout(function(){t._undo(!1);t.onContentChanged()},0))},0));setTimeout(function(){t._clearP()},0)}else{var i=this._createRange(this._getSelection()),r=i.startContainer,w=i.endContainer;if("keypress"==n.type&&(null!=Sys.Extended.UI.HtmlEditor.contentEditable(r)||null!=Sys.Extended.UI.HtmlEditor.contentEditable(w)))return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(r==w&&1==r.nodeType&&"TD"==r.tagName.toUpperCase()&&i.startOffset==i.startOffset&&r.childNodes.item(i.startOffset)&&r.childNodes.item(i.startOffset).tagName&&"BR"==r.childNodes.item(i.startOffset).tagName.toUpperCase()){for(var li=r.childNodes.item(i.startOffset),ai=0,vi=0,d=li.previousSibling;d;)ai++,d=d.previousSibling;for(d=li.nextSibling;d;)vi++,d=d.nextSibling;if(46==n.keyCode&&0==vi||n.keyCode==Sys.UI.Key.backspace&&0==ai||46==n.keyCode&&r.firstChild==r.lastChild&&1==r.firstChild.nodeType)return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}if(r==w&&3==r.nodeType&&i.startOffset==i.endOffset&&!Sys.Extended.UI.HtmlEditor.isOpera){if(yi=r.data+"",46==n.keyCode&&i.startOffset==yi.length&&(!r.nextSibling||3!=r.nextSibling.nodeType))return r.nextSibling&&(r.parentNode.removeChild(r.nextSibling),t.onContentChanged()),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;if(n.keyCode==Sys.UI.Key.backspace&&0==i.startOffset&&(!r.previousSibling||3!=r.previousSibling.nodeType))return r.previousSibling&&(r.parentNode.removeChild(r.previousSibling),t.onContentChanged()),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}if(n.keyCode==Sys.UI.Key.backspace&&1==r.nodeType&&r==w&&i.startOffset==i.endOffset&&(y=r.childNodes.item(i.startOffset),null!=y&&1==y.nodeType&&"BR"==y.tagName.toUpperCase()&&(y=y.previousSibling,null!=y&&3!=y.nodeType)))return y.parentNode.removeChild(y),t.onContentChanged(),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1;setTimeout(function(){var o=t._getSelection(),i=t._createRange(o),f=i.startContainer,s=i.endContainer,n;if(null!=Sys.Extended.UI.HtmlEditor.contentEditable(f)||null!=Sys.Extended.UI.HtmlEditor.contentEditable(s))return void t._undo(!1);if(Sys.Extended.UI.HtmlEditor.isOpera&&f==s&&3==f.nodeType&&0==f.data.length)f.parentNode.removeChild(f);else if(f==s&&1==f.nodeType&&Sys.Extended.UI.HtmlEditor.isStyleTag(f.tagName)&&i.startOffset==i.endOffset&&0==f.childNodes.length){for(;1==f.parentNode.nodeType&&Sys.Extended.UI.HtmlEditor.isStyleTag(f.parentNode.tagName)&&1==f.parentNode.childNodes.length;)f=f.parentNode;var r=f.nextSibling,u=f.previousSibling,e=f.parentNode;(e.removeChild(f),t.onContentChanged(),null==r&&null==u)?(i.setStart(e,0),i.setEnd(e,0)):null!=r&&null!=u?3==r.nodeType&&3==u.nodeType?(n=(""+u.data).length,u.appendData(r.data),e.removeChild(r),i.setStart(u,n),i.setEnd(u,n)):3==u.nodeType?(n=(""+u.data).length,i.setStart(u,n),i.setEnd(u,n)):3==r.nodeType?(i.setStart(r,0),i.setEnd(r,0)):r.childNodes.length>0?(i.setStart(r,0),i.setEnd(r,0)):(n=Sys.Extended.UI.HtmlEditor.__getIndex(r),i.setStart(e,n),i.setEnd(e,n)):null!=u?3==u.nodeType?(n=(""+u.data).length,i.setStart(u,n),i.setEnd(u,n)):(n=u.childNodes.length,n>0?(i.setStart(u,n),i.setEnd(u,n)):(n=Sys.Extended.UI.HtmlEditor.__getIndex(u),i.setStart(e,n),i.setEnd(e,n))):null!=r&&(3==r.nodeType?(i.setStart(r,0),i.setEnd(r,0)):(n=r.childNodes.length,n>0?(i.setStart(r,n),i.setEnd(r,n)):(n=Sys.Extended.UI.HtmlEditor.__getIndex(r),i.setStart(e,n),i.setEnd(e,n))));t._removeAllRanges(o);t._selectRange(o,i)}},0)}break;case Sys.UI.Key.enter:if((Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)&&"keydown"==n.type)break;if((!Sys.Extended.UI.HtmlEditor.isIE&&"keypress"==n.type||Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type)&&this._saveContent(),Sys.Extended.UI.HtmlEditor.isIE&&"keydown"==n.type){if(u=t._getSelection(),"control"==u.type.toLowerCase())break;if(h=t._createRange(u),n.shiftKey)break;if(e=h.parentElement(),"TEXTAREA"==e.tagName.toUpperCase())break;for(;e&&e.tagName&&"BODY"!=e.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(e.tagName);)e=e.parentNode;if(e&&e.tagName&&(a=e.tagName.toUpperCase(),"P"==a||"LI"==a)){"LI"==a&&setTimeout(ki,0);break}try{var ni=Sys.Extended.UI.HtmlEditor.smartClassName+"_middle_add",c=null,tt="<span id="+ni+"><\/span>";if(h.pasteHTML(tt),ot=!1,c=t._doc.getElementById(ni),null!=c){for(g=c.nextSibling,it=c.parentNode;null==g&&null!=it&&Sys.Extended.UI.HtmlEditor.isStyleTag(it.tagName);)g=it.nextSibling,it=it.parentNode;null==g||Sys.Extended.UI.HtmlEditor.isInlineElement(g)||null==g.tagName||"undefined"==typeof g.tagName||(st=g.tagName.toUpperCase(),"BR"!=st&&"UL"!=st&&"OL"!=st&&"P"!=st&&(ot=!0));c.parentNode.removeChild(c)}if(h.pasteHTML("<br/>"+(ot?tt:"")),ot&&(c=t._doc.getElementById(ni)),h.select(),ot)return setTimeout(di,0),Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}catch(n){}Sys.Extended.UI.HtmlEditor._stopEvent(n)}else if(!n.shiftKey&&(Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)){for(e=Sys.Extended.UI.HtmlEditor.getSelParent(this),3==e.nodeType&&(e=e.parentNode);e&&e.tagName&&"BODY"!=e.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(e.tagName);)e=e.parentNode;if(e&&e.tagName&&("P"==e.tagName.toUpperCase()||"LI"==e.tagName.toUpperCase()))break;tt="<br />";Sys.Extended.UI.HtmlEditor.isOpera&&(u=t._getSelection(),i=t._createRange(u),i.startContainer==i.endContainer&&(1==i.startContainer.nodeType?(ti=i.startContainer.childNodes.item(i.startOffset),1==ti.nodeType&&"BR"==ti.tagName.toUpperCase()&&(tt+="<br />")):3!=i.startContainer.nodeType||i.startOffset!=i.endOffset||i.startContainer.data.length!=i.endOffset||i.startContainer.nextSibling&&3==i.startContainer.nextSibling.nodeType||(tt+="&nbsp;")));(this.insertHTML(tt),Sys.Extended.UI.HtmlEditor._stopEvent(n),Sys.Extended.UI.HtmlEditor.isOpera)&&(u=t._getSelection(),i=t._createRange(u),i.startContainer==i.endContainer&&3==i.startContainer.nodeType&&i.startOffset==i.endOffset&&0==i.startContainer.data.length&&(ii=i.startContainer.previousSibling,i.startContainer.parentNode.removeChild(i.startContainer),t._removeAllRanges(u),i=t._createRange(),i.setStart(ii,0),i.setEnd(ii,1),t._selectRange(u,i)));t.onContentChanged()}else Sys.Extended.UI.HtmlEditor.isSafari&&(this.insertHTML("<br/>"),Sys.Extended.UI.HtmlEditor._stopEvent(n),t.onContentChanged())}}else t._a_prize=!1;if(Sys.Extended.UI.HtmlEditor.isIE&&"keypress"==n.type&&!n.ctrlKey){var o=n.keyCode,at=t._getSelection(),rt=t._createRange(at);if(rt.text.length>0){var ht=String.fromCharCode(o),pi=Sys.Extended.UI.HtmlEditor.capLock(n),tr=n.shiftKey&&!pi||pi;return tr||(ht=ht.toLowerCase()),l=Sys.Extended.UI.HtmlEditor.smartClassName+"StyleForTyping",s=t._doc.getElementById(l),null!=s&&(ht="<span id='"+l+"'><\/span>"+ht+"<span id='"+l+l+"'><\/span>",s.parentNode.removeChild(s)),rt.pasteHTML(ht),null!=s&&(t.trickWithStyles(l),s=t._doc.getElementById(l+l),s.parentNode.removeChild(s)),Sys.Extended.UI.HtmlEditor._stopEvent(n),t.onContentChanged(),!1}}if("mouseup"==n.type||"mousedown"==n.type||"keydown"==n.type){if(wi=!0,"keydown"==n.type&&!n.ctrlKey&&(o=n.keyCode,(o>=48&&o<=90||32==o||13==o||o>=186&&o<=222||o>=96&&o<=111)&&null!=t._StyleForTyping)){for(t.n_arr=[],vt=0;vt<t._StyleForTyping.length;vt++)t.n_arr.push(t._StyleForTyping[vt]);l=Sys.Extended.UI.HtmlEditor.smartClassName+"StyleForTyping";ri=!0;Sys.Extended.UI.HtmlEditor.isIE?(t.insertHTML("<span id='"+l+"'>&nbsp;<\/span>"),s=t._doc.getElementById(l),s&&s.nextSibling&&3==s.nextSibling.nodeType?(ri=!1,at=t._getSelection(),rt=t._createRange(at),rt.moveToElementText(t._doc.getElementById(l)),rt.select()):s&&s.removeChild(s.firstChild)):t.insertHTML("<span id='"+l+"'><\/span>");ri&&setTimeout(function(){t.trickWithStyles(l);t.onContentChanged()},0)}!wi&&Sys.Extended.UI.HtmlEditor.isIE||t._updated_now||(t._updateTimer&&(clearTimeout(t._updateTimer),t._updateTimer=null),t._updateTimerLimit=3,t._updateTimer=setTimeout(ui,300))}return((Sys.Extended.UI.HtmlEditor.isIE||"keydown"!=n.type&&"keyup"!=n.type)&&(!Sys.Extended.UI.HtmlEditor.isIE||"keydown"!=n.type&&"keyup"!=n.type||16!=n.keyCode&&20!=n.keyCode)&&(t._StyleForTyping=null),Sys.Extended.UI.HtmlEditor.isSafari&&setTimeout(function(){t._createRange(t._getSelection())},0),Sys.Extended.UI.HtmlEditor.isIE||setTimeout(function(){var i,n,r;t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel&&(i=t._getSelection(),n=t._createRange(i),3!=n.startContainer.nodeType&&n.startContainer==n.endContainer&&n.startOffset==n.endOffset&&n.startContainer.childNodes.item(n.startOffset)&&3==n.startContainer.childNodes.item(n.startOffset).nodeType&&(r=n.startContainer.childNodes.item(n.startOffset),i.collapseToEnd(),t._removeAllRanges(i),i=t._getSelection(),n=t._createRange(i),n.setStart(r,0),n.setEnd(r,0),t._selectRange(i,n)))},0),Sys.Extended.UI.HtmlEditor.isIE)||(u=t._getSelection(),i=t._createRange(u),t._saved_startContainer=i.startContainer,t._saved_startOffset=i.startOffset),setTimeout(function(){try{t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel&&t._ifShadow()}catch(n){}},0),"keydown"==n.type&&(null!=t._AfterOnContentChanged&&"undefined"!=typeof t._AfterOnContentChanged&&t._AfterOnContentChanged||(t._AfterOnContentChanged=!0,setTimeout(function(){t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel&&(t.onContentChanged(),t._AfterOnContentChanged=!1)},0))),!0}catch(bi){return Sys.Extended.UI.HtmlEditor._stopEvent(n),!1}};Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.ModePanel=function(n){Sys.Extended.UI.HtmlEditor.ModePanel.initializeBase(this,[n]);this._activated=!1;this._isActivating=!1;this._editPanel=null;this._cachedContent=null;this._onbeforeunload$delegate=Function.createDelegate(this,this._onbeforeunload)};Sys.Extended.UI.HtmlEditor.ModePanel.prototype={set_editPanel:function(n){this._editPanel=n},get_content:function(){return this._activated?this._getContent():null!=this._cachedContent?this._cachedContent:""},set_content:function(n){if(this._cachedContent=n,this._activated||this._isActivating){if(this._isActivating){var t=this;return setTimeout(function(){t.set_content(n)},10),!1}this._setContent(n)}else this._activate(n);return!0},_activate:function(){this.get_element().style.display="";this._isActivating=!0},_activateFinished:function(){this._activated=!0;this._isActivating=!1;this._editPanel._setActive();this._editPanel.get_autofocus()&&this._focus()},_deactivate:function(){this.get_element().style.display="none";this._activated=!1;this._isActivating=!1},initialize:function(){Sys.Extended.UI.HtmlEditor.ModePanel.callBaseMethod(this,"initialize");Sys.Extended.UI.HtmlEditor.isIE&&$addHandlers(window,{beforeunload:this._onbeforeunload$delegate})},dispose:function(){Sys.Extended.UI.HtmlEditor.isIE&&$common.removeHandlers(window,{beforeunload:this._onbeforeunload$delegate});this._activated&&(Sys.Extended.UI.HtmlEditor.isIE&&this._onbeforeunload(),this._deactivate());Sys.Extended.UI.HtmlEditor.ModePanel.callBaseMethod(this,"dispose")},_onbeforeunload:function(){this._activated&&(this._editPanel._contentPrepared||(this._editPanel._prepareContentForPostback(this.get_content()),this._editPanel._contentPrepared=!0))},_getContent:function(){return null!=this._cachedContent?this._cachedContent:""},_setContent:function(){},_focus:function(){this._focused()},_focused:function(n){this._editPanel._focused(n);this._editPanel.set_autofocus(!0)},_really_focused:function(){this._editPanel._really_focused();this._editPanel.set_autofocus(!0)}};Sys.Extended.UI.HtmlEditor.ModePanel.registerClass("Sys.Extended.UI.HtmlEditor.ModePanel",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.DesignPanel=function(n){Sys.Extended.UI.HtmlEditor.DesignPanel.initializeBase(this,[n]);this._doc=null;this._updated_now=!1;this._updateTimer=null;this._popup=null;this._contextElement=null;this._a_prize=!1;this.__stack=null;this._StyleForTyping=null;this.isWord=!1;this.isPlainText=!1;this.dfltBlockElement="P";this._FontNotSet=!0;this._design_timer1=null;this._events$delegate=Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.DesignPanelEventHandler);this._blur$delegate=Function.createDelegate(this,this._blur);this._focus$delegate=Function.createDelegate(this,this._focus_event)};Sys.Extended.UI.HtmlEditor.DesignPanel.prototype={initialize:function(){Sys.Extended.UI.HtmlEditor.DesignPanel.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.HtmlEditor.DesignPanel.callBaseMethod(this,"dispose")},_activate:function(n){Sys.Extended.UI.HtmlEditor.DesignPanel.callBaseMethod(this,"_activate");this._wasFocused=!1;this._initIframe(n);this._onDocumentLoaded()},_deactivate:function(){this._deactivateCommon();Sys.Extended.UI.HtmlEditor.isIE&&(this._doc.open(),this._doc.write(""),this._doc.close(),this.get_element().src="javascript:false;");this._doc=null;Sys.Extended.UI.HtmlEditor.DesignPanel.callBaseMethod(this,"_deactivate")},_deactivateCommon:function(){this._editPanel.__blured=!1;for(var t=this._doc.body.getElementsByTagName("IMG"),n=0;n<t.length;n++)if(t[n].getAttribute(Sys.Extended.UI.HtmlEditor.attachedIdAttribute)&&t[n].getAttribute(Sys.Extended.UI.HtmlEditor.attachedIdAttribute).length>0)try{Sys.Extended.UI.HtmlEditor.isIE?$removeHandler(t[n],"dragstart",Sys.Extended.UI.HtmlEditor.stopDrag):$removeHandler(t[n],"draggesture",Sys.Extended.UI.HtmlEditor.stopDrag)}catch(t){}Sys.Extended.UI.HtmlEditor._removeEvents(this._doc,["keydown","keypress","mousedown","mouseup","dblclick"],this._events$delegate);Sys.Extended.UI.HtmlEditor._removeEvents(this.get_element().contentWindow,["blur"],this._blur$delegate);Sys.Extended.UI.HtmlEditor._removeEvents(this.get_element().contentWindow,["focus"],this._focus$delegate)},_initIframe:function(n){Sys.Extended.UI.HtmlEditor.isIE||(this._savedValue=n,this._absAndFixedParents=this._getAbsAndFixedParents());var t=Sys.Extended.UI.HtmlEditor.Trim(this._prepareContent(n));this._doc=this.get_element().contentWindow.document;Sys.Extended.UI.HtmlEditor.isIE||(this._doc.designMode="on");this._doc.open();this._doc.write('<html><head><link rel="stylesheet" href="'+this._editPanel.get_documentCssPath()+'" media="all" /><link rel="stylesheet" href="'+this._editPanel.get_designPanelCssPath()+'" media="all" /><\/head><body>'+t+"<\/body><\/html>");this._doc.close();this._doc.id="EditorDocument";Sys.Extended.UI.HtmlEditor.isIE&&(this._doc.body.contentEditable=!0,this._tryForward=!0)},_blur:function(n){return this._editPanel.__blured=!0,Sys.Extended.UI.HtmlEditor.isIE||null==this._design_timer1||(clearTimeout(this._design_timer1),this._design_timer1=null),this.isPopup||this._editPanel._validate(n,null),!0},_focus_event:function(){if(this._editPanel.__blured=!1,Sys.Extended.UI.HtmlEditor.isIE)this._really_focused();else{var n=this;Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel=this._editPanel;null==this._design_timer1&&(this._design_timer1=setTimeout(function(){n._really_focused();n._design_timer1=null},0))}return!0},_getAbsAndFixedParents:function(){for(var n=this.get_element(),t="";null!=n&&n.tagName&&"body"!=n.tagName.toLowerCase();)t+=n.tagName,"absolute"!=n.style.position&&"fixed"!=n.style.position||(t+=": "+n.style.position),t+="\n",n=n.parentNode;return t},_onDocumentLoaded:function(){var n=this,t;if(!Sys.Extended.UI.HtmlEditor.isIE&&(t=this._getAbsAndFixedParents(),t!=this._absAndFixedParents))return this._initIframe(this._savedValue),void setTimeout(function(){n._onDocumentLoaded()},10);try{if(!Sys.Extended.UI.HtmlEditor.isIE&&(this._doc.queryCommandValue("forecolor"),(Sys.Extended.UI.HtmlEditor.isSafari||Sys.Extended.UI.HtmlEditor.isOpera)&&!Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element())))return void setTimeout(function(){n._onDocumentLoaded()},10);n._doc.body.innerHTML}catch(t){return void setTimeout(function(){n._onDocumentLoaded()},10)}this._afterBodyIsFormed();setTimeout(function(){n._activateFinished();Sys.Extended.UI.HtmlEditor.isIE&&!n._editPanel.get_autofocus()&&n._getSelection().empty()},0)},_afterBodyIsFormed:function(){var i=this,n,t;if(Sys.Extended.UI.HtmlEditor._addEvents(this._doc,["keydown","keypress","mousedown","mouseup","dblclick"],this._events$delegate),Sys.Extended.UI.HtmlEditor._addEvents(this.get_element().contentWindow,["blur"],this._blur$delegate),Sys.Extended.UI.HtmlEditor._addEvents(this.get_element().contentWindow,["focus"],this._focus$delegate),Sys.Extended.UI.HtmlEditor.inspectForShadows(i._doc.body),n=this._doc.body,1==n.childNodes.length&&n.firstChild.tagName&&"DIV"==n.firstChild.tagName.toUpperCase()&&n.firstChild.style.cssText.length>0&&n.firstChild.style.direction.length>0&&"absolute"!=Sys.Extended.UI.HtmlEditor.getStyle(n.firstChild,"position")){for(n.style.cssText=n.firstChild.style.cssText,t=n.firstChild;t.firstChild;)n.insertBefore(t.firstChild,t);n.removeChild(t)}i._clearP()},_getContent:function(){var y,n,p,u,l,s,h,t,f,c,i,e;if(null!=this._popup&&"function"==typeof this._popup._forceImClose&&(y=this._popup._forceImClose,y(this._popup._iframe.contentWindow)),this._clearP(),Sys.Extended.UI.HtmlEditor.isIE)Sys.Extended.UI.HtmlEditor.spanJoiner(this._doc.body,this._doc),n=Sys.Extended.UI.HtmlEditor.getHTML(this._doc.body,!1,!0),n=n.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/gi,"$1&nbsp;$3").replace(/(<td[^>]*?>)\s*(&nbsp;)\s*(<\/td[^>]*?>)/gi,"$1<br/>$3").replace(/(<p[^>]*?>)\s*(&nbsp;)\s*(<\/p[^>]*?>)/gi,"$1<br/>$3"),n=(this._doc.body.style.cssText.length>0?'<div style="'+this._doc.body.style.cssText.replace('"',"'")+'">':"")+n+(this._doc.body.style.cssText.length>0?"<\/div>":""),this._editPanel.get_noScript()&&(n=n.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"")),/<embed/gi.test(n)&&(n=n.replace(/(<embed(?:.*?))(\sloop=\"true\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(\splay=\"true\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(\sbgcolor=\"\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(\sscale=\"\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(\shspace=\"0\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(\svspace=\"0\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(\swmode=\"[^\"]+\")((?:.*?)>)/gi,"$1$3").replace(/(<embed(?:.*?))(pseudomode=)(\"[^\"]*\")((?:.*?)>)/gi,"$1wmode=$3$4").replace(/(<embed(?:.*?))(\swmode=\"\")((?:.*?)>)/gi,"$1$3")),p=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HtmlEditor.smartClassName+":)","ig"),n=n.replace(p,"$1");else{u=this._doc.createElement("DIV");l=new Sys.Extended.UI.HtmlEditor.DesignPanel.ScriptRecover;u.style.cssText=this._doc.body.style.cssText;this._editPanel.get_noScript()||this._doc.body.innerHTML.replace(/<script(?:[^>]*?)>(.*?)<\/script(?:[^>]*?>)/gi,function(n,t){return l.regReplScript1(n,t)});u.innerHTML=Sys.Extended.UI.HtmlEditor.Trim(this._doc.body.innerHTML);for(var w=u.getElementsByTagName("IMG"),a=[],f=0;f<w.length;f++)a.push(w[f]);for(s=0;s<a.length;s++)if(t=a[s],h=t.getAttribute("dummytag"),h&&h.length>0&&"embed"==h.toLowerCase()){var k=t.getAttribute("dummysrc"),o=t.getAttribute("dummybgcolor"),v=t.getAttribute("pseudomode"),b=t.attributes,r=this._doc.createElement("EMBED");for(r.src=k,r.width=t.width,r.height=t.height,o&&o.length>0&&(o=Sys.Extended.UI.HtmlEditor.tryReplaceRgb(o),r.setAttribute("bgcolor",o)),v&&v.length>0&&r.setAttribute("wmode",v),f=0;f<b.length;++f)c=b.item(f),c.specified&&(i=c.name.toLowerCase(),e=c.value,"dummytag"!=i&&"dummysrc"!=i&&"dummybgcolor"!=i&&"style"!=i&&"wmode"!=i&&"pseudomode"!=i&&"src"!=i&&("loop"==i&&"true"==e||"play"==i&&"true"==e||"hspace"==i&&"0"==e||"vspace"==i&&"0"==e||"scale"==i&&0==e.length||"align"==i&&0==e.length||r.setAttribute(i,e)));t.style.width&&t.style.width.length>0&&(r.style.width=t.style.width);t.style.height&&t.style.height.length>0&&(r.style.height=t.style.height);t.parentNode.insertBefore(r,t);t.parentNode.removeChild(t)}Sys.Extended.UI.HtmlEditor.spanJoiner(u,this._doc);n=Sys.Extended.UI.HtmlEditor.getHTML(u,u.style.cssText.length>0,!0);n=this._editPanel.get_noScript()?n.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,""):n.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(n,t,i,r){return l.regReplFromScript1(n,t,i,r)});delete u}return n=Sys.Extended.UI.HtmlEditor.brXHTML(n.replace(/^([\n|\r]+)/,"")),this._editPanel.get_noUnicode()&&(n=n.replace(/([\u0080-\uFFFF])/g,function(n,t){return"&#"+t.charCodeAt(0).toString(10)+";"})),"<br />"==Sys.Extended.UI.HtmlEditor.Trim(n)&&(n=""),n},_setContent:function(n){this._deactivateCommon();var t=Sys.Extended.UI.HtmlEditor.Trim(this._prepareContent(n));this._doc.open();this._doc.write('<html><head><link rel="stylesheet" href="'+this._editPanel.get_documentCssPath()+'" media="all" /><link rel="stylesheet" href="'+this._editPanel.get_designPanelCssPath()+'" media="all" /><\/head><body>'+t+"<\/body><\/html>");this._doc.close();Sys.Extended.UI.HtmlEditor.isIE&&(this._doc.body.contentEditable=!0,this._tryForward=!0);this._afterBodyIsFormed();this._editPanel.get_autofocus()&&this._focus();Sys.Extended.UI.HtmlEditor.isIE&&!this._editPanel.get_autofocus()&&this._getSelection().empty()},_focus:function(n){this.focusEditor();this._focused(n)},focusEditor:function(){try{this.get_element().contentWindow.focus()}catch(n){}this._wasFocused||(this._wasFocused=!0,this._editPanel.get_startEnd()||this._setToEnd())},_prepareContent:function(n){var t=n,o,e,s,r,h,f,n;if(t=t.replace(/<object(?:[^>]*?)>(?:[^\u0000]*?)(<embed(?:[^>]*?)>)(?:[^\u0000]*?)<\/object(?:[^>]*?)>/gi,"$1"),Sys.Extended.UI.HtmlEditor.isIE)return t=Sys.Extended.UI.HtmlEditor.Trim(t.replace(/([\n\r]+<)/g,"<").replace(/([^>])([\n\r]+)([^<])/g,"$1 $3")).replace(/(&amp;)/g,"&amp;amp;").replace(/<br\s*[\/]*>\s*<\/td>/gi,"<\/td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/gi,"$1&nbsp;$3").replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/gi,"$1&nbsp;$3"),/<embed/gi.test(t)&&(t=t.replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/gi,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/gi,'$1 wmode="transparent"$2')),t=t.replace(/&amp;/gi,"&");o=new Sys.Extended.UI.HtmlEditor.DesignPanel.ScriptRecover;e=document.createElement("DIV");this._editPanel.get_noScript()||t.replace(/<script(?:[^>]*?)>(.*?)<\/script(?:[^>]*?>)/gi,function(n,t){return o.regReplScript1(n,t)});e.innerHTML=Sys.Extended.UI.HtmlEditor.Trim(t.replace(/([^>])([\n\r]+)([^<])/g,"$1 $3"));for(var l=e.getElementsByTagName("EMBED"),c=[],r=0;r<l.length;r++)c.push(l[r]);for(s=0;s<c.length;s++){var i=c[s],u=document.createElement("IMG"),a=i.attributes;for(u.src=this._editPanel.get_imagePath_1x1(),u.setAttribute("dummytag","embed"),r=0;r<a.length;++r)h=a.item(r),h.specified&&(f=h.name.toLowerCase(),n=h.value,"src"==f?f="dummysrc":"bgcolor"==f?f="dummybgcolor":"wmode"==f&&(f="pseudomode"),u.setAttribute(f,n));u.style.cssText="border: 1px dotted #000000; background-image: url('"+("application/x-mplayer2"==u.getAttribute("type").toLowerCase()?this._editPanel.get_imagePath_media():tthis._editPanel.get_imagePath_flash())+"'); background-position: center; background-repeat: no-repeat; background-color: #c0c0c0;";i.style.width&&i.style.width.length>0&&(u.style.width=i.style.width);i.style.height&&i.style.height.length>0&&(u.style.height=i.style.height);i.parentNode.insertBefore(u,i);i.parentNode.removeChild(i)}return Sys.Extended.UI.HtmlEditor.spanJoiner(e,document),t=Sys.Extended.UI.HtmlEditor.Trim(Sys.Extended.UI.HtmlEditor.getHTML(e,!1,!0)),this._editPanel.get_noScript()||(t=t.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(n,t,i,r){return o.regReplFromScript1(n,t,i,r)})),delete e,delete o,t=Sys.Extended.UI.HtmlEditor.brXHTML(t),0==t.length&&(t="<br/>"),t},_clearP:function(){function u(n){var i=!1,t;if(1==n.nodeType){if((t=n.tagName.toUpperCase(),(!f||"LI"!=t)&&(Sys.Extended.UI.HtmlEditor.isRestricted(n)||"IMG"==t||"IFRAME"==t||"EMBED"==t||"SCRIPT"==t))||n.childNodes.length>1)return!0;if(0==n.childNodes.length)return!1;i|=u(n.firstChild)}else 3==n.nodeType&&(i|=!0);return i}var n,i,t,r,f;try{n=this._doc.body;n.firstChild&&3==n.firstChild.nodeType&&(i=Sys.Extended.UI.HtmlEditor.Trim(""+n.firstChild.data),0==i.length?n.removeChild(n.firstChild):i!=""+n.firstChild.data&&(n.firstChild.data=i));Sys.Extended.UI.HtmlEditor.isIE&&1==n.childNodes.length&&(n=n.firstChild,1==n.nodeType)&&(t=n.tagName.toLowerCase(),("p"==t||"ul"==t||"ol"==t)&&(r=!1,f="ul"==t||"ol"==t,1==n.childNodes.length&&(u(n.firstChild)||n.removeChild(n.firstChild)),r=!0,(r||"<p>&nbsp;<\/p>"==n.parentNode.innerHTML.toLowerCase())&&this._doc.body.removeChild(n)))}catch(u){}},isControl:function(){var i,n,t;try{return(i=this._getSelection(),Sys.Extended.UI.HtmlEditor.isIE)?"control"==i.type.toLowerCase():(n=this._createRange(i),t=this._getParent(n),3!=t.nodeType&&n.startContainer==n.endContainer&&!!t.tagName&&null!=n.startContainer.childNodes.item(n.startOffset)&&(n.startOffset!=n.endOffset||!n.startContainer.childNodes.item(n.startOffset).tagName||"BR"!=n.startContainer.childNodes.item(n.startOffset).tagName.toUpperCase()&&!Sys.Extended.UI.HtmlEditor.isStyleTag(n.startContainer.childNodes.item(n.startOffset).tagName))&&!("BODY"==t.tagName.toUpperCase()&&0==n.startOffset&&n.endOffset>0&&n.endOffset==t.childNodes.length)&&(n.startOffset!=n.endOffset||3!=n.startContainer.childNodes.item(n.startOffset).nodeType))}catch(i){return!0}},isPopup:function(){return null!=this._popup},_getSelection:function(){var n,t,i,r;if(Sys.Extended.UI.HtmlEditor.isIE)return n=this._doc.selection;this.focusEditor();r=this.get_element().contentWindow;n=r.getSelection();t=this._createRange(n);i=t.startContainer;try{for(;i&&i.nodeType;)i=i.parentNode}catch(i){this._removeAllRanges(n);t=this._createRange(n);t.setStart(this._saved_startContainer,this._saved_startOffset);t.setEnd(this._saved_startContainer,this._saved_startOffset);this._selectRange(n,t);n=r.getSelection()}return n},_createRange:function(n){if(Sys.Extended.UI.HtmlEditor.isIE)return"undefined"==typeof n?this._doc.body.createTextRange():n.createRange();if(this.focusEditor(),"undefined"==typeof n)return this._doc.createRange();try{return n.getRangeAt(0)}catch(n){return this._doc.createRange()}},toEndOfProtected:function(){var i=this,f=this._getSelection(),n,r,u,t;try{t=this._createRange(f)}catch(t){return!1}if(Sys.Extended.UI.HtmlEditor.isIE?n=Sys.Extended.UI.HtmlEditor.contentEditable(Sys.Extended.UI.HtmlEditor.getSelParent(i)):(n=Sys.Extended.UI.HtmlEditor.contentEditable(t.startContainer),null==n&&(n=Sys.Extended.UI.HtmlEditor.contentEditable(t.endContainer))),Sys.Extended.UI.HtmlEditor.isIE&&null!=n){try{t.remove(n)}catch(t){}t=i._doc.body.createControlRange();t.add(n);t.select()}else Sys.Extended.UI.HtmlEditor.isIE||null==n||(u=i._getSelection(),null!=n.nextSibling&&3==n.nextSibling.nodeType?r=n.nextSibling:(r=i._doc.createTextNode(""),null!=n.nextSibling?n.parentNode.insertBefore(r,n.nextSibling):n.parentNode.appendChild(r)),i._removeAllRanges(u),t=i._createRange(u),t.setStart(r,0),t.setEnd(r,0),i._selectRange(u,t));return!0},_commonPaste:function(n){var t=this,r,i,f,u;(this._saveContent(),Sys.Extended.UI.HtmlEditor.isIE)?(this.openWait(),setTimeout(function(){t._paste(!t._editPanel.get_noPaste());t.closeWait()},0),Sys.Extended.UI.HtmlEditor._stopEvent(n)):this.isPlainText||this.isWord||this._editPanel.get_noPaste()?(r=t._getSafePlace(),null!=r?(i=t._doc.createElement("div"),i.style.display="inline",i.style.borderStyle="none",r.parentNode.insertBefore(i,r),i.appendChild(r),i.removeChild(r),i.innerHTML="xx",f=t._getSelection(),u=t._createRange(),t._removeAllRanges(f),u.setStart(i.firstChild,0),u.setEnd(i.firstChild,1),t._selectRange(f,u),t.openWait(),setTimeout(function(){var h=i.parentNode,f,o,r,n,u,s,e;for((i.lastChild.deleteData(i.lastChild.length-1,1),t.isWord)?(i.innerHTML=Sys.Extended.UI.HtmlEditor.cleanUp(i.innerHTML),Sys.Extended.UI.HtmlEditor.replaceOldTags(i,t),Sys.Extended.UI.HtmlEditor.spanJoiner(i,t._doc)):(f=document.createElement("div"),f.innerHTML=Sys.Extended.UI.HtmlEditor.cleanUp(i.innerHTML),o=new Sys.Extended.UI.HtmlEditor.jsDocument(!0),Sys.Extended.UI.HtmlEditor.__MozillaGetInnerText(f,o),i.innerHTML=o.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"").replace(/\n/g,"<br/>").replace(/\t/g,"&nbsp;"),delete f);i.firstChild;)h.insertBefore(i.firstChild,i);r=null;n=null;i.nextSibling&&3==i.nextSibling.nodeType&&i.previousSibling&&3==i.previousSibling.nodeType&&(r=i.nextSibling,n=i.previousSibling);h.removeChild(i);u=null;(null!=r&&null!=n&&(u=n.data.length,n.data=""+n.data+r.data,r.parentNode.removeChild(r)),t.isWord=!1,t.isPlainText=!1,t.closeWait(),null!=u)&&(s=t._getSelection(),e=t._createRange(),t._removeAllRanges(s),e.setStart(n,u),e.setEnd(n,u),t._selectRange(s,e));t.onContentChanged()},0)):Sys.Extended.UI.HtmlEditor._stopEvent(n)):setTimeout(function(){Sys.Extended.UI.HtmlEditor.operateAnchors(t,t._doc,!t._editPanel.get_showAnchors());Sys.Extended.UI.HtmlEditor.operatePlaceHolders(t,t._doc,!t._editPanel.get_showPlaceHolders());Sys.Extended.UI.HtmlEditor.inspectForShadows(t._doc.body);t._checkImages(t._doc.body);t.onContentChanged()},0)},_selectRange:function(n,t){n.addRange(t);this.focusEditor()},_selectRng:function(n){var i=this._getSelection(),f,e;if(Sys.Extended.UI.HtmlEditor.isIE){var t=this._createRange(i),r=this._createRange(i),o=this._doc.createElement("span"),u=this._doc.createElement("span");n[0].parentNode.insertBefore(o,n[0]);n[n.length-1].nextSibling?n[n.length-1].parentNode.insertBefore(u,n[n.length-1].nextSibling):n[n.length-1].parentNode.appendChild(u);try{t.moveToElementText(o);f=t.moveStart("character",1);t.moveStart("character",-f);r.moveToElementText(u);f=r.moveEnd("character",-1);r.moveEnd("character",-f);t.setEndPoint("EndToEnd",r);t.select()}catch(n){}n[0].parentNode.removeChild(o);n[n.length-1].parentNode.removeChild(u)}else e=this._doc.createRange(),e.setStart(n[0],0),e.setEnd(n[n.length-1],(""+n[n.length-1].data).length),this._removeAllRanges(i),this._selectRange(i,e)},_removeAllRanges:function(n){n.removeAllRanges()},_setToEnd:function(){var n=this;setTimeout(function(){n._setToEnd_();n._editPanel.updateToolbar()},0)},_setToEnd_:function(){var n=this,e,u,r,i;if(Sys.Extended.UI.HtmlEditor.isIE)return u=n._getSelection(),r=n._createRange(u),"control"!=u.type.toLowerCase()&&(r.moveEnd("textedit",1),r.collapse(!1)),r.select(),void n.focusEditor();var f=0,t=n._doc.body,i=null;if(t.lastChild&&3==t.lastChild.nodeType?(t=t.lastChild,f=(""+t.data).length):(e=n._doc.createTextNode(""),t.lastChild&&1==t.lastChild.nodeType&&"BR"==t.lastChild.tagName.toUpperCase()?t.insertBefore(e,t.lastChild):t.appendChild(e),t=e,f=0),u=n._getSelection(),n._removeAllRanges(u),r=n._createRange(),r.setStart(t,f),r.setEnd(t,f),n._selectRange(u,r),null!=i&&n._doc.body.removeChild(i),n.focusEditor(),!Sys.Extended.UI.HtmlEditor.isSafari&&!Sys.Extended.UI.HtmlEditor.isOpera)try{i=n._doc.createElement("button");i.style.width="0px";i.style.height="20px";n._doc.body.appendChild(i);i.focus();i.blur();n.focusEditor();n._doc.body.removeChild(i)}catch(n){}},isShadowed:function(){var t,i,n,r,u;if(!this.isControl())return!1;if(i=this._getSelection(),n=this._createRange(i),t=Sys.Extended.UI.HtmlEditor.isIE?n.item(0):n.startContainer.childNodes.item(n.startOffset),t.tagName&&"IMG"==t.tagName.toUpperCase()&&t.getAttribute(Sys.Extended.UI.HtmlEditor.attachedIdAttribute)&&t.getAttribute(Sys.Extended.UI.HtmlEditor.attachedIdAttribute).length>0){if(r=this.getAttachedElement(t),null!=r){if(Sys.Extended.UI.HtmlEditor.isIE)n=this._doc.body.createControlRange(),n.add(r),n.select();else try{u=Sys.Extended.UI.HtmlEditor.__getIndex(r);i.collapseToEnd();this._removeAllRanges(i);n=this._createRange(i);n.setStart(r.parentNode,u);n.setEnd(r.parentNode,u+1);this._selectRange(i,n)}catch(t){return!0}return!1}return!0}return!1},_ifShadow:function(){var f,u,t;if(Sys.Extended.UI.HtmlEditor.isIE)try{this._doc.selection}catch(i){return!1}for(var i=this,r=null,n=Sys.Extended.UI.HtmlEditor.getSelParent(i);n&&(3==n.nodeType||n.tagName&&"BODY"!=n.tagName.toUpperCase());)if(3!=n.nodeType&&n.tagName){if(f=n.tagName.toUpperCase(),"TABLE"==f&&n.getAttribute(Sys.Extended.UI.HtmlEditor.noContextMenuAttribute)&&"yes"==n.getAttribute(Sys.Extended.UI.HtmlEditor.noContextMenuAttribute)){r=n.rows.item(0).cells.item(0).firstChild;Sys.Extended.UI.HtmlEditor.isIE&&"P"==f&&(r=r.firstChild);break}n=n.parentNode}else n=n.parentNode;if(null!=r)if(u=i._getSelection(),t=i._createRange(u),Sys.Extended.UI.HtmlEditor.isIE)t=i._doc.body.createControlRange(),t.add(r),t.select();else try{u.collapseToEnd();i._removeAllRanges(u);t=i._createRange(u);t.setStart(r.parentNode,0);t.setEnd(r.parentNode,1);i._selectRange(u,t)}catch(i){}},_saveContent:function(){var n,t,i;try{try{n=this._getSelection();t=this._createRange(n)}catch(n){}i=new Sys.Extended.UI.HtmlEditor._Marker(this,t,n)}catch(n){return}for(this.__stack||(this.__stack=[],this.__stackPos=0);this.__stackPos<this.__stack.length;)this.__stack.pop();this.__stack.length==Sys.Extended.UI.HtmlEditor.__stackMaxSize&&(this.__stack.reverse(),this.__stack.pop(),this.__stack.reverse());this.__stack.push(i);this.__stackPos=this.__stack.length},_restoreContent:function(){function v(n,t,i,r,u){return t.replace(/\salign=[^\s>]*/gi,"")+('"X"'==r?"":"align="+r)+u.replace(/\salign=[^\s>]*/gi,"")}var u,r,t,e,f,s,i,c,h,n,l;if(this.__stack&&this.__stackPos>=0&&this.__stackPos<this.__stack.length){if(t=this.__stack[this.__stackPos],Sys.Extended.UI.HtmlEditor.isIE){for(var a=this._doc.body.getElementsByTagName("EMBED"),o=[],n=0;n<a.length;n++)o.push(a[n]);for(e=0;e<o.length;e++)o[e].parentNode.removeChild(o[e]);if(f=t._save.replace(/&amp;/gi,"&"),f=f.replace(/(<embed(?:.*?))(teoalign=)(\"[^\"]*\")((?:.*?)>)/gi,v),this._doc.body.innerHTML="!!!<span><\/span>"+Sys.Extended.UI.HtmlEditor.Trim(f),this._doc.body.firstChild&&this._doc.body.removeChild(this._doc.body.firstChild),this._doc.body.firstChild&&this._doc.body.removeChild(this._doc.body.firstChild),s=Sys.Extended.UI.HtmlEditor.getHrefsText(f),Sys.Extended.UI.HtmlEditor.setHrefsText(this._doc.body,s),this._editPanel.get_relativeImages()&&(s=Sys.Extended.UI.HtmlEditor.getImagesText(f),Sys.Extended.UI.HtmlEditor.setImagesText(this._doc.body,s)),Sys.Extended.UI.HtmlEditor.setNames(this._doc.body,t._nArr),Sys.Extended.UI.HtmlEditor.operateAnchors(this,this._doc,!this._editPanel.get_showAnchors()),Sys.Extended.UI.HtmlEditor.operatePlaceHolders(this,this._doc,!this._editPanel.get_showPlaceHolders()),null!=t._tree){i=this._doc.body;try{for(n=t._tree.length-1;n>=0;n--)i=i.childNodes.item(t._tree[n])}catch(v){return void(this.__stackPos>0&&(this.__stackPos--,this._restoreContent(),this.__stackPos++))}try{c=this._doc.body.createControlRange();c.add(i);c.select()}catch(v){}}else h=this,setTimeout(function(){try{if(h._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel){if(u=h._getSelection(),r=h._createRange(u),"control"!=u.type.toLowerCase())try{r.moveToPoint(t._offsetLeft,t._offsetTop)}catch(n){}r.select()}}catch(n){}},0)}else{if(Sys.Extended.UI.HtmlEditor.isOpera)this._doc.body.innerHTML=Sys.Extended.UI.HtmlEditor.Trim(t._save);else for(this._doc.body.innerHTML="",n=0;n<t._save.childNodes.length;n++)this._doc.body.appendChild(t._save.childNodes.item(n).cloneNode(!0));Sys.Extended.UI.HtmlEditor.operateAnchors(this,this._doc,!this._editPanel.get_showAnchors());Sys.Extended.UI.HtmlEditor.operatePlaceHolders(this,this._doc,!this._editPanel.get_showPlaceHolders());try{u=this._getSelection();r=this._createRange();this._removeAllRanges(u)}catch(v){}for(var y="",i=this._doc.body,n=t._tree.length-1;n>=0;n--)y+=" "+t._tree[n],i=i.childNodes.item(t._tree[n]);l=t._offset;try{r.setStart(i,l);r.setEnd(i,l)}catch(v){return void Sys.Extended.UI.HtmlEditor.inspectForShadows(this._doc.body)}try{this._selectRange(u,r)}catch(v){}}try{Sys.Extended.UI.HtmlEditor.inspectForShadows(this._doc.body)}catch(v){}}},SaveContent:function(){this._saveContent()},RestoreContent:function(){this._undo(!1)},_undo:function(n){var i,t;if(this.__stack&&this.__stackPos>0){this.__stackPos==this.__stack.length&&n&&this._saveContent();do i=Sys.Extended.UI.HtmlEditor.Trim(this._doc.body.innerHTML),this.__stackPos--,this._restoreContent();while(Sys.Extended.UI.HtmlEditor.Trim(this._doc.body.innerHTML)==i&&this.__stackPos>0&&n);t=this;setTimeout(function(){try{t._ifShadow()}catch(n){}if(t._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel)try{t._editPanel.updateToolbar()}catch(n){}n||t.onContentChanged()},0)}},_redo:function(){var i,t,n;this.__stack&&this.__stackPos<this.__stack.length-1&&(this.__stackPos++,n=this,Sys.Extended.UI.HtmlEditor.isIE&&(i=n._doc.body.getElementsByTagName("EMBED").length,i>0)&&(t=n._body.ownerDocument.createElement("div"),n._body.appendChild(t),setTimeout(function(){n._body.removeChild(t)},0)),this._restoreContent(),n=this,setTimeout(function(){n._ifShadow();n._editPanel.updateToolbar()},0))},undo:function(){this._undo(!0);this.onContentChanged()},redo:function(){this._redo();this.onContentChanged()},_contextMenuCallP:function(){},onContentChanged:function(){},_copyCut:function(n,t){var v=this,c,f,l,e,a,u,h,y,r,i;if(Sys.Extended.UI.HtmlEditor.isIE){var r=this._getSelection(),i=this._createRange(r),s=!1,o="";if("x"==n&&this._saveContent(),"control"==r.type.toLowerCase())s=!0,o=Sys.Extended.UI.HtmlEditor.getHTML(i.item(0),!0);else if(""!=i.text){if(s=!0,o=i.htmlText,c=i.duplicate(),f=this._getTextNodeCollection(),f.length<1)return;if(l=Sys.Extended.UI.HtmlEditor._commonParent(f[0],f[f.length-1]),null!=l&&f[0].previousSibling&&3==f[0].previousSibling.nodeType)for(e=l.parent;e&&"BODY"!=e.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(e.tagName);)a=e.cloneNode(!1),a.innerHTML=o,o=a.outerHTML,e=e.parentNode;r=this._getSelection();r.empty();i=this._createRange(r);i.setEndPoint("EndToEnd",c);i.setEndPoint("StartToStart",c);i.select()}else""!=i.htmlText&&(s=!0,o=i.htmlText);s?(u=this._doc.createElement("DIV"),u.innerHTML="!!!<span><\/span>"+o,u.removeChild(u.firstChild),u.removeChild(u.firstChild),h=Sys.Extended.UI.HtmlEditor.getHTML(u,!1,!0),y=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HtmlEditor.smartClassName+":)","ig"),h=h.replace(y,"$1"),delete u,this._contentCopy(h,!0),i.select(),"x"==n&&(r.clear(),this._clearP())):"x"==n&&(r.clear(),this._clearP());t&&setTimeout(function(){v._editPanel.updateToolbar()},0)}else"x"==n?(this._saveContent(),r=this._getSelection(),i=this._createRange(r),this._removeAllRanges(r),i.deleteContents(),""==this._doc.body.innerHTML&&(this._doc.body.innerHTML="<br/>",i.setStart(this._doc.body,0),i.setEnd(this._doc.body,0)),v.onContentChanged(),this._selectRange(r,i)):(r=this._getSelection(),i=this._createRange(r),this._removeAllRanges(r),alert(String.format(Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_Use_verb,Sys.Extended.UI.HtmlEditor.isSafari&&navigator.userAgent.indexOf("mac")!=-1?"Apple-C":"Ctrl-C")),this._selectRange(r,i))},_paste:function(n,t){var l,a,f=this,v=this._getSelection(),o=this._createRange(v),i,r,s,h,e,c,u;if(!n)return l=o.offsetLeft,a=o.offsetTop,this.insertHTML(this._getPlain()),void f.onContentChanged();if(!this._editPanel.get_noPaste()){if(l=o.offsetLeft,a=o.offsetTop,r=this._doc.createElement("span"),s=this._contentCopy("",!1,t),/<[\/]*p[\s>]+/i.test(s)||/<[\/]*h/i.test(s))i=this._getSafePlace();else{if(i=this._doc.createElement("SPAN"),i.id=Sys.Extended.UI.HtmlEditor.smartClassName,!this.insertHTML(Sys.Extended.UI.HtmlEditor.getHTML(i,!0)))return;i=this._doc.getElementById(Sys.Extended.UI.HtmlEditor.smartClassName);i&&(i.id=null,i.removeAttribute("id"),i.setAttribute("para","no"))}if(r.innerHTML=s,i){if(this._checkImages(r),h=i.parentNode,e=i.getAttribute("para"),"no"!=e){if(e.indexOf("left")>=0&&r.firstChild&&r.firstChild.tagName&&"P"==r.firstChild.tagName.toUpperCase()){for(;r.firstChild.firstChild;)i.previousSibling.appendChild(r.firstChild.firstChild);r.removeChild(r.firstChild)}if(e.indexOf("right")>=0&&r.lastChild&&r.lastChild.tagName&&"P"==r.lastChild.tagName.toUpperCase()){for(;r.lastChild.lastChild;)i.nextSibling.insertBefore(r.lastChild.lastChild,i.nextSibling.firstChild);r.removeChild(r.lastChild)}}if(c=i,u=null,0==r.childNodes.length&&e.indexOf("left")>=0&&e.indexOf("right")>=0){for(i.nextSibling.firstChild&&(u=this._doc.createElement("span"),c=u,u.innerHTML="111",i.previousSibling.appendChild(u));i.nextSibling.firstChild;)i.previousSibling.appendChild(i.nextSibling.firstChild);h.removeChild(i.nextSibling)}else for(;r.firstChild;)h.insertBefore(r.firstChild,i);setTimeout(function(){var t=f._getSelection(),n=f._createRange(t);if("control"==t.type.toLowerCase())for(;n.length>0;)n.remove(0);try{n.collapse(!1)}catch(t){}f.focusEditor();Sys.Extended.UI.HtmlEditor._setCursor(c,f);u&&u.parentNode.removeChild(u);h.removeChild(i);Sys.Extended.UI.HtmlEditor.inspectForShadows(f._doc.body);f.onContentChanged();n.select()},0)}}},_contentCopy:function(n,t,i){var o,r,c,a,v,f,h,u,e,y;if(""!=n&&(n=n.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/gi,"$1&nbsp;$3").replace(/(<td[^>]*?>)\s*(&nbsp;)\s*(<\/td[^>]*?>)/gi,"$1<br/>$3").replace(/(<p[^>]*?>)\s*(&nbsp;)\s*(<\/p[^>]*?>)/gi,"$1<br/>$3")),o=this._doc.createElement("iframe"),o.width="0",o.height="0",Sys.Extended.UI.HtmlEditor.isIE&&(o.src="javascript:false;"),this._doc.appendChild(o),r=o.contentWindow.document,r.write("<html><head><\/head><body>"+n+"<\/body><\/html>"),r.close(),r.body.contentEditable=!0,c=r.body.createTextRange(),a=!1,""==n){for(c.execCommand("paste"),v=r.createElement("DIV"),f=0;f<r.body.childNodes.length;f++)if(h=r.body.childNodes.item(f),8==h.nodeType&&(u=""+h.data,u.search(/StartFragment/i)>=0&&h.nextSibling&&3==h.nextSibling.nodeType&&(u=""+h.nextSibling.data,u.length&&160==u.charCodeAt(0)))){u=u.substr(1);h.nextSibling.data=u;a=!0;break}if("undefined"!=typeof i&&i&&(r.body.innerHTML=Sys.Extended.UI.HtmlEditor.cleanUp(r.body.innerHTML)),u=Sys.Extended.UI.HtmlEditor.Trim(Sys.Extended.UI.HtmlEditor.getHTML(r.body,!1,!0)),u=u.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,""),r.body.innerHTML=u,!t){Sys.Extended.UI.HtmlEditor.operateAnchors(this,r,!this.showAnchors);Sys.Extended.UI.HtmlEditor.operatePlaceHolders(this,r,!this.showPlaceHolders);for(var l=r.body.getElementsByTagName("EMBED"),s=[],f=0;f<l.length;f++)s.push(l[f]);for(e=0;e<s.length;e++)s[e].parentNode.removeChild(s[e])}delete c;delete v;t&&Sys.Extended.UI.HtmlEditor.isIE&&(c=r.body.createTextRange())}t&&Sys.Extended.UI.HtmlEditor.isIE&&(""!=n&&(Sys.Extended.UI.HtmlEditor.operateAnchors(this,r,!0),Sys.Extended.UI.HtmlEditor.operatePlaceHolders(this,r,!0)),c.select(),c.execCommand("copy"));for(var p=Sys.Extended.UI.HtmlEditor.Trim(r.body.innerHTML).replace(/<br\s*[\/]*>\s*<\/td>/gi,"<\/td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/gi,"$1&nbsp;$3").replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/gi,"$1&nbsp;$3").replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/gi,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/gi,'$1 wmode="transparent"$2'),l=r.body.getElementsByTagName("EMBED"),s=[],f=0;f<l.length;f++)s.push(l[f]);for(e=0;e<s.length;e++)s[e].parentNode.removeChild(s[e]);return o.src="",y=this,y._doc.removeChild(o),delete o,p},insertHTML:function(n,t){function w(n,t){return'<span class="'+Sys.Extended.UI.HtmlEditor.smartClassName+"_script\" style='display:none;visibility:hidden;'>"+t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"<\/span>"}function b(n,t){return t.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}var a,i,r,h,u,c,f,p;if(this.focusEditor(),a=this._getSelection(),"undefined"==typeof t&&(t=this._createRange(a)),Sys.Extended.UI.HtmlEditor.isIE){var e='<span id="'+Sys.Extended.UI.HtmlEditor.smartClassName+'">111<span><\/span>'+n+"<\/span>",k=Sys.Extended.UI.HtmlEditor.getHrefsText(e),d=Sys.Extended.UI.HtmlEditor.getImagesText(e);e=this._editPanel.get_noScript()?e.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,""):e.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,w);try{if(t.pasteHTML)t.pasteHTML(e);else{for(r=this._doc.createElement("DIV"),r.innerHTML=e;r.firstChild;)t(0).parentNode.insertBefore(r.firstChild,t(0));t(0).parentNode.removeChild(t(0));t.remove(0);delete r}}catch(n){return!1}for(i=this._doc.getElementById(Sys.Extended.UI.HtmlEditor.smartClassName),i.innerHTML="<span>qqq<\/span>"+Sys.Extended.UI.HtmlEditor.getHTML(i,!1,!0).replace(new RegExp("<span(?:[^>]*?)class="+Sys.Extended.UI.HtmlEditor.smartClassName+"_script(?:[^>]*?)>(.*?)<\/span(?:[^>]*?)>","gi"),b)+"<span>qqq<\/span>",i.removeChild(i.firstChild),i.removeChild(i.lastChild),Sys.Extended.UI.HtmlEditor.setHrefsText(i,k),Sys.Extended.UI.HtmlEditor.setImagesText(i,d),i.firstChild&&i.removeChild(i.firstChild),i.firstChild&&i.removeChild(i.firstChild);i.firstChild;)i.parentNode.insertBefore(i.firstChild,i);return i.parentNode.removeChild(i),delete i,!0}r=this._doc.createElement("div");r.innerHTML=n;for(var v=r.getElementsByTagName("EMBED"),l=[],u=0;u<v.length;u++)l.push(v[u]);for(h=0;h<l.length;h++){var s=l[h],o=document.createElement("IMG"),y=s.attributes;for(o.src=this._images_list[1],o.setAttribute("dummytag","embed"),u=0;u<y.length;++u)c=y.item(u),c.specified&&(f=c.name.toLowerCase(),p=c.value,"src"==f?f="dummysrc":"bgcolor"==f?f="dummybgcolor":"wmode"==f&&(f="pseudomode"),o.setAttribute(f,p));o.getAttribute("type");o.style.cssText="border: 1px dotted #000000; background-image: url('"+("application/x-mplayer2"==o.getAttribute("type").toLowerCase()?this._images_list[3]:this._images_list[2])+"'); background-position: center; background-repeat: no-repeat; background-color: #c0c0c0;";s.parentNode.insertBefore(o,s);s.parentNode.removeChild(s)}return this.insertNodeAtSelection(r,t)},insertNodeAtSelection:function(n,t){var r,i,e,u,o,f;if(Sys.Extended.UI.HtmlEditor.isIE)return!1;if(r=this._getSelection(),"undefined"==typeof t)try{t=this._createRange(r)}catch(n){return this._removeAllRanges(r),!1}if((i=t.startContainer,e=t.startOffset,"EditorDocument"!=i.ownerDocument.id&&"ms__id"!=i.ownerDocument.uniqueID.substring(0,6))||1==t.startContainer.nodeType&&"TR"==t.startContainer.tagName.toUpperCase()||1==t.endContainer.nodeType&&"TR"==t.endContainer.tagName.toUpperCase())return!1;this._removeAllRanges(r);t.deleteContents();try{t=this._createRange()}catch(n){return this._removeAllRanges(r),!1}switch(i.nodeType){case 3:for(e>0&&(i=i.splitText(e));n.firstChild;)i.parentNode.insertBefore(n.firstChild,i);t.setStart(i,0);t.setEnd(i,0);break;case 1:case 11:try{if(this._removeAllRanges(r),i.childNodes.length>=e+1){for(i=i.childNodes.item(e);n.firstChild;)i.parentNode.insertBefore(n.firstChild,i);u=this._doc.createTextNode("");i.parentNode.insertBefore(u,i);i=u}else{if(u=this._doc.createTextNode(""),Sys.Extended.UI.HtmlEditor.canHaveChildren(i)){for(;n.firstChild;)i.appendChild(n.firstChild);i.appendChild(u)}else{for(;n.firstChild;)i.parentNode.insertBefore(n.firstChild,i);i.parentNode.insertBefore(u,i)}i=u}if(1==i.nodeType){for(o=i.parentNode,f=0;f<o.childNodes.length&&i!=o.childNodes.item(f);f++);t.setStart(o,f);t.setEnd(o,f)}else t.setStart(i,0),t.setEnd(i,0)}catch(n){return this._removeAllRanges(r),!1}}return this._selectRange(r,t),!0},trickWithStyles:function(n){var i=this,r=i._doc.getElementById(n),t,f,e,o,h,u,s;if(null!=r)if(r.nextSibling&&3==r.nextSibling.nodeType){if(t=r.nextSibling,r.parentNode.removeChild(r),f=(""+t.data).indexOf(" "),f>0?t.splitText(f):0==f&&t.splitText(1),null!=i.n_arr)for(e=0;e<i.n_arr.length;e++)i.MSIE_applyCssStyle(i.n_arr[e],[t],!1);if(i.n_arr=null,o=i._getSelection(),Sys.Extended.UI.HtmlEditor.isIE){h=i._createRange(o);u=i._doc.createElement("span");t.nextSibling?t.parentNode.insertBefore(u,t.nextSibling):t.parentNode.appendChild(u);try{h.moveToElementText(u);h.select()}catch(n){}u.parentNode.removeChild(u)}else s=i._doc.createRange(),s.setStart(t,t.length),s.setEnd(t,t.length),i._removeAllRanges(o),i._selectRange(o,s)}else r.parentNode.removeChild(r)},_getParent:function(n){return Sys.Extended.UI.HtmlEditor.isIE?n.parentElement():n.startContainer},_checkImages:function(n){var f,u,t,i,r;if(this._editPanel.get_relativeImages())for(f=n.getElementsByTagName("IMG"),u=0;u<f.length;u++)t=f[u],t.src.indexOf("http://")>=0&&(i=t.src,t.src="qwerty.gif",r=t.src.indexOf("qwerty.gif"),i.substr(0,r)==t.src.substr(0,r)&&(i=i.substr(r,i.length-r)),t.src=i)},_getSafePlace:function(n){function f(n,t,r,u){var o=Sys.Extended.UI.HtmlEditor.myClone(r,e._doc,!1),s,h;for(n&&o.appendChild(n);t;)(1==t.nodeType||3==t.nodeType&&Sys.Extended.UI.HtmlEditor.Trim(""+t.data).length>0)&&(s=null,t.tagName&&"SCRIPT"==t.tagName.toUpperCase()&&(s=t.text),h=Sys.Extended.UI.HtmlEditor.myClone(t,e._doc,!0),0!=o.childNodes.length&&u?o.insertBefore(h,o.firstChild):o.appendChild(h),null!=s&&(h.text=s)),t=u?t.previousSibling:t.nextSibling;return 0==o.childNodes.length&&(delete o,o=null),r==i?o:f(o,u?r.previousSibling:r.nextSibling,r.parentNode,u)}var t=this._doc.createElement("SPAN"),e=this,i,r;if(t.id=Sys.Extended.UI.HtmlEditor.smartClassName,"undefined"==typeof n){if(!this.insertHTML(Sys.Extended.UI.HtmlEditor.getHTML(t,!0)))return null}else null==n.nextSibling?n.parentNode.appendChild(t):n.parentNode.insertBefore(t,n.nextSibling),n.parentNode.removeChild(n);for(t=this._doc.getElementById(Sys.Extended.UI.HtmlEditor.smartClassName),t.id=null,t.removeAttribute("id"),t.setAttribute("para","no"),i=t.parentNode,r=i.tagName.toUpperCase();"BODY"!=r&&"TD"!=r&&"P"!=r&&"DIV"!=r&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName);)i=i.parentNode,r=i.tagName.toUpperCase();if("P"==r){t.setAttribute("para","");var o=f(null,t.previousSibling,t.parentNode,!0),s=f(null,t.nextSibling,t.parentNode,!1),u=i.parentNode;o&&(u.insertBefore(o,i),t.setAttribute("para",t.getAttribute("para")+" left"));u.insertBefore(t,i);s&&(u.insertBefore(s,i),t.setAttribute("para",t.getAttribute("para")+" right"));u.removeChild(i)}return t},noContextMenuAttributeName:function(){return Sys.Extended.UI.HtmlEditor.noContextMenuAttribute},_getTextNodeCollection:function(n){function k(n,t){for(;n;){if(n.id&&n.id==c)return void(b=!0);if(3==n.nodeType){for(;n.nextSibling&&(3==n.nextSibling.nodeType||!Sys.Extended.UI.HtmlEditor.isIE&&"undefined"!=typeof h.__saveBM__&&null!=h.__saveBM__&&h.__saveBM__[0]==n.nextSibling);)3==n.nextSibling.nodeType?n.data=""+n.data+n.nextSibling.data:(h.__saveBM__[0]=n,h.__saveBM__[1]=(""+n.data).length),n.parentNode.removeChild(n.nextSibling);Sys.Extended.UI.HtmlEditor.Trim(""+n.data).length>0&&r.push(n)}else{var i=n.tagName;n.tagName&&(i=i.toUpperCase(),"MAP"!=i&&"AREA"!=i&&"SCRIPT"!=i&&"NOSCRIPT"!=i&&(!n.style||"none"!=Sys.Extended.UI.HtmlEditor.getStyle(n,"display")&&"hidden"!=Sys.Extended.UI.HtmlEditor.getStyle(n,"visibility"))&&k(n.firstChild,!1))}if(b)return;if(n.parentNode,t)for(;null==n.nextSibling;)n=n.parentNode;n=n.nextSibling}}var r=[],a,v,s,t,i,b,h,f,y;if(this.isControl())return r;var p,l=this._getSelection(),o=this._createRange(l),c=Sys.Extended.UI.HtmlEditor.smartClassName+"_right",w=Sys.Extended.UI.HtmlEditor.smartClassName+"_left",u=null,e=null;if("undefined"==typeof n){if(Sys.Extended.UI.HtmlEditor.isIE?(u=o.duplicate(),e=o.duplicate(),u.setEndPoint("EndToStart",o),e.setEndPoint("StartToEnd",o)):(u=o.cloneRange(),e=o.cloneRange(),u.setEnd(u.startContainer,u.startOffset),e.setStart(e.endContainer,e.endOffset),p=u.endOffset),!this.insertHTML("<span id='"+c+"'/>",e))return r;if(Sys.Extended.UI.HtmlEditor.isOpera&&(u.setEnd(u.startContainer,p),u.setStart(u.startContainer,p)),!this.insertHTML("<span id='"+w+"'/>",u))return a=this._doc.getElementById(c),null!=a&&(f=a.parentNode,f.removeChild(a)),v=this._doc.getElementById(rl),null!=v&&(f=v.parentNode,f.removeChild(v)),r}else s=this._doc.createElement("SPAN"),s.id=c,this._doc.body.appendChild(s),s=this._doc.createElement("SPAN"),s.id=w,this._doc.body.insertBefore(s,this._doc.body.firstChild);if(t=this._doc.getElementById(w),i=this._doc.getElementById(c),null==t||null==i)return null!=t&&(f=t.parentNode,f.removeChild(t)),null!=i&&(f=i.parentNode,f.removeChild(i)),[];for(;t.firstChild;)t.removeChild(t.firstChild);for(;i.firstChild;)i.removeChild(i.firstChild);for(;t.previousSibling&&3==t.previousSibling.nodeType&&0==Sys.Extended.UI.HtmlEditor.Trim(""+t.previousSibling.data).length;)t.parentNode.removeChild(t.previousSibling);for(;t.nextSibling&&3==t.nextSibling.nodeType&&0==Sys.Extended.UI.HtmlEditor.Trim(""+t.nextSibling.data).length;)t.parentNode.removeChild(t.nextSibling);for(;i.previousSibling&&3==i.previousSibling.nodeType&&0==Sys.Extended.UI.HtmlEditor.Trim(""+i.previousSibling.data).length;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling&&3==i.nextSibling.nodeType&&0==Sys.Extended.UI.HtmlEditor.Trim(""+i.nextSibling.data).length;)i.parentNode.removeChild(i.nextSibling);return b=!1,h=this,k(t,!0),(f=t.parentNode,f.removeChild(t),f=i.parentNode,f.removeChild(i),"undefined"==typeof n)&&(Sys.Extended.UI.HtmlEditor.isIE?(l.empty(),e.select()):r.length>0&&(this._removeAllRanges(l),y=this._createRange(),y.setEnd(r[r.length-1],r[r.length-1].length),y.setStart(r[r.length-1],r[r.length-1].length),this._selectRange(l,y))),r},_getPlain:function(){var n=this._doc.createElement("textarea"),i,t;return n.width="0",n.height="0",this._doc.appendChild(n),i=n.createTextRange(),i.execCommand("paste"),t=n.value,t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"").replace(/\n/g,"<br/>"),this._doc.removeChild(n),t},_execCommand:function(n,t,i){var r,u,f=this,e,i;if(!Sys.Extended.UI.HtmlEditor.isIE||this.isControl()||(r=this._getSelection(),u=this._createRange(r),e=u.parentElement(),"TEXTAREA"!=e.tagName.toUpperCase())){switch("createlink"!=n.toLowerCase()&&this._saveContent(),n.toLowerCase()){case"createlink":Sys.Extended.UI.HtmlEditor.isIE||!t?this._doc.execCommand(n,t,i):(i=prompt("Enter URL"))&&this._doc.execCommand(n,!1,i);break;case"backcolor":case"forecolor":case"fontname":case"fontsize":this.MSIE_applyCommand(n.toLowerCase(),i);break;case"indent":this.MSIE_indent(!0);break;case"outdent":this.MSIE_indent(!1);break;case"justifyleft":this.MSIE_justify("left");break;case"justifyfull":this.MSIE_justify("justify");break;case"justifycenter":this.MSIE_justify("center");break;case"justifyright":this.MSIE_justify("right");break;case"paragraph":this.MSIE_justify("remain",!1,"P");break;case"formatblock":if(null!=i&&"string"==typeof i&&2==i.length&&"H"==i.substr(0,1).toUpperCase()&&parseInt(i.substr(1,1))>0){this.MSIE_justify("remain",!1,i);break}this._doc.execCommand(n,t,i);break;case"insertunorderedlist":this.MSIE_list("UL");break;case"insertorderedlist":this.MSIE_list("OL");break;case"bold":case"italic":case"underline":case"strikethrough":case"superscript":case"subscript":this.MSIE_applyCommand(n.toLowerCase());break;default:this._doc.execCommand(n,t,i)}this.onContentChanged();Sys.Extended.UI.HtmlEditor.isIE||(r=this._getSelection(),u=this._createRange(r),this._removeAllRanges(r),this._selectRange(r,u),this.focusEditor());f=this;setTimeout(function(){f._editPanel.updateToolbar()},0)}},MSIE_indent:function(n){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.MSIE_indent)(n)},MSIE_justify:function(n,t,i){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.MSIE_justify)(n,t,i)},MSIE_list:function(n){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.MSIE_list)(n)},getSelectionAfterOperation:function(n){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.getSelectionAfterOperation)(n)},setSelectionAfterOperation:function(n,t){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.setSelectionAfterOperation)(n,t)},get_paragraphs:function(){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.get_paragraphs)()},getPseudoP:function(){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.getPseudoP)()},getPseudoP_Recur:function(n,t,i){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.getPseudoP_Recur)(n,t,i)},unWrap:function(n,t){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.unWrap)(n,t)},tryUnWrap:function(n,t,i){return Function.createDelegate(this,Sys.Extended.UI.HtmlEditor.tryUnWrap)(n,t,i)},MSIE_applyCommand:function(n,t){var e=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(this.getSelectedHTML()),f;if(!this.isControl()){var u=this._getSelection(),r=this._createRange(u),o=(Sys.Extended.UI.HtmlEditor.isIE?[r.boundingLeft,r.boundingTop]:[r.startContainer,r.startOffset],Sys.Extended.UI.HtmlEditor.isIE&&r.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&e.length>0),i={name:"none",value:"none"};switch(n.toLowerCase()){case"bold":i={name:"font-weight",value:"bold",repl:!1};break;case"italic":i={name:"font-style",value:"italic",repl:!1};break;case"underline":i={name:"text-decoration",value:"underline",repl:!1};break;case"strikethrough":i={name:"text-decoration",value:"line-through",repl:!1};break;case"superscript":i={name:"vertical-align",value:"super",repl:!1};break;case"subscript":i={name:"vertical-align",value:"sub",repl:!1};break;case"forecolor":i={name:"color",value:t,repl:!1};break;case"backcolor":i={name:"background-color",value:t,repl:!1};break;case"fontname":i={name:"font-family",value:t,repl:!1};break;case"fontsize":i={name:"font-size",value:t,repl:!1}}if(o)f=this._getTextNodeCollection(),this.MSIE_applyCssStyle(i,f,!0);else{if(this.isControl())return;f=this._tryExpand();f.length>0?(this.MSIE_applyCssStyle(i,f,!1),Sys.Extended.UI.HtmlEditor.isIE&&null!=this.__saveBM__?(u=this._getSelection(),r=this._createRange(u),r.moveToBookmark(this.__saveBM__),r.select(),this.__saveBM__=null):null!=this.__saveBM__&&(3==this.__saveBM__[0].nodeType?(u=this._getSelection(),r=this._doc.createRange(),r.setStart(this.__saveBM__[0],this.__saveBM__[1]),r.setEnd(this.__saveBM__[0],this.__saveBM__[1]),this._removeAllRanges(u),this._selectRange(u,r)):(this._trySelect(this.__saveBM__[0],this.__saveBM__[0]),this.__saveBM__[0].parentNode.removeChild(this.__saveBM__[0])),this.__saveBM__=null)):this._setStyleForTyping(i)}}},MSIE_applyCssStyle:function(n,t,i){var u=n.name.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),e=n.value,lt=n.repl,ft=!1,et=!1,c,a,b,h,r,v,f,s,d,l,tt,it,ht,st,w,rt,ut;this._saveContent();var at=Sys.Extended.UI.HtmlEditor.smartClassName+"_right",vt=Sys.Extended.UI.HtmlEditor.smartClassName+"_left",p=this._doc.createElement("SPAN");for(p.id=vt,c=this._doc.createElement("SPAN"),c.id=at,t[0].parentNode.insertBefore(p,t[0]),null!=t[t.length-1].nextSibling?t[t.length-1].parentNode.insertBefore(c,t[t.length-1].nextSibling):t[t.length-1].parentNode.appendChild(c),Sys.Extended.UI.HtmlEditor.unStyle(p),Sys.Extended.UI.HtmlEditor.unStyle(c),a=[],f=0;f<t.length;f++){for(h=t[f],r=h.parentNode,b=0;b<a.length;b++)if(v=a[b],v.parent==r){v.textNodes.push(h);break}b==a.length&&a.push({parent:r,textNodes:[h]})}for(f=0;f<a.length;f++)if(v=a[f],v.textNodes.length>1){var o=v.textNodes,nt=this._doc.createElement("SPAN"),k=this._doc.createElement("SPAN");o[0].parentNode.insertBefore(nt,o[0]);null!=o[o.length-1].nextSibling?o[o.length-1].parentNode.insertBefore(k,o[o.length-1].nextSibling):o[o.length-1].parentNode.appendChild(k);Sys.Extended.UI.HtmlEditor._moveTagsUp(nt,k);nt.parentNode.removeChild(nt);k.parentNode.removeChild(k)}for(f=0;f<t.length;f++){for(var h=t[f],r=h.parentNode,ot=!1;r&&r.tagName&&1==r.childNodes.length&&Sys.Extended.UI.HtmlEditor.isStyleTag(r.tagName);)if(s=r.tagName.toUpperCase(),("I"==s||"EM"==s)&&"font-style"==n.name||("B"==s||"STRONG"==s)&&"font-weight"==n.name||("S"==s||"STRIKE"==s)&&"text-decoration"==n.name||"U"==s&&"text-decoration"==n.name||("SUB"==s||"SUP"==s)&&"vertical-align"==n.name){for(d=r,r=r.parentNode;d.firstChild;)r.insertBefore(d.firstChild,d);r.removeChild(d);ot=!0}else{if(r.style&&r.style[u]&&r.style[u].length>0){if(l=r.style[u],u.toLowerCase().indexOf("color")>=0||"fontFamily"==u||"fontSize"==u)r.style[u]=e;else if(lt)try{r.style[u]=r.style[u]+" "+e;l==r.style[u]&&(r.style[u]=e)}catch(n){r.style[u]=e}else if(ft)if(et)r.style[u]=l.replace(e,"").replace(/,/,"");else try{r.style[u]=r.style[u]+" "+e;l==r.style[u]&&(r.style[u]=e)}catch(n){r.style[u]=e}else{if(tt=l.replace(e,""),"fontWeight"==u&&"700"==l.toString()&&(tt=""),tt==l)try{r.style[u]=r.style[u]+" "+e;l==r.style[u]&&(r.style[u]=e)}catch(n){r.style[u]=e}else r.style[u]=tt.replace(/,/,""),et=!0;ft=!0}ot=!0}r=r.parentNode}ot||et||(it=this._doc.createElement("SPAN"),it.style[u]=e,ht=h.parentNode,ht.insertBefore(it,h),it.appendChild(h),ft=!0)}var y=Sys.Extended.UI.HtmlEditor._commonTotalParent(p,c),ct=y.parent.childNodes.item(y.indexFirst).previousSibling,g=y.parent.childNodes.item(y.indexLast).nextSibling;p.parentNode.removeChild(p);c.parentNode.removeChild(c);st=0;w=y.parent.childNodes.length;(null!=ct&&(st=Sys.Extended.UI.HtmlEditor.__getIndex(ct)),null!=g&&(w=Sys.Extended.UI.HtmlEditor.__getIndex(g)+1,w<y.parent.childNodes.length))&&(3==g.nodeType?w++:1==g.nodeType&&(rt=g.tagName.toUpperCase(),"TR"!=rt&&"TD"!=rt&&"LI"!=rt&&w++));Sys.Extended.UI.HtmlEditor.spanJoiner(y.parent,this._doc,st,w);ut=this;i&&ut._selectRng(t);setTimeout(function(){Sys.Extended.UI.HtmlEditor.isIE||ut.focusEditor();ut._editPanel.updateToolbar()},0)},_tryExpand:function(n){function p(n){var t=/[\d\w]/;return!t.test(n)&&(t=/[\u0080-\u024F]/,!t.test(n)&&(t=/[\u0370-\u2000]/,!t.test(n)))}var o,s,h,c,b=[],l=this._getSelection(),t=this._createRange(l),k=Sys.Extended.UI.HtmlEditor.smartClassName+"_right_add",d=Sys.Extended.UI.HtmlEditor.smartClassName+"_left_add",a=Sys.Extended.UI.HtmlEditor.smartClassName+"_middle_add",y,f;if(Sys.Extended.UI.HtmlEditor.isIE&&"undefined"==typeof n&&(t.execCommand("bold"),this.__saveBM__=t.getBookmark(),t.execCommand("bold")),Sys.Extended.UI.HtmlEditor.isIE){var r=null,w="<span id="+a+"><\/span>",v=t.duplicate();try{t.pasteHTML(w)}catch(n){}if(r=this._doc.getElementById(a),null==r)return[];if("undefined"!=typeof n&&(this.__saveBM__=r),null!=r.nextSibling&&!Sys.Extended.UI.HtmlEditor.isInlineElement(r.nextSibling))return r.parentNode.removeChild(r),[];if(t.expand("word"),t.select(),0==t.text.length)return r.parentNode.removeChild(r),v.select(),[];if(y=new RegExp(w,"ig"),!y.test(t.htmlText.replace(/[\n\r]/g,"")))return r.parentNode.removeChild(r),v.select(),[];if(y=new RegExp(w+"(<\/span>|&nbsp;|[\\s])*$","ig"),y.test(t.htmlText.replace(/[\n\r]/g,"")))return r.parentNode.removeChild(r),v.select(),[];for(;t.text.length>0&&" "==t.text.substr(t.text.length-1,1);)if(t.moveEnd("character",-1),t.select(),0==t.text.length)return r.parentNode.removeChild(r),v.select(),[];return"undefined"==typeof n&&r.parentNode.removeChild(r),this._getTextNodeCollection()}if(!this.insertHTML("<span id='"+d+"'><\/span><span id='"+a+"'><\/span><span id='"+k+"'><\/span>"))return[];var i=this._doc.getElementById(d),u=this._doc.getElementById(k),e=this._doc.getElementById(a);Sys.Extended.UI.HtmlEditor.positionInParagraph(i,i.previousSibling,!0,i.parentNode,p);try{this._trySelect(i,u)}catch(n){}return(h=this._getSelection(),c=this._createRange(h),o=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(this.getSelectedHTML()),s=Sys.Extended.UI.HtmlEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&o.length>0,!s||0==this._getTextNodeCollection().length)?(f=this._doc.createTextNode(""),i.parentNode.insertBefore(f,i),i.parentNode.removeChild(i),u.parentNode.removeChild(u),e.parentNode.removeChild(e),t=this._doc.createRange(),t.setStart(f,0),t.setEnd(f,0),t.setStart(f,0),t.setEnd(f,0),this._removeAllRanges(l),this._selectRange(l,t),[]):(u.parentNode.insertBefore(i,e),Sys.Extended.UI.HtmlEditor.positionInParagraph(u,u.nextSibling,!1,u.parentNode,p),this._trySelect(i,u),h=this._getSelection(),c=this._createRange(h),o=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(this.getSelectedHTML()),s=Sys.Extended.UI.HtmlEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&o.length>0,!s||0==this._getTextNodeCollection().length)?(f=this._doc.createTextNode(""),i.parentNode.insertBefore(f,i),i.parentNode.removeChild(i),u.parentNode.removeChild(u),e.parentNode.removeChild(e),t=this._doc.createRange(),t.setStart(f,0),t.setEnd(f,0),t.setStart(f,0),t.setEnd(f,0),this._removeAllRanges(l),this._selectRange(l,t),[]):(Sys.Extended.UI.HtmlEditor.positionInParagraph(i,i.previousSibling,!0,i.parentNode,p),this._trySelect(i,u),h=this._getSelection(),c=this._createRange(h),o=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(this.getSelectedHTML()),s=Sys.Extended.UI.HtmlEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&o.length>0,Sys.Extended.UI.HtmlEditor.isIE?"undefined"!=typeof n?this.__saveBM__=e:e.parentNode.removeChild(e):this.__saveBM__=[e,0],s&&(b=this._getTextNodeCollection()),i.parentNode.removeChild(i),u.parentNode.removeChild(u),b)},_setStyleForTyping:function(n){var e=n.name.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),o=n.value,s=n.repl,u,f;null==this._StyleForTyping&&(this._StyleForTyping=[]);for(var i=[],r=!0,t=0;t<this._StyleForTyping.length;t++)u=this._StyleForTyping[t].name.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),f=this._StyleForTyping[t].value,u!=e||f!=o&&!s?i.push(this._StyleForTyping[t]):r=!1;this._StyleForTyping=i;r&&this._StyleForTyping.push(n)},_trySelect:function(n,t){var i=this._getSelection(),e=null,o=null,r,u,f;if(Sys.Extended.UI.HtmlEditor.isIE){i.empty();i=this._getSelection();r=this._createRange(i);u=this._createRange(i);try{null!=n&&r.moveToElementText(n);null!=t&&u.moveToElementText(t);null!=n&&null!=t?(r.setEndPoint("EndToEnd",u),r.select()):null!=n?r.select():null!=t&&u.select()}catch(n){}}else try{e=this._doc.createTextNode("");o=this._doc.createTextNode("");n.parentNode.insertBefore(e,n);t.parentNode.insertBefore(o,t);f=this._doc.createRange();f.setStart(e,0);f.setEnd(o,0);this._removeAllRanges(i);this._selectRange(i,f)}catch(n){}},getSelectedHTML:function(){var t=this._getSelection(),i=this._createRange(t),n=null;if(Sys.Extended.UI.HtmlEditor.isIE)n=i.htmlText;else if(Sys.Extended.UI.HtmlEditor.isSafari&&("Caret"==t.type||"None"==t.type))n="";else{if(Sys.Extended.UI.HtmlEditor.isSafari&&null==i.cloneContents())return"";n=Sys.Extended.UI.HtmlEditor.getHTML(i.cloneContents(),!1)}return n},_queryCommandState:function(n){var h=this._rangeStartEnd(),t,e,o,s,c;if(null==h)return!1;try{t={name:"none",value:"none"};switch(n.toLowerCase()){case"bold":t={name:"font-weight",value:"bold"};break;case"italic":t={name:"font-style",value:"italic"};break;case"underline":t={name:"text-decoration",value:"underline"};break;case"strikethrough":t={name:"text-decoration",value:"line-through"};break;case"superscript":t={name:"vertical-align",value:"super"};break;case"subscript":t={name:"vertical-align",value:"sub"}}var i=h.start,r=h.end,u=Sys.Extended.UI.HtmlEditor.getStyle(i,t.name).toString().toLowerCase(),f=Sys.Extended.UI.HtmlEditor.getStyle(r,t.name).toString().toLowerCase();if("font-weight"==t.name&&"700"==u&&(u="bold"),"font-weight"==t.name&&"700"==f&&(f="bold"),/MSIE (5|6)/.test(navigator.userAgent)&&"strikethrough"==n.toLowerCase()&&("underline"==u||"underline"==f)){for(;i&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName);){if(i.style.textDecoration.indexOf("line-through")>=0){u=i.style.textDecoration;break}i=i.parentNode}for(;r&&Sys.Extended.UI.HtmlEditor.isStyleTag(r.tagName);){if(r.style.textDecoration.indexOf("line-through")>=0){f=r.style.textDecoration;break}r=r.parentNode}}if(Sys.Extended.UI.HtmlEditor.isSafari&&("strikethrough"==n.toLowerCase()||"underline"==n.toLowerCase())){for(e=n.toLowerCase(),"strikethrough"==e&&(e="line-through");i&&Sys.Extended.UI.HtmlEditor.isStyleTag(i.tagName);){if(i.style.textDecoration.indexOf(e)>=0){u=i.style.textDecoration;break}i=i.parentNode}for(;r&&Sys.Extended.UI.HtmlEditor.isStyleTag(r.tagName);){if(r.style.textDecoration.indexOf(e)>=0){f=r.style.textDecoration;break}r=r.parentNode}}if(o=u.indexOf(t.value)>=0&&f.indexOf(t.value)>=0,null!=this._StyleForTyping&&this._StyleForTyping.length>0)for(s=0;s<this._StyleForTyping.length;s++)if(c=this._StyleForTyping[s],c.name==t.name&&c.value==t.value){o=!o;break}return o}catch(n){return!1}},_textAlignState:function(n){var t=this._rangeStartEnd(),i,r;if(null==t)return!1;try{return i=this._textAlignStateSingle(t.start),r=this._textAlignStateSingle(t.end),i==n&&r==n}catch(n){return!1}},_textAlignStateSingle:function(n){for(;n&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName);)n=n.parentNode;if(null!=n){var t=n.tagName.toUpperCase();if("P"==t||"DIV"==t)return n.style.textAlign.toLowerCase()}return null},_rangeStartEnd:function(){function r(t,i){for(var u=null;null==u;){if(u=3==t.nodeType?i&&n.startContainer!=n.endContainer&&n.startOffset==t.length&&t.nextSibling?r(t.nextSibling,i):!i&&n.startContainer!=n.endContainer&&0==n.endOffset&&t.previousSibling?r(t.previousSibling,i):t:null==(i?t.firstChild:t.lastChild)?null:r(i?t.firstChild:t.lastChild,i),null!=u)return u;if(t=i?t.nextSibling:t.previousSibling,null==t)return null}}var u,f,c;if(this.isControl())return null;try{var l=this._getSelection(),n=this._createRange(l),t=null,i=null;if(Sys.Extended.UI.HtmlEditor.isIE)if(0==n.text.length)t=i=this._getParent(n);else{var e=Sys.Extended.UI.HtmlEditor.smartClassName+"_right_marker",o=Sys.Extended.UI.HtmlEditor.smartClassName+"_left_marker",s=n.duplicate(),h=n.duplicate();s.setEndPoint("EndToStart",n);h.setEndPoint("StartToEnd",n);h.pasteHTML("<span id='"+e+"'/>");s.pasteHTML("<span id='"+o+"'/>");u=this._doc.getElementById(o);f=this._doc.getElementById(e);t=u.parentNode;i=f.parentNode;u.parentNode.removeChild(u);f.parentNode.removeChild(f)}else{if(c=this._getParent(n),3!=c.nodeType&&n.startContainer==n.endContainer&&n.startOffset==n.endOffset&&n.startContainer.childNodes.item(n.startOffset).tagName&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.startContainer.childNodes.item(n.startOffset).tagName))return{start:n.startContainer.childNodes.item(n.startOffset),end:n.startContainer.childNodes.item(n.startOffset)};t=r(n.startContainer,!0);null!=t&&null!=t.parentNode&&(t=t.parentNode);null==t&&(t=n.startContainer);i=r(n.endContainer,!1);null!=i&&null!=i.parentNode&&(i=i.parentNode);null==i&&(i=n.endContainer)}return{start:t,end:i}}catch(r){return null}},rtlState:function(){return!(!this._doc.body.style.direction||"rtl"!=this._doc.body.style.direction)},openWait:function(){this._editPanel.openWait()},closeWait:function(){this._editPanel.closeWait()}};Sys.Extended.UI.HtmlEditor.DesignPanel.ScriptRecover=function(){this.scriptsArray=[];this.scriptsArray_index=-1;this.regReplScript1=function(n,t){return this.scriptsArray.push(t),""};this.regReplFromScript=function(n,t){return t.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")};this.regReplFromScript1=function(n,t,i,r){this.scriptsArray_index++;var u;return u=Sys.Extended.UI.HtmlEditor.isIE?this.scriptsArray[this.scriptsArray_index]:this.scriptsArray[this.scriptsArray_index].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"'),t+u+r}};Sys.Extended.UI.HtmlEditor.DesignPanel.registerClass("Sys.Extended.UI.HtmlEditor.DesignPanel",Sys.Extended.UI.HtmlEditor.ModePanel);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.HtmlPanel=function(n){Sys.Extended.UI.HtmlEditor.HtmlPanel.initializeBase(this,[n]);this._onfocus$delegate=Function.createDelegate(this,this._onfocus);Sys.Extended.UI.HtmlEditor.isIE&&"BackCompat"!=document.compatMode&&(this._onresize$delegate=Function.createDelegate(this,this._onresize))};Sys.Extended.UI.HtmlEditor.HtmlPanel.prototype={_activate:function(n){this._shouldResize=!1;var t=this.get_element();(Sys.Extended.UI.HtmlEditor.isIE&&Sys.Browser.version>6&&"BackCompat"!=document.compatMode&&t.parentNode.clientHeight>0&&(this._shouldResize=!0),Sys.Extended.UI.HtmlEditor.HtmlPanel.callBaseMethod(this,"_activate"),Sys.Extended.UI.HtmlEditor.isIE)?(t.value="",setTimeout(function(){t.value=n},0)):t.value=n;$addHandlers(t,{focus:this._onfocus$delegate});this._shouldResize&&$addHandlers(t,{resize:this._onresize$delegate});this._activateFinished()},_deactivate:function(){var n=this.get_element();this._shouldResize&&$common.removeHandlers(n,{resize:this._onresize$delegate});this._shouldResize=!1;$common.removeHandlers(n,{focus:this._onfocus$delegate});n.value="";Sys.Extended.UI.HtmlEditor.HtmlPanel.callBaseMethod(this,"_deactivate")},_getContent:function(){return this.get_element().value},_setContent:function(n){if(this.get_element().value=n,Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element().parentNode))try{var t=this.get_element();t.focus();setTimeout(function(){try{Sys.Extended.UI.HtmlEditor.setSelectionRange(t,0,0)}catch(n){}},0)}catch(n){}},_focus:function(){var n,t;if(Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element().parentNode))try{n=this.get_element();n.focus();setTimeout(function(){try{Sys.Extended.UI.HtmlEditor.setSelectionRange(n,0,0)}catch(n){}},0)}catch(n){}t=this;setTimeout(function(){t._focused()},0)},_onfocus:function(){this._really_focused();var n=this.get_element();return setTimeout(function(){n.focus()},0),!0},_onresize:function(){var n=this.get_element(),t=n.parentNode.clientHeight;t>0&&(n.style.height=t+"px")}};Sys.Extended.UI.HtmlEditor.HtmlPanel.registerClass("Sys.Extended.UI.HtmlEditor.HtmlPanel",Sys.Extended.UI.HtmlEditor.ModePanel);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.PreviewPanel=function(n){Sys.Extended.UI.HtmlEditor.PreviewPanel.initializeBase(this,[n]);this._focus$delegate=Function.createDelegate(this,this._focus_event);this._blur$delegate=Function.createDelegate(this,this._blur_event);this._doc=null;this._content="";this._panel_timer=null};Sys.Extended.UI.HtmlEditor.PreviewPanel.prototype={_focus:function(){try{this.get_element().contentWindow.focus()}catch(n){}this._focused()},_focus_event:function(){if(null==this._panel_timer){var t=this.get_element().contentWindow,n=this;this._really_focused();this._panel_timer=setTimeout(function(){t.focus();n._really_focused();n._panel_timer=null},0)}return!0},_blur_event:function(){return null!=this._panel_timer&&(clearTimeout(this._panel_timer),this._panel_timer=null),!0},_activate:function(n){Sys.Extended.UI.HtmlEditor.PreviewPanel.callBaseMethod(this,"_activate");this._content=n;this._wasFocused=!1;this._initIframe(n);Sys.Extended.UI.HtmlEditor._addEvents(this.get_element().contentWindow,["focus"],this._focus$delegate);Sys.Extended.UI.HtmlEditor._addEvents(this.get_element().contentWindow,["blur"],this._blur$delegate);this._activateFinished()},_deactivate:function(){if(Sys.Extended.UI.HtmlEditor._removeEvents(this.get_element().contentWindow,["blur"],this._blur$delegate),Sys.Extended.UI.HtmlEditor._removeEvents(this.get_element().contentWindow,["focus"],this._focus$delegate),Sys.Extended.UI.HtmlEditor.isIE)try{this._doc.open();this._doc.write("");this._doc.close();this.get_element().src="javascript:false;"}catch(n){}this._doc=null;this._content="";Sys.Extended.UI.HtmlEditor.PreviewPanel.callBaseMethod(this,"_deactivate")},_initIframe:function(n){var t=Sys.Extended.UI.HtmlEditor.Trim(n);this._doc=this.get_element().contentWindow.document;Sys.Extended.UI.HtmlEditor.isIE&&(t=t.replace(/&amp;/gi,"&"));this._doc.open();this._doc.write('<html><head><link rel="stylesheet" href="'+this._editPanel.get_documentCssPath()+'" media="all" /><\/head><body>'+t+"<\/body><\/html>");this._doc.close()},_getContent:function(){return this._content},_setContent:function(n){this._content=n;this._initIframe(n)}};Sys.Extended.UI.HtmlEditor.PreviewPanel.registerClass("Sys.Extended.UI.HtmlEditor.PreviewPanel",Sys.Extended.UI.HtmlEditor.ModePanel);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel=null;Sys.Extended.UI.HtmlEditor.EditPanel=function(n){Sys.Extended.UI.HtmlEditor.EditPanel.initializeBase(this,[n]);this._loaded=!1;this._eAfter=null;this._toolbars=null;this._modePanels=null;this._contentChangedElement=null;this._contentElement=null;this._contentForceElement=null;this._activeModeElement=null;this._suppressTabInDesignMode=!1;this._keyboardEnabled=!0;this._noPaste=!1;this._hotkeys=null;this._showAnchors=!1;this._showPlaceHolders=!1;this._startEnd=!0;this._relativeImages=!0;this._documentCssPath=null;this._designPanelCssPath=null;this._imagePath_1x1=null;this._imagePath_flash=null;this._imagePath_media=null;this._imagePath_anchor=null;this._imagePath_placeHolder=null;this._autofocus=!0;this._initialCleanUp=!1;this._noScript=!1;this._noUnicode=!1;this._cachedToolbarIds=null;this._contentPrepared=!1;this._activeMode=null;this._pageRequestManager=null;this._formOnSubmitSaved=null;this._validators=null;this._app_onload$delegate=Function.createDelegate(this,this._app_onload);this._onsubmit$delegate=Function.createDelegate(this,this._onsubmit);this._disposed=!0};Sys.Extended.UI.HtmlEditor.EditPanel.prototype={get_relativeImages:function(){return this._relativeImages},set_relativeImages:function(n){this._relativeImages=n;this._loaded&&this.raisePropertyChanged("relativeImages")},get_startEnd:function(){return this._startEnd},set_startEnd:function(n){this._startEnd=n;this._loaded&&this.raisePropertyChanged("startEnd")},get_showPlaceHolders:function(){return this._showPlaceHolders},set_showPlaceHolders:function(n){this._showPlaceHolders=n;this._loaded&&this.raisePropertyChanged("showPlaceHolders")},get_showAnchors:function(){return this._showAnchors},set_showAnchors:function(n){this._showAnchors=n;this._loaded&&this.raisePropertyChanged("showAnchors")},get_hotkeys:function(){return this._hotkeys},set_hotkeys:function(n){this._hotkeys=n;this._loaded&&this.raisePropertyChanged("noPaste")},get_noPaste:function(){return this._noPaste},set_noPaste:function(n){this._noPaste=n;this._loaded&&this.raisePropertyChanged("noPaste")},get_suppressTabInDesignMode:function(){return this._suppressTabInDesignMode},set_suppressTabInDesignMode:function(n){this._suppressTabInDesignMode=n;this._loaded&&this.raisePropertyChanged("suppressTabInDesignMode")},get_keyboardEnabled:function(){return this._keyboardEnabled},set_keyboardEnabled:function(n){this._keyboardEnabled=n;this._loaded&&this.raisePropertyChanged("keyboardEnabled")},get_noUnicode:function(){return this._noUnicode},set_noUnicode:function(n){this._noUnicode=n;this._loaded&&this.raisePropertyChanged("noUnicode")},get_noScript:function(){return this._noScript},set_noScript:function(n){this._noScript=n;this._loaded&&this.raisePropertyChanged("noScript")},get_initialCleanUp:function(){return this._initialCleanUp},set_initialCleanUp:function(n){this._initialCleanUp=n;this._loaded&&this.raisePropertyChanged("initialCleanUp")},get_imagePath_1x1:function(){return this._imagePath_1x1},set_imagePath_1x1:function(n){this._imagePath_1x1=n},get_imagePath_flash:function(){return this._imagePath_flash},set_imagePath_flash:function(n){this._imagePath_flash=n},get_imagePath_media:function(){return this._imagePath_media},set_imagePath_media:function(n){this._imagePath_media=n},get_imagePath_anchor:function(){return this._imagePath_anchor},set_imagePath_anchor:function(n){this._imagePath_anchor=n},get_imagePath_placeHolder:function(){return this._imagePath_placeHolder},set_imagePath_placeHolder:function(n){this._imagePath_placeHolder=n},get_documentCssPath:function(){return this._documentCssPath},set_documentCssPath:function(n){this._documentCssPath=n;this._loaded&&this.raisePropertyChanged("documentCssPath")},get_designPanelCssPath:function(){return this._designPanelCssPath},set_designPanelCssPath:function(n){this._designPanelCssPath=n;this._loaded&&this.raisePropertyChanged("designPanelCssPath")},get_autofocus:function(){return this._autofocus},set_autofocus:function(n){this._autofocus=n;this._loaded&&this.raisePropertyChanged("autofocus")},get_content:function(){return null==this._activeMode?null!=this.get_contentElement()?this._getContentForPostback():"":this.getContent()},set_content:function(n){return this.get_isInitialized()&&this._loaded?(this.setContent(n),this._contentPrepared=!1,void(this._loaded&&this.raisePropertyChanged("content"))):void(null!=this.get_contentElement()&&(this.get_contentElement().value=n.replace(/\"/g,"&quot;")))},get_activeMode:function(){return null==this._activeMode?Sys.Extended.UI.HtmlEditor.ActiveModeType.Design:this._activeMode},set_activeMode:function(n){var t,i,r;if(!Sys.Extended.UI.HtmlEditor.ActiveModeType_checkValue(n))throw Error.argumentOutOfRange("value, function: Sys.Extended.UI.HtmlEditor.EditPanel.set_activeMode");return t=this._activeMode,i=!0,this._loaded&&null!=t&&t!=n?(r=new Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs(t,n,this),this.raiseBeforeActiveModeChanged(r),this._eAfter=new Sys.Extended.UI.HtmlEditor.ActiveModeChangedArgs(t,n,this),i=this._setMode(n)):this._activeMode=n,this.get_activeModeElement().value=n,i},get_contentChangedElement:function(){return this._contentChangedElement},set_contentChangedElement:function(n){this._contentChangedElement=n},get_contentElement:function(){return this._contentElement},set_contentElement:function(n){this._contentElement=n},get_contentForceElement:function(){return this._contentForceElement},set_contentForceElement:function(n){this._contentForceElement=n},get_activeModeElement:function(){return this._activeModeElement},set_activeModeElement:function(n){this._activeModeElement=n},setCancelOnPostback:function(){this._loaded&&(this.get_contentForceElement().value="")},setAcceptOnPostback:function(){this._loaded&&(this.get_contentForceElement().value="1")},get_toolbars:function(){return null==this._toolbars&&(this._toolbars=[]),this._toolbars},set_toolbars:function(n){this.get_toolbars().push(n)},get_toolbarIds:function(){},set_toolbarIds:function(n){if(!this.get_isInitialized())return void(this._cachedToolbarIds=n);for(var i=n.split(";"),t=0;t<i.length;t++)i[t].length>0&&this.set_toolbars($find(i[t]))},get_modePanels:function(){return null==this._modePanels&&(this._modePanels=[]),this._modePanels},set_modePanel:function(n){this.get_modePanels().push(n)},get_modePanelIds:function(){},set_modePanelIds:function(n){for(var i=n.split(";"),t=0;t<i.length;t++)this.set_modePanel($find(i[t]))},add_focused:function(n){this.get_events().addHandler("focused",n)},remove_focused:function(n){this.get_events().removeHandler("focused",n)},raiseFocused:function(n){var t=this.get_events().getHandler("focused");t&&t(this,n)},add_activeModeChanged:function(n){this.get_events().addHandler("activeModeChanged",n)},remove_activeModeChanged:function(n){this.get_events().removeHandler("activeModeChanged",n)},raiseActiveModeChanged:function(n){var t=this.get_events().getHandler("activeModeChanged");t&&t(this,n)},add_beforeActiveModeChanged:function(n){this.get_events().addHandler("beforeActiveModeChanged",n)},remove_beforeActiveModeChanged:function(n){this.get_events().removeHandler("beforeActiveModeChanged",n)},raiseBeforeActiveModeChanged:function(n){var t=this.get_events().getHandler("beforeActiveModeChanged");t&&t(this,n)},get_activePanel:function(){var n=this.get_modePanels()[this.get_activeMode()];if(null==n||"undefined"==typeof n)throw Error.argumentOutOfRange("activeMode, function: Sys.Extended.UI.HtmlEditor.EditPanel.get_activePanel");return n},initialize:function(){this.__appLoaded__=!1;Sys.Extended.UI.HtmlEditor.EditPanel.callBaseMethod(this,"initialize");this._disposed=!1;Sys.Application.add_load(this._app_onload$delegate);Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager&&(this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance(),this._pageRequestManager&&(this._partialUpdateEndRequestHandler=Function.createDelegate(this,this._partialUpdateEndRequest),this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler),this._invokingRequestHandler=Function.createDelegate(this,this._invokingRequest),Sys.Net.WebRequestManager.add_invokingRequest(this._invokingRequestHandler),this._completedRequestHandler=Function.createDelegate(this,this._completedRequest),Sys.Net.WebRequestManager.add_completedRequest(this._completedRequestHandler)));Sys.Extended.UI.HtmlEditor.addFormOnSubmit(this._onsubmit$delegate,this)},dispose:function(){this._loaded=!1;this._disposed=!0;this._pageRequestManager&&(this._invokingRequestHandler&&(this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler),this._partialUpdateEndRequestHandler=null,Sys.Net.WebRequestManager.remove_invokingRequest(this._invokingRequestHandler),this._invokingRequestHandler=null,Sys.Net.WebRequestManager.remove_completedRequest(this._completedRequestHandler),this._completedRequestHandler=null),this._pageRequestManager=null);Sys.Extended.UI.HtmlEditor.removeFormOnSubmit(this._onsubmit$delegate);Sys.Application.remove_load(this._app_onload$delegate);this.disableToolbars();Sys.Extended.UI.HtmlEditor.EditPanel.callBaseMethod(this,"dispose")},_onsubmit:function(){return this._contentPrepared||(this._prepareContentForPostback(this.get_content()),this._contentPrepared=!0),!0},_invokingRequest:function(n,t){if(!this._contentPrepared){var r=t.get_webRequest(),i=r.get_body(),u=new RegExp("([\\?&])("+this.get_contentElement().name+"=)([^&$]*)([&$])","g");this._prepareContentForPostback(this.get_content());i=i.replace(u,"$1$2"+escape(this.get_contentElement().value)+"$4");this._contentPrepared=!0;r.set_body(i)}},_completedRequest:function(){this._contentPrepared=!1},_partialUpdateEndRequest:function(){this._contentPrepared=!1;Sys.Extended.UI.HtmlEditor.isIE&&this.__blured&&(this.__blured=!1,this.get_activePanel()._focus())},_app_onload:function(){var i,t,u,n,f,r,e,o;this.__appLoaded__||(this.__appLoaded__=!0,this._disposed)||((this._loaded=!0,this.set_activeMode(parseInt(this.get_activeModeElement().value)),null!=this._cachedToolbarIds&&(this.set_toolbarIds(this._cachedToolbarIds),this._cachedToolbarIds=null),this._validators=this.get_modePanels()[Sys.Extended.UI.HtmlEditor.ActiveModeType.Html].get_element().Validators,this._shouldResize=!1,Sys.Extended.UI.HtmlEditor.isIE&&"BackCompat"!=document.compatMode&&(this._shouldResize=!0),this._shouldResize)&&(i=this.get_modePanels(),t=i[Sys.Extended.UI.HtmlEditor.ActiveModeType.Design],null==t&&(t=i[Sys.Extended.UI.HtmlEditor.ActiveModeType.Preview]),u=i[Sys.Extended.UI.HtmlEditor.ActiveModeType.Html],null!=t&&null!=u&&(n=t.get_element(),n.style.display="",r=n.offsetHeight,e=!1,0==r&&(e=!0,f=Sys.Extended.UI.HtmlEditor.setElementVisibility(n.parentNode),r=n.offsetHeight),u.get_element().style.height=r+"px",e&&(Sys.Extended.UI.HtmlEditor.restoreElementVisibility(f),delete f),n.style.display="none")),o=this.get_contentElement().value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&"),this.setContent(this._initialCleanUp?Sys.Extended.UI.HtmlEditor.cleanUp(o.replace(/[\n\r]+/g," ")):o),this.setAcceptOnPostback())},_setActive:function(){for(var n=0;n<this.get_toolbars().length;n++)this.get_toolbars()[n].set_activeEditPanel(this,!0);null!=this._eAfter&&(this.raisePropertyChanged("activeMode"),this.raiseActiveModeChanged(this._eAfter),this._eAfter=null)},_focused:function(n){if("undefined"==typeof n||!n)for(var t=0;t<this.get_toolbars().length;t++)this.get_toolbars()[t].set_activeEditPanel(this);Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel=this},_really_focused:function(){this._focused();this.raiseFocused(new Sys.EventArgs)},updateToolbar:function(){this._focused()},getContent:function(){var n=this.get_activePanel().get_content().replace(/<\/?html(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?head(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?body(?=\s|>)(?:[^>]*?)>/gi,"").replace(/^([\n\r]+)/,"").replace(/([\n\r]+)$/,"");return Sys.Extended.UI.HtmlEditor.isIE||(n=n.replace(/^<br\s*[\/]*>$/,"")),n},setContent:function(n){var t=n;this.get_noScript()&&(t=t.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,""));t=t.replace(/<\/?html(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?head(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?body(?=\s|>)(?:[^>]*?)>/gi,"").replace(/^([\n\r]+)/,"").replace(/([\n\r]+)$/,"");this._prepareContentForPostback(t);this.get_activePanel().set_content(t);this._validate(null,t)},_validate:function(n,t){var i=this._validators,r;if(null!=i&&"undefined"!=typeof i){this._contentForValidation=t;try{for(r=0;r<i.length;r++)window.ValidatorValidate(i[r],null,n);window.ValidatorUpdateIsValid()}catch(n){}this._contentForValidation=null}},_prepareContentForPostback:function(n){this.get_contentElement().value=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")},_getContentForPostback:function(){return this.get_contentElement().value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},_setMode:function(n){var o=this.get_activePanel(),s,t,i,r;if(!o._activated)return s=this,setTimeout(function(){s._setMode(n)},10),!1;if(t=this.get_content(),(Sys.Extended.UI.HtmlEditor.isOpera&&(t=t.replace(/\r/gi,"")),this._shouldResize&&n==Sys.Extended.UI.HtmlEditor.ActiveModeType.Html)&&(i=this.get_activePanel(),r=this.get_modePanels()[Sys.Extended.UI.HtmlEditor.ActiveModeType.Html],null!=i&&null!=r)){var u,f=i.get_element(),e=f.offsetHeight,h=!1;0==e&&(h=!0,u=Sys.Extended.UI.HtmlEditor.setElementVisibility(f.parentNode),e=f.offsetHeight);r.get_element().style.height=e+"px";h&&(Sys.Extended.UI.HtmlEditor.restoreElementVisibility(u),delete u)}return this.disableToolbars(n),o._deactivate(),this._activeMode=n,this.setContent(t),!0},disableToolbars:function(n){for(var i,t=0;t<this.get_toolbars().length;t++)i=this.get_toolbars()[t],i._loaded&&i.disable(n)},openWait:function(){},closeWait:function(){}};Sys.Extended.UI.HtmlEditor.EditPanel.registerClass("Sys.Extended.UI.HtmlEditor.EditPanel",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.Toolbar=function(n){Sys.Extended.UI.HtmlEditor.Toolbar.initializeBase(this,[n]);this._loaded=!1;this._cachedButtonIds=null;this._cachedEditPanel=null;this._buttons=null;this._alwaysVisible=!1;this._app_onload$delegate=Function.createDelegate(this,this._app_onload)};Sys.Extended.UI.HtmlEditor.Toolbar.prototype={get_alwaysVisible:function(){return this._alwaysVisible},set_alwaysVisible:function(n){this._alwaysVisible=n;this.get_isInitialized()&&this.raisePropertyChanged("alwaysVisible")},set_activeEditPanel:function(n){if(!this._loaded)return void(this._cachedEditPanel=n);for(var t=0;t<this.get_buttons().length;t++)this.get_buttons()[t].set_activeEditPanel(n)},disable:function(){if(this.get_isInitialized()){if(this._alwaysVisible)return;for(var n=0;n<this.get_buttons().length;n++)this.get_buttons()[n].set_activeEditPanel(null)}},get_buttons:function(){return null==this._buttons&&(this._buttons=[]),this._buttons},set_buttons:function(n){this.get_buttons().push(n)},get_buttonIds:function(){},set_buttonIds:function(n){if(!this.get_isInitialized())return void(this._cachedButtonIds=n);for(var i=n.split(";"),t=0;t<i.length;t++)i[t].length>0&&this.set_buttons($find(i[t]))},initialize:function(){Sys.Extended.UI.HtmlEditor.Toolbar.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate)},dispose:function(){this._loaded=!1;Sys.Application.remove_load(this._app_onload$delegate);Sys.Extended.UI.HtmlEditor.Toolbar.callBaseMethod(this,"dispose")},_app_onload:function(){null!=this._cachedButtonIds&&(this.set_buttonIds(this._cachedButtonIds),this._cachedButtonIds=null);this._loaded=!0;null!=this._cachedEditPanel&&(this.set_activeEditPanel(this._cachedEditPanel),this._cachedEditPanel=null)}};Sys.Extended.UI.HtmlEditor.Toolbar.registerClass("Sys.Extended.UI.HtmlEditor.Toolbar",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton.initializeBase(this,[n]);this._loaded=!1;this._preservePlace=!1;this._editPanel=null;this._activeModes=null;this._app_onload$delegate=Function.createDelegate(this,this._app_onload);this._cssClass="";this._onmouseover$delegate=Function.createDelegate(this,this._onmouseover);this._onmouseout$delegate=Function.createDelegate(this,this._onmouseout);this._onmousedown$delegate=Function.createDelegate(this,this._onmousedown);this._onmouseup$delegate=Function.createDelegate(this,this._onmouseup);this._onclick$delegate=Function.createDelegate(this,this._onclick)};Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton.prototype={get_preservePlace:function(){return this._preservePlace},set_preservePlace:function(n){this._preservePlace=n},set_activeEditPanel:function(n){this._editPanel=n;null==this._editPanel?this.hideButton():this.isAllowedActiveMode(this._editPanel.get_activeMode())&&this.canBeShown()?(this.showButton(),this.onEditPanelActivity()):this.hideButton()},isImage:function(){return!0},checkRangeInDesign:function(){if("undefined"==typeof this._designPanel||null==this._designPanel||this._designPanel.isPopup())return!1;var n=Sys.Extended.UI.HtmlEditor.getSelParent(this._designPanel);return 3==n.nodeType&&(n=n.parentNode),n.ownerDocument==this._designPanel._doc},get_buttonName:function(){var n=Object.getType(this).getName();return n.substring(n.lastIndexOf(".")+1)},get_message:function(messageName){var expression="Sys.Extended.UI.Resources.HtmlEditor_toolbar_button_"+this.get_buttonName()+"_message_"+messageName;return eval(expression)},isDisplayed:function(){var t=this.get_element(),n;return t?(n=t.style,"none"!=n.display&&"hidden"!=n.visibility):!1},hideButton:function(){var n=this.get_element();n&&(this._preservePlace?n.style.visibility="hidden":n.style.display="none")},showButton:function(){var n=this.get_element();n&&("none"==n.style.display&&(n.style.display=""),this._preservePlace&&(n.style.visibility="visible"))},canBeShown:function(){return!0},onEditPanelActivity:function(){},get_activeModes:function(){return null==this._activeModes&&(this._activeModes=[]),this._activeModes},set_activeModes:function(n){this.get_activeModes().push(n)},get_activeModesIds:function(){},set_activeModesIds:function(n){for(var i=n.split(";"),t=0;t<i.length;t++)this.set_activeModes(parseInt(i[t]))},set_toolTip:function(n){this.get_element().title=n},get_toolTip:function(){return this.get_element().title},isAllowedActiveMode:function(n){for(var t=0;t<this.get_activeModes().length;t++)if(this.get_activeModes()[t]==n)return!0;return!1},initialize:function(){function t(n){var i,r;if(1==n.nodeType&&n.tagName)for(i=n.tagName.toUpperCase(),"INPUT"!=i&&"TEXTAREA"!=i&&"IFRAME"!=i&&(n.unselectable="on"),r=0;r<n.childNodes.length;r++)t(n.childNodes.item(r))}Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate);var n=this.get_element();if(this._preservePlace&&!this.canBeShown()&&(n.style.display="none"),this._cssClass=n.className,this.isImage()&&$addHandlers(n,{mouseover:this._onmouseover$delegate,mouseout:this._onmouseout$delegate,mousedown:this._onmousedown$delegate,mouseup:this._onmouseup$delegate,click:this._onclick$delegate}),Sys.Extended.UI.HtmlEditor.isIE)t(n);else try{n.style.MozUserSelect="none";n.parentNode.style.MozUserSelect="none"}catch(t){}},dispose:function(){this.isImage()&&$common.removeHandlers(this.get_element(),{mouseover:this._onmouseover$delegate,mouseout:this._onmouseout$delegate,mousedown:this._onmousedown$delegate,mouseup:this._onmouseup$delegate,click:this._onclick$delegate});this._loaded=!1;Sys.Application.remove_load(this._app_onload$delegate);Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton.callBaseMethod(this,"dispose")},_app_onload:function(){this.onButtonLoaded();this._loaded=!0},onButtonLoaded:function(){},_onmouseover:function(){return!!this.isEnable()&&(Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_hover"),!0)},_onmouseout:function(){return!!this.isEnable()&&(Sys.UI.DomElement.removeCssClass(this.get_element(),this._cssClass+"_hover"),Sys.UI.DomElement.removeCssClass(this.get_element(),this._cssClass+"_mousedown"),!0)},_onmousedown:function(){return this.isEnable()?(Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_mousedown"),!1):null},_onmouseup:function(){return!!this.isEnable()&&(Sys.UI.DomElement.removeCssClass(this.get_element(),this._cssClass+"_mousedown"),!0)},_onclick:function(){return!!this.isEnable()},isEnable:function(){return!!this._loaded&&null!=this._editPanel},setActivity:function(n){n?Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_active"):Sys.UI.DomElement.removeCssClass(this.get_element(),this._cssClass+"_active")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.initializeBase(this,[n]);this._normalSrc="";this._hoverSrc="";this._downSrc="";this._activeSrc="";this._downTimer=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.prototype={get_normalSrc:function(){return this._normalSrc},set_normalSrc:function(n){this._normalSrc=n;var t=this.get_element();/none$/.test(t.src)&&(t.src=n)},get_hoverSrc:function(){return this._hoverSrc},set_hoverSrc:function(n){this._hoverSrc=n},get_downSrc:function(){return this._downSrc},set_downSrc:function(n){this._downSrc=n},get_activeSrc:function(){return this._activeSrc},set_activeSrc:function(n){this._activeSrc=n},isImage:function(){return!0},_onmouseover:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.callBaseMethod(this,"_onmouseover")&&(this._hoverSrc.length>0&&(this.get_element().src=this._hoverSrc),!0)},_onmouseout:function(){var n=this.get_element();return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.callBaseMethod(this,"_onmouseout")&&(this._hoverSrc.length>0&&(n.src=Sys.UI.DomElement.containsCssClass(n,this._cssClass+"_mousedown")&&this._downSrc.length>0?this._downSrc:Sys.UI.DomElement.containsCssClass(n,this._cssClass+"_active")&&this._activeSrc.length>0?this._activeSrc:this._normalSrc),!0)},_onmousedown:function(){return null===Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.callBaseMethod(this,"_onmousedown")?null:(this._downSrc.length>0&&(this.get_element().src=this._downSrc,this._downTimer=setTimeout(Function.createDelegate(this,this._onmouseup),1e3)),!0)},_onmouseup:function(){var n=this.get_element();return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.callBaseMethod(this,"_onmouseup")&&(this._downSrc.length>0&&(n.src=Sys.UI.DomElement.containsCssClass(n,this._cssClass+"_hover")&&this._hoverSrc.length>0?this._hoverSrc:Sys.UI.DomElement.containsCssClass(n,this._cssClass+"_active")&&this._activeSrc.length>0?this._activeSrc:this._normalSrc,null!=this._downTimer&&(clearTimeout(this._downTimer),this._downTimer=null)),!0)},setActivity:function(n){var t=this.get_element();this._activeSrc.length>0&&(n?Sys.UI.DomElement.containsCssClass(t,this._cssClass+"_active")||(t.src=this._activeSrc):Sys.UI.DomElement.containsCssClass(t,this._cssClass+"_active")&&(t.src=Sys.UI.DomElement.containsCssClass(t,this._cssClass+"_mousedown")&&this._downSrc.length>0?this._downSrc:Sys.UI.DomElement.containsCssClass(t,this._cssClass+"_hover")&&this._hoverSrc.length>0?this._hoverSrc:this._normalSrc));Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.callBaseMethod(this,"setActivity",[n])}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton.prototype={_onmousedown:function(n){return null!=this._designPanel&&!this._designPanel.isPopup()&&null!==Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton.callBaseMethod(this,"_onmousedown",[n])&&(this.callMethod(),!1)},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){return null!=this._designPanel&&!this._designPanel.isPopup()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton.prototype={};Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorClear=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorClear.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorClear.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorClear.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("backcolor",!1,"")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorClear.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorClear",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton.initializeBase(this,[n]);this._relatedPopup=null;this._autoClose=!0;this._forclose_onmousedown$delegate=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton.prototype={set_activeEditPanel:function(n){this._editPanel!=n&&null!=this._editPanel&&this.closePopup();Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton.callBaseMethod(this,"set_activeEditPanel",[n])},get_autoClose:function(){return this._autoClose},set_autoClose:function(n){this._autoClose=n},get_relatedPopup:function(){return this._relatedPopup},set_relatedPopup:function(n){this._relatedPopup=n},openPopup:function(n,t,i){var u,f;if((!this._autoClose||null==this._forclose_onmousedown$delegate)&&null!=this._relatedPopup){if(this._bookmark=null,Sys.Extended.UI.HtmlEditor.isIE)if(u=this._designPanel._getSelection(),this._selType=u.type.toLowerCase(),f=this._designPanel._createRange(u),"text"==this._selType||"none"==this._selType)try{this._bookmark=f.duplicate()}catch(n){}else"control"==this._selType&&(this._bookmark=f.item(0),f.remove(0),u.empty());if("function"==typeof this._relatedPopup.set_relatedElement){if(this._relatedPopup.set_relatedElement(this.get_element()),this._forclose_onmousedown$delegate=Function.createDelegate(this,this._forclose_onmousedown),this._autoClose){var e=this._designPanel.get_element().contentWindow,o=e.document.body,r=this;setTimeout(function(){null!=r._forclose_onmousedown$delegate&&(Sys.Extended.UI.HtmlEditor._addEvent(o,"mousedown",r._forclose_onmousedown$delegate),Sys.Extended.UI.HtmlEditor._addEvent(o,"keydown",r._forclose_onmousedown$delegate),Sys.Extended.UI.HtmlEditor._addEvent(document.body,"keydown",r._forclose_onmousedown$delegate),Sys.Extended.UI.HtmlEditor._addEvent(window,"keydown",r._forclose_onmousedown$delegate),Sys.Extended.UI.HtmlEditor._addEvent(e,"mousedown",r._forclose_onmousedown$delegate),Sys.Extended.UI.HtmlEditor._addEvent(document.body,"mousedown",r._forclose_onmousedown$delegate),document.documentElement&&Sys.Extended.UI.HtmlEditor._addEvent(document.documentElement,"mousedown",r._forclose_onmousedown$delegate))},0)}this._relatedPopup.open(n)}else this._relatedPopup.open(n,t,i)}},_forclose_onmousedown:function(n){var i,t,r,u,f;if(null==this._forclose_onmousedown$delegate||!this._relatedPopup.isOpened)return!0;if(this._relatedPopup.close(),this._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel)try{this._bookmark&&(Sys.Extended.UI.HtmlEditor.isIE&&("control"==this._selType?(t=this._designPanel._doc.body.createControlRange(),t.add(this._bookmark)):t=this._bookmark,t.select()),this._bookmark=null);Sys.Extended.UI.HtmlEditor.isIE||(i=this._designPanel._getSelection(),t=this._designPanel._createRange(i),this._designPanel._removeAllRanges(i),this._designPanel._selectRange(i,t),this._designPanel.focusEditor())}catch(n){}if(r=this,setTimeout(function(){if(r._editPanel==Sys.Extended.UI.HtmlEditor.LastFocusedEditPanel)try{r._editPanel.updateToolbar()}catch(n){}},0),this._autoClose)try{u=this._designPanel.get_element().contentWindow;f=u.document.body;document.documentElement&&Sys.Extended.UI.HtmlEditor._removeEvent(document.documentElement,"mousedown",this._forclose_onmousedown$delegate);Sys.Extended.UI.HtmlEditor._removeEvent(f,"keydown",this._forclose_onmousedown$delegate);Sys.Extended.UI.HtmlEditor._removeEvent(document.body,"keydown",this._forclose_onmousedown$delegate);Sys.Extended.UI.HtmlEditor._removeEvent(window,"keydown",this._forclose_onmousedown$delegate);Sys.Extended.UI.HtmlEditor._removeEvent(f,"mousedown",this._forclose_onmousedown$delegate);Sys.Extended.UI.HtmlEditor._removeEvent(u,"mousedown",this._forclose_onmousedown$delegate);Sys.Extended.UI.HtmlEditor._removeEvent(document.body,"mousedown",this._forclose_onmousedown$delegate)}catch(n){}return this._forclose_onmousedown$delegate=null,!n||!n.type||"keydown"!=n.type||(Sys.Extended.UI.HtmlEditor._stopEvent(n),!1)},closePopup:function(){null!=this._forclose_onmousedown$delegate&&this._forclose_onmousedown$delegate(null)},dispose:function(){null!=this._forclose_onmousedown$delegate&&this._forclose_onmousedown$delegate(null);Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Selector=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Selector.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Selector.prototype={};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Selector.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Selector",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector.initializeBase(this,[n]);this._fixedColorButton=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector.prototype={get_fixedColorButton:function(){return this._fixedColorButton},set_fixedColorButton:function(n){this._fixedColorButton=n},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector.callBaseMethod(this,"callMethod")&&(this.openPopup(Function.createDelegate(this,this._onopened)),!0)},_onopened:function(n){n.setColor=Function.createDelegate(this,this.setColor)},setColor:function(n){this.closePopup();null!=this._fixedColorButton&&this._fixedColorButton.set_defaultColor(n)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector",Sys.Extended.UI.HtmlEditor.ToolbarButtons.Selector);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector.callBaseMethod(this,"callMethod"))return!1},setColor:function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector.callBaseMethod(this,"setColor",[n]);this._designPanel._execCommand("backcolor",!1,n)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.BackColorSelector",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton.prototype={onEditPanelActivity:function(){Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton.callBaseMethod(this,"onEditPanelActivity");this.setActivity(this.checkState())},checkState:function(){return!!this.checkRangeInDesign()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("bold",!1,null)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold.callBaseMethod(this,"checkState")&&this._designPanel._queryCommandState("bold")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Bold",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton.prototype={initialize:function(){Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton.callBaseMethod(this,"initialize")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.BulletedList=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.BulletedList.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BulletedList.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.BulletedList.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("InsertUnorderedList")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.BulletedList.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.BulletedList",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton.callBaseMethod(this,"callMethod")&&(this.openPopup(Function.createDelegate(this,this._onopened)),!0)},_onopened:function(n){n.setColor=Function.createDelegate(this,this.setColor)},setColor:function(){this.closePopup()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Copy=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Copy.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Copy.prototype={canBeShown:function(){return Sys.Extended.UI.HtmlEditor.isIE},callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Copy.callBaseMethod(this,"callMethod"))return!1;var n=this._designPanel;Sys.Extended.UI.HtmlEditor.isIE?(n.openWait(),setTimeout(function(){n.isShadowed();n._copyCut("c",!0);n.closeWait();n._ifShadow()},0)):n._copyCut("c",!0)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Copy.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Copy",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Cut=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Cut.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Cut.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Cut.callBaseMethod(this,"callMethod"))return!1;var n=this._designPanel;Sys.Extended.UI.HtmlEditor.isIE?(n.openWait(),setTimeout(function(){n.isShadowed();n._copyCut("x",!0);n.closeWait()},0)):n._copyCut("x",!0)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Cut.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Cut",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.DecreaseIndent=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.DecreaseIndent.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DecreaseIndent.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.DecreaseIndent.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("Outdent")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DecreaseIndent.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.DecreaseIndent",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton.initializeBase(this,[n]);this._activeMode=Sys.Extended.UI.HtmlEditor.ActiveModeType.Design};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton.prototype={get_activeMode:function(){return this._activeMode},set_activeMode:function(n){this._activeMode=n},_onclick:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton.callBaseMethod(this,"_onclick"))return!1;var n=this;return setTimeout(function(){n._editPanel.set_activeMode(n._activeMode)},0),!0},onEditPanelActivity:function(){this.setActivity(this._editPanel.get_activeMode()==this._activeMode)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignMode=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignMode.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignMode.prototype={};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignMode.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignMode",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton.prototype={_onmousedown:function(n){return null!=this._designPanel&&!this._designPanel.isPopup()&&null!==Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton.callBaseMethod(this,"_onmousedown",[n])&&(this.callMethod(),!1)},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){return null!=this._designPanel&&!this._designPanel.isPopup()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.BoxButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.initializeBase(this,[n]);this._onclick_option$delegate=Function.createDelegate(this,this._onclick_option);this._onchange$delegate=Function.createDelegate(this,this._onchange)};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.prototype={initialize:function(){var i=this.get_element().id,n,t;for(Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.callBaseMethod(this,"initialize"),this._select=$get(i+"_select"),$addHandler(this._select,"change",this._onchange$delegate),n=0;n<this._select.options.length;n++)t=this._select.options[n],$addHandler(t,"click",this._onclick_option$delegate)},dispose:function(){for(var t,n=0;n<this._select.options.length;n++)t=this._select.options[n],$removeHandler(t,"click",this._onclick_option$delegate);$removeHandler(this._select,"change",this._onchange$delegate);Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.callBaseMethod(this,"dispose")},isImage:function(){return!1},callMethod:function(){return!0},_onclick_option:function(n){if(!this.isEnable())return!1;var t=n.target;return t.parentNode.value=t.value,Sys.Extended.UI.HtmlEditor._stopEvent(n),!!Sys.Extended.UI.HtmlEditor.isSafari&&(this.callMethod(t.parentNode,n),!0)},_onchange:function(n){if(!this.isEnable())return!1;var t=n.target;return Sys.Extended.UI.HtmlEditor._stopEvent(n),this.callMethod(t,n),!0}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.CommonButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton.prototype={onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel();this.checkState()},checkState:function(){return!!this.checkRangeInDesign()},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton.callBaseMethod(this,"callMethod")&&null!=this._designPanel&&!this._designPanel.isPopup()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.SelectButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton.initializeBase(this,[n]);this._defaultColor="#000000";this._colorDiv=null;this._methodButton=null};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton.prototype={get_defaultColor:function(){return this._defaultColor},set_defaultColor:function(n){this._defaultColor=n;null!=this._colorDiv&&(this._colorDiv.get_element().style.backgroundColor=n)},get_colorDiv:function(){return this._colorDiv},set_colorDiv:function(n){this._colorDiv=n},get_methodButton:function(){return this._methodButton},set_methodButton:function(n){this._methodButton=n},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton.callBaseMethod(this,"callMethod")&&void this.setColor(this.get_defaultColor())},setColor:function(){},initialize:function(){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton.callBaseMethod(this,"initialize");null!=this._methodButton&&(this._methodButton.callMethod=Function.createDelegate(this,this.callMethod));null!=this._colorDiv&&(this._colorDiv.callMethod=Function.createDelegate(this,this.callMethod))}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeBoxButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedBackColor=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedBackColor.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedBackColor.prototype={setColor:function(n){this._designPanel._execCommand("backcolor",!1,n)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedBackColor.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedBackColor",Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor.prototype={setColor:function(n){this._designPanel._execCommand("forecolor",!1,n)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor",Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName.prototype={initialize:function(){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName.callBaseMethod(this,"initialize")},callMethod:function(n){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName.callBaseMethod(this,"callMethod"))return!1;try{var t=this._designPanel;t._execCommand("fontname",!1,n.options.item(n.selectedIndex).value)}catch(n){}},checkState:function(){var u,n,i,t,f,e,r;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName.callBaseMethod(this,"checkState"))return!1;u=this._designPanel;n=null;try{n=Function.createDelegate(u,Sys.Extended.UI.HtmlEditor._queryCommandValue)("fontname")}catch(u){}if(u._FontNotSet||n&&0!=n.length||(n=Sys.Extended.UI.HtmlEditor.getStyle(u._doc.body,"font-family")),i=this._select,t=0,n&&n.length>0){for(f=n.toLowerCase().split(",")[0].replace(/^(['"])/,"").replace(/(['"])$/,""),t=0;t<i.options.length;t++)if(e=i.options.item(t).value.toLowerCase().split(",")[0],e==f)break;if(t==i.options.length)try{r=document.createElement("OPTION");r.value=n.replace(/^(['"])/,"").replace(/(['"])$/,"");r.text=n.split(",")[0].replace(/^(['"])/,"").replace(/(['"])$/,"");i.add(r,Sys.Extended.UI.HtmlEditor.isIE?t:null);$addHandler(r,"click",this._onclick_option$delegate)}catch(u){t=0}}i.selectedIndex=t}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontName",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.prototype={initialize:function(){Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.callBaseMethod(this,"initialize")},callMethod:function(n){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.callBaseMethod(this,"callMethod"))return!1;try{var t=this._designPanel;t._execCommand("FontSize",!1,Sys.Extended.UI.HtmlEditor.fontSizeSeek(n.options.item(n.selectedIndex).value))}catch(n){}},checkState:function(){var i,t,e,o,r;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.callBaseMethod(this,"checkState"))return!1;var u=this._designPanel,n=null,f=this._select.id;try{n=Function.createDelegate(u,Sys.Extended.UI.HtmlEditor._queryCommandValue)("fontsize",f)}catch(u){}n&&(n=n.toString());u._FontNotSet||n&&0!=n.length||(n=Sys.Extended.UI.HtmlEditor.getStyle(u._doc.body,"font-size"),n=Sys.Extended.UI.HtmlEditor._TryTransformFromPxToPt(n,this,f));try{if(i=this._select,t=0,n&&n.length>0){for(e=n.toLowerCase().split(",")[0],t=0;t<i.options.length;t++)if(o=Sys.Extended.UI.HtmlEditor.fontSizeSeek(i.options.item(t).value.toLowerCase().split(",")[0]),o==e)break;if(t==i.options.length)try{r=document.createElement("OPTION");r.value=n;r.text=n;i.add(r,Sys.Extended.UI.HtmlEditor.isIE?t:null);$addHandler(r,"click",this._onclick_option$delegate)}catch(u){t=0}}i.selectedIndex=t}catch(u){}}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.FontSize",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeSelectButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor.callBaseMethod(this,"callMethod"))return!1},setColor:function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor.callBaseMethod(this,"setColor",[n]);this._designPanel._execCommand("forecolor",!1,n)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColor",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorClear=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorClear.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorClear.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorClear.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("forecolor",!1,"")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorClear.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorClear",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector.callBaseMethod(this,"callMethod"))return!1},setColor:function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector.callBaseMethod(this,"setColor",[n]);this._designPanel._execCommand("forecolor",!1,n)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.ForeColorSelector",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ColorSelector);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.HorizontalSeparator=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.HorizontalSeparator.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.HorizontalSeparator.prototype={isImage:function(){return!1}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.HorizontalSeparator.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.HorizontalSeparator",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModeImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.HtmlMode=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.HtmlMode.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.HtmlMode.prototype={};Sys.Extended.UI.HtmlEditor.ToolbarButtons.HtmlMode.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.HtmlMode",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.IncreaseIndent=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.IncreaseIndent.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.IncreaseIndent.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.IncreaseIndent.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("Indent")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.IncreaseIndent.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.IncreaseIndent",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertHR=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertHR.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertHR.prototype={callMethod:function(){var n,r,t,i,u;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertHR.callBaseMethod(this,"callMethod"))return!1;n=this._designPanel;try{return(n._saveContent(),r=n._doc.createElement("div"),r.innerHTML="<hr>",t=r.firstChild,i=n._getSafePlace(),!i)?void 0:(u=i.parentNode,u.insertBefore(t,i),u.removeChild(i),t=t.nextSibling?t.nextSibling:t,Sys.Extended.UI.HtmlEditor._setCursor(t,n),setTimeout(function(){n.onContentChanged();n._editPanel.updateToolbar()},0),n.focusEditor(),!0)}catch(n){}}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertHR.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertHR",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton.prototype={set_activeEditPanel:function(n){var t,i;this._editPanel!=n&&null!=this._editPanel&&(t=this.get_relatedPopup(),"function"==typeof t._forceImClose&&(i=t._forceImClose,i(t._iframe.contentWindow)));Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton.callBaseMethod(this,"set_activeEditPanel",[n])},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton.callBaseMethod(this,"callMethod")&&(this.openPopup(Function.createDelegate(this,this._onopened)),!0)},_onopened:function(n){n.popupMediator.set_callMethodByName("OK",Function.createDelegate(this,this._onOK));n.popupMediator.set_callMethodByName("Cancel",Function.createDelegate(this,this._onCancel));var t=this.get_relatedPopup();t._popup=this._designPanel._popup;t._forceImClose=Function.createDelegate(this,this._onCancel);this._designPanel._popup=this.get_relatedPopup();this.opened(n)},opened:function(){},_onOK:function(n){this.okCheck(n)&&this._exit(Function.createDelegate(this,this.ok),n)},_onCancel:function(n){this.cancelCheck(n)&&this._exit(Function.createDelegate(this,this.cancel),n)},_exit:function(n,t){this.closePopup();this._designPanel._popup=this.get_relatedPopup()._popup;this.get_relatedPopup()._popup=null;this.get_relatedPopup()._forceImClose=null;n(t)},ok:function(){},cancel:function(){},okCheck:function(){return!0},cancelCheck:function(){return!0}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton",Sys.Extended.UI.HtmlEditor.ToolbarButtons.DesignModePopupImageButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertLink=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertLink.initializeBase(this,[n]);this._emptySrc=window.location.href.replace(/(http[s]*\:\/\/)[^\u0000]*/i,"$1")};Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertLink.prototype={callMethod:function(){var t=this._designPanel,i=t._getSelection(),n=(t._createRange(i),Sys.Extended.UI.HtmlEditor.getSelParent(t));for(3==n.nodeType&&(n=n.parentNode);n&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName)&&"A"!=n.tagName.toUpperCase();)n=n.parentNode;if(n&&"A"==n.tagName.toUpperCase())this._edit=!0,this._editLink(n);else if(this._edit=!1,!this._createLink())return!1;return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertLink.callBaseMethod(this,"callMethod")},opened:function(n){this._preparePopup(n)},ok:function(n){var t=n.popupMediator.getField("target"),i;if(null!=t&&(this._obj.target=t.value),i=n.popupMediator.getField("url"),null!=i&&(this._obj.href=i.value),/^javascript:/.test(this._obj.href)){this._obj.target=null;try{this._obj.removeAttribute("target")}catch(n){}}else t=n.popupMediator.getField("target"),null!=t&&(this._obj.target=t.value);this._edit?this._edit_callback(!0):this._create_callback(!0)},cancel:function(){this._edit?this._edit_callback(!1):this._create_callback(!1)},_createLink:function(){var n=this._designPanel,s=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(n.getSelectedHTML()),f=n._getSelection(),i=n._createRange(f),e,h,r,c,l,u,t,v,y;if((this._txt=null,n.isControl()&&Sys.Extended.UI.HtmlEditor.getSelParent(n).tagName&&("EMBED"==Sys.Extended.UI.HtmlEditor.getSelParent(n).tagName.toUpperCase()||"IMG"==Sys.Extended.UI.HtmlEditor.getSelParent(n).tagName.toUpperCase())||!n.isControl()&&(Sys.Extended.UI.HtmlEditor.isIE&&i.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&s.length>0))||(n._saveContent(),e=n._doc.createElement("span"),e.innerHTML="new link",e.id=Sys.Extended.UI.HtmlEditor.smartClassName,h=!0,Sys.Extended.UI.HtmlEditor.isIE&&n.isControl()?(r=i.item(0),c=n._doc.createElement("span"),r.parentNode.insertBefore(c,r),this._txt=e.firstChild,r.parentNode.insertBefore(this._txt,r),l=n._doc.createElement("span"),r.parentNode.insertBefore(l,r),r.parentNode.removeChild(r),n.setSelectionAfterOperation([c,l],!1),h=!1):(n.insertHTML(Sys.Extended.UI.HtmlEditor.getHTML(e,!0)),u=n._doc.getElementById(Sys.Extended.UI.HtmlEditor.smartClassName),this._txt=u.firstChild,u.parentNode.insertBefore(u.firstChild,u),u.parentNode.removeChild(u)),Sys.Extended.UI.HtmlEditor.isIE?h&&i.select():(i=n._createRange(),i.setStart(this._txt,0),i.setEnd(this._txt,(""+this._txt.data).length),n._removeAllRanges(f),n._selectRange(f,i)),s=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(n.getSelectedHTML()),f=n._getSelection(),i=n._createRange(f)),!(n.isControl()&&"IMG"==Sys.Extended.UI.HtmlEditor.getSelParent(n).tagName.toUpperCase()||!n.isControl()&&(Sys.Extended.UI.HtmlEditor.isIE&&i.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&s.length>0)))return this._txt&&(n._undo(!1),n.__stack.pop()),!1;n._saveContent();this._obj={target:"default",href:this._emptySrc,title:""};for(var a=n._doc.getElementsByTagName("A"),o=[],t=0;t<a.length;t++)o.push([a[t],""+a[t].href]);for(n._execCommand("createLink",!1,this._emptySrc),this._oldList=[],t=0;t<o.length;t++)v=o[t][0],y=o[t][1],v.href==y&&this._oldList.push(v);return!0},_editLink:function(n){var t=this._designPanel;this._obj=n;t._saveContent()},_preparePopup:function(n){var i,t;this._obj.target&&this._obj.target.length>0&&"default"==this._obj.target&&(this._obj.target=this.get_relatedPopup().get_defaultTarget());i=n.popupMediator.getField("target");null!=i&&(i.value=this._obj.target&&this._obj.target.length>0&&"_"==this._obj.target.substr(0,1)?this._obj.target.toLowerCase():"_self");t=n.popupMediator.getField("url");null!=t&&(t.value=this._edit?Sys.Extended.UI.HtmlEditor.getRealAttribute(this._obj,"href"):this._obj.href,0==t.value.length&&(t.value=this._emptySrc),t.value=t.value.replace(/\&quot;/g,'"'),setTimeout(function(){Sys.Extended.UI.HtmlEditor.setSelectionRange(t,0,t.value.length)},0))},_edit_callback:function(n){var t=this._designPanel;try{n?(0==this._obj.title.length&&(this._obj.title=null,this._obj.removeAttribute("title")),t.onContentChanged()):t._undo(!1)}catch(n){}return!0},okCheck:function(n){var i=n.popupMediator.getField("url"),t;return null!=i?(t=i.value,!(""==t||t.length>=3&&"://"==t.substr(t.length-3,3))||(n.alert(this.get_message("EmptyURL")),n.setTimeout(function(){try{i.focus()}catch(n){}},0),!1)):!1},_create_callback:function(n){var t=this._designPanel,i,r;try{if(n){for(var u=t._doc.getElementsByTagName("A"),s=0,f=0;f<u.length;f++){for(var h=!0,e=u[f],o=0;o<this._oldList.length;o++)if(e==this._oldList[o]){h=!1;break}h&&(s=f,this._obj.target&&(e.target=this._obj.target),e.href=this._obj.href,this._obj.title.length>0&&(e.title=this._obj.title))}(this._txt&&(this._txt.data=this._obj.href),u.length>0)&&(i=u[s],r=t._doc.createElement("span"),r.innerHTML="&nbsp;",null!=i.nextSibling?i.parentNode.insertBefore(r,i.nextSibling):i.parentNode.appendChild(r),setTimeout(function(){Sys.Extended.UI.HtmlEditor._setCursor(r,t);setTimeout(function(){i.parentNode.removeChild(r)},0)},0));setTimeout(function(){t._editPanel.updateToolbar();t.onContentChanged()},0)}else t._undo(!1),t.__stack.pop(),this._txt&&(t._undo(!1),t.__stack.pop());t.focusEditor()}catch(n){}return!0}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertLink.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.InsertLink",Sys.Extended.UI.HtmlEditor.ToolbarButtons.OkCancelPopupButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("italic",!1,null)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic.callBaseMethod(this,"checkState")&&this._designPanel._queryCommandState("italic")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Italic",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter.prototype={checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter.callBaseMethod(this,"checkState")&&this._designPanel._textAlignState("center")},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("JustifyCenter")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyCenter",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull.prototype={checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull.callBaseMethod(this,"checkState")&&this._designPanel._textAlignState("justify")},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("JustifyFull")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyFull",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft.prototype={checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft.callBaseMethod(this,"checkState")&&this._designPanel._textAlignState("left")},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("JustifyLeft")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyLeft",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight.prototype={checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight.callBaseMethod(this,"checkState")&&this._designPanel._textAlignState("right")},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("JustifyRight")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.JustifyRight",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr.prototype={callMethod:function(){var n,t,i;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr.callBaseMethod(this,"callMethod"))return!1;(this._designPanel._doc.body.style.direction=this.checkState()?"rtl":"",Sys.Extended.UI.HtmlEditor.isIE)||(n=this._designPanel._getSelection(),t=this._designPanel._createRange(n),this._designPanel._removeAllRanges(n),this._designPanel._selectRange(n,t),this._designPanel.focusEditor());i=this;setTimeout(function(){i._editPanel.updateToolbar()},0)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr.callBaseMethod(this,"checkState")&&(!this._designPanel._doc.body.style.direction||"rtl"!=this._designPanel._doc.body.style.direction)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Ltr",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.OrderedList=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.OrderedList.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.OrderedList.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.OrderedList.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("InsertOrderedList")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.OrderedList.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.OrderedList",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph.prototype={checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph.callBaseMethod(this,"checkState")&&this._designPanel._textAlignState("")},callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("Paragraph")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paragraph",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paste=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paste.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paste.prototype={canBeShown:function(){return Sys.Extended.UI.HtmlEditor.isIE},callMethod:function(){var n,t,i;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paste.callBaseMethod(this,"callMethod"))return!1;n=this._designPanel;Sys.Extended.UI.HtmlEditor.isIE?(n._saveContent(),n.openWait(),setTimeout(function(){n._paste(!0);n.closeWait()},0)):(t=n._getSelection(),i=n._createRange(t),n._removeAllRanges(t),alert(String.format(Sys.Extended.UI.Resources.HtmlEditor_toolbar_button_Use_verb,Sys.Extended.UI.HtmlEditor.isSafari&&navigator.userAgent.indexOf("mac")!=-1?"Apple-V":"Ctrl-V")),n._selectRange(t,i),n.isWord=!1,n.isPlainText=!1)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paste.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Paste",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteText=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteText.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteText.prototype={callMethod:function(){var n;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteText.callBaseMethod(this,"callMethod"))return!1;if(n=this._designPanel,Sys.Extended.UI.HtmlEditor.isIE)n._saveContent(),n.openWait(),setTimeout(function(){n._paste(!1);n.closeWait()},0);else{var t=n._getSelection(),i=n._createRange(t),r=String.format(Sys.Extended.UI.Resources.HtmlEditor_toolbar_button_Use_verb,Sys.Extended.UI.HtmlEditor.isSafari&&navigator.userAgent.indexOf("mac")!=-1?"Apple-V":"Ctrl-V"),u=String.format(Sys.Extended.UI.Resources.HtmlEditor_toolbar_button_OnPastePlainText,r);alert(u);setTimeout(function(){n._removeAllRanges(t);n._selectRange(t,i)},0);n.isPlainText=!0}}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteText.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteText",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteWord=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteWord.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteWord.prototype={callMethod:function(){var n;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteWord.callBaseMethod(this,"callMethod"))return!1;if(n=this._designPanel,Sys.Extended.UI.HtmlEditor.isIE)n._saveContent(),n.openWait(),setTimeout(function(){n._paste(!0,!0);n.closeWait()},0);else{var t=n._getSelection(),i=n._createRange(t),r=String.format(Sys.Extended.UI.Resources.HtmlEditor_toolbar_button_Use_verb,Sys.Extended.UI.HtmlEditor.isSafari&&navigator.userAgent.indexOf("mac")!=-1?"Apple-V":"Ctrl-V"),u=String.format(Sys.Extended.UI.Resources.HtmlEditor_toolbar_button_OnPasteFromMSWord,r);alert(u);setTimeout(function(){n._removeAllRanges(t);n._selectRange(t,i)},0);n.isWord=!0}}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteWord.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.PasteWord",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.PreviewMode=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.PreviewMode.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.PreviewMode.prototype={};Sys.Extended.UI.HtmlEditor.ToolbarButtons.PreviewMode.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.PreviewMode",Sys.Extended.UI.HtmlEditor.ToolbarButtons.ModeButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Redo=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Redo.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Redo.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Redo.callBaseMethod(this,"callMethod")&&void this._designPanel.redo()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Redo.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Redo",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment.prototype={checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment.callBaseMethod(this,"checkState")&&this._designPanel._textAlignState(null)},callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment.callBaseMethod(this,"callMethod"))return!1;var n=this._designPanel,t=this._editPanel;n._saveContent();n.MSIE_justify("left",!0);n.onContentChanged();setTimeout(function(){t.updateToolbar()},0)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveAlignment",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.prototype={callMethod:function(){var i;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.callBaseMethod(this,"callMethod"))return!1;var t=this._designPanel,r=t._getSelection(),n=(t._createRange(r),Sys.Extended.UI.HtmlEditor.getSelParent(t));for(3==n.nodeType&&(n=n.parentNode);n&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName)&&"A"!=n.tagName.toUpperCase();)n=n.parentNode;if(n&&"A"==n.tagName.toUpperCase()){for(t._saveContent(),i=n.firstChild;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n);i&&Sys.Extended.UI.HtmlEditor._setCursor(i,t);setTimeout(function(){t._editPanel.updateToolbar()},0);t.onContentChanged()}}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveStyles=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveStyles.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveStyles.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveStyles.callBaseMethod(this,"callMethod"))return!1;var n=this._designPanel;setTimeout(function(){function tt(n,t,i,r){var u=i.cloneNode(!1),e,c,s,o,h,f;if(n)if(n.push&&"function"==typeof n.push)for(e=0;e<n.length;e++)u.appendChild(n[e]);else u.appendChild(n);for(;t;)c=r?t.previousSibling:t.nextSibling,(1==t.nodeType||3==t.nodeType&&Sys.Extended.UI.HtmlEditor.Trim(""+t.data).length>0)&&(1==t.nodeType&&(Sys.Extended.UI.HtmlEditor.isStyleTag(t.tagName)&&"A"!=t.tagName.toUpperCase()&&(!t.id||"_left_"!=t.id&&"_right_"!=t.id)&&Sys.Extended.UI.HtmlEditor.spanJoiner(t),Sys.Extended.UI.HtmlEditor.isStyleTag(t.tagName)&&0==t.childNodes.length&&(!t.id||"_left_"!=t.id&&"_right_"!=t.id)&&(t=null)),t&&(0!=u.childNodes.length&&r?u.insertBefore(t,u.firstChild):u.appendChild(t))),t=c;if(0==u.childNodes.length)delete u,u=null;else if(1==u.childNodes.length&&3==u.firstChild.nodeType&&0==(""+u.firstChild.data).length)delete u,u=null;else if(Sys.Extended.UI.HtmlEditor.isStyleTag(u.tagName)){for(s=u.childNodes.length,o=0;o<u.childNodes.length;o++)f=u.childNodes.item(o),1!=f.nodeType||Sys.Extended.UI.HtmlEditor.isStyleTag(f.tagName)||s--;if(0==s){for(h=[];u.firstChild;)f=u.removeChild(u.firstChild),h.push(f);u=h}}return i==l?u:tt(u,r?i.previousSibling:i.nextSibling,i.parentNode,r)}function et(n,t){for(;n;){if(n==e)return void(v=!0);if(3==n.nodeType){for(;n.nextSibling&&3==n.nextSibling.nodeType;)n.data=""+n.data+n.nextSibling.data,n.parentNode.removeChild(n.nextSibling);Sys.Extended.UI.HtmlEditor.Trim(""+n.data).length>0&&i.push(n)}else et(n.firstChild,!1);if(v)return;if(n.parentNode,t)for(;n&&null==n.nextSibling;)n=n.parentNode;n=n.nextSibling}}var ct=Sys.Extended.UI.HtmlEditor.isIE?"":Sys.Extended.UI.HtmlEditor.Trim(n.getSelectedHTML()),s=n._getSelection(),f=n._createRange(s),i=null,ot=!1,it,h,e,st,rt,r,y,k,ht,o,c,u,l,a,nt,ft,v,t;if(!n.isControl()&&(Sys.Extended.UI.HtmlEditor.isIE&&f.text.length>0||!Sys.Extended.UI.HtmlEditor.isIE&&ct.length>0)?i=n._getTextNodeCollection():(i=n._tryExpand(),ot=!0),null!=i&&i.length>0){for(it=!1,v=!0,n._saveContent(),h=n._doc.createElement("span"),h.id="_left_",e=n._doc.createElement("span"),e.id="_right_",st=i[0].parentNode,rt=i[i.length-1].parentNode,st.insertBefore(h,i[0]),i[i.length-1].nextSibling?rt.insertBefore(e,i[i.length-1].nextSibling):rt.appendChild(e);v;)for(v=!1,o=0;o<i.length;o++)if(r=i[o].parentNode,r&&null==i[o].previousSibling&&null==i[o].nextSibling&&(y=r.tagName.toUpperCase(),Sys.Extended.UI.HtmlEditor.isStyleTag(y)&&"A"!=y&&(r.className!=Sys.Extended.UI.HtmlEditor.smartClassName||"H"==y.substr(0,1))))if(k=Sys.Extended.UI.HtmlEditor.differAttr(r,["class","color","face","size"]),it=!0,0==k.length){var p=r.parentNode,c=r.firstChild?r.firstChild:null,d=null;if("H"==y.toUpperCase().substr(0,1)&&Sys.Extended.UI.HtmlEditor.isIE)for(d=n._doc.createElement("p"),d.className=Sys.Extended.UI.HtmlEditor.smartClassName,p.insertBefore(d,r);r.firstChild;)d.appendChild(r.firstChild);else{for(;r.firstChild;)p.insertBefore(r.firstChild,r);"H"==y.toUpperCase().substr(0,1)&&(ht=n._doc.createElement("br"),p.insertBefore(ht,r))}p.removeChild(r);v=!0}else{for(var p=r.parentNode,ut=n._doc.createElement(y),g=0;g<k.length;g++)ut.setAttribute(k[g][0],k[g][1]);for(p.insertBefore(ut,r);r.firstChild;)ut.appendChild(r.firstChild);p.removeChild(r)}for(o=0;o<i.length;o++)if(c=i[o],u=null!=i[o].parentNode&&"undefined"!=typeof i[o].parentNode?i[o].parentNode:null,u){for(l=null;u&&u.tagName&&"BODY"!=u.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(u.tagName)&&"A"!=u.tagName.toUpperCase()&&0==Sys.Extended.UI.HtmlEditor.differAttr(u,["class","color","face","size"]).length;)l=u,u=u.parentNode;if(l){it=!0;u=c.parentNode;null==c.previousSibling&&null==c.nextSibling&&u&&u.tagName&&"BODY"!=u.tagName.toUpperCase()&&Sys.Extended.UI.HtmlEditor.isStyleTag(u.tagName)&&Sys.Extended.UI.HtmlEditor.differAttr(u,["class","color","face","size"]).length>0&&(c=u);var w=tt(null,c.previousSibling,c.parentNode,!0),b=tt(null,c.nextSibling,c.parentNode,!1),r=l.parentNode;if(w){if(w.push&&"function"==typeof w.push)for(a=0;a<w.length;a++)r.insertBefore(w[a],l);else r.insertBefore(w,l);Sys.Extended.UI.HtmlEditor.isIE&&(h=n._doc.getElementById("_left_"),e=n._doc.getElementById("_right_"))}if(r.insertBefore(c,l),b){if(b.push&&"function"==typeof b.push)for(a=0;a<b.length;a++)r.insertBefore(b[a],l);else r.insertBefore(b,l);Sys.Extended.UI.HtmlEditor.isIE&&(h=n._doc.getElementById("_left_"),e=n._doc.getElementById("_right_"))}r.removeChild(l)}}if(ot)if(Sys.Extended.UI.HtmlEditor.isIE&&null!=n.__saveBM__){try{for(t=h.parentNode,t.removeChild(h);t&&0==t.childNodes.length;)t.parentNode.removeChild(t),t=t.parentNode;for(t=e.parentNode,t.removeChild(e);t&&0==t.childNodes.length;)t.parentNode.removeChild(t),t=t.parentNode;h=null;e=null}catch(n){}s=n._getSelection();f=n._createRange(s);f.moveToBookmark(n.__saveBM__);f.select();n.__saveBM__=null}else null!=n.__saveBM__&&(3==n.__saveBM__[0].nodeType?(s=n._getSelection(),f=n._doc.createRange(),f.setStart(n.__saveBM__[0],n.__saveBM__[1]),f.setEnd(n.__saveBM__[0],n.__saveBM__[1]),n._removeAllRanges(s),n._selectRange(s,f)):(n._trySelect(n.__saveBM__[0],n.__saveBM__[0]),n.__saveBM__[0].parentNode.removeChild(n.__saveBM__[0])),n.__saveBM__=null);else if(Sys.Extended.UI.HtmlEditor.isIE)try{s=n._getSelection();nt=n._createRange(s);ft=n._createRange(s);nt.moveToElementText(h);ft.moveToElementText(e);nt.setEndPoint("EndToEnd",ft);nt.select()}catch(n){}else i=[],v=!1,et(h,!0),f=n._doc.createRange(),f.setStart(i[0],0),f.setEnd(i[i.length-1],(""+i[i.length-1].data).length),n._removeAllRanges(s),n._selectRange(s,f);try{if(null!=h)for(t=h.parentNode,t.removeChild(h);t&&0==t.childNodes.length;)t.parentNode.removeChild(t),t=t.parentNode;if(null!=e)for(t=e.parentNode,t.removeChild(e);t&&0==t.childNodes.length;)t.parentNode.removeChild(t),t=t.parentNode}catch(n){}n.onContentChanged();n._editPanel.updateToolbar()}},0)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveStyles.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveStyles",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.prototype={callMethod:function(){var n,t,i;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.callBaseMethod(this,"callMethod"))return!1;(this._designPanel._doc.body.style.direction=this.checkState()?"":"rtl",Sys.Extended.UI.HtmlEditor.isIE)||(n=this._designPanel._getSelection(),t=this._designPanel._createRange(n),this._designPanel._removeAllRanges(n),this._designPanel._selectRange(n,t),this._designPanel.focusEditor());i=this;setTimeout(function(){i._editPanel.updateToolbar()},0)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.callBaseMethod(this,"checkState")&&!(!this._designPanel._doc.body.style.direction||"rtl"!=this._designPanel._doc.body.style.direction)}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Rtl",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("strikeThrough",!1,null)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.callBaseMethod(this,"checkState")&&this._designPanel._queryCommandState("strikeThrough")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("subScript",!1,null)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript.callBaseMethod(this,"checkState")&&this._designPanel._queryCommandState("subScript")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.SubScript",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("superScript",!1,null)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript.callBaseMethod(this,"checkState")&&this._designPanel._queryCommandState("superScript")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.SuperScript",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline.callBaseMethod(this,"callMethod")&&void this._designPanel._execCommand("underline",!1,null)},checkState:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline.callBaseMethod(this,"checkState")&&this._designPanel._queryCommandState("underline")}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Underline",Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.Undo=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.Undo.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Undo.prototype={callMethod:function(){return!!Sys.Extended.UI.HtmlEditor.ToolbarButtons.Undo.callBaseMethod(this,"callMethod")&&void this._designPanel.undo()}};Sys.Extended.UI.HtmlEditor.ToolbarButtons.Undo.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.Undo",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.Popup=function(n){Sys.Extended.UI.HtmlEditor.Popups.Popup.initializeBase(this,[n]);this._iframe=null;this._top=0;this._left=0;this._doc=null;this._initialContent="";this._cssPath="";this._autoDimensions=!0;this._registeredFields=[];this._registeredHandlers=[];this._app_onload$delegate=Function.createDelegate(this,this._app_onload);this.isOpened=!1;this.isLoaded=!1;this.isLoading=!1};Sys.Extended.UI.HtmlEditor.Popups.Popup.prototype={getDocument:function(){return this._doc},getPopupMediator:function(){return this._iframe.contentWindow&&this._iframe.contentWindow.popupMediator?this._iframe.contentWindow.popupMediator:null},get_registeredFields:function(){return this._registeredFields},set_registeredFields:function(value){this._registeredFields=eval(value)},get_registeredHandlers:function(){return this._registeredHandlers},set_registeredHandlers:function(value){this._registeredHandlers=eval(value)},get_initialContent:function(){return this._initialContent},set_initialContent:function(n){this._initialContent=n},get_cssPath:function(){return this._cssPath},set_cssPath:function(n){this._cssPath=n},get_autoDimensions:function(){return this._autoDimensions},set_autoDimensions:function(n){this._autoDimensions=n},get_iframe:function(){return this._iframe},set_iframe:function(n){this._iframe=n},checkCorrectLoaded:function(n){var t=this;return!t.isLoaded||"0px"!=t._iframe.style.height&&"0px"!=t._iframe.style.width||(this.isLoaded=!1),!!this.isLoaded||(this.isLoading||this.reload(),"undefined"!=typeof n&&setTimeout(n,10),!1)},_baseOpen:function(n,t,i){var r=this,u;this.checkCorrectLoaded(function(){r._baseOpen(n,t,i)})&&(u=this.get_element(),"undefined"!=typeof i&&(this._left=parseInt(i)),"undefined"!=typeof t&&(this._top=parseInt(t)),u.style.top=this._top+"px",u.style.left=this._left+"px",setTimeout(function(){"function"==typeof n&&r._onDocumentLoaded(n);r.isOpened=!0},0))},open:function(n,t,i){this._baseOpen(n,t,i)},close:function(n){var t=this.get_element();this.isOpened=!1;t.style.top="-2000px";t.style.left="-2000px";"function"==typeof n&&n()},reload:function(){var t,i,n;this.isLoading=!0;t=this.get_element();i=t.parentNode;document.body.appendChild(t);i.appendChild(this.get_element());this._doc=this._iframe.contentWindow.document;this._doc.open();n=new Sys.StringBuilder;n.append('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html><head>');this._cssPath.length>0&&n.append('<link rel="stylesheet" href="'+this._cssPath+'" media="all" />');n.append("<script>var __loaded__ = false;<\/script><\/head><body style='margin:0px; padding:0px; border-width:0px;' onload='__loaded__ = true;'>");this._autoDimensions&&n.append("<table cellspacing='0' cellpadding='0' border='0'><tr><td>");n.append(this._initialContent);this._autoDimensions&&n.append("<\/td><\/tr><\/table>");n.append("<\/body><\/html>");this._doc.write(n.toString());this._doc.close();this.isLoaded=!1;this._afterReload()},_afterReload:function(){var t=this._iframe.contentWindow,n=this,r,i;if(this.isLoaded=t.__loaded__,n._doc.body&&n._doc.body.innerHTML||(this.isLoaded=!1),!this.isLoaded)return void setTimeout(function(){n._afterReload()},10);for(this.isLoaded=!1,t.popupMediator={},t.popupMediator.registeredFields=this._registeredFields,t.popupMediator.registeredHandlers=this._registeredHandlers,t.popupMediator.get_callMethodByName=function(n){for(var u,r=t.popupMediator.registeredHandlers,i=0;i<r.length;i++)if(u=r[i],u.name==n)return u.callMethod;return null},t.popupMediator.set_callMethodByName=function(n,i){for(var f,u=t.popupMediator.registeredHandlers,r=0;r<u.length;r++)f=u[r],f.name==n&&(f.callMethod=i)},t.popupMediator.getField=function(n){for(var u,r=t.popupMediator.registeredFields,i=0;i<r.length;i++)if(u=r[i],u.name==n)return t.document.getElementById(u.clientID);return null},t.Sys=Sys,i=0;i<this._registeredHandlers.length;i++)$find(this._registeredHandlers[i].clientID).activate(t.document.getElementById(this._registeredHandlers[i].clientID));if(Sys.Extended.UI.HtmlEditor.isIE)n._doc.onselectstart=function(){var i=n._iframe.contentWindow.event,t=i.srcElement.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t};else for(n._doc.onmousedown=function(n){var t=n.target.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t||!(!Sys.Extended.UI.HtmlEditor.isSafari||"TABLE"!=t&&"TR"!=t&&"TD"!=t&&"DIV"!=t)},r=n._doc.getElementsByTagName("input"),i=0;i<r.length;i++)r[i].setAttribute("autocomplete","off");this._autoDimensions?(n._iframe.style.height="1000px",n._iframe.style.width="1000px",setTimeout(function(){n._iframe.style.height=n._doc.body.firstChild.offsetHeight+"px";n._iframe.style.width=n._doc.body.firstChild.offsetWidth+"px";n.isLoaded=!0;n.isLoading=!1},0)):(n.isLoaded=!0,n.isLoading=!1)},_onDocumentLoaded:function(n){var t=this;return this.isLoaded?(this.isLoaded=!0,void n(this._iframe.contentWindow)):void setTimeout(function(){t._onDocumentLoaded(n)},10)},initialize:function(){this.__appLoaded__=!1;Sys.Extended.UI.HtmlEditor.Popups.Popup.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate)},dispose:function(){Sys.Application.remove_load(this._app_onload$delegate);this.isOpened&&this.close();Sys.Extended.UI.HtmlEditor.Popups.Popup.callBaseMethod(this,"dispose")},_app_onload:function(){if(!this.__appLoaded__){this.__appLoaded__=!0;var n=this.get_element();Sys.Extended.UI.HtmlEditor.isReallyVisible(n)&&(this._parentNode_=n.parentNode,this.reload())}}};Sys.Extended.UI.HtmlEditor.Popups.Popup.registerClass("Sys.Extended.UI.HtmlEditor.Popups.Popup",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup=function(n){Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.initializeBase(this,[n]);this._relatedElement=null};Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.prototype={get_relatedElement:function(){return this._relatedElement},set_relatedElement:function(n){this._relatedElement=n},open:function(n){var h,f,e,o,s;if(null!=this._relatedElement){if(h=this,!this.checkCorrectLoaded(function(){h.open(n)}))return;for(var c=$common.getLocation(this._relatedElement),i=c.x,r=c.y+this._relatedElement.offsetHeight,t=this.get_element().parentNode;t&&t.tagName&&"BODY"!=t.tagName.toUpperCase();){if(f=Sys.Extended.UI.HtmlEditor.getStyle(t,"position"),"absolute"==f||"fixed"==f){e=parseInt(Sys.Extended.UI.HtmlEditor.getStyle(t,"top"));o=parseInt(Sys.Extended.UI.HtmlEditor.getStyle(t,"left"));isNaN(e)||isNaN(o)||(i-=o,r-=e);break}"relative"==f&&(s=$common.getLocation(t),i-=s.x,r-=s.y);t=t.parentNode}var u=Sys.Extended.UI.HtmlEditor.getClientViewportElement(this._iframe),l=u.clientWidth+u.scrollLeft,a=u.clientHeight+u.scrollTop;r<u.scrollTop&&(r=u.scrollTop);i<u.scrollLeft&&(i=u.scrollLeft);r+this._iframe.offsetHeight>a&&(r-=r+this._iframe.offsetHeight-a);i+this._iframe.offsetWidth>l&&(i-=i+this._iframe.offsetWidth-l);Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.callBaseMethod(this,"open",[n,r,i])}},close:function(n){Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.callBaseMethod(this,"close",[n])},initialize:function(){Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup.registerClass("Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup",Sys.Extended.UI.HtmlEditor.Popups.Popup);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup=function(n){Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup.initializeBase(this,[n]);this._contentDiv=null};Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup.prototype={get_contentDiv:function(){return this._contentDiv},set_contentDiv:function(n){this._contentDiv=n},initialize:function(){Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup.callBaseMethod(this,"initialize");this.set_initialContent(this._contentDiv.innerHTML)},dispose:function(){Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup.registerClass("Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup",Sys.Extended.UI.HtmlEditor.Popups.AttachedPopup);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.BaseColorsPopup=function(n){Sys.Extended.UI.HtmlEditor.Popups.BaseColorsPopup.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.Popups.BaseColorsPopup.prototype={};Sys.Extended.UI.HtmlEditor.Popups.BaseColorsPopup.registerClass("Sys.Extended.UI.HtmlEditor.Popups.BaseColorsPopup",Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup=function(n){Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup.prototype={initialize:function(){Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup.registerClass("Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup",Sys.Extended.UI.HtmlEditor.Popups.AttachedTemplatePopup);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.LinkProperties=function(n){Sys.Extended.UI.HtmlEditor.Popups.LinkProperties.initializeBase(this,[n]);this._defaultTarget="_self";this._targetTextHolder=null;this._urlTextHolder=null};Sys.Extended.UI.HtmlEditor.Popups.LinkProperties.prototype={get_defaultTarget:function(){return this._defaultTarget},set_defaultTarget:function(n){this._defaultTarget=n}};Sys.Extended.UI.HtmlEditor.Popups.LinkProperties.registerClass("Sys.Extended.UI.HtmlEditor.Popups.LinkProperties",Sys.Extended.UI.HtmlEditor.Popups.OkCancelAttachedTemplatePopup);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton=function(n){Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton.initializeBase(this,[n]);this._loaded=!1;this._activated=null;this._app_onload$delegate=Function.createDelegate(this,this._app_onload);this._cssClass="";this._name="";this._onmouseover$delegate=Function.createDelegate(this,this._onmouseover);this._onmouseout$delegate=Function.createDelegate(this,this._onmouseout);this._onmousedown$delegate=Function.createDelegate(this,this._onmousedown);this._onmouseup$delegate=Function.createDelegate(this,this._onmouseup);this._onclick$delegate=Function.createDelegate(this,this._onclick)};Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton.prototype={isImage:function(){return!0},set_toolTip:function(n){this.get_element().title=n},get_toolTip:function(){return this.get_element().title},set_name:function(n){this._name=n},get_name:function(){return this._name},initialize:function(){function t(n){var i,r;if(1==n.nodeType&&n.tagName)for(i=n.tagName.toUpperCase(),"INPUT"!=i&&"TEXTAREA"!=i&&"IFRAME"!=i&&(n.unselectable="on"),r=0;r<n.childNodes.length;r++)t(n.childNodes.item(r))}var n=this.get_element();if(Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton.callBaseMethod(this,"initialize"),Sys.Application.add_load(this._app_onload$delegate),this._cssClass=n.className.split(" ")[0],this.isImage()&&$addHandlers(n,{mouseover:this._onmouseover$delegate,mouseout:this._onmouseout$delegate,mousedown:this._onmousedown$delegate,mouseup:this._onmouseup$delegate,click:this._onclick$delegate}),Sys.Extended.UI.HtmlEditor.isIE)t(n);else try{n.style.MozUserSelect="none";n.parentNode.style.MozUserSelect="none"}catch(t){}},activate:function(n){this._activated=n;this.isImage()&&(Sys.Extended.UI.HtmlEditor._addEvent(this._activated,"mouseover",this._onmouseover$delegate),Sys.Extended.UI.HtmlEditor._addEvent(this._activated,"mouseout",this._onmouseout$delegate),Sys.Extended.UI.HtmlEditor._addEvent(this._activated,"mousedown",this._onmousedown$delegate),Sys.Extended.UI.HtmlEditor._addEvent(this._activated,"mouseup",this._onmouseup$delegate),Sys.Extended.UI.HtmlEditor._addEvent(this._activated,"click",this._onclick$delegate))},dispose:function(){this.isImage()&&null!=this._activated&&(Sys.Extended.UI.HtmlEditor._removeEvent(this._activated,"mouseover",this._onmouseover$delegate),Sys.Extended.UI.HtmlEditor._removeEvent(this._activated,"mouseout",this._onmouseout$delegate),Sys.Extended.UI.HtmlEditor._removeEvent(this._activated,"mousedown",this._onmousedown$delegate),Sys.Extended.UI.HtmlEditor._removeEvent(this._activated,"mouseup",this._onmouseup$delegate),Sys.Extended.UI.HtmlEditor._removeEvent(this._activated,"click",this._onclick$delegate));this._activated=null;this._loaded=!1;Sys.Application.remove_load(this._app_onload$delegate);Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton.callBaseMethod(this,"dispose")},_app_onload:function(){this._loaded||(this.onButtonLoaded(),this._loaded=!0)},onButtonLoaded:function(){},_onmouseover:function(){return!!this.isEnable()&&(Sys.UI.DomElement.addCssClass(this._activated,this._cssClass+"_hover"),!0)},_onmouseout:function(n){if(!this.isEnable())return!1;var t=n.toElement||n.relatedTarget;try{for(;t&&"undefined"!=typeof t&&t!=this._activated;)t=t.parentNode}catch(n){t=null}return null!=t||(Sys.UI.DomElement.removeCssClass(this._activated,this._cssClass+"_hover"),Sys.UI.DomElement.removeCssClass(this._activated,this._cssClass+"_mousedown"),!0)},_onmousedown:function(){return this.isEnable()?(Sys.UI.DomElement.addCssClass(this._activated,this._cssClass+"_mousedown"),!1):null},_onmouseup:function(){return!!this.isEnable()&&(Sys.UI.DomElement.removeCssClass(this._activated,this._cssClass+"_mousedown"),!0)},_onclick:function(n){return!!this.isEnable()&&(this.callMethod(n),!0)},callMethod:function(){var n=this._activated.ownerDocument||this._activated.document||target,t=n.defaultView||n.parentWindow,i=t.popupMediator.get_callMethodByName(this._name);Function.createDelegate(this,i)(t)},isEnable:function(){return!!this._loaded}};Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton.registerClass("Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.PopupBoxButton=function(n){Sys.Extended.UI.HtmlEditor.Popups.PopupBoxButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HtmlEditor.Popups.PopupBoxButton.prototype={};Sys.Extended.UI.HtmlEditor.Popups.PopupBoxButton.registerClass("Sys.Extended.UI.HtmlEditor.Popups.PopupBoxButton",Sys.Extended.UI.HtmlEditor.Popups.PopupCommonButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.PopupBGIButton=function(n){Sys.Extended.UI.HtmlEditor.Popups.PopupBGIButton.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.Popups.PopupBGIButton.prototype={};Sys.Extended.UI.HtmlEditor.Popups.PopupBGIButton.registerClass("Sys.Extended.UI.HtmlEditor.Popups.PopupBGIButton",Sys.Extended.UI.HtmlEditor.Popups.PopupBoxButton);Type.registerNamespace("Sys.Extended.UI.HtmlEditor");Sys.Extended.UI.HtmlEditor.Editor=function(n){Sys.Extended.UI.HtmlEditor.Editor.initializeBase(this,[n]);this._editPanel=null;this._changingToolbar=null;(Sys.Extended.UI.HtmlEditor.isIE&&8==Sys.Browser.version&&"BackCompat"!=document.compatMode||Sys.Extended.UI.HtmlEditor.isOpera)&&(this._onresize$delegate=Function.createDelegate(this,this._onresize))};Sys.Extended.UI.HtmlEditor.Editor.prototype={get_autofocus:function(){return this._editPanel.get_autofocus()},set_autofocus:function(n){this._editPanel.set_autofocus(n)},get_content:function(){return this._editPanel.get_content()},set_content:function(n){this._editPanel.set_content(n)},get_activeMode:function(){return this._editPanel.get_activeMode()},set_activeMode:function(n){this._editPanel.set_activeMode(n)},get_editPanel:function(){return this._editPanel},set_editPanel:function(n){this._editPanel=n},get_changingToolbar:function(){return this._changingToolbar},set_changingToolbar:function(n){this._changingToolbar=n},add_propertyChanged:function(n){this._editPanel.add_propertyChanged(n)},remove_propertyChanged:function(n){this._editPanel.remove_propertyChanged(n)},initialize:function(){var n,t,i,r;Sys.Extended.UI.HtmlEditor.Editor.callBaseMethod(this,"initialize");n=this.get_element();t=n.className;(Sys.UI.DomElement.removeCssClass(n,t),Sys.UI.DomElement.addCssClass(n,"ajax__htmleditor_editor_base"),Sys.UI.DomElement.addCssClass(n,t),Sys.Extended.UI.HtmlEditor.isIE||"BackCompat"==document.compatMode||(this.get_element().style.height="100%"),Sys.Extended.UI.HtmlEditor.isIE&&8==Sys.Browser.version&&"BackCompat"!=document.compatMode||Sys.Extended.UI.HtmlEditor.isOpera)&&($addHandlers(n,{resize:this._onresize$delegate}),i=this.get_editPanel(),this._saved_setActive=i._setActive,i._setActive=Function.createDelegate(this,this._setActive),r=this,Sys.Extended.UI.HtmlEditor.isOpera?setTimeout(function(){r._ensureVisibleResize()},0):r._ensureVisibleResize())},_setActive:function(n){var t=this;Function.createDelegate(this.get_editPanel(),this._saved_setActive)(n);Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element())?t._ensureVisibleResize():setTimeout(function(){t._ensureVisibleResize()},0)},_ensureVisibleResize:function(){var n,t=!1;Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element())||(t=!0,n=Sys.Extended.UI.HtmlEditor.setElementVisibility(this.get_element()));this._onresize();t&&(Sys.Extended.UI.HtmlEditor.restoreElementVisibility(n),delete n)},dispose:function(){(Sys.Extended.UI.HtmlEditor.isIE&&8==Sys.Browser.version&&"BackCompat"!=document.compatMode||Sys.Extended.UI.HtmlEditor.isOpera)&&($common.removeHandlers(this.get_element(),{resize:this._onresize$delegate}),this.get_editPanel()._setActive=this._saved_setActive);Sys.Extended.UI.HtmlEditor.Editor.callBaseMethod(this,"dispose")},_onresize:function(n){var t,i;try{t=this.get_editPanel().get_element().parentNode;"undefined"!=typeof n&&null!=n||(t.style.height="");i=Sys.Extended.UI.HtmlEditor.Editor.MidleCellHeightForIE(t.parentNode.parentNode.parentNode,t.parentNode);t.style.height=i;"undefined"!=typeof this.get_editPanel().get_activePanel()._onresize&&this.get_editPanel().get_activePanel()._onresize()}catch(n){}return!0}};Sys.Extended.UI.HtmlEditor.Editor.registerClass("Sys.Extended.UI.HtmlEditor.Editor",Sys.UI.Control);Sys.Extended.UI.HtmlEditor.Editor.MidleCellHeightForIE=function(n,t){var f="100%",e,i,r,u,o;if(Sys.Extended.UI.HtmlEditor.isIE&&"BackCompat"!=document.compatMode||Sys.Extended.UI.HtmlEditor.isOpera)try{for(e=2,i=0;i<n.rows.length;i++)n.rows[i]!=t&&(e+=n.rows[i].offsetHeight+1);r=n.clientHeight;(8==Sys.Browser.version||Sys.Extended.UI.HtmlEditor.isOpera)&&(u=n.style.height,o=n.parentNode.style.height,u.indexOf("px")>0?r=parseInt(u):"100%"==u&&o.indexOf("px")>0&&(r=parseInt(o)));f=100*(r-e)/(1*r)+"%"}catch(n){f=""}return f}