www.delview.com
Open in
urlscan Pro
63.143.40.102
Public Scan
Submitted URL: http://delview.com/mobi/default.aspx?_tsm_combinedscripts_=true&v=zamfz6yyhpphz1neef8j6-t902-6phpn2mehv0eep-i1&_tsm...
Effective URL: https://www.delview.com/mobi/default.aspx?_tsm_combinedscripts_=true&v=zamfz6yyhpphz1neef8j6-t902-6phpn2mehv0eep-i1&_tsm...
Submission: On November 07 via api from US — Scanned from CA
Effective URL: https://www.delview.com/mobi/default.aspx?_tsm_combinedscripts_=true&v=zamfz6yyhpphz1neef8j6-t902-6phpn2mehv0eep-i1&_tsm...
Submission: On November 07 via api from US — Scanned from CA
Form analysis
0 forms found in the DOMText Content
function MaskedEditSetMessage(n,t,i){n.errormessage=t;n.text=i==""?t:i;n.innerHTML=n.text}function MaskedEditMessageShow(n,t){if(typeof n.display=="string"){if(n.display=="None")return;if(n.display=="Dynamic"){n.style.display=t?"none":"inline";return}}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(n){var i,t,r,o,u,f,e,s;if(MaskedEditSetMessage(n,"",""),MaskedEditSetCssClass(n,""),MaskedEditMessageShow(n,!0),n.IsMaskedEdit=="false")return!0;if(i=$get(n.TargetValidator),n.ValidEmpty=="false"&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i).get_Value()==n.InitialValue)return MaskedEditSetMessage(n,n.EmptyValueMessage,n.EmptyValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1;if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i).get_Value()=="")return!0;if(t=!0,r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i).get_Value(),n.ValidationExpression!=""&&(o=new RegExp(n.ValidationExpression),u=o.exec(r),t=u!=null&&r==u[0],!t))return MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1;var l=i.MaskedEditBehavior.AutoFormatDate(),a=i.MaskedEditBehavior.AutoFormatTime(),h="",c="";return n.MinimumValue!=""&&(h=n.MinimumValue.split(" ")[0],c=n.MinimumValue.split(" ")[1]),f="",e="",n.MaximumValue!=""&&(f=n.MaximumValue.split(" ")[0],e=n.MaximumValue.split(" ")[1]),t=MaskedEditValidatorPartDate(n,l,h,f),t&&(t=MaskedEditValidatorPartTime(n,a,c,e)),t&&n.ClientValidationFunction!=""&&(s={Value:r,IsValid:!0},eval(n.ClientValidationFunction+"(value, args);"),t=s.IsValid,t||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t||MaskedEditMessageShow(n,t),t}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,e==24&&(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,u==24&&(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,u==24&&(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":u="DMY";break;case"DayYearMonth":u="DYM";break;case"MonthDayYear":u="MDY";break;case"MonthYearDay":u="MYD";break;case"YearDayMonth":u="YDM";break;case"YearMonthDay":u="YMD"}y=n.DateSeparator;v=t.split(y);parseInt(v.length,10)!=3&&(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]||l==29&&s==2&&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(n){var r,t,i,f,u,e;return(MaskedEditSetMessage(n,"",""),MaskedEditSetCssClass(n,""),MaskedEditMessageShow(n,!0),n.IsMaskedEdit=="false")?!0:(r=$get(n.TargetValidator),n.ValidEmpty=="false"&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(r).get_Value()==n.InitialValue)?(MaskedEditSetMessage(n,n.EmptyValueMessage,n.EmptyValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1):Sys.Extended.UI.TextBoxWrapper.get_Wrapper(r).get_Value()==""?!0:(t=!0,i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(r).get_Value(),n.ValidationExpression!=""&&(f=new RegExp(n.ValidationExpression),u=f.exec(i),t=u!=null&&i==u[0],!t))?(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1):(t=MaskedEditValidatorPartDate(n,i,n.MinimumValue,n.MaximumValue),t&&n.ClientValidationFunction!=""&&(e={Value:i,IsValid:!0},eval(n.ClientValidationFunction+"(value, args);"),t=e.IsValid,t||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t||MaskedEditMessageShow(n,t),t)}function MaskedEditValidatorTime(n){var r,t,i,f,u,e;return(MaskedEditSetMessage(n,"",""),MaskedEditSetCssClass(n,""),MaskedEditMessageShow(n,!0),n.IsMaskedEdit=="false")?!0:(r=$get(n.TargetValidator),n.ValidEmpty=="false"&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(r).get_Value()==n.InitialValue)?(MaskedEditSetMessage(n,n.EmptyValueMessage,n.EmptyValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1):Sys.Extended.UI.TextBoxWrapper.get_Wrapper(r).get_Value()==""?!0:(t=!0,i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(r).get_Value(),n.ValidationExpression!=""&&(f=new RegExp(n.ValidationExpression),u=f.exec(i),t=u!=null&&i==u[0],!t))?(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1):(t=MaskedEditValidatorPartTime(n,i,n.MinimumValue,n.MaximumValue),t&&n.ClientValidationFunction!=""&&(e={Value:i,IsValid:!0},eval(n.ClientValidationFunction+"(value, args);"),t=e.IsValid,t||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t||MaskedEditMessageShow(n,t),t)}function MaskedEditValidatorNumber(n){var o,s,l,h,a;if(MaskedEditSetMessage(n,"",""),MaskedEditSetCssClass(n,""),MaskedEditMessageShow(n,!0),n.IsMaskedEdit=="false")return!0;if(o=$get(n.TargetValidator),s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o).get_Value().replace(new RegExp("([w_.,s$ ])","g"),""),n.ValidEmpty=="false"&&s==n.InitialValue)return MaskedEditSetMessage(n,n.EmptyValueMessage,n.EmptyValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1;if(s=="")return!0;var t=!0,y=n.Thousands,p=n.Decimal,v=n.Money,w=n.LastMaskPosition+v.length+1,u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o).get_Value();if(n.ValidationExpression!=""&&(l=new RegExp(n.ValidationExpression),h=l.exec(u),t=h!=null&&u==h[0],!t))return MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1;t=!1;var c=null,e=null,r=null,f=null,i=null;return u=u.replace(new RegExp("(\\"+y+")","g"),""),u=u.replace(new RegExp("(\\"+v+")","g"),""),r=u.match(/^\s*(\S+(\s+\S+)*)\s*$/),r!=null&&(u=r[1]),e=/^\s*[-\+]?\d+\s*$/,u.match(e)!=null&&(f=parseInt(u,10),t=f==(isNaN(f)?null:f)),t?(n.MaximumValue!=""&&(i=parseInt(n.MaximumValue,10),i==(isNaN(i)?null:i)&&f>i&&(t=!1,MaskedEditSetMessage(n,n.MaximumValueMessage,n.MaximumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t&&n.MinimumValue!=""&&(i=parseInt(n.MinimumValue,10),i==(isNaN(i)?null:i)&&f<i&&(t=!1,MaskedEditSetMessage(n,n.MinimumValueMessage,n.MinimumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)))):(e=new RegExp("^\\s*([-\\+])?(\\d+)?(\\"+p+"(\\d+))?\\s*$"),r=u.match(e),r!=null&&(c=null,c=typeof r[1]!="undefined"?r[1]+(r[2].length>0?r[2]:"0")+"."+r[4]:(r[2].length>0?r[2]:"0")+"."+r[4],f=parseFloat(c),t=f==(isNaN(f)?null:f)),t||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass)),t&&(n.MaximumValue!=""&&(i=parseFloat(n.MaximumValue),i==(isNaN(i)?null:i)&&f>i&&(t=!1,MaskedEditSetMessage(n,n.MaximumValueMessage,n.MaximumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t&&n.MinimumValue!=""&&(i=parseFloat(n.MinimumValue),i==(isNaN(i)?null:i)&&f<i&&(t=!1,MaskedEditSetMessage(n,n.MinimumValueMessage,n.MinimumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))))),t&&n.ClientValidationFunction!=""&&(a={Value:u,IsValid:!0},eval(n.ClientValidationFunction+"(value, args);"),t=a.IsValid,t||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t||MaskedEditMessageShow(n,t),t}function MaskedEditValidatorNone(n){var u,t,r,o,f,e,i,s;return(MaskedEditSetMessage(n,"",""),MaskedEditSetCssClass(n,""),MaskedEditMessageShow(n,!0),n.IsMaskedEdit=="false")?!0:(u=$get(n.TargetValidator),n.ValidEmpty=="false"&&Sys.Extended.UI.TextBoxWrapper.get_Wrapper(u).get_Value()==n.InitialValue)?(MaskedEditSetMessage(n,n.EmptyValueMessage,n.EmptyValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1):Sys.Extended.UI.TextBoxWrapper.get_Wrapper(u).get_Value()==""?!0:(t=!0,r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(u).get_Value(),n.ValidationExpression!=""&&(o=new RegExp(n.ValidationExpression),f=o.exec(r),t=f!=null&&r==f[0],!t))?(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass),MaskedEditMessageShow(n,!1),!1):(e=/^\d+\s*$/,i=null,n.MaximumValue!=""&&n.MaximumValue.match(e)!=null&&(i=parseInt(n.MaximumValue,10),i==(isNaN(i)?null:i)&&r.length>i&&(t=!1,MaskedEditSetMessage(n,n.MaximumValueMessage,n.MaximumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t&&n.MinimumValue!=""&&n.MinimumValue.match(e)!=null&&(i=parseInt(n.MinimumValue,10),i==(isNaN(i)?null:i)&&r.length<i&&(t=!1,MaskedEditSetMessage(n,n.MinimumValueMessage,n.MinimumValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t&&n.ClientValidationFunction!=""&&(s={Value:r,IsValid:!0},eval(n.ClientValidationFunction+"(value, args);"),t=s.IsValid,t||(MaskedEditSetMessage(n,n.InvalidValueMessage,n.InvalidValueText),MaskedEditSetCssClass(n,n.InvalidValueCssClass))),t||MaskedEditMessageShow(n,t),t)}function callbackSuccessStub(n,t){var i=t.split(":"),u=i[0],r=$find(u);r&&r._onCallbackSuccess(n,i[1])}function callbackErrorStub(n,t){var i=t.split(":"),u=i[0],r=$find(u);alert("error");r&&r._onCallbackError(n,i[1])}var $common,CommonToolkitScripts,$AA,JSON,actJQuery,prm,ComboBox_Elements;(function(){function n(){var n=Sys.version;if(!n&&!Sys._versionChecked){Sys._versionChecked=!0;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BoxSide=function(){};Sys.Extended.UI.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};Sys.Extended.UI.BoxSide.registerEnum("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!=""&&typeof r!="undefined"||(r=typeof i!="undefined"?i:null),r},getInheritedBackgroundColor:function(n){if(!n)return"#FFFFFF";var t=this.getCurrentStyle(n,"backgroundColor");try{while(!t||t==""||t=="transparent"||t=="rgba(0, 0, 0, 0)")n=n.parentNode,t=n?this.getCurrentStyle(n,"backgroundColor"):"#FFFFFF"}catch(i){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(this.getCurrentStyle(n,"MozBoxSizing")=="border-box"||this.getCurrentStyle(n,"BoxSizing")=="border-box"){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 document.compatMode=="CSS1Compat"?(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 r!="none"},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(u){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(f.type=="px",String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit,f.type)),f.size}return 0},parsePadding:function(n){if(n){if(n=="inherit")return 0;var t=this.parseUnit(n);return t.type!=="px"&&Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit,t.type)),t.size}return 0},parseUnit:function(n){var f,t,r,i,e,u;if(!n)throw Error.argumentNull("value");for(n=n.trim().toLowerCase(),f=n.length,t=-1,r=0;r<f;r++){if(i=n.substr(r,1),(i<"0"||i>"9")&&i!="-"&&i!="."&&i!=",")break;t=r}if(t==-1)throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits);return e=t<f-1?n.substring(t+1).trim():"px",u=parseFloat(n.substr(0,t+1)),e=="px"&&(u=Math.floor(u)),{size:u,type:e}},getElementOpacity:function(n){var t,i,r,u;if(!n)throw Error.argumentNull("element");return(t=!1,n.filters?(r=n.filters,r.length!==0&&(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,i.length!==0&&(u=i["DXImageTransform.Microsoft.Alpha"],u&&(r=!1,u.opacity=t*100)),r&&(n.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+t*100+")")):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!=$common.getVisible(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(n){if(n){if(n instanceof Function)return n;if(String.isInstanceOfType(n)&&n.length>0){var t;if((t=window[n])instanceof Function||(t=eval(n))instanceof Function)return t}}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 r=="l"&&e.append(n),f=e.toString(),u&&f.length>t&&(f=r=="l"?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(i){}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(r){}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;i!=null&&($common.removeElement(n),i.replaceChild(n,t))},removeElement:function(n){var t=n.parentNode;t!=null&&t.removeChild(n)},applyProperties:function(n,t){var r,i,u;for(r in t)i=t[r],i!=null&&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(typeof n.nameTable!="undefined"&&(f=n.nameTable,String.isInstanceOfType(f)&&(f=i[f]),f!=null&&(i=f)),h=null,typeof n.name!="undefined"&&(h=n.name),r=document.createElement(n.nodeName),typeof n.name!="undefined"&&i&&(i[n.name]=r),typeof n.parent!="undefined"&&t==null&&(e=n.parent,String.isInstanceOfType(e)&&(e=i[e]),e!=null&&(t=e)),typeof n.properties!="undefined"&&n.properties!=null&&$common.applyProperties(r,n.properties),typeof n.cssClasses!="undefined"&&n.cssClasses!=null&&$common.addCssClasses(r,n.cssClasses),typeof n.events!="undefined"&&n.events!=null&&$addHandlers(r,n.events),typeof n.visible!="undefined"&&n.visible!=null&&this.setVisible(r,n.visible),t&&t.appendChild(r),typeof n.opacity!="undefined"&&n.opacity!=null&&$common.setElementOpacity(r,n.opacity),typeof n.children!="undefined"&&n.children!=null)for(s=0;s<n.children.length;s++)c=n.children[s],$common.createElementFromTemplate(c,r,i);return o=r,typeof n.contentPresenter!="undefined"&&n.contentPresenter!=null&&(o=i[o]),typeof n.content!="undefined"&&n.content!=null&&(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&&(n.getAttribute("value")=="1"?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;i!=null;i=i.parentNode)if(i==n)return!0;return!1},isDescendantOrSelf:function(n,t){return n===t?!0: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?!0: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)};typeof ValidatorGetValue=="function"&&(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)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedCommon",["ComponentModel"],n):n()})(),function(){function n(){var n=Sys.version;if(!n&&!Sys._versionChecked){Sys._versionChecked=!0;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Sys.Timer=function(){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()||this._timer===null||(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)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedTimer",["ComponentModel"],n):n()}(),function(){function n(){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)))$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()};else throw Error.argumentType("type",t,$AA.Animation,Sys.Extended.UI.Resources.Animation_InvalidBaseType);};$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(r){}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))for(s=0;s<n.AnimationChildren.length;s++)l=$AA.createAnimation(n.AnimationChildren[s]),l&&u.add(l);else throw Error.argument("obj",String.format(Sys.Extended.UI.Resources.Animation_ChildrenNotAllowed,i.getName()));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(),e!="animationname"&&e!="animationchildren")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(a){}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;if(this._timer=null,t){if(t.dispose(),this._percentComplete!==100&&(this._percentComplete=100,this.raisePropertyChanged("percentComplete"),n||n===undefined))this.onStep(100);this.onEnd();this.raisePropertyChanged("isPlaying");this.raisePropertyChanged("isActive")}}},onStart:function(){this.raiseStarted();for(var n in this.DynamicProperties)try{this[n](eval(this.DynamicProperties[n]))}catch(t){if(Sys.Debug.isDebug)throw t;}},onStep:function(n){this.setValue(this.getAnimatedValue(n));this.raiseStep()},onEnd:function(){this.raiseEnded()},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){if(n>100&&(n=100),this._percentComplete=n,this.raisePropertyChanged("percentComplete"),t)this.onStep(n);n===100&&this.stop(!1)},setOwner:function(n){this._owner=n},raiseStarted:function(){var n=this.get_events().getHandler("started");n&&n(this,Sys.EventArgs.Empty)},add_started:function(n){this.get_events().addHandler("started",n)},remove_started:function(n){this.get_events().removeHandler("started",n)},raiseEnded:function(){var n=this.get_events().getHandler("ended");n&&n(this,Sys.EventArgs.Empty)},add_ended:function(n){this.get_events().addHandler("ended",n)},remove_ended:function(n){this.get_events().removeHandler("ended",n)},raiseStep:function(){var n=this.get_events().getHandler("step");n&&n(this,Sys.EventArgs.Empty)},add_step:function(n){this.get_events().addHandler("step",n)},remove_step:function(n){this.get_events().removeHandler("step",n)},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"))},set_animationTarget: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)this.set_target(i);else throw Error.argument("id",String.format(Sys.Extended.UI.Resources.Animation_TargetNotFound,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 this._timer!==null},get_isPlaying:function(){return this._timer!==null&&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(){var t,n;for($AA.ParallelAnimation.callBaseMethod(this,"onStart"),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=u!==undefined?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];n!=null&&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],t!=null&&(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){if(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 n=-1;if(this._conditionScript&&this._conditionScript.length>0)try{n=eval(this._conditionScript)?0:1}catch(t){}return n},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 t=-1,n;if(this._selectScript&&this._selectScript.length>0)try{n=eval(this._selectScript);n!==undefined&&(t=n)}catch(i){}return t},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=r!==undefined?r:$AA.FadeEffect.FadeIn;this._max=f!==undefined?f:1;this._min=u!==undefined?u:0;this._start=this._min;this._end=this._max;this._layoutCreated=!1;this._forceLayoutInIE=e===undefined||e===null?!0: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!=""&&this._originalWidth!="auto"||t&&t!=""&&t!="auto"||(n.style.width=n.offsetWidth+"px"),this._originalBackColor&&this._originalBackColor!=""&&this._originalBackColor!="transparent"&&this._originalBackColor!="rgba(0, 0, 0, 0)"||(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"))},set_startValue:function(n){n=this._getFloat(n);this._start=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,r!==undefined?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")},set_duration:function(n){n=this._getFloat(n);$AA.PulseAnimation.callBaseMethod(this,"set_duration",[n]);this._in.set_duration(n);this._out.set_duration(n)},set_fps:function(n){n=this._getInteger(n);$AA.PulseAnimation.callBaseMethod(this,"set_fps",[n]);this._in.set_fps(n);this._out.set_fps(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,r!==undefined?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||n.length!=7)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 r.length==1&&(r="0"+r),u.length==1&&(u="0"+u),f.length==1&&(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=o!=null?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=f===undefined?!0: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(this._width!==null&&this._width!==undefined?this._width:n.offsetWidth);this._verticalAnimation.set_endValue(this._height!==null&&this._height!==undefined?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=r!==undefined?r:1;this._unit=u!==undefined?u:"px";this._center=f;this._scaleFont=e;this._fontUnit=o!==undefined?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,(this._fontUnit=="px"||this._fontUnit=="pt")&&(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]);t===undefined&&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=r!==undefined?r:!0};$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(n){}},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)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedAnimations",["ExtendedCommon","ExtendedTimer"],n):n()}(),function(){function n(){var n=Sys.version;if(!n&&!Sys._versionChecked){Sys._versionChecked=!0;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BehaviorBase=function(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);typeof Sys.WebForms!="undefined"&&typeof Sys.WebForms.PageRequestManager!="undefined"?(Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate),(Sys.Extended.UI.ControlBase.__doPostBackSaved==null||typeof Sys.Extended.UI.ControlBase.__doPostBackSaved=="undefined")&&(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(){typeof Sys.WebForms!="undefined"&&typeof Sys.WebForms.PageRequestManager!="undefined"?(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(typeof WebForm_DoCallback=="undefined")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(),f!=null&&!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)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedBase",["ComponentModel","Serialization"],n):n()}();Sys.Extended.UI.Resources={AjaxFileUpload_FileInQueue:"{0} file(s) in queue.",AjaxFileUpload_AllFilesUploaded:"All Files Uploaded.",AjaxFileUpload_FileList:"List of Uploaded files:",PasswordStrength_InvalidWeightingRatios:"Strength Weighting ratios must have 4 elements",HTMLEditor_toolbar_button_FontSize_defaultValue:"default",AjaxFileUpload_SelectFileToUpload:"Please select file(s) to upload.",HTMLEditor_toolbar_button_DesignMode_title:"Design mode",Animation_ChildrenNotAllowed:'Sys.Extended.UI.Animation.createAnimation cannot add child animations to type "{0}" that does not derive from Sys.Extended.UI.Animation.ParentAnimation',PasswordStrength_RemainingSymbols:"{0} symbol characters",HTMLEditor_toolbar_button_FixedForeColor_title:"Foreground color",HTMLEditor_toolbar_popup_LinkProperties_field_URL:"URL",ExtenderBase_CannotSetClientStateField:"clientStateField can only be set before initialization",HTMLEditor_toolbar_button_Bold_title:"Bold",RTE_PreviewHTML:"Preview HTML",HTMLEditor_toolbar_popup_LinkProperties_button_OK:"OK",HTMLEditor_toolbar_button_JustifyRight_title:"Justify Right",RTE_JustifyCenter:"Justify Center",PasswordStrength_RemainingUpperCase:"{0} more upper case characters",HTMLEditor_toolbar_popup_LinkProperties_button_Cancel:"Cancel",Animation_TargetNotFound:'Sys.Extended.UI.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control. No element or control could be found corresponding to "{0}"',AsyncFileUpload_UnhandledException:"Unhandled Exception",RTE_FontColor:"Font Color",RTE_LabelColor:"Label Color",Common_InvalidBorderWidthUnit:'A unit type of "{0}"\' is invalid for parseBorderWidth',HTMLEditor_toolbar_button_JustifyFull_title:"Justify",RTE_Heading:"Heading",AsyncFileUpload_ConfirmToSeeErrorPage:"Do you want to see the response page?",Tabs_PropertySetBeforeInitialization:"{0} cannot be changed before initialization",HTMLEditor_toolbar_button_StrikeThrough_title:"Strike through",RTE_OrderedList:"Ordered List",HTMLEditor_toolbar_button_OnPastePlainText:"Plain text pasting is switched on. Just now: {0}",HTMLEditor_toolbar_button_RemoveLink_title:"Remove Link",HTMLEditor_toolbar_button_FontName_defaultValue:"default",HTMLEditor_toolbar_button_FontName_label:"Font",ReorderList_DropWatcherBehavior_NoChild:'Could not find child of list with id "{0}"',CascadingDropDown_MethodTimeout:"[Method timeout]",RTE_Columns:"Columns",RTE_InsertImage:"Insert Image",RTE_InsertTable:"Insert Table",RTE_Values:"Values",RTE_OK:"OK",ExtenderBase_PageNotRegisteredForCallbacks:"This Page has not been registered for callbacks",HTMLEditor_toolbar_button_InsertLink_title:"Insert/Edit URL link",Animation_NoDynamicPropertyFound:'Sys.Extended.UI.Animation.createAnimation found no property corresponding to "{0}" or "{1}"',AjaxFileUpload_WrongFileType:"Can't add file '{0}' to upload list. File with type '{1}' is not allowed",Animation_InvalidBaseType:"Sys.Extended.UI.Animation.registerAnimation can only register types that inherit from Sys.Extended.UI.Animation.Animation",RTE_UnorderedList:"Unordered List",AsyncFileUpload_UnknownServerError:"Unknown Server error",ResizableControlBehavior_InvalidHandler:"{0} handler not a function, function name, or function text",Animation_InvalidColor:'Color must be a 7-character hex representation (e.g. #246ACF), not "{0}"',RTE_CellColor:"Cell Color",PasswordStrength_RemainingMixedCase:"Mixed case characters",HTMLEditor_toolbar_button_HtmlMode_title:"HTML text",RTE_Italic:"Italic",CascadingDropDown_NoParentElement:'Failed to find parent element "{0}"',ValidatorCallout_DefaultErrorMessage:"This control is invalid",HTMLEditor_toolbar_button_DecreaseIndent_title:"Decrease Indent",RTE_Indent:"Indent",ReorderList_DropWatcherBehavior_CallbackError:"Reorder failed, see details below.\\r\\n\\r\\n{0}",PopupControl_NoDefaultProperty:'No default property supported for control "{0}" of type "{1}"',RTE_Normal:"Normal",PopupExtender_NoParentElement:'Couldn\'t find parent element "{0}"',RTE_ViewValues:"View Values",RTE_Legend:"Legend",RTE_Labels:"Labels",RTE_CellSpacing:"Cell Spacing",PasswordStrength_RemainingNumbers:"{0} more numbers",HTMLEditor_toolbar_popup_LinkProperties_field_Target:"Target",HTMLEditor_toolbar_button_PreviewMode_title:"Preview",RTE_Border:"Border",RTE_Create:"Create",RTE_BackgroundColor:"Background Color",RTE_Cancel:"Cancel",HTMLEditor_toolbar_button_PasteText_title:"Paste Plain Text",RTE_JustifyFull:"Justify Full",RTE_JustifyLeft:"Justify Left",RTE_Cut:"Cut",AsyncFileUpload_UploadingProblem:"The requested file uploading problem.",AjaxFileUpload_Cancelling:"Cancelling...",ResizableControlBehavior_CannotChangeProperty:"Changes to {0} not supported",AjaxFileUpload_MaxNumberOfFilesExceeded:"Maximum number of files exceeded",AjaxFileUpload_UploadError:"An Error occured during file upload.",RTE_ViewSource:"View Source",Common_InvalidPaddingUnit:'A unit type of "{0}" is invalid for parsePadding',RTE_Paste:"Paste",ExtenderBase_ControlNotRegisteredForCallbacks:"This Control has not been registered for callbacks",Calendar_Today:"Today: {0}",MultiHandleSlider_CssHeightWidthRequired:"You must specify a CSS width and height for all handle styles as well as the rail.",Common_DateTime_InvalidFormat:"Invalid format",HTMLEditor_toolbar_button_Copy_title:"Copy",ListSearch_DefaultPrompt:"Type to search",CollapsiblePanel_NoControlID:'Failed to find element "{0}"',RTE_ViewEditor:"View Editor",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Current:"Current window",RTE_BarColor:"Bar Color",AjaxFileUpload_CancellingUpload:"Cancelling upload...",AsyncFileUpload_InternalErrorMessage:"The AsyncFileUpload control has encountered an error with the uploader in this page. Please refresh the page and try again.",HTMLEditor_toolbar_button_Underline_title:"Underline",PasswordStrength_DefaultStrengthDescriptions:"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!",HTMLEditor_toolbar_button_SuperScript_title:"Super script",AjaxFileUpload_UploadingInputFile:"Uploading file: {0}.",HTMLEditor_toolbar_button_Ltr_title:"Left to right direction",HTMLEditor_toolbar_button_RemoveAlignment_title:"Remove Alignment",HTMLEditor_toolbar_button_OrderedList_title:"Ordered List",HTMLEditor_toolbar_popup_LinkProperties_field_Target_New:"New window",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Top:"Top window",HTMLEditor_toolbar_button_JustifyCenter_title:"Justify Center",AjaxFileUpload_Cancel:"Cancel",RTE_Inserttexthere:"Insert text here",Animation_UknownAnimationName:'Sys.Extended.UI.Animation.createAnimation could not find an Animation corresponding to the name "{0}"',ExtenderBase_InvalidClientStateType:"saveClientState must return a value of type String",HTMLEditor_toolbar_button_JustifyLeft_title:"Justify Left",Rating_CallbackError:"An unhandled exception has occurred:\\r\\n{0}",HTMLEditor_toolbar_button_Undo_title:"Undo",HTMLEditor_toolbar_button_Redo_title:"Redo",Tabs_OwnerExpected:"owner must be set before initialize",DynamicPopulate_WebServiceTimeout:"Web service call timed out",PasswordStrength_RemainingLowerCase:"{0} more lower case characters",AjaxFileUpload_Canceled:"cancelled",AjaxFileUpload_UploadCanceled:"File upload cancelled.",AjaxFileUpload_Upload:"Upload",HTMLEditor_toolbar_button_BulletedList_title:"Bulleted List",HTMLEditor_toolbar_button_Paste_title:"Paste",Animation_MissingAnimationName:"Sys.Extended.UI.Animation.createAnimation requires an object with an AnimationName property",HTMLEditor_toolbar_button_PasteWord_title:"Paste from MS Word (with cleanup)",HTMLEditor_toolbar_button_Italic_title:"Italic",RTE_JustifyRight:"Justify Right",Tabs_ActiveTabArgumentOutOfRange:"Argument is not a member of the tabs collection",RTE_CellPadding:"Cell Padding",HTMLEditor_toolbar_button_ForeColorClear_title:"Clear foreground color",RTE_ClearFormatting:"Clear Formatting",AlwaysVisible_ElementRequired:"Sys.Extended.UI.AlwaysVisibleControlBehavior must have an element",AjaxFileUpload_Remove:"Remove",HTMLEditor_toolbar_button_SubScript_title:"Sub script",Slider_NoSizeProvided:"Please set valid values for the height and width attributes in the slider's CSS classes",DynamicPopulate_WebServiceError:"Web Service call failed: {0}",PasswordStrength_StrengthPrompt:"Strength: ",AjaxFileUpload_Uploading:"Uploading",HTMLEditor_toolbar_button_Rtl_title:"Right to left direction",PasswordStrength_RemainingCharacters:"{0} more characters",HTMLEditor_toolbar_button_BackColorClear_title:"Clear background color",PasswordStrength_Satisfied:"Nothing more required",AjaxFileUpload_DefaultError:"File upload error.",AjaxFileUpload_DropFiles:"Drop files here",AjaxFileUpload_UploadingHtml5File:"Uploading file: {0} of size {1} bytes.",RTE_Hyperlink:"Hyperlink",Animation_NoPropertyFound:'Sys.Extended.UI.Animation.createAnimation found no property corresponding to "{0}"',PasswordStrength_InvalidStrengthDescriptionStyles:"Text Strength description style classes must match the number of text descriptions.",HTMLEditor_toolbar_button_Use_verb:"Use {0}",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Parent:"Parent window",PasswordStrength_GetHelpRequirements:"Get help on password requirements",AjaxFileUpload_error:"error",HTMLEditor_toolbar_button_FixedBackColor_title:"Background color",PasswordStrength_InvalidStrengthDescriptions:"Invalid number of text strength descriptions specified",AjaxFileUpload_Pending:"pending",RTE_Underline:"Underline",HTMLEditor_toolbar_button_IncreaseIndent_title:"Increase Indent",AsyncFileUpload_ServerResponseError:"Server Response Error",Tabs_PropertySetAfterInitialization:"{0} cannot be changed after initialization",RTE_Rows:"Rows",RTE_Redo:"Redo",RTE_Size:"Size",RTE_Undo:"Undo",RTE_Bold:"Bold",RTE_Copy:"Copy",RTE_Font:"Font",HTMLEditor_toolbar_button_FontSize_label:"Size",HTMLEditor_toolbar_button_Cut_title:"Cut",CascadingDropDown_MethodError:"[Method error {0}]",HTMLEditor_toolbar_button_InsertLink_message_EmptyURL:"URL can not be empty",AjaxFileUpload_SelectFile:"Select File",RTE_BorderColor:"Border Color",HTMLEditor_toolbar_button_RemoveStyles_title:"Remove styles",RTE_Paragraph:"Paragraph",RTE_InsertHorizontalRule:"Insert Horizontal Rule",AjaxFileUpload_UploadedPercentage:"uploaded {0} %",HTMLEditor_toolbar_button_Paragraph_title:"Make Paragraph",AjaxFileUpload_Uploaded:"Uploaded",Common_UnitHasNoDigits:"No digits",RTE_Outdent:"Outdent",Common_DateTime_InvalidTimeSpan:'"{0}" is not a valid TimeSpan format',Animation_CannotNestSequence:"Sys.Extended.UI.Animation.SequenceAnimation cannot be nested inside Sys.Extended.UI.Animation.ParallelAnimation",HTMLEditor_toolbar_button_InsertHR_title:"Insert horizontal rule",HTMLEditor_toolbar_button_OnPasteFromMSWord:"Pasting from MS Word is switched on. Just now: {0}",Shared_BrowserSecurityPreventsPaste:"Your browser security settings don't permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."},function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.AutoSize=function(){throw Error.invalidOperation();};Sys.Extended.UI.AutoSize.prototype={None:0,Fill:1,Limit:2};Sys.Extended.UI.AutoSize.registerEnum("Sys.Extended.UI.AutoSize",!1);Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs=function(n,t){Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs.initializeBase(this);this._oldIndex=n;this._selectedIndex=t};Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs.prototype={get_oldIndex:function(){return this._oldIndex},set_oldIndex:function(n){this._oldIndex=n},get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(n){this._selectedIndex=n}};Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs.registerClass("Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs",Sys.CancelEventArgs);Sys.Extended.UI.AccordionBehavior=function(n){Sys.Extended.UI.AccordionBehavior.initializeBase(this,[n]);this._selectedIndex=0;this._panes=[];this._fadeTransitions=!1;this._duration=.25;this._framesPerSecond=30;this._autoSize=Sys.Extended.UI.AutoSize.None;this._requireOpenedPane=!0;this._suppressHeaderPostbacks=!1;this._headersSize=0;this._headerClickHandler=null;this._headerCssClass="";this._headerSelectedCssClass="";this._resizeHandler=null;this._isIE8InStandardMode=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version>7&&Sys.Browser.documentMode!=0};Sys.Extended.UI.AccordionBehavior.prototype={initialize:function(){var t,i,n,r,u;for(Sys.Extended.UI.AccordionBehavior.callBaseMethod(this,"initialize"),this._headerClickHandler=Function.createDelegate(this,this._onHeaderClick),t=this.get_ClientState(),t!==null&&t!==""&&this._changeSelectedIndex(parseInt(t),!1,!0),i=this.get_element().childNodes,n={},n.value=0;n.value<i.length;n.value++){if(r=this._getNextDiv(i,n),!r)break;u=this._getNextDiv(i,n);u&&(this.addPane(r,u),n.value--)}this._requireOpenedPane&&!this.get_Pane()&&this._panes.length>0&&this._changeSelectedIndex(0,!1,!0);this._initializeLayout()},_getNextDiv:function(n,t){for(var i=null;t.value<n.length&&(i=n[t.value++]);)if(i.tagName&&i.tagName.toLowerCase()==="div")break;return i},addPane:function(n,t){var r={},u,i;return r.animation=null,r.header=n,n._index=this._panes.length,$addHandler(n,"click",this._headerClickHandler),u=this.get_element(),i=document.createElement("div"),u.insertBefore(i,t),i.appendChild(t),i._original=t,r.content=i,i.style.border="",i.style.margin="",i.style.padding="",Array.add(this._panes,r),this._initializePane(n._index),t.style.display="block",r},_getAnimation:function(n){var t=n.animation,i,r;return t||(i=null,r=null,this._fadeTransitions?(i=new Sys.Extended.UI.Animation.LengthAnimation(null,null,null,"style","height",0,0,"px"),r=new Sys.Extended.UI.Animation.FadeAnimation(null,null,null,Sys.Extended.UI.Animation.FadeEffect.FadeOut,0,1,!1),t=new Sys.Extended.UI.Animation.ParallelAnimation(n.content,this._duration,this._framesPerSecond,[r,i])):t=i=new Sys.Extended.UI.Animation.LengthAnimation(n.content,this._duration,this._framesPerSecond,"style","height",0,0,"px"),n.animation=t,t._length=i,t._fade=r,t._pane=n,t._opening=!0,t._behavior=this,t._ended=Function.createDelegate(n.animation,this._onAnimationFinished),t.add_ended(n.animation._ended),t.initialize()),t},_onAnimationFinished:function(){this._behavior._endPaneChange(this._pane,this._opening)},_initializeLayout:function(){for(var r,u,n,i,t=0;t<this._panes.length;t++)r=this._panes[t].animation,r&&r.get_isPlaying()&&r.stop();for(u=this.get_element(),this._initialHeight=u.offsetHeight,n=u.style,this._autoSize===Sys.Extended.UI.AutoSize.None?(this._disposeResizeHandler(),i=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version>=7,(!i||i&&n.height&&n.height.length>0)&&(n.height="auto"),(!i||i&&n.overflow&&n.overflow.length>0)&&(n.overflow="auto")):(this._addResizeHandler(),n.height=u.offsetHeight+"px",n.overflow="hidden"),t=0;t<this._panes.length;t++)this._initializePane(t);this._resizeSelectedPane()},_initializePane:function(n){var f=this.get_Pane(n),r;if(f){var t=f.content,i=t._original,u=n===this._selectedIndex;t.style.height=u||this._autoSize===Sys.Extended.UI.AutoSize.Fill?"auto":"0px";t.style.overflow=u?"auto":"hidden";t.style.display=u?"block":"none";i.style.height="auto";i.style.maxHeight="";i.style.overflow=u?"auto":"hidden";r=u||!this._fadeTransitions?1:0;this._autoSize===Sys.Extended.UI.AutoSize.Fill?($common.getElementOpacity(i)!=r&&$common.setElementOpacity(i,r),$common.getElementOpacity(t)!=1&&$common.setElementOpacity(t,1)):($common.getElementOpacity(t)!=r&&$common.setElementOpacity(t,r),$common.getElementOpacity(i)!=1&&$common.setElementOpacity(i,1));f.header.className=this._selectedIndex===n?this._headerSelectedCssClass||this._headerCssClass:this._headerCssClass}},_addResizeHandler:function(){this._resizeHandler||(this._resizeHandler=Function.createDelegate(this,this._resizeSelectedPane),$addHandler(window,"resize",this._resizeHandler))},dispose:function(){var t,n;for(this._disposeResizeHandler(),this._disposeAnimations(),t=this._panes.length-1;t>=0;t--)n=this._panes[t],n&&(n.header&&(n.header._index=null,$removeHandler(n.header,"click",this._headerClickHandler),n.header=null),n.content&&(n.content._original=null,n.content=null),this._panes[t]=null,delete this._panes[t]);this._panes=null;this._headerClickHandler=null;Sys.Extended.UI.AccordionBehavior.callBaseMethod(this,"dispose")},_disposeResizeHandler:function(){this._resizeHandler&&($removeHandler(window,"resize",this._resizeHandler),this._resizeHandler=null)},_disposeAnimations:function(){for(var n,t=0;t<this._panes.length;t++)n=this._panes[t].animation,n&&(n.get_isPlaying()&&n.stop(),n._ended&&(n.remove_ended(n._ended),n._ended=null),n.dispose(),n._length=null,n._fade=null,n._pane=null,n._opening=null,n._behavior=null,this._panes[t].animation=null)},_resizeSelectedPane:function(){var i=this.get_Pane(),n,t;if(i){this._headersSize=this._getHeadersSize().height;n=i.content._original;switch(this._autoSize){case Sys.Extended.UI.AutoSize.None:n.style.height="auto";n.style.maxHeight="";break;case Sys.Extended.UI.AutoSize.Limit:t=this._getRemainingHeight(!1);n.style.height="auto";n.style.maxHeight=t+"px";break;case Sys.Extended.UI.AutoSize.Fill:t=this._getRemainingHeight(!0);n.style.height=t+"px";n.style.maxHeight=""}}},_onHeaderClick:function(n){for(var t=n.target,r=this.get_element(),i;t&&t.parentNode!==r;)t=t.parentNode;n.stopPropagation();this._suppressHeaderPostbacks&&n.preventDefault();i=t._index;i!==this._selectedIndex||this._requireOpenedPane||(i=-1);this._changeSelectedIndex(i,!0)},_changeSelectedIndex:function(n,t,i){var r=this._selectedIndex,u=this.get_Pane(n),f=this.get_Pane(r),e;(i||u!=f)&&((e=new Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs(r,n),this.raiseSelectedIndexChanging(e),e.get_cancel())||(f&&(f.header.className=this._headerCssClass),u&&(u.header.className=this._headerSelectedCssClass==""?this._headerCssClass:this._headerSelectedCssClass),this._selectedIndex=n,this.set_ClientState(this._selectedIndex),t&&this._changePanes(r),this.raiseSelectedIndexChanged(new Sys.Extended.UI.AccordionSelectedIndexChangeEventArgs(r,n)),this.raisePropertyChanged("SelectedIndex")))},_changePanes:function(n){var u,f,r,i,t;if(this.get_isInitialized()){for(u=null,f=null,r=0;r<this._panes.length;r++){if(i=this._panes[r],t=this._getAnimation(i),t.get_isPlaying()&&t.stop(),r==this._selectedIndex)t._opening=!0,u=t;else if(r==n)t._opening=!1,f=t;else continue;this._startPaneChange(i,t._opening);this._fadeTransitions&&t._fade.set_effect(t._opening?Sys.Extended.UI.Animation.FadeEffect.FadeIn:Sys.Extended.UI.Animation.FadeEffect.FadeOut);this._autoSize===Sys.Extended.UI.AutoSize.Fill?(t.set_target(i.content._original),t._length.set_startValue($common.getContentSize(i.content._original).height),t._length.set_endValue(t._opening?this._getRemainingHeight(!0):0)):(t.set_target(i.content),t._length.set_startValue(i.content.offsetHeight),t._length.set_endValue(t._opening?this._getRemainingHeight(!1):0))}f&&f.play();u&&u.play()}},_startPaneChange:function(n,t){var i=n.content,r=i._original;t?(i.style.display="block",this._autoSize===Sys.Extended.UI.AutoSize.Fill&&this._isIE8InStandardMode&&(r.style.display="block")):(i.style.overflow="hidden",r.style.overflow="hidden",this._autoSize===Sys.Extended.UI.AutoSize.Limit&&(i.style.height=this._getTotalSize(r).height+"px",r.style.maxHeight=""))},_endPaneChange:function(n,t){var i=n.content,r=i._original,u;t?(this._autoSize===Sys.Extended.UI.AutoSize.Limit&&(u=this._getRemainingHeight(!0),r.style.maxHeight=u+"px"),r.style.overflow="auto",i.style.height="auto",i.style.overflow="auto"):this._isIE8InStandardMode?this._autoSize===Sys.Extended.UI.AutoSize.Fill?r.style.display="none":i.style.height="0px":i.style.display="none"},_getHeadersSize:function(){for(var n={width:0,height:0},t,i=0;i<this._panes.length;i++)t=this._getTotalSize(this._panes[i].header),n.width=Math.max(n.width,t.width),n.height+=t.height;return n},_getRemainingHeight:function(n){var t=0,i=this.get_Pane(),u,r;return this._autoSize===Sys.Extended.UI.AutoSize.None?i&&(t=this._getTotalSize(i.content._original).height):(t=this._headersSize,n&&i&&(t+=this._getGutterSize(i.content._original).height),u=this.get_element(),t=Math.max(u.offsetHeight-t,0),i&&this._autoSize===Sys.Extended.UI.AutoSize.Limit&&(r=this._getTotalSize(i.content._original).height,r>0&&(t=Math.min(t,r)))),t},_getTotalSize:function(n){var t=$common.getSize(n),i=$common.getMarginBox(n);return t.width+=i.horizontal,t.height+=i.vertical,t},_getGutterSize:function(n){var i={width:0,height:0},t;try{t=$common.getPaddingBox(n);i.width+=t.horizontal;i.height+=t.vertical}catch(r){}try{t=$common.getBorderBox(n);i.width+=t.horizontal;i.height+=t.vertical}catch(r){}return t=$common.getMarginBox(n),i.width+=t.horizontal,i.height+=t.vertical,i},add_selectedIndexChanging:function(n){this.get_events().addHandler("selectedIndexChanging",n)},remove_selectedIndexChanging:function(n){this.get_events().removeHandler("selectedIndexChanging",n)},raiseSelectedIndexChanging:function(n){var t=this.get_events().getHandler("selectedIndexChanging");t&&t(this,n)},add_selectedIndexChanged:function(n){this.get_events().addHandler("selectedIndexChanged",n)},remove_selectedIndexChanged:function(n){this.get_events().removeHandler("selectedIndexChanged",n)},raiseSelectedIndexChanged:function(n){var t=this.get_events().getHandler("selectedIndexChanged");t&&t(this,n)},get_Pane:function(n){return(n===undefined||n===null)&&(n=this._selectedIndex),this._panes&&n>=0&&n<this._panes.length?this._panes[n]:null},get_Count:function(){return this._panes?this._panes.length:0},get_TransitionDuration:function(){return this._duration*1e3},set_TransitionDuration:function(n){var t,i;if(this._duration!=n/1e3){for(this._duration=n/1e3,t=0;t<this._panes.length;t++)i=this._panes[t].animation,i&&i.set_duration(this._duration);this.raisePropertyChanged("TransitionDuration")}},get_FramesPerSecond:function(){return this._framesPerSecond},set_FramesPerSecond:function(n){var t,i;if(this._framesPerSecond!=n){for(this._framesPerSecond=n,t=0;t<this._panes.length;t++)i=this._panes[t].animation,i&&i.set_fps(this._framesPerSecond);this.raisePropertyChanged("FramesPerSecond")}},get_FadeTransitions:function(){return this._fadeTransitions},set_FadeTransitions:function(n){if(this._fadeTransitions!=n){if(this._fadeTransitions=n,this._disposeAnimations(),!this._fadeTransitions)for(var t=0;t<this._panes.length;t++)$common.getElementOpacity(this._panes[t].content)!=1&&$common.setElementOpacity(this._panes[t].content,1),$common.getElementOpacity(this._panes[t].content._original)!=1&&$common.setElementOpacity(this._panes[t].content._original,1);this.raisePropertyChanged("FadeTransitions")}},get_HeaderCssClass:function(){return this._headerCssClass},set_HeaderCssClass:function(n){this._headerCssClass=n;this.raisePropertyChanged("HeaderCssClass")},get_HeaderSelectedCssClass:function(){return this._headerSelectedCssClass},set_HeaderSelectedCssClass:function(n){this._headerSelectedCssClass=n;this.raisePropertyChanged("HeaderSelectedCssClass")},get_AutoSize:function(){return this._autoSize},set_AutoSize:function(n){Sys.Browser.agent===Sys.Browser.InternetExplorer&&n===Sys.Extended.UI.AutoSize.Limit&&(n=Sys.Extended.UI.AutoSize.Fill);this._autoSize!=n&&(this._autoSize=n,this._initializeLayout(),this.raisePropertyChanged("AutoSize"))},get_SelectedIndex:function(){return this._selectedIndex},set_SelectedIndex:function(n){this._changeSelectedIndex(n,!0)},get_requireOpenedPane:function(){return this._requireOpenedPane},set_requireOpenedPane:function(n){this._requireOpenedPane!=n&&(this._requireOpenedPane=n,this.raisePropertyChanged("requireOpenedPane"))},get_suppressHeaderPostbacks:function(){return this._suppressHeaderPostbacks},set_suppressHeaderPostbacks:function(n){this._suppressHeaderPostbacks!=n&&(this._suppressHeaderPostbacks=n,this.raisePropertyChanged("suppressHeaderPostbacks"))}};Sys.Extended.UI.AccordionBehavior.registerClass("Sys.Extended.UI.AccordionBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.AccordionBehavior,{name:"accordion"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedAccordion",["ExtendedAnimations","ExtendedBase"],n):n()}();Type.registerNamespace("Sys.Extended.UI.AjaxFileUpload");Type.registerNamespace("AjaxFileUpload");Sys.Extended.UI.AjaxFileUpload.Item=function(n,t,i){this._deleteButton=null;this._parentId=n;this._inputElementValue=t.value;this._id=t.id;this._slices=t.slices;this._sliceIndex=0;this._fileInfoContainer=null;this._fileStatusText=null;this._isUploaded=!1;this._isUploading=!1;this._fileSize=0;this._fileName="";this._fileType="";this._bytesUploaded=0;this._ui=this.initUI(i)};Sys.Extended.UI.AjaxFileUpload.Item.prototype={initUI:function(n){var l=this,t=this._inputElementValue,e=new Sys.Extended.UI.AjaxFileUpload.Utils,a=e.checkHtml5BrowserSupport(),i=this._id,r=$common.createElementFromTemplate({nodeName:"div",properties:{id:this._parentId+"_FileItemContainer_"+i},cssClasses:["ajax__fileupload_fileItemInfo"]}),u=$common.createElementFromTemplate({nodeName:"div",properties:{id:this._parentId+"_FileInfoContainer_"+i,style:{display:"inline-block"}}}),o=$common.createElementFromTemplate({nodeName:"span",properties:{id:this._parentId+"_FileItemInfo_"+i},cssClasses:["ajax__fileupload_fileItemInfo"]}),h=$common.createElementFromTemplate({nodeName:"span",properties:{id:this._parentId+"_FileItemStatus_"+i},cssClasses:["uploadstatus"]}),f=$common.createElementFromTemplate({nodeName:"div",properties:{id:this._parentId+"_FileItemDeleteButton_"+i},cssClasses:["removeButton"]}),s,c;return this._fileName=e.getFileName(t),s=decodeURIComponent(this._fileName),a?(this._fileSize=t.size,c=t.type?'<span class="filetype">('+t.type+")<\/span>":"",o.innerHTML='<span class="filename">'+s+"<\/span> "+c+' - <span class="filesize">'+e.sizeToString(t.size)+"<\/span> ",this._fileType=t.type):(o.innerHTML='<span class="filename">'+s+"<\/span>",this._fileType=e.getFileType(t)),u.appendChild(o),u.appendChild(h),$common.setText(f,Sys.Extended.UI.Resources.AjaxFileUpload_Remove),$addHandlers(f,{click:Function.createDelegate(this,function(){n(l)})}),Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<=8?(r.appendChild(f),r.appendChild(u)):(r.appendChild(u),r.appendChild(f)),this._fileInfoContainer=u,this._deleteButton=f,this._fileStatusText=h,r},setStatus:function(n,t){$common.setText(this._fileStatusText," ("+t+")");this._fileInfoContainer.setAttribute("class",n+"State")},disabled:function(n){this._deleteButton.disabled=n?"disabled":""},hide:function(){this._deleteButton.style.visibility="hidden"},destroy:function(){$common.removeElement(this._inputElementValue);$common.removeElement(this._deleteButton);$common.removeElement(this._ui)},get_inputElementValue:function(){return this._inputElementValue},appendNodeTo:function(n){n.appendChild(this._ui)},removeNodeFrom:function(n){n.removeChild(this._ui)}};Sys.Extended.UI.AjaxFileUploadCompleteAllEventArgs=function(n,t,i,r){if(arguments.length!=4)throw Error.parameterCount();Sys.Extended.UI.AjaxFileUploadCompleteAllEventArgs.initializeBase(this);this._filesInQueue=n;this._filesUploaded=t;this._reason=i;this._serverArguments=r};Sys.Extended.UI.AjaxFileUploadCompleteAllEventArgs.prototype={get_filesInQueue:function(){return this._filesInQueue},get_reason:function(){return this._reason},get_filesUploaded:function(){return this._filesUploaded},get_serverArguments:function(){return this._serverArguments}};Sys.Extended.UI.AjaxFileUploadCompleteAllEventArgs.registerClass("Sys.Extended.UI.AjaxFileUploadCompleteAllEventArgs",Sys.EventArgs);Type.registerNamespace("Sys.Extended.UI.AjaxFileUpload");Type.registerNamespace("AjaxFileUpload");Sys.Extended.UI.AjaxFileUpload.Control=function(n){Sys.Extended.UI.AjaxFileUpload.Control.initializeBase(this,[n]);this._allowedFileTypes=null;this._contextKey=null;this._postBackUrl=null;this._mode=0;this._serverPollingSupport=!1;this._throbber=null;this._maximumNumberOfFiles=10;this._allowedFileTypes="";this._chunkSize=4096;this._storeToAzure=!1;this._azureContainerName="";this._uploadUrl="AjaxFileUploadHandler.axd";this._useHtml5Support=!1;this._elements=null;this._processor=null;this._filesInQueue=[];this._isUploading=!1;this._currentFileId=null;this._currentQueueIndex=0;this._canceled=!1};Sys.Extended.UI.AjaxFileUpload.Control.prototype={initialize:function(){var r=new Sys.Extended.UI.AjaxFileUpload.Utils,u=this.get_id(),n=function(n){return document.getElementById(u+n)},t={queueContainer:n("_QueueContainer"),selectFileButton:n("_SelectFileButton"),uploadOrCancelButton:n("_UploadOrCancelButton"),fileStatusContainer:n("_FileStatusContainer"),footer:n("_Footer")},i;this._useHtml5Support=r.checkHtml5BrowserSupport()&&this._mode!=2;t.progressBar=n("_ProgressBar");t.progressBarContainer=n("_ProgressBarContainer");this._useHtml5Support?(t.inputFile=n("_Html5InputFile"),t.dropZone=n("_Html5DropZone")):t.inputFile=n("_InputFileElement");this._elements=t;i=this._useHtml5Support?new Sys.Extended.UI.AjaxFileUpload.ProcessorHtml5(this,t):new Sys.Extended.UI.AjaxFileUpload.Processor(this,t);this.setDefaultElementsLayout(t);this.attachEvents(t);i.initialize();this._processor=i;Sys.Extended.UI.AjaxFileUpload.Control.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.AjaxFileUpload.Control.callBaseMethod(this,"dispose")},setDefaultElementsLayout:function(n){$common.setVisible(n.inputFile,!0);$common.setVisible(n.uploadOrCancelButton,!1);$common.setVisible(n.fileStatusContainer,!0);n.selectFileButton.innerHTML=Sys.Extended.UI.Resources.AjaxFileUpload_SelectFile;n.uploadOrCancelButton.innerHTML=Sys.Extended.UI.Resources.AjaxFileUpload_Upload;this.setStatusMessage(Sys.Extended.UI.Resources.AjaxFileUpload_SelectFileToUpload)},attachEvents:function(n){this.onUploadOrCancelButtonClicked$delegate=Function.createDelegate(this,this.onUploadOrCancelButtonClickedHandler);$addHandlers(n.uploadOrCancelButton,{click:this.onUploadOrCancelButtonClicked$delegate})},onUploadOrCancelButtonClickedHandler:function(){var i=this._filesInQueue,u,t,r,n;if(!i.length){alert(Sys.Extended.UI.Resources.AjaxFileUpload_SelectFileToUpload);return}for(u=0,n=0;n<i.length;n++)i[n]._isUploaded&&u++;if(u==i.length){alert(Sys.Extended.UI.Resources.AjaxFileUpload_AllFilesUploaded);return}if(this.enableControls(this._isUploading),this._isUploading=!this._isUploading,this._isUploading)this._canceled=!1,t=new XMLHttpRequest,r=this,t.open("POST","?contextKey="+this._contextKey+"&start=1&queue="+this._filesInQueue.length),t.onreadystatechange=function(){if(t.readyState==4)if(t.status==200)r._processor.startUpload(),r.raiseUploadStart(Sys.Serialization.JavaScriptSerializer.deserialize(t.responseText));else{r.raiseUploadError(t);throw"Failed to starting upload.";}},t.send(null);else for(this._canceled=!0,this._processor.cancelUpload(),n=0;n<i.length;n++)i[n]._isUploaded||(i[n]._isUploading=!1)},enableControls:function(n){var t=this._elements.uploadOrCancelButton;$common.setText(t,n?Sys.Extended.UI.Resources.AjaxFileUpload_Upload:Sys.Extended.UI.Resources.AjaxFileUpload_Cancel);t.setAttribute("class",n?"ajax__fileupload_uploadbutton":"ajax_fileupload_cancelbutton");$common.setVisible(this._elements.inputFile,n);this._useHtml5Support&&(this._elements.dropZone.disable=!n,this._elements.inputFile.disable=!n)},done:function(){this._isUploading=!1;this.enableControls(!0);this.setStatusMessage(Sys.Extended.UI.Resources.AjaxFileUpload_AllFilesUploaded+" "+Sys.Extended.UI.Resources.AjaxFileUpload_SelectFileToUpload);$common.setVisible(this._elements.uploadOrCancelButton,!1);var n=new XMLHttpRequest,t=this,i=this._filesInQueue[this._currentQueueIndex-1];n.open("POST","?contextKey="+this._contextKey+"&complete=1&queue="+this._filesInQueue.length+"&uploaded="+(this._currentQueueIndex-(i._isUploaded?0:1))+"&reason="+(this._canceled?"cancel":"done"));n.onreadystatechange=function(){if(n.readyState==4)if(n.status==200)t.raiseUploadCompleteAll(Sys.Serialization.JavaScriptSerializer.deserialize(n.responseText));else{t.raiseUploadError(n);throw"Failed to completing upload.";}};n.send(null);this._filesInQueue=[];this._currentQueueIndex=0},removeFileFromQueueHandler:function(n){n&&!n._isUploading&&(Array.remove(this._filesInQueue,n),n.removeNodeFrom(this._elements.queueContainer),this._elements.queueContainer.hasChildNodes()||($common.setVisible(this._elements.queueContainer,!1),$common.setVisible(this._elements.uploadOrCancelButton,!1)),this._showFilesCount())},addFileToQueue:function(n){var i=this.get_maximumNumberOfFiles(),t;return i>0&&this._filesInQueue.length>=i?(alert(Sys.Extended.UI.Resources.AjaxFileUpload_MaxNumberOfFilesExceeded),!1):(t=new Sys.Extended.UI.AjaxFileUpload.Item(this.get_id(),n,Function.createDelegate(this,this.removeFileFromQueueHandler)),t.appendNodeTo(this._elements.queueContainer),t.setStatus("pending",Sys.Extended.UI.Resources.AjaxFileUpload_Pending),$common.setVisible(this._elements.queueContainer,!0),$common.setVisible(this._elements.uploadOrCancelButton,!0),this._filesInQueue.push(t),this._showFilesCount(),!0)},_showFilesCount:function(){var n=this._filesInQueue.length==0;this.setStatusMessage(n?Sys.Extended.UI.Resources.AjaxFileUpload_SelectFileToUpload:String.format(Sys.Extended.UI.Resources.AjaxFileUpload_FileInQueue,this._filesInQueue.length.toString()))},fileTypeIsValid:function(n){var i,t,r;if(!this._allowedFileTypes)return!0;for(i=this._allowedFileTypes.split(","),t=0;t<i.length;t++)if(r=i[t],n.toLocaleLowerCase()==r.toLocaleLowerCase())return!0;return!1},confirmFileIsInvalid:function(n){var t=new Sys.Extended.UI.AjaxFileUpload.Utils;alert(String.format(Sys.Extended.UI.Resources.AjaxFileUpload_WrongFileType,t.getFileName(n.value),n.type))},doneAndUploadNextFile:function(n){var t=new XMLHttpRequest,i=this;t.open("POST","?contextKey="+this._contextKey+"&done=1&guid="+n._id,!0);t.onreadystatechange=function(){if(t.readyState==4)if(t.status==200)i.raiseUploadComplete(Sys.Serialization.JavaScriptSerializer.deserialize(t.responseText)),i._processor.startUpload();else{i.setFileStatus(n,"error",Sys.Extended.UI.Resources.AjaxFileUpload_error);i.raiseUploadError(t);throw"error raising upload complete event and start new upload";}};t.send(null)},cancelUpload:function(){var i=this.getCurrentFileItem(),n,t;for(i._isUploaded=!1,i._isUploading=!1,this.setStatusMessage(Sys.Extended.UI.Resources.AjaxFileUpload_UploadCanceled),n=0;n<this._filesInQueue.length;n++)t=this._filesInQueue[n],t._isUploaded||this.setFileStatus(t,"cancelled",Sys.Extended.UI.Resources.AjaxFileUpload_Canceled)},setAsUploading:function(n){n._isUploading=!0;n._isUploaded=!1;this._currentQueueIndex=Array.indexOf(this._filesInQueue,n)+1;this.setFileStatus(n,"uploading",Sys.Extended.UI.Resources.AjaxFileUpload_Uploading);this.setStatusMessage("Uploading "+this._currentQueueIndex+" of "+this._filesInQueue.length+" file(s)")},setFileStatus:function(n,t,i){typeof n=="string"&&(n=this.getFileItem(n));n&&n.setStatus(t,i)},setStatusMessage:function(n){this._elements.fileStatusContainer.innerHTML=n},setPercent:function(n){var t=this._elements.progressBar;n<=0?n="0":n>=100&&(n="100");t.style.width=n+"%";$common.setText(t,String.format(Sys.Extended.UI.Resources.AjaxFileUpload_UploadedPercentage,n))},get_allowedFileTypes:function(){return this._allowedFileTypes},set_allowedFileTypes:function(n){this._allowedFileTypes=n},get_contextKey:function(){return this._contextKey},set_contextKey:function(n){this._contextKey=n},get_postBackUrl:function(){return this._postBackUrl},set_postBackUrl:function(n){this._postBackUrl=n},get_mode:function(){return this._mode},set_mode:function(n){this._mode=n},get_serverPollingSupport:function(){return this._serverPollingSupport},set_serverPollingSupport:function(n){this._serverPollingSupport=n},get_throbber:function(){return this._throbber},set_throbber:function(n){this._throbber=n},get_maximumNumberOfFiles:function(){return this._maximumNumberOfFiles},set_maximumNumberOfFiles:function(n){this._maximumNumberOfFiles=n},get_chunkSize:function(){return this._chunkSize},set_chunkSize:function(n){this._chunkSize=n},get_storeToAzure:function(){return this._storeToAzure},set_storeToAzure:function(n){this._storeToAzure=n},get_azureContainerName:function(){return this._azureContainerName},set_azureContainerName:function(n){this._azureContainerName=n},add_uploadStart:function(n){this.get_events().addHandler("uploadStart",n)},remove_uploadStart:function(n){this.get_events().removeHandler("uploadStart",n)},add_uploadComplete:function(n){this.get_events().addHandler("uploadComplete",n)},remove_uploadComplete:function(n){this.get_events().removeHandler("uploadComplete",n)},add_uploadCompleteAll:function(n){this.get_events().addHandler("uploadCompleteAll",n)},remove_uploadCompleteAll:function(n){this.get_events().removeHandler("uploadCompleteAll",n)},raiseUploadStart:function(n){var t=this.get_events().getHandler("uploadStart"),i;t&&(i=new Sys.Extended.UI.AjaxFileUploadStartEventArgs(n.FilesInQueue,n.ServerArguments),t(this,i))},raiseUploadComplete:function(n){var t=this.getCurrentFileItem(),i,r,u;if(!t||!n||n.FileId!==t._id)throw"Invalid finalizing upload server response.";this.setFileStatus(t,"uploaded",Sys.Extended.UI.Resources.AjaxFileUpload_Uploaded);this.setStatusMessage("Uploaded "+this._currentQueueIndex+" of "+this._filesInQueue.length+" file(s)");t._isUploaded=!0;t._isUploading=!1;t.hide();i=this.get_events().getHandler("uploadComplete");i&&(r=Array.indexOf(this._filesInQueue,t),u=new Sys.Extended.UI.AjaxFileUploadEventArgs(n.FileId,"Success",n.FileName,n.FileSize,n.ContentType,n.PostedUrl,r,this._filesInQueue.length),i(this,u))},raiseUploadCompleteAll:function(n){var t=this.get_events().getHandler("uploadCompleteAll"),i;t&&(i=new Sys.Extended.UI.AjaxFileUploadCompleteAllEventArgs(n.FilesInQueue,n.FilesUploaded,n.Reason,n.ServerArguments),t(this,i))},add_uploadError:function(n){this.get_events().addHandler("uploadError",n)},remove_uploadError:function(n){this.get_events().removeHandler("uploadError",n)},raiseUploadError:function(n){var t=this.get_events().getHandler("uploadError");t&&t(this,n);this._canceled=!1;this._isUploading=!1;this.enableControls(!0)},getCurrentFileItem:function(){return this.getFileItem(this._currentFileId)},getNextFile:function(){var n,t;if(!this._isUploading)return null;for(n=0;n<this._filesInQueue.length;n++)if(t=this._filesInQueue[n],!t._isUploaded)return t;return null},getFileItem:function(n){for(var t,i=0;i<this._filesInQueue.length;i++)if(t=this._filesInQueue[i],t._id===n)return t;return null}};Sys.Extended.UI.AjaxFileUpload.Control.registerClass("Sys.Extended.UI.AjaxFileUpload.Control",Sys.Extended.UI.ControlBase);Type.registerNamespace("Sys.Extended.UI.AjaxFileUpload");Type.registerNamespace("AjaxFileUpload");Sys.Extended.UI.AjaxFileUpload.Utils=function(){this.generateGuid=function(){for(var i,t="",n=0;n<32;n++)(n==8||n==12||n==16||n==20)&&(t=t+"-"),i=Math.floor(Math.random()*16).toString(16).toUpperCase(),t=t+i;return t};this.getFileName=function(n){var i="",r,t;if(!n)return"";if(!n.value&&n.name)i=n.name;else{if(!n.value&&typeof n!="string")throw"Invalid parameter. fullPath parameter must be a string of full path or file element.";n.value&&(n=n.value);n&&(r=n.indexOf("\\")>=0?n.lastIndexOf("\\"):n.lastIndexOf("/"),t=n.substring(r),(t.indexOf("\\")===0||t.indexOf("/")===0)&&(t=t.substring(1)),i=t)}return encodeURIComponent(i)};this.getFileType=function(n){if(!n)throw"file must defined or not null";if(!n.value&&n.name)return n.name.substring(n.name.lastIndexOf(".")+1);if(n.value&&(n=n.value),typeof n!="string")throw"can't resolve file type.";return n.substring(n.lastIndexOf(".")+1)};this.sizeToString=function(n){if(!n||n<=0)return"0 Kb";var t=Math.floor(Math.log(n)/Math.log(1024));return(n/Math.pow(1024,Math.floor(t))).toFixed(2)+" "+["bytes","kb","MB","GB","TB","PB"][t]};this.checkHtml5BrowserSupport=function(){var n=Sys.Browser;return n.name=="Microsoft Internet Explorer"&&n.version<=10?!1:window.File&&window.FileReader&&window.FileList&&window.Blob&&(new XMLHttpRequest).upload}};Type.registerNamespace("Sys.Extended.UI.AjaxFileUpload");Type.registerNamespace("AjaxFileUpload");Sys.Extended.UI.AjaxFileUpload.Processor=function(n,t){var r=new Sys.Extended.UI.AjaxFileUpload.Utils,i=new XMLHttpRequest;this._iframe=null;this._iframeName=n.get_id()+"_uploadIframe";this._form=null;this.initialize=function(){this.attachEvents();this.createIFrame();this.createForm()};this.attachEvents=function(){this.onFileSelected$delegate=Function.createDelegate(this,this.onFileSelectedHandler);this.attachFileInputEvents(t.inputFile,!0);var r=this;i.onreadystatechange=function(){if(i.readyState==4&&i.status==200){var t=i.responseText;t&&(t=parseFloat(t).toFixed(2),n.setPercent(t));t<100&&setTimeout(function(){r.pollingServerProgress(!0)},500)}}};this.attachFileInputEvents=function(n,t){t?$addHandlers(n,{change:this.onFileSelected$delegate}):$common.removeHandlers(n,{change:this.onFileSelected$delegate})};this.onFileSelectedHandler=function(){var i={id:r.generateGuid(),value:t.inputFile,type:r.getFileType(t.inputFile.value)};n.fileTypeIsValid(i.type)?(n.addFileToQueue(i),this.createInputFileElement()):n.confirmFileIsInvalid(i)};this.createInputFileElement=function(){var i=t.inputFile,f,u;i.style.zIndex=-999;$common.setLocation(i,{x:-99999,y:-99999});this.attachFileInputEvents(i,!1);f=n.get_id()+"_file_"+r.generateGuid();u=$common.createElementFromTemplate({nodeName:"input",properties:{id:f,name:"act-file-data",type:"file",style:{zIndex:0,cursor:"pointer",position:"absolute"}}},i.parentNode);$common.setElementOpacity(u,0);this.attachFileInputEvents(u,!0);t.inputFile=u};this.startUpload=function(){var t=this._form,i=n.getNextFile(),r;if(!i){n._currentFileId=null;this.setThrobber(!1);n.done();return}for(n.setAsUploading(i),r=i.get_inputElementValue(),n._currentFileId=i._id,this.setThrobber(!0);t.firstChild;)t.removeChild(t.firstChild);r.name="act-file-data";t.appendChild(r);t.setAttribute("action",n._uploadUrl+"?contextKey="+n._contextKey+"&fileId="+n._currentFileId+"&fileName="+i._fileName+"&usePoll="+(n.get_serverPollingSupport()?"true":"false")+"&storeToAzure="+n.get_storeToAzure()+"&acn="+n.get_azureContainerName());t.submit()};this.cancelUpload=function(){var t=new XMLHttpRequest,r=this;i&&i.abort();t.open("POST","?contextKey="+n._contextKey+"&cancel=1&guid="+n._currentFileId,!0);t.onreadystatechange=function(){if(r.setThrobber(!1),t.readyState==4)if(t.status==200)n.cancelUpload();else{r.raiseUploadError(t);throw"Failed to cancel upload.";}};t.send(null)};this.createIFrame=function(){var t=this._iframeName,n=document.createElement("IFRAME");n.width="0";n.height="0";n.style.display="none";n.src="about:blank";n.id=t;n.name=t;n.security="restricted";document.body.appendChild(n);n.contentWindow.name=t;$addHandlers(n,{load:Function.createDelegate(this,this.onIFrameLoadedHandler)});this._iframe=n};this.onIFrameLoadedHandler=function(t){if(n._currentFileId)try{var i=this._iframe,r=null;if(i.contentDocument?r=i.contentDocument:i.contentWindow?r=i.contentWindow.document:i.document&&(r=i.document),r==null)throw"Document not initialized";n.doneAndUploadNextFile(n.getCurrentFileItem())}catch(t){if(!n._canceled||!(t.message&&(t.message.indexOf("Access is denied")>-1||t.message.indexOf("Permission denied")>-1))){this.raiseUploadError(t);throw t;}}};this.setThrobber=function(i){if(n.get_serverPollingSupport()){n.setPercent(0);$common.setVisible(t.progressBar,i?!0:!1);$common.setVisible(t.progressBarContainer,i?!0:!1);this.pollingServerProgress(i);return}n.get_throbber()!=null&&(n.get_throbber().style.display=i?"":"none")};this.pollingServerProgress=function(t){t&&n._currentFileId&&(i.open("GET","?contextKey="+n._contextKey+"&poll=1&guid="+n._currentFileId,!0),i.send(null))};this.createForm=function(){var t,i="___postForm"+n.get_id();try{t=document.createElement('<form method="post" enctype="multipart/form-data" id="'+i+'" target="'+this._iframeName+'">')}catch(r){t=document.createElement("form");t.setAttribute("id",i);t.setAttribute("method","post");t.setAttribute("target",this._iframe.id);t.setAttribute("enctype","multipart/form-data")}t.style.visibility="hidden";t.style.display="none";document.body.appendChild(t);this._form=t};this.raiseUploadError=function(t){n.raiseUploadError(t);n.setFileStatus(n._currentFileId,"error",Sys.Extended.UI.Resources.AjaxFileUpload_error);i&&i.abort();n._currentFileId=null}};Type.registerNamespace("Sys.Extended.UI.AjaxFileUpload");Type.registerNamespace("AjaxFileUpload");Sys.Extended.UI.AjaxFileUpload.ProcessorHtml5=function(n,t){var u=new Sys.Extended.UI.AjaxFileUpload.Utils,i=n.get_chunkSize()*1e3,r=0,f=null;this.initialize=function(){$common.setVisible(t.dropZone,!0);t.dropZone.innerHTML=Sys.Extended.UI.Resources.AjaxFileUpload_DropFiles;this.attachEvents()};this.attachEvents=function(){this.onFileDropped$delegate=Function.createDelegate(this,this.onFileDroppedHandler);this.onFileDragOver$delegate=Function.createDelegate(this,this.onFileDragOverHandler);this.onFileSelected$delegate=Function.createDelegate(this,this.onFileSelectedHandler);t.inputFile.addEventListener("change",this.onFileSelected$delegate,!1);t.dropZone.addEventListener("drop",this.onFileDropped$delegate,!1);t.dropZone.addEventListener("dragover",this.onFileDragOver$delegate,!1)};this.onFileDroppedHandler=function(n){n.stopPropagation();n.preventDefault();this.addFilesToQueue(n.dataTransfer.files)};this.onFileDragOverHandler=function(n){n.stopPropagation();n.preventDefault()};this.onFileSelectedHandler=function(n){this.addFilesToQueue(n.target.files)};this.addFilesToQueue=function(r){for(var o,s,e,f=0;f<r.length;f++)if(o=r[f],s=0,o.size>i&&(s=Math.ceil(o.size/i)),e={id:u.generateGuid(),value:r[f],type:u.getFileType(r[f]),uploaded:!1,slices:s},n.fileTypeIsValid(e.type)){if(!n.addFileToQueue(e))break}else n.confirmFileIsInvalid(e);t.inputFile.value=null};this.cancelUpload=function(){f&&f.abort();n.cancelUpload()};this.startUpload=function(){var i=n.getNextFile();i?(i._sliceIndex===0&&n.setPercent(0),$common.setVisible(t.progressBarContainer,!0),this.upload(i)):(n._currentFileId=null,n.setPercent(0),$common.setVisible(t.progressBarContainer,!1),n.done())};this.upload=function(r){var o,s;if(n._isUploading){$common.setVisible(t.progressBar,!0);n.setAsUploading(r);var f=r.get_inputElementValue(),a=r._fileName,h=r._slices&&r._slices>0,v=r._sliceIndex==0;h&&(o=r._sliceIndex*i,s=o+i,f=f.slice(o,s>f.size?f.size:s));var c=new FormData,l=n._currentFileId=r._id,u=new XMLHttpRequest,y=this,e=function(n){return function(t){n.call(y,l,t)}};u.upload.addEventListener("progress",e(this.onProgressHandler),!1);u.addEventListener("load",e(this.onUploadCompleteHandler),!1);u.addEventListener("error",e(this.onUploadFailedHandler),!1);u.addEventListener("abort",e(this.onUploadCanceledHandler),!1);u.open("POST",n._uploadUrl+"?contextKey="+n._contextKey+"&fileId="+l+"&fileName="+a+"&chunked="+(h?"true":"false")+"&firstChunk="+v+"&storeToAzure="+n.get_storeToAzure()+"&acn="+n.get_azureContainerName(),!0);c.append("act-file-data",f);u.send(c)}};this.onProgressHandler=function(t,i){if(n._isUploading&&i.lengthComputable){r=i.loaded;var u=n.getFileItem(t),f=u._slices,e=u._bytesUploaded+r,o=f-u._sliceIndex==1?e:i.total*f,s=f==0?(i.loaded*100/i.total).toFixed(2):(e/o*100).toFixed(2);n.setPercent(s)}};this.onUploadCompleteHandler=function(t){var e=this,i=n.getFileItem(t),f=i.get_inputElementValue();i._slices&&i._slices>0&&i._sliceIndex+1<i._slices?(i._sliceIndex++,i._bytesUploaded+=r,r=0,e.startUpload()):(i.hide(),i.setStatus("uploaded",Sys.Extended.UI.Resources.AjaxFileUpload_Uploaded),n.setStatusMessage(String.format(Sys.Extended.UI.Resources.AjaxFileUpload_UploadingHtml5File,f.name,u.sizeToString(f.size))),n.doneAndUploadNextFile(i))};this.onUploadFailedHandler=function(t,i){var r=n.getFileItem(t);r._isUploading=!1;n.setFileStatus(t,"error",Sys.Extended.UI.Resources.AjaxFileUpload_error);n.raiseUploadError(i)};this.onUploadCanceledHandler=function(t){var i=n.getFileItem(t);i._isUploading=!1;n.setFileStatus(i,"canceled",Sys.Extended.UI.Resources.AjaxFileUpload_Canceled)}};Sys.Extended.UI.AjaxFileUploadStartEventArgs=function(n,t){if(arguments.length!=2)throw Error.parameterCount();Sys.Extended.UI.AjaxFileUploadStartEventArgs.initializeBase(this);this._filesInQueue=n;this._serverArguments=t};Sys.Extended.UI.AjaxFileUploadStartEventArgs.prototype={get_filesInQueue:function(){return this._filesInQueue},get_serverArguments:function(){return this._serverArguments}};Sys.Extended.UI.AjaxFileUploadStartEventArgs.registerClass("Sys.Extended.UI.AjaxFileUploadStartEventArgs",Sys.EventArgs);Sys.Extended.UI.AjaxFileUploadEventArgs=function(n,t,i,r,u,f,e,o){if(arguments.length!=8)throw Error.parameterCount();Sys.Extended.UI.AjaxFileUploadEventArgs.initializeBase(this);this._fileId=n;this._statusMessage=t;this._fileName=i;this._fileSize=r;this._contentType=u;this._postedUrl=f;this._fileIndex=e;this._fileQueueLength=o};Sys.Extended.UI.AjaxFileUploadEventArgs.prototype={get_fileId:function(){return this._fileId},get_fileName:function(){return this._fileName},get_statusMessage:function(){return this._statusMessage},get_fileSize:function(){return this._fileSize},get_contentType:function(){return this._contentType},get_postedUrl:function(){return this._postedUrl},set_postedUrl:function(){return this._postedUrl=value},get_fileIndex:function(){return this._fileIndex},get_fileQueueLength:function(){return this._fileQueueLength}};Sys.Extended.UI.AjaxFileUploadEventArgs.registerClass("Sys.Extended.UI.AjaxFileUploadEventArgs",Sys.EventArgs),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.HorizontalSide=function(){throw Error.invalidOperation();};Sys.Extended.UI.HorizontalSide.prototype={Left:0,Center:1,Right:2};Sys.Extended.UI.HorizontalSide.registerEnum("Sys.Extended.UI.HorizontalSide",!1);Sys.Extended.UI.VerticalSide=function(){throw Error.invalidOperation();};Sys.Extended.UI.VerticalSide.prototype={Top:0,Middle:1,Bottom:2};Sys.Extended.UI.VerticalSide.registerEnum("Sys.Extended.UI.VerticalSide",!1);Sys.Extended.UI.AlwaysVisibleControlBehavior=function(n){Sys.Extended.UI.AlwaysVisibleControlBehavior.initializeBase(this,[n]);this._horizontalOffset=0;this._horizontalSide=Sys.Extended.UI.HorizontalSide.Left;this._verticalOffset=0;this._verticalSide=Sys.Extended.UI.VerticalSide.Top;this._scrollEffectDuration=.1;this._repositionHandler=null;this._animate=!1;this._animation=null};Sys.Extended.UI.AlwaysVisibleControlBehavior.prototype={initialize:function(){Sys.Extended.UI.AlwaysVisibleControlBehavior.callBaseMethod(this,"initialize");var n=this.get_element();if(!n)throw Error.invalidOperation(Sys.Extended.UI.Resources.AlwaysVisible_ElementRequired);this._repositionHandler=Function.createDelegate(this,this._reposition);Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7&&(this._animate=!0);this._animate?(this._animation=new Sys.Extended.UI.Animation.MoveAnimation(n,this._scrollEffectDuration,25,0,0,!1,"px"),n.style.position="absolute"):n.style.position="fixed";$addHandler(window,"resize",this._repositionHandler);this._animate&&$addHandler(window,"scroll",this._repositionHandler);this._reposition()},dispose:function(){this._repositionHandler&&(this._animate&&$removeHandler(window,"scroll",this._repositionHandler),$removeHandler(window,"resize",this._repositionHandler),this._repositionHandler=null);this._animation&&(this._animation.dispose(),this._animation=null);Sys.Extended.UI.AlwaysVisibleControlBehavior.callBaseMethod(this,"dispose")},_reposition:function(){var i=this.get_element(),n,t;if(i){this.raiseRepositioning(Sys.EventArgs.Empty);n=0;t=0;this._animate&&(document.documentElement&&document.documentElement.scrollTop?(n=document.documentElement.scrollLeft,t=document.documentElement.scrollTop):(n=document.body.scrollLeft,t=document.body.scrollTop));var r=$common.getClientBounds(),u=r.width,f=r.height;switch(this._horizontalSide){case Sys.Extended.UI.HorizontalSide.Center:n=Math.max(0,Math.floor(n+u/2-i.offsetWidth/2-this._horizontalOffset));break;case Sys.Extended.UI.HorizontalSide.Right:n=Math.max(0,n+u-i.offsetWidth-this._horizontalOffset);break;case Sys.Extended.UI.HorizontalSide.Left:default:n+=this._horizontalOffset}switch(this._verticalSide){case Sys.Extended.UI.VerticalSide.Middle:t=Math.max(0,Math.floor(t+f/2-i.offsetHeight/2-this._verticalOffset));break;case Sys.Extended.UI.VerticalSide.Bottom:t=Math.max(0,t+f-i.offsetHeight-this._verticalOffset);break;case Sys.Extended.UI.VerticalSide.Top:default:t+=this._verticalOffset}this._animate&&this._animation?(this._animation.stop(),this._animation.set_horizontal(n),this._animation.set_vertical(t),this._animation.play()):(i.style.left=n+"px",i.style.top=t+"px");this.raiseRepositioned(Sys.EventArgs.Empty)}},get_HorizontalOffset:function(){return this._horizontalOffset},set_HorizontalOffset:function(n){this._horizontalOffset!=n&&(this._horizontalOffset=n,this._reposition(),this.raisePropertyChanged("HorizontalOffset"))},get_HorizontalSide:function(){return this._horizontalSide},set_HorizontalSide:function(n){this._horizontalSide!=n&&(this._horizontalSide=n,this._reposition(),this.raisePropertyChanged("HorizontalSide"))},get_VerticalOffset:function(){return this._verticalOffset},set_VerticalOffset:function(n){this._verticalOffset!=n&&(this._verticalOffset=n,this._reposition(),this.raisePropertyChanged("VerticalOffset"))},get_VerticalSide:function(){return this._verticalSide},set_VerticalSide:function(n){this._verticalSide!=n&&(this._verticalSide=n,this._reposition(),this.raisePropertyChanged("VerticalSide"))},get_ScrollEffectDuration:function(){return this._scrollEffectDuration},set_ScrollEffectDuration:function(n){this._scrollEffectDuration!=n&&(this._scrollEffectDuration=n,this._animation&&this._animation.set_duration(n),this.raisePropertyChanged("ScrollEffectDuration"))},get_useAnimation:function(){return this._animate},set_useAnimation:function(n){n|=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7;this._animate!=n&&(this._animate=n,this.raisePropertyChanged("useAnimation"))},add_repositioning:function(n){this.get_events().addHandler("repositioning",n)},remove_repositioning:function(n){this.get_events().removeHandler("repositioning",n)},raiseRepositioning:function(n){var t=this.get_events().getHandler("repositioning");t&&t(this,n)},add_repositioned:function(n){this.get_events().addHandler("repositioned",n)},remove_repositioned:function(n){this.get_events().removeHandler("repositioned",n)},raiseRepositioned:function(n){var t=this.get_events().getHandler("repositioned");t&&t(this,n)}};Sys.Extended.UI.AlwaysVisibleControlBehavior.registerClass("Sys.Extended.UI.AlwaysVisibleControlBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.AlwaysVisibleControlBehavior,{name:"alwaysVisible"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedAlwaysVisible",["ExtendedAnimations","ExtendedBase"],n):n()}(),function(){function n(){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.OnClick),$addHandler(n,"click",this._onClickHandler),this._onMouseOverHandler=Function.createDelegate(this,this.OnMouseOver),$addHandler(n,"mouseover",this._onMouseOverHandler),this._onMouseOutHandler=Function.createDelegate(this,this.OnMouseOut),$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},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()},get_OnLoadBehavior:function(){return this._onLoad},get_OnClick:function(){return this._onClick?this._onClick.get_json():null},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},OnClick:function(){this._onClick&&this._onClick.play()},get_OnMouseOver:function(){return this._onMouseOver?this._onMouseOver.get_json():null},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")},get_OnMouseOverBehavior:function(){return this._onMouseOver},OnMouseOver: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},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")},get_OnMouseOutBehavior:function(){return this._onMouseOut},OnMouseOut: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(r){return!1}return n==t},get_OnHoverOver:function(){return this._onHoverOver?this._onHoverOver.get_json():null},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")},get_OnHoverOverBehavior:function(){return this._onHoverOver},get_OnHoverOut:function(){return this._onHoverOut?this._onHoverOut.get_json():null},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")},get_OnHoverOutBehavior:function(){return this._onHoverOut}};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)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedAnimationBehavior",["ExtendedAnimations","ExtendedBase"],n):n()}();Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.AreaChart=function(n){Sys.Extended.UI.AreaChart.initializeBase(this,[n]);var t=this.get_id();t=t.replace("_ctl00","");this._parentDiv=document.getElementById(t+"__ParentDiv");this._chartWidth="300";this._chartHeight="300";this._chartTitle="";this._categoriesAxis="";this._series=null;this._chartType=Sys.Extended.UI.AreaChartType.Basic;this._theme="AreaChart";this._valueAxisLines=9;this._chartTitleColor="";this._valueAxisLineColor="";this._categoryAxisLineColor="";this._baseLineColor="";this.yMax=0;this.yMin=0;this.roundedTickRange=0;this.startX=0;this.startY=0;this.endX=0;this.endY=0;this.xInterval=0;this.yInterval=0;this.arrXAxis;this.arrXAxisLength=0;this.charLength=3.5;this.arrCombinedData=null};Sys.Extended.UI.AreaChart.prototype={initialize:function(){if(Sys.Extended.UI.AreaChart.callBaseMethod(this,"initialize"),!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"))throw"Current version of browser does not support SVG.";this._valueAxisLines==0&&(this._valueAxisLines=9);this.generateAreaChart()},dispose:function(){Sys.Extended.UI.AreaChart.callBaseMethod(this,"dispose")},generateAreaChart:function(){this.arrXAxis=this._categoriesAxis.split(",");this.arrXAxisLength=this.arrXAxis.length;this.calculateMinMaxValues();this.calculateInterval();this.calculateValueAxis();var n=this.initializeSVG();n=n+String.format('<text x="{0}" y="{1}" id="ChartTitle" style="fill:{3}">{2}<\/text>',parseInt(this._chartWidth)/2-this._chartTitle.length*this.charLength,parseInt(this._chartHeight)/20,this._chartTitle,this._chartTitleColor);n=n+this.drawBackgroundHorizontalLines();n=n+this.drawBackgroundVerticalLines();n=n+this.drawBaseLines();n=n+this.drawLegendArea();n=n+this.drawAxisValues();this._parentDiv.innerHTML=n;this.drawAreas()},calculateInterval:function(){this.startX=this._chartWidth/10+.5;this.endX=parseInt(this._chartWidth)-4.5;this.startY=this.yMin>=0?Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)*24/100)+.5:Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)*12/100)/2+.5;this.yInterval=this.startY/(this._valueAxisLines+1)},calculateMinMaxValues:function(){var u,i,r,t,n;if(this._chartType==Sys.Extended.UI.AreaChartType.Basic)for(n=0;n<this._series.length;n++)r=this._series[n].Data,u=Math.max.apply(null,r),i=Math.min.apply(null,r),n==0?(this.yMax=u,this.yMin=i):(u>this.yMax&&(this.yMax=u),i<this.yMin&&(this.yMin=i));else{for(n=0;n<this._series.length;n++){for(r=[],t=0;t<this._series[n].Data.length;t++)r[t]=this._series[n].Data[t];if(this.arrCombinedData==null)this.arrCombinedData=r;else for(t=0;t<r.length;t++)this.arrCombinedData[t]=parseFloat(this.arrCombinedData[t])+parseFloat(r[t])}for(n=0;n<this._series.length;n++)i=Math.min.apply(null,this._series[n].Data),n==0?this.yMin=i:i<this.yMin&&(this.yMin=i);this.yMax=Math.max.apply(null,this.arrCombinedData)}this.yMin<0&&(this._valueAxisLines=Math.round(this._valueAxisLines/2))},calculateValueAxis:function(){var i,n,r,t;i=this.yMin>=0?this.yMax:this.yMax>Math.abs(this.yMin)?this.yMax:Math.abs(this.yMin);n=i/(this._valueAxisLines-1);n<1?this.roundedTickRange=n.toFixed(1):(r=Math.ceil(Math.log(n)/Math.log(10)-1),t=Math.pow(10,r),this.roundedTickRange=Math.ceil(n/t)*t);this.startX=this.startX+(this.roundedTickRange*10*this._valueAxisLines/10).toString().length*this.charLength},drawBackgroundHorizontalLines:function(){for(var t="",n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY-this.yInterval*n,this._categoryAxisLineColor);if(this.yMin<0)for(n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY+this.yInterval*n,this._categoryAxisLineColor);return t},drawBackgroundVerticalLines:function(){var t="",n;for(this.xInterval=Math.round((parseInt(this._chartWidth)-this.startX)/this.arrXAxisLength),n=0;n<this.arrXAxisLength;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*n,this.startY-this.yInterval*this._valueAxisLines,this.startY,this._valueAxisLineColor);if(this.yMin<0)for(n=0;n<this.arrXAxisLength;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*n,this.startY+this.yInterval*this._valueAxisLines,this.startY,this._valueAxisLineColor);return t},drawBaseLines:function(){var n="",t;for(n=n+String.format('<path d="M{0} {1} {2} {1}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.endX,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY-this.yInterval*this._valueAxisLines,this.startY,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.startY+4,this._baseLineColor),t=0;t<this.arrXAxisLength;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);for(t=0;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY-this.yInterval*t,this._baseLineColor);if(this.yMin<0)for(n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY+this.yInterval*this._valueAxisLines,this.startY,this._baseLineColor),t=1;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY+this.yInterval*t,this._baseLineColor);return n},drawLegendArea:function(){for(var t="",o=parseInt(this._chartHeight)*82/100+5,i=7.5,u=5,c=0,r,l,n=0;n<this._series.length;n++)c=c+this._series[n].Name.length;r=Math.round(c*5/2)+Math.round((i+u*2)*this._series.length);l=!1;r>parseInt(this._chartWidth)/2&&(r=r/2,l=!0);t=t+"<g>";t=t+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="LegendArea" stroke=""><\/path>',parseInt(this._chartWidth)/2-r/2,o,Math.round(parseInt(this._chartWidth)/2+c*5)+Math.round((i+u*2)*this._series.length),Math.round(parseInt(this._chartHeight)*97.5/100));var e=parseInt(this._chartWidth)*40/100-r/2+i+u,s=e,f=parseInt(this._chartWidth)*40/100-r/2,h=f;for(n=0;n<this._series.length;n++)l&&n==Math.round(this._series.length/2)&&(e=parseInt(this._chartWidth)*40/100-r/2+i+u,s=e,f=parseInt(this._chartWidth)*40/100-r/2,h=f,o=parseInt(this._chartHeight)*89/100+5,l=!1),f=h,e=s,t=t+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="Legend{4}" style="fill:{5}"><\/path>',f,o+7.5,f+i,o+15,n+1,this._series[n].AreaColor),t=t+String.format('<text x="{0}" y="{1}" id="LegendText">{2}<\/text>',e,o+15,this._series[n].Name),this._series[n].Name.length>10?(h=f+this._series[n].Name.length*5+i+u*2,s=e+this._series[n].Name.length*5+i+u*2):(h=h+this._series[n].Name.length*6+i+u*2,s=s+this._series[n].Name.length*6+i+u*2);return t+"<\/g>"},drawAxisValues:function(){for(var t="",i=0,n=0;n<this.arrXAxisLength;n++)i=(this.arrXAxis[n].toString().length*10*n/10).toString().length*5.5,t=t+String.format('<text id="SeriesAxis" x="{0}" y="{1}" fill-opacity="1">{2}<\/text>',Math.round(this.startX+this.xInterval*10*n/10+this.xInterval/2-i),this.startY+Math.round(this.yInterval*65/100),this.arrXAxis[n]);for(n=0;n<=this._valueAxisLines;n++)i=(this.roundedTickRange*10*n/10).toString().length*5.5,t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">{2}<\/text>',this.startX-i-15,this.startY-this.yInterval*10*n/10+3.5,this.roundedTickRange*10*n/10);if(this.yMin<0)for(n=1;n<=this._valueAxisLines;n++)i=(this.roundedTickRange*10*n/10).toString().length*5.5,t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">-{2}<\/text>',this.startX-i-19,this.startY+this.yInterval*10*n/10,this.roundedTickRange*10*n/10);return t},initializeSVG:function(){var n=String.format('<?xml-stylesheet type="text/css" href="{0}.css"?>',this._theme);return n=n+String.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="{0}" height="{1}" style="position: relative; display: block;">',this._chartWidth,this._chartHeight),n=n+"<defs>",n=n+'<linearGradient gradientTransform="rotate(0)">',n=n+'<stop offset="0%" id="LinearGradient1"><\/stop>',n=n+'<stop offset="25%" id="LinearGradient2"><\/stop>',n=n+'<stop offset="100%" id="LinearGradient3"><\/stop><\/linearGradient>',n=n+"<\/defs>",n=n+String.format('<path fill="none" stroke-opacity="1" fill-opacity="1" stroke-linejoin="round" stroke-linecap="square" d="M5 {0} {1} {0} {1} {2} 5 {2} z"><\/path>',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10),n=n+String.format('<path id="ChartBackGround" stroke="" d="M0 0 {0} 0 {0} {1} 0 {1} z"><\/path>',this._chartWidth,this._chartHeight),n+String.format('<path fill="#ffffff" stroke-opacity="1" fill-opacity="0" stroke-linejoin="round" stroke-linecap="square" stroke="" d="M5 {0} {1} {0} {1} {2} 5 {2} z"><\/path>',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10)},drawAreas:function(){for(var r="",t=[],e=[],o=[],u=[],n,f,s,i=0;i<this.arrXAxisLength;i++)for(n=0;n<this._series.length;n++){if(t[n]=0,this._chartType==Sys.Extended.UI.AreaChartType.Stacked)for(f=0;f<=n;f++)t[n]=parseFloat(t[n])+parseFloat(this._series[f].Data[i]);else t[n]=parseFloat(this._series[n].Data[i]);u[n]=i==0?String.format("{0} {1} {0} {2} ",this.startX+this.xInterval/2,this.startY,this.startY-Math.round(t[n]*(this.yInterval/this.roundedTickRange))):i==this.arrXAxisLength-1?u[n]+String.format("{0} {1} {2} {3} {2} {4} ",e[n],o[n],this.startX+this.xInterval*i+this.xInterval/2,this.startY-Math.round(t[n]*(this.yInterval/this.roundedTickRange)),this.startY):u[n]+String.format("{0} {1} ",this.startX+this.xInterval*i+this.xInterval/2,this.startY-Math.round(t[n]*(this.yInterval/this.roundedTickRange)));r=t[n]>0?r+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*i+this.xInterval/2-t[n].toString().length*this.charLength,this.startY-Math.round(t[n]*(this.yInterval/this.roundedTickRange))-7.5,t[n]):r+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*i+this.xInterval/2-t[n].toString().length*this.charLength,this.startY-Math.round(t[n]*(this.yInterval/this.roundedTickRange))+7.5,t[n]);e[n]=this.startX+this.xInterval*i+this.xInterval/2;o[n]=this.startY-Math.round(t[n]*(this.yInterval/this.roundedTickRange))}this._parentDiv.innerHTML=this._parentDiv.innerHTML+r;s=this._parentDiv.innerHTML;this.drawArea(this,u,0)},drawArea:function(n,t,i){n._parentDiv.innerHTML=n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<g><path id="AreaPath{1}" d="M{0} z" style="fill:{2};stroke:{2}"><\/path><\/g><\/svg>',t[i],i+1,n._series[i].AreaColor);i++;i<n._series.length&&setTimeout(function(){n.drawArea(n,t,i)},400)},get_chartWidth:function(){return this._chartWidth},set_chartWidth:function(n){this._chartWidth=n},get_chartHeight:function(){return this._chartHeight},set_chartHeight:function(n){this._chartHeight=n},get_chartTitle:function(){return this._chartTitle},set_chartTitle:function(n){this._chartTitle=n},get_categoriesAxis:function(){return this._categoriesAxis},set_categoriesAxis:function(n){this._categoriesAxis=n},get_ClientSeries:function(){return this._series},set_ClientSeries:function(n){this._series=n},get_chartType:function(){return this._chartType},set_chartType:function(n){this._chartType=n},get_theme:function(){return this._theme},set_theme:function(n){this._theme=n},get_valueAxisLines:function(){return this._valueAxisLines},set_valueAxisLines:function(n){this._valueAxisLines=n},get_chartTitleColor:function(){return this._chartTitleColor},set_chartTitleColor:function(n){this._chartTitleColor=n},get_valueAxisLineColor:function(){return this._valueAxisLineColor},set_valueAxisLineColor:function(n){this._valueAxisLineColor=n},get_categoryAxisLineColor:function(){return this._categoryAxisLineColor},set_categoryAxisLineColor:function(n){this._categoryAxisLineColor=n},get_baseLineColor:function(){return this._baseLineColor},set_baseLineColor:function(n){this._baseLineColor=n}};Sys.Extended.UI.AreaChart.registerClass("Sys.Extended.UI.AreaChart",Sys.Extended.UI.ControlBase);Sys.registerComponent(Sys.Extended.UI.AreaChart,{name:"AreaChart",parameters:[{name:"ClientSeries",type:"AreaChartSeries[]"}]});Sys.Extended.UI.AreaChartType=function(){throw Error.invalidOperation();};Sys.Extended.UI.AreaChartType.prototype={Basic:0,Stacked:1};Sys.Extended.UI.AreaChartType.registerEnum("Sys.Extended.UI.AreaChartType",!1);Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.AsyncFileUpload=function(n){Sys.Extended.UI.AsyncFileUpload.initializeBase(this,[n]);this._hiddenField=null;this._inputFile=null;this._innerTB=null;this._postBackUrl="";this._formName="";this._iframe=null;this._waitTimer=null;this._completeBackColor="";this._uploadingBackColor="";this._errorBackColor="";this._throbber=null;this._onchange$delegate=null;this._onload$delegate=null;this._app_onload$delegate=Function.createDelegate(this,this._app_onload);this._onmouseup$delegate=null};Sys.Extended.UI.AsyncFileUpload.prototype={get_throbber:function(){return this._throbber},set_throbber:function(n){this._throbber=n},get_completeBackColor:function(){return this._completeBackColor},set_completeBackColor:function(n){this._completeBackColor=n},get_errorBackColor:function(){return this._errorBackColor},set_errorBackColor:function(n){this._errorBackColor=n},get_uploadingBackColor:function(){return this._uploadingBackColor},set_uploadingBackColor:function(n){this._uploadingBackColor=n},get_inputFile:function(){return this._inputFile},set_inputFile:function(n){this._inputFile=n},get_hiddenField:function(){return this._hiddenField},set_hiddenField:function(n){this._hiddenField=n},get_innerTB:function(){return this._innerTB},set_innerTB:function(n){this._innerTB=n},get_postBackUrl:function(){return this._postBackUrl},set_postBackUrl:function(n){this._postBackUrl=n},get_formName:function(){return this._formName},set_formName:function(n){this._formName=n},add_uploadStarted:function(n){this.get_events().addHandler("uploadStarted",n)},remove_uploadStarted:function(n){this.get_events().removeHandler("uploadStarted",n)},raiseUploadStarted:function(n){var t=this.get_events().getHandler("uploadStarted");return t?t(this,n):!0},add_uploadComplete:function(n){this.get_events().addHandler("uploadComplete",n)},remove_uploadComplete:function(n){this.get_events().removeHandler("uploadComplete",n)},raiseUploadComplete:function(n){var t=this.get_events().getHandler("uploadComplete");t&&t(this,n)},add_uploadError:function(n){this.get_events().addHandler("uploadError",n)},remove_uploadError:function(n){this.get_events().removeHandler("uploadError",n)},raiseUploadError:function(n){var t=this.get_events().getHandler("uploadError");return t?(t(this,n),!0):!1},setThrobber:function(n){this.get_throbber()!=null&&(this.get_throbber().style.display=n?"":"none")},_onStart:function(n){var t=this.raiseUploadStarted(new Sys.Extended.UI.AsyncFileUploadEventArgs(n,null,null,null));return typeof t=="undefined"&&(t=!0),t},initialize:function(){Sys.Extended.UI.AsyncFileUpload.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate);this._iframeName=this.get_element()+"_iframe";this.setThrobber(!1)},dispose:function(){Sys.Application.remove_load(this._app_onload$delegate);this._onchange$delegate!=null&&($common.removeHandlers(this._inputFile,{change:this._onchange$delegate}),this._onchange$delegate=null);this._onmouseup$delegate!=null&&($common.removeHandlers(this._inputFile,{mouseup:this._onmouseup$delegate}),this._onmouseup$delegate=null);this._removeIframe();Sys.Extended.UI.AsyncFileUpload.callBaseMethod(this,"dispose")},_onmouseup:function(){var n=this._inputFile;return setTimeout(function(){n.blur()},0),!0},_app_onload:function(){if(this.setThrobber(!1),this._inputFile!=null&&(this._onchange$delegate==null&&(this._onchange$delegate=Function.createDelegate(this,this._onchange),$addHandlers(this._inputFile,{change:this._onchange$delegate})),this._innerTB!=null)){this._inputFile.blur();var n=this._inputFile;setTimeout(function(){n.blur()},0);this._innerTB.style.width=this._inputFile.offsetWidth-107+"px";this._inputFile.parentNode.style.width=this._inputFile.offsetWidth+"px";Sys.Browser.agent==Sys.Browser.InternetExplorer&&(this._onmouseup$delegate=Function.createDelegate(this,this._onmouseup),$addHandlers(this._inputFile,{mouseup:this._onmouseup$delegate}))}},_removeIframe:function(){this._removeTimer();this._iframe!=null&&(this._onload$delegate!=null&&($common.removeHandlers(this._iframe,{load:this._onload$delegate}),this._onload$delegate=null),document.body.removeChild(this._iframe),this._iframe=null)},_removeTimer:function(){this._waitTimer!=null&&(window.clearTimeout(this._waitTimer),this._waitTimer=null)},_onError:function(n){var t=Sys.Extended.UI.Resources.AsyncFileUpload_UnhandledException;this.setThrobber(!1);this.get_errorBackColor()!=""&&(this._innerTB!=null?this._innerTB.style.backgroundColor=this.get_errorBackColor():this._inputFile.style.backgroundColor=this.get_errorBackColor());this.raiseUploadError(new Sys.Extended.UI.AsyncFileUploadEventArgs(this._inputFile.value,null,null,n))||alert(t+": "+n)},_onchange:function(){var t=this._inputFile.value,n,i;if(t!=""){this._innerTB!=null&&(this._innerTB.value=t);this._hiddenField!=null&&(this._hiddenField.value=t);try{this._iframe==null?(this._onload$delegate=Function.createDelegate(this,this._onload),n=document.createElement("IFRAME"),n.width="0",n.height="0",n.style.display="none",n.src="about:blank",n.id=this._iframeName,n.name=this._iframeName,$addHandlers(n,{load:this._onload$delegate}),this._iframe=n,document.body.appendChild(this._iframe),n.contentWindow.name=this._iframeName):(this._removeIframe(),i=Sys.Extended.UI.Resources.AsyncFileUpload_InternalErrorMessage,this._onError(i))}catch(r){this._onError(r.message)}}},_stopLoad:function(n){var r=document.getElementById(this._formName),u,i,t;if(this._removeTimer(),this.setThrobber(!1),r.target="_top",r.action=this._postBackUrl,i="",t=n.split("------"),t.length>0){if(t[0]=="error"){this._onError(t[1]);return}u=parseInt(t[0])}t.length>1&&(i=t[1]);this.get_completeBackColor()!=""&&(this._innerTB!=null?this._innerTB.style.backgroundColor=this.get_completeBackColor():this._inputFile.style.backgroundColor=this.get_completeBackColor());this.raiseUploadComplete(new Sys.Extended.UI.AsyncFileUploadEventArgs(this._inputFile.value,u,i,null))},_onload:function(n){var l=!0,f=this,i=document.getElementById(this._formName),t,a,u,e,v,o,r,s,h,y,c,n;try{if(t=this._iframe.contentWindow.document,t==null||t.location==null){n={message:Sys.Extended.UI.Resources.AsyncFileUpload_UploadingProblem};throw n;}else if(t.location.href=="about:blank"){if(this._removeTimer(),this.get_uploadingBackColor()!=""&&(this._innerTB!=null?this._innerTB.style.backgroundColor=this.get_uploadingBackColor():this._inputFile.style.backgroundColor=this.get_uploadingBackColor()),a=this._onStart(this._inputFile.value),a)return u=this._postBackUrl,u+=u.indexOf("?")===-1?"?":"&",i.action=u+"AsyncFileUploadID="+this.get_element().id+"&rnd="+Math.random().toString().replace(/\./g,""),i.target=this._iframeName,l=!1,this.setThrobber(!0),setTimeout(function(){i.submit();f._waitTimer=setTimeout(function(){f._wait()},100)},0),!0}else{if(t.body.innerHTML=="")return!0;if(e=t.getElementById(this.get_element().id),o="",e!=null){if(r=e.innerHTML.split("------"),r.length>0){if(r[0]=="error"){n={message:r[1]};throw n;}v=parseInt(r[0])}r.length>1&&(o=r[1])}else{s=Sys.Extended.UI.Resources.AsyncFileUpload_UnknownServerError;function w(n,t){return s=t,""}if(t.body.innerHTML.replace(/Exception\]:([^\n\r]+)[\n\r]/,w),h=Sys.Extended.UI.Resources.AsyncFileUpload_ServerResponseError+": '"+s+"'",y=confirm(h+"\n\n"+Sys.Extended.UI.Resources.AsyncFileUpload_ConfirmToSeeErrorPage),y){c=window.open("","NotFoundInAnswer","toolbar=0,status=1,scrollbars=1,resizable=1,width=600,height=400");function p(){try{c.document||setTimeout(p,100)}catch(i){return}var n=c.document;n.open();n.write("<body>"+t.body.innerHTML+"<\/body>");n.close()}setTimeout(p,0)}n={message:h};throw n;}this._removeTimer();i.target="_top";i.action=this._postBackUrl;this.get_completeBackColor()!=""&&(this._innerTB!=null?this._innerTB.style.backgroundColor=this.get_completeBackColor():this._inputFile.style.backgroundColor=this.get_completeBackColor());this.setThrobber(!1);this.raiseUploadComplete(new Sys.Extended.UI.AsyncFileUploadEventArgs(this._inputFile.value,v,o,null))}}catch(b){this._removeTimer();i.target="_top";i.action=this._postBackUrl;this._onError(b.message)}finally{l&&setTimeout(function(){f._removeIframe()},100)}},_wait:function(){var n;if(this._waitTimer!=null){n=this;try{var t=this._iframe.contentWindow.document,i=t.location,r=i.href;this._waitTimer=setTimeout(function(){n._wait()},100)}catch(u){setTimeout(function(){n._removeIframe()},100);setTimeout(function(){n._onError(Sys.Extended.UI.Resources.AsyncFileUpload_UploadingProblem)},0);this._waitTimer=null}}}};Sys.Extended.UI.AsyncFileUpload.registerClass("Sys.Extended.UI.AsyncFileUpload",Sys.Extended.UI.ControlBase);Sys.Extended.UI.AsyncFileUploadEventArgs=function(n,t,i,r){if(arguments.length!=4)throw Error.parameterCount();Sys.Extended.UI.AsyncFileUploadEventArgs.initializeBase(this);this._fileName=n;this._length=t;this._contentType=i;this._errorMessage=r};Sys.Extended.UI.AsyncFileUploadEventArgs.prototype={get_fileName:function(){var n=this._fileName.lastIndexOf("/"),t=this._fileName.lastIndexOf("\\");return this._fileName.substr((n>t?n:t)+1)},get_path:function(){return this._fileName},get_length:function(){return this._length},get_contentType:function(){return this._contentType},get_errorMessage:function(){return this._errorMessage}};Sys.Extended.UI.AsyncFileUploadEventArgs.registerClass("Sys.Extended.UI.AsyncFileUploadEventArgs",Sys.EventArgs),function(){function n(){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._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.raiseShowing(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.raiseShown(Sys.EventArgs.Empty))},hide:function(){if(this._visible){var n=new Sys.CancelEventArgs;(this.raiseHiding(n),n.get_cancel())||(this._visible=!1,this._onHide?this.onHide():(this._hidePopup(),this._hideCleanup()))}},getBounds:function(){var i=this.get_element(),s=i.offsetParent||document.documentElement,f,n,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?i.clientLeft*2:0);u=i.offsetHeight-(i.clientTop?i.clientTop*2: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 typeof pageYOffset=="number"&&(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 typeof pageXOffset=="number"?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=1e3;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.raiseHidden(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.raiseShown(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)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(n){var t=this.get_events().getHandler("shown");t&&t(this,n)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)}};Sys.Extended.UI.PopupBehavior.registerClass("Sys.Extended.UI.PopupBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.PopupBehavior,{name:"popup"});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")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedPopup",["ExtendedAnimations","ExtendedAnimationBehavior"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.AutoCompleteBehavior=function(n){Sys.Extended.UI.AutoCompleteBehavior.initializeBase(this,[n]);this._servicePath=null;this._serviceMethod=null;this._contextKey=null;this._useContextKey=!1;this._minimumPrefixLength=3;this._completionSetCount=10;this._completionInterval=1e3;this._completionListElementID=null;this._completionListElement=null;this._textColor="windowtext";this._textBackground="window";this._popupBehavior=null;this._popupBehaviorHiddenHandler=null;this._onShowJson=null;this._onHideJson=null;this._timer=null;this._cache=null;this._currentPrefix=null;this._selectIndex=-1;this._focusHandler=null;this._blurHandler=null;this._bodyClickHandler=null;this._completionListBlurHandler=null;this._keyDownHandler=null;this._mouseDownHandler=null;this._mouseUpHandler=null;this._mouseOverHandler=null;this._tickHandler=null;this._enableCaching=!0;this._flyoutHasFocus=!1;this._textBoxHasFocus=!1;this._completionListCssClass=null;this._completionListItemCssClass=null;this._highlightedItemCssClass=null;this._delimiterCharacters=null;this._firstRowSelected=!1;this._showOnlyCurrentWordInCompletionListItem=!1;this._webRequest=null};Sys.Extended.UI.AutoCompleteBehavior.prototype={initialize:function(){Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(this,"initialize");$common.prepareHiddenElementForATDeviceUpdate();this._popupBehaviorHiddenHandler=Function.createDelegate(this,this._popupHidden);this._tickHandler=Function.createDelegate(this,this._onTimerTick);this._focusHandler=Function.createDelegate(this,this._onGotFocus);this._blurHandler=Function.createDelegate(this,this._onLostFocus);this._keyDownHandler=Function.createDelegate(this,this._onKeyDown);this._mouseDownHandler=Function.createDelegate(this,this._onListMouseDown);this._mouseUpHandler=Function.createDelegate(this,this._onListMouseUp);this._mouseOverHandler=Function.createDelegate(this,this._onListMouseOver);this._completionListBlurHandler=Function.createDelegate(this,this._onCompletionListBlur);this._bodyClickHandler=Function.createDelegate(this,this._onCompletionListBlur);this._timer=new Sys.Timer;this.initializeTimer(this._timer);var n=this.get_element();this.initializeTextBox(n);this._completionListElementID!==null&&(this._completionListElement=$get(this._completionListElementID));this._completionListElement==null&&(this._completionListElement=document.createElement("ul"),this._completionListElement.id=this.get_id()+"_completionListElem",Sys.Browser.agent===Sys.Browser.Safari?document.body.appendChild(this._completionListElement):n.parentNode.insertBefore(this._completionListElement,n.nextSibling));this.initializeCompletionList(this._completionListElement);this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"PopupBehavior",parentElement:n,positioningMode:Sys.Extended.UI.PositioningMode.BottomLeft},null,null,this._completionListElement);this._popupBehavior.add_hidden(this._popupBehaviorHiddenHandler);this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson)},dispose:function(){this._onShowJson=null;this._onHideJson=null;this._popupBehavior&&(this._popupBehaviorHiddenHandler&&this._popupBehavior.remove_hidden(this._popupBehaviorHiddenHandler),this._popupBehavior.dispose(),this._popupBehavior=null);this._timer&&(this._timer.dispose(),this._timer=null);var n=this.get_element();n&&($removeHandler(n,"focus",this._focusHandler),$removeHandler(n,"blur",this._blurHandler),$removeHandler(n,"keydown",this._keyDownHandler),$removeHandler(this._completionListElement,"blur",this._completionListBlurHandler),$removeHandler(this._completionListElement,"mousedown",this._mouseDownHandler),$removeHandler(this._completionListElement,"mouseup",this._mouseUpHandler),$removeHandler(this._completionListElement,"mouseover",this._mouseOverHandler));this._bodyClickHandler&&($removeHandler(document.body,"click",this._bodyClickHandler),this._bodyClickHandler=null);this._popupBehaviorHiddenHandler=null;this._tickHandler=null;this._focusHandler=null;this._blurHandler=null;this._keyDownHandler=null;this._completionListBlurHandler=null;this._mouseDownHandler=null;this._mouseUpHandler=null;this._mouseOverHandler=null;Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(this,"dispose")},initializeTimer:function(n){n.set_interval(this._completionInterval);n.add_tick(this._tickHandler)},initializeTextBox:function(n){n.autocomplete="off";$addHandler(n,"focus",this._focusHandler);$addHandler(n,"blur",this._blurHandler);$addHandler(n,"keydown",this._keyDownHandler)},initializeCompletionList:function(n){if(this._completionListCssClass)Sys.UI.DomElement.addCssClass(n,this._completionListCssClass);else{var t=n.style;t.textAlign="left";t.visibility="hidden";t.cursor="default";t.listStyle="none";t.padding="0px";t.margin="0px! important";Sys.Browser.agent===Sys.Browser.Safari?(t.border="solid 1px gray",t.backgroundColor="white",t.color="black"):(t.border="solid 1px buttonshadow",t.backgroundColor=this._textBackground,t.color=this._textColor)}$addHandler(n,"mousedown",this._mouseDownHandler);$addHandler(n,"mouseup",this._mouseUpHandler);$addHandler(n,"mouseover",this._mouseOverHandler);$addHandler(n,"blur",this._completionListBlurHandler);$addHandler(document.body,"click",this._bodyClickHandler)},_currentCompletionWord:function(){var u=this.get_element(),t=u.value,r=t,n,i;return this.get_isMultiWord()&&(n=this._getCurrentWordStartIndex(),i=this._getCurrentWordEndIndex(n),r=i<=n?t.substring(n):t.substring(n,i)),r},_getCursorIndex:function(){return this.get_element().selectionStart},_getCurrentWordStartIndex:function(){for(var u=this.get_element(),f=u.value.substring(0,this._getCursorIndex()),n=0,t=-1,i,r=0;r<this._delimiterCharacters.length;++r)i=f.lastIndexOf(this._delimiterCharacters.charAt(r)),i>t&&(t=i);return n=t,n>=this._getCursorIndex()&&(n=0),n<0?0:n+1},_getCurrentWordEndIndex:function(n){for(var u=this.get_element(),f=u.value.substring(n),t=0,i,r=0;r<this._delimiterCharacters.length;++r)i=f.indexOf(this._delimiterCharacters.charAt(r)),i>0&&(i<t||t==0)&&(t=i);return t<=0?u.value.length:t+n},get_isMultiWord:function(){return this._delimiterCharacters!=null&&this._delimiterCharacters!=""},_getTextWithInsertedWord:function(n){var i=n,o=this.get_element(),r=o.value;if(this.get_isMultiWord()){var t=this._getCurrentWordStartIndex(),u=this._getCurrentWordEndIndex(t),f="",e="";t>0&&(f=r.substring(0,t));u>t&&(e=r.substring(u));i=f+n+e}return i},_hideCompletionList:function(){var n=new Sys.CancelEventArgs;(this.raiseHiding(n),n.get_cancel())||this.hidePopup()},showPopup:function(){this._popupBehavior.show();this.raiseShown(Sys.EventArgs.Empty)},hidePopup:function(){this._popupBehavior?this._popupBehavior.hide():this._popupHidden()},_popupHidden:function(){this._completionListElement.innerHTML="";this._selectIndex=-1;this._flyoutHasFocus=!1;this.raiseHidden(Sys.EventArgs.Empty)},_highlightItem:function(n){for(var r=this._completionListElement.childNodes,t,i=0;i<r.length;i++)t=r[i],t._highlighted&&(this._completionListItemCssClass?(Sys.UI.DomElement.removeCssClass(t,this._highlightedItemCssClass),Sys.UI.DomElement.addCssClass(t,this._completionListItemCssClass)):Sys.Browser.agent===Sys.Browser.Safari?(t.style.backgroundColor="white",t.style.color="black"):(t.style.backgroundColor=this._textBackground,t.style.color=this._textColor),this.raiseItemOut(new Sys.Extended.UI.AutoCompleteItemEventArgs(t,t.firstChild.nodeValue,t._value)));this._highlightedItemCssClass?(Sys.UI.DomElement.removeCssClass(n,this._completionListItemCssClass),Sys.UI.DomElement.addCssClass(n,this._highlightedItemCssClass)):Sys.Browser.agent===Sys.Browser.Safari?n.style.backgroundColor="lemonchiffon":(n.style.backgroundColor="highlight",n.style.color="highlighttext");n._highlighted=!0;this.raiseItemOver(new Sys.Extended.UI.AutoCompleteItemEventArgs(n,n.firstChild.nodeValue,n._value))},_onCompletionListBlur:function(){this._hideCompletionList()},_onListMouseDown:function(n){n.target!==this._completionListElement?(this._setText(n.target),this._flyoutHasFocus=!1):this._flyoutHasFocus=!0},_onListMouseUp:function(){try{this.get_element().focus()}catch(n){}},_onListMouseOver:function(n){var i=n.target,r,t;if(i!==this._completionListElement)for(r=this._completionListElement.childNodes,t=0;t<r.length;++t)if(i===r[t]){this._highlightItem(i);this._selectIndex=t;break}},_onGotFocus:function(){this._textBoxHasFocus=!0;this._flyoutHasFocus&&this._hideCompletionList();this._minimumPrefixLength!=0||this.get_element().value||this._timer.set_enabled(!0)},_onKeyDown:function(n){this._textBoxHasFocus=!0;this._timer.set_enabled(!1);var t=n.keyCode?n.keyCode:n.rawEvent.keyCode;t===Sys.UI.Key.esc?(this._hideCompletionList(),n.preventDefault()):t===Sys.UI.Key.up?this._selectIndex>0&&(this._selectIndex--,this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex),this._highlightItem(this._completionListElement.childNodes[this._selectIndex]),n.stopPropagation(),n.preventDefault()):t===Sys.UI.Key.down?this._selectIndex<this._completionListElement.childNodes.length-1&&(this._selectIndex++,this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex),this._highlightItem(this._completionListElement.childNodes[this._selectIndex]),n.stopPropagation(),n.preventDefault()):t===Sys.UI.Key.enter?this._selectIndex!==-1?(this._setText(this._completionListElement.childNodes[this._selectIndex]),n.preventDefault()):this.hidePopup():t===Sys.UI.Key.tab?this._selectIndex!==-1&&this._setText(this._completionListElement.childNodes[this._selectIndex]):this._timer.set_enabled(!0)},_handleScroll:function(n,t){var i=this._completionListElement,r=$common.getBounds(n),u=this._completionListElement.childNodes.length;r.height*t-(i.clientHeight+i.scrollTop)>=0&&(i.scrollTop+=r.height*t-(i.clientHeight+i.scrollTop)+r.height);r.height*(u-(t+1))-(i.scrollHeight-i.scrollTop)>=0&&(i.scrollTop-=r.height*(u-(t+1))-(i.scrollHeight-i.scrollTop)+r.height);i.scrollTop%r.height!=0&&(r.height*(t+1)-(i.clientHeight+i.scrollTop)>=0?i.scrollTop-=i.scrollTop%r.height:i.scrollTop+=r.height-i.scrollTop%r.height)},_handleFlyoutFocus:function(){this._textBoxHasFocus||this._flyoutHasFocus||(this._webRequest&&(this._webRequest.get_executor().abort(),this._webRequest=null),this._hideCompletionList())},_onLostFocus:function(){this._textBoxHasFocus=!1;this._timer.set_enabled(!1);window.setTimeout(Function.createDelegate(this,this._handleFlyoutFocus),500)},_onMethodComplete:function(n,t){this._webRequest=null;this._update(t,n,!0)},_onMethodFailed:function(){this._webRequest=null},_onTimerTick:function(n,t){var i,t,r;if(this._timer.set_enabled(!1),this._servicePath&&this._serviceMethod){if(i=this._currentCompletionWord(),i.trim().length<this._minimumPrefixLength){this._currentPrefix=null;this._update("",null,!1);return}if(this._currentPrefix!==i||i==""&&this._minimumPrefixLength==0){if(this._currentPrefix=i,i!=""&&this._cache&&this._cache[i]){this._update(i,this._cache[i],!1);return}if(t=new Sys.CancelEventArgs,this.raisePopulating(t),t.get_cancel())return;r={prefixText:this._currentPrefix,count:this._completionSetCount};this._useContextKey&&(r.contextKey=this._contextKey);this._webRequest&&(this._webRequest.get_executor().abort(),this._webRequest=null);this._webRequest=Sys.Net.WebServiceProxy.invoke(this.get_servicePath(),this.get_serviceMethod(),!1,r,Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodFailed),i);$common.updateFormToRefreshATDeviceBuffer()}}},_setText:function(n){var t=n&&n.firstChild?n.firstChild.nodeValue:null;this._timer.set_enabled(!1);var i=this.get_element(),r=i.control,u=this._showOnlyCurrentWordInCompletionListItem?this._getTextWithInsertedWord(t):t;r&&r.set_text?r.set_text(u):i.value=u;$common.tryFireEvent(i,"change");this.raiseItemSelected(new Sys.Extended.UI.AutoCompleteItemEventArgs(n,t,n?n._value:null));this._currentPrefix=this._currentCompletionWord();this._hideCompletionList()},_update:function(n,t,i){var f,r,o,l,u,a,c;if(i&&this.get_enableCaching()&&(this._cache||(this._cache={}),this._cache[n]=t),!this._textBoxHasFocus||n!=this._currentCompletionWord()){this._hideCompletionList();return}if(t&&t.length){this._completionListElement.innerHTML="";this._selectIndex=-1;var s=null,e=null,h=null;for(f=0;f<t.length;f++){r=null;r=this._completionListElementID?document.createElement("div"):document.createElement("li");s==null&&(s=r);try{o=Sys.Serialization.JavaScriptSerializer.deserialize("("+t[f]+")");o&&o.First?(e=o.First,h=o.Second):(e=t[f],h=e)}catch(v){e=t[f];h=t[f]}l=this._showOnlyCurrentWordInCompletionListItem?e:this._getTextWithInsertedWord(e);r.appendChild(document.createTextNode(l));r._value=h;r.__item="";this._completionListItemCssClass?Sys.UI.DomElement.addCssClass(r,this._completionListItemCssClass):(u=r.style,u.padding="0px",u.textAlign="left",u.textOverflow="ellipsis",Sys.Browser.agent===Sys.Browser.Safari?(u.backgroundColor="white",u.color="black"):(u.backgroundColor=this._textBackground,u.color=this._textColor));this._completionListElement.appendChild(r)}a=$common.getBounds(this.get_element());this._completionListElement.style.width=Math.max(1,a.width-2)+"px";this._completionListElement.scrollTop=0;this.raisePopulated(Sys.EventArgs.Empty);c=new Sys.CancelEventArgs;this.raiseShowing(c);c.get_cancel()||(this.showPopup(),this._firstRowSelected&&s!=null&&(this._highlightItem(s),this._selectIndex=0))}else this._hideCompletionList()},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_completionInterval:function(){return this._completionInterval},set_completionInterval:function(n){this._completionInterval!=n&&(this._completionInterval=n,this.raisePropertyChanged("completionInterval"))},get_completionList:function(){return this._completionListElement},set_completionList:function(n){this._completionListElement!=n&&(this._completionListElement=n,this.raisePropertyChanged("completionList"))},get_completionSetCount:function(){return this._completionSetCount},set_completionSetCount:function(n){this._completionSetCount!=n&&(this._completionSetCount=n,this.raisePropertyChanged("completionSetCount"))},get_minimumPrefixLength:function(){return this._minimumPrefixLength},set_minimumPrefixLength:function(n){this._minimumPrefixLength!=n&&(this._minimumPrefixLength=n,this.raisePropertyChanged("minimumPrefixLength"))},get_serviceMethod:function(){return this._serviceMethod},set_serviceMethod:function(n){this._serviceMethod!=n&&(this._serviceMethod=n,this.raisePropertyChanged("serviceMethod"))},get_servicePath:function(){return this._servicePath},set_servicePath:function(n){this._servicePath!=n&&(this._servicePath=n,this.raisePropertyChanged("servicePath"))},get_contextKey:function(){return this._contextKey},set_contextKey:function(n){this._contextKey!=n&&(this._contextKey=n,this.set_useContextKey(!0),this.raisePropertyChanged("contextKey"))},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(n){this._useContextKey!=n&&(this._useContextKey=n,this.raisePropertyChanged("useContextKey"))},get_enableCaching:function(){return this._enableCaching},set_enableCaching:function(n){this._enableCaching!=n&&(this._enableCaching=n,this.raisePropertyChanged("enableCaching"))},get_completionListElementID:function(){return this._completionListElementID},set_completionListElementID:function(n){this._completionListElementID!=n&&(this._completionListElementID=n,this.raisePropertyChanged("completionListElementID"))},get_completionListCssClass:function(){return this._completionListCssClass},set_completionListCssClass:function(n){this._completionListCssClass!=n&&(this._completionListCssClass=n,this.raisePropertyChanged("completionListCssClass"))},get_completionListItemCssClass:function(){return this._completionListItemCssClass},set_completionListItemCssClass:function(n){this._completionListItemCssClass!=n&&(this._completionListItemCssClass=n,this.raisePropertyChanged("completionListItemCssClass"))},get_highlightedItemCssClass:function(){return this._highlightedItemCssClass},set_highlightedItemCssClass:function(n){this._highlightedItemCssClass!=n&&(this._highlightedItemCssClass=n,this.raisePropertyChanged("highlightedItemCssClass"))},get_delimiterCharacters:function(){return this._delimiterCharacters},set_delimiterCharacters:function(n){this._delimiterCharacters!=n&&(this._delimiterCharacters=n,this.raisePropertyChanged("delimiterCharacters"))},get_firstRowSelected:function(){return this._firstRowSelected},set_firstRowSelected:function(n){this._firstRowSelected!=n&&(this._firstRowSelected=n,this.raisePropertyChanged("firstRowSelected"))},get_showOnlyCurrentWordInCompletionListItem:function(){return this._showOnlyCurrentWordInCompletionListItem},set_showOnlyCurrentWordInCompletionListItem:function(n){this._showOnlyCurrentWordInCompletionListItem!=n&&(this._showOnlyCurrentWordInCompletionListItem=n,this.raisePropertyChanged("showOnlyCurrentWordInCompletionListItem"))},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)},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_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(n){var t=this.get_events().getHandler("shown");t&&t(this,n)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)},add_itemSelected:function(n){this.get_events().addHandler("itemSelected",n)},remove_itemSelected:function(n){this.get_events().removeHandler("itemSelected",n)},raiseItemSelected:function(n){var t=this.get_events().getHandler("itemSelected");t&&t(this,n)},add_itemOver:function(n){this.get_events().addHandler("itemOver",n)},remove_itemOver:function(n){this.get_events().removeHandler("itemOver",n)},raiseItemOver:function(n){var t=this.get_events().getHandler("itemOver");t&&t(this,n)},add_itemOut:function(n){this.get_events().addHandler("itemOut",n)},remove_itemOut:function(n){this.get_events().removeHandler("itemOut",n)},raiseItemOut:function(n){var t=this.get_events().getHandler("itemOut");t&&t(this,n)}};Sys.Extended.UI.AutoCompleteBehavior.registerClass("Sys.Extended.UI.AutoCompleteBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.AutoCompleteBehavior,{name:"autoComplete"});Sys.Extended.UI.AutoCompleteBehavior.descriptor={properties:[{name:"completionInterval",type:Number},{name:"completionList",isDomElement:!0},{name:"completionListElementID",type:String},{name:"completionSetCount",type:Number},{name:"minimumPrefixLength",type:Number},{name:"serviceMethod",type:String},{name:"servicePath",type:String},{name:"enableCaching",type:Boolean},{name:"showOnlyCurrentWordInCompletionListItem",type:Boolean}]};Sys.Extended.UI.AutoCompleteItemEventArgs=function(n,t,i){Sys.Extended.UI.AutoCompleteItemEventArgs.initializeBase(this);this._item=n;this._text=t;this._value=i!==undefined?i:null};Sys.Extended.UI.AutoCompleteItemEventArgs.prototype={get_item:function(){return this._item},set_item:function(n){this._item=n},get_text:function(){return this._text},set_text:function(n){this._text=n},get_value:function(){return this._value},set_value:function(n){this._value=n}};Sys.Extended.UI.AutoCompleteItemEventArgs.registerClass("Sys.Extended.UI.AutoCompleteItemEventArgs",Sys.EventArgs)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedAutoComplete",["ExtendedTimer","ExtendedAnimationBehavior","ExtendedPopup"],n):n()}(); /*! * jQuery JavaScript Library v1.9.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2013-2-4 */ if(function(n,t){function wt(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:n.nodeType===1&&t?!0:r==="array"||r!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in n)}function ff(n){var t=ri[n]={};return i.each(n.match(s)||[],function(n,i){t[i]=!0}),t}function wi(n,r,u,f){if(i.acceptData(n)){var s,h,c=i.expando,a=typeof r=="string",l=n.nodeType,o=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&o[e]&&(f||o[e].data)||!a||u!==t)return e||(l?n[c]=e=k.pop()||i.guid++:e=c),o[e]||(o[e]={},l||(o[e].toJSON=i.noop)),(typeof r=="object"||typeof r=="function")&&(f?o[e]=i.extend(o[e],r):o[e].data=i.extend(o[e].data,r)),s=o[e],f||(s.data||(s.data={}),s=s.data),u!==t&&(s[i.camelCase(r)]=u),a?(h=s[r],h==null&&(h=s[i.camelCase(r)])):h=s,h}}function bi(n,t,r){if(i.acceptData(n)){var o,h,e,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data,e)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in e)?t=[t]:(t=i.camelCase(t),t=(t in e)?[t]:t.split(" ")),o=0,h=t.length;o<h;o++)delete e[t[o]];if(!(r?bt:i.isEmptyObject)(e))return}(r||(delete u[f].data,bt(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}}function ki(n,r,u){if(u===t&&n.nodeType===1){var f="data-"+r.replace(iu,"-$1").toLowerCase();if(u=n.getAttribute(f),typeof u=="string"){try{u=u==="true"?!0:u==="false"?!1:u==="null"?null:+u+""===u?+u:tu.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function bt(n){for(var t in n)if((t!=="data"||!i.isEmptyObject(n[t]))&&t!=="toJSON")return!1;return!0}function et(){return!0}function b(){return!1}function di(n,t){do n=n[t];while(n&&n.nodeType!==1);return n}function gi(n,t,r){if(t=t||0,i.isFunction(t))return i.grep(n,function(n,i){var u=!!t.call(n,i,n);return u===r});if(t.nodeType)return i.grep(n,function(n){return n===t===r});if(typeof t=="string"){var u=i.grep(n,function(n){return n.nodeType===1});if(ye.test(t))return i.filter(t,u,!r);t=i.filter(t,u)}return i.grep(n,function(n){return i.inArray(n,t)>=0===r})}function nr(n){var i=hu.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function ef(n,t){return n.getElementsByTagName(t)[0]||n.appendChild(n.ownerDocument.createElement(t))}function tr(n){var t=n.getAttributeNode("type");return n.type=(t&&t.specified)+"/"+n.type,n}function ir(n){var t=ge.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function kt(n,t){for(var u,r=0;(u=n[r])!=null;r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function rr(n,t){if(t.nodeType===1&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;f<o;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function of(n,t){var r,f,u;if(t.nodeType===1){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}r==="script"&&t.text!==n.text?(tr(t).text=n.text,ir(t)):r==="object"?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):r==="input"&&ci.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):r==="option"?t.defaultSelected=t.selected=n.defaultSelected:(r==="input"||r==="textarea")&&(t.defaultValue=n.defaultValue)}}function u(n,r){var s,e,h=0,f=typeof n.getElementsByTagName!==o?n.getElementsByTagName(r||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],s=n.childNodes||n;(e=s[h])!=null;h++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function sf(n){ci.test(n.type)&&(n.defaultChecked=n.checked)}function ur(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=ku.length;i--;)if(t=ku[i]+r,t in n)return t;return u}function it(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)}function fr(n,t){for(var f,r,o,e=[],u=0,s=n.length;u<s;u++)(r=n[u],r.style)&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||f!=="none"||(r.style.display=""),r.style.display===""&&it(r)&&(e[u]=i._data(r,"olddisplay",hr(r.nodeName)))):e[u]||(o=it(r),(f&&f!=="none"||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;u<s;u++)(r=n[u],r.style)&&(t&&r.style.display!=="none"&&r.style.display!==""||(r.style.display=t?e[u]||"":"none"));return n}function er(n,t,i){var r=fo.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function or(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:t==="width"?1:0,o=0;e<4;e+=2)r==="margin"&&(o+=i.css(n,r+p[e],!0,f)),u?(r==="content"&&(o-=i.css(n,"padding"+p[e],!0,f)),r!=="margin"&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),r!=="padding"&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function sr(n,t,r){var e=!0,u=t==="width"?n.offsetWidth:n.offsetHeight,f=v(n),o=i.support.boxSizing&&i.css(n,"boxSizing",!1,f)==="border-box";if(u<=0||u==null){if(u=y(n,t,f),(u<0||u==null)&&(u=n.style[t]),vt.test(u))return u;e=o&&(i.support.boxSizingReliable||u===n.style[t]);u=parseFloat(u)||0}return u+or(n,t,r||(o?"border":"content"),e,f)+"px"}function hr(n){var u=r,t=wu[n];return t||(t=cr(n,u),t!=="none"&&t||(ut=(ut||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(ut[0].contentWindow||ut[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=cr(n,u),ut.detach()),wu[n]=t),t}function cr(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function dt(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||ho.test(n)?u(n,i):dt(n+"["+(typeof i=="object"?t:"")+"]",i,r,u)});else if(r||i.type(t)!=="object")u(n,t);else for(f in t)dt(n+"["+f+"]",t[f],r,u)}function lr(n){return function(t,r){typeof t!="string"&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(s)||[];if(i.isFunction(r))while(u=e[f++])u[0]==="+"?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function ar(n,t,r,u){function f(s){var h;return e[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);if(typeof s!="string"||o||e[s]){if(o)return!(h=s)}else return t.dataTypes.unshift(s),f(s),!1}),h}var e={},o=n===pi;return f(t.dataTypes[0])||!e["*"]&&f("*")}function gt(n,r){var f,u,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function hf(n,i,r){var s,o,e,u,h=n.contents,f=n.dataTypes,c=n.responseFields;for(u in c)u in r&&(i[c[u]]=r[u]);while(f[0]==="*")f.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(u in h)if(h[u]&&h[u].test(o)){f.unshift(u);break}if(f[0]in r)e=f[0];else{for(u in r){if(!f[0]||n.converters[u+" "+f[0]]){e=u;break}s||(s=u)}e=e||s}if(e)return e!==f[0]&&f.unshift(e),r[e]}function cf(n,t){var o,r,i,e,u={},h=0,s=n.dataTypes.slice(),f=s[0];if(n.dataFilter&&(t=n.dataFilter(t,n.dataType)),s[1])for(i in n.converters)u[i.toLowerCase()]=n.converters[i];for(;r=s[++h];)if(r!=="*"){if(f!=="*"&&f!==r){if(i=u[f+" "+r]||u["* "+r],!i)for(o in u)if(e=o.split(" "),e[1]===r&&(i=u[f+" "+e[0]]||u["* "+e[0]],i)){i===!0?i=u[o]:u[o]!==!0&&(r=e[0],s.splice(h--,0,r));break}if(i!==!0)if(i&&n.throws)t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function vr(){try{return new n.XMLHttpRequest}catch(t){}}function lf(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function yr(){return setTimeout(function(){tt=t}),tt=i.now()}function af(n,t){i.each(t,function(t,i){for(var u=(ft[t]||[]).concat(ft["*"]),r=0,f=u.length;r<f;r++)if(u[r].call(n,t,i))return})}function pr(n,t,r){var e,o,s=0,l=pt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var s=tt||yr(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,e=u.tweens.length;r<e;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),i<1&&e?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:tt||yr(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;i<r;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),h=u.props;for(vf(h,u.opts.specialEasing);s<l;s++)if(e=pt[s].call(u,n,h,u.opts),e)return e;return af(u,h),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function vf(n,t){var u,f,r,e,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function yf(n,t,r){var u,o,v,a,s,y,l,f,b,h=this,e=n.style,p={},w=[],c=n.nodeType&&it(n);r.queue||(f=i._queueHooks(n,"fx"),f.unqueued==null&&(f.unqueued=0,b=f.empty.fire,f.empty.fire=function(){f.unqueued||b()}),f.unqueued++,h.always(function(){h.always(function(){f.unqueued--;i.queue(n,"fx").length||f.empty.fire()})}));n.nodeType===1&&("height"in t||"width"in t)&&(r.overflow=[e.overflow,e.overflowX,e.overflowY],i.css(n,"display")==="inline"&&i.css(n,"float")==="none"&&(i.support.inlineBlockNeedsLayout&&hr(n.nodeName)!=="inline"?e.zoom=1:e.display="inline-block"));r.overflow&&(e.overflow="hidden",i.support.shrinkWrapBlocks||h.always(function(){e.overflow=r.overflow[0];e.overflowX=r.overflow[1];e.overflowY=r.overflow[2]}));for(o in t)if(a=t[o],wo.exec(a)){if(delete t[o],y=y||a==="toggle",a===(c?"hide":"show"))continue;w.push(o)}if(v=w.length,v)for(s=i._data(n,"fxshow")||i._data(n,"fxshow",{}),("hidden"in s)&&(c=s.hidden),y&&(s.hidden=!c),c?i(n).show():h.done(function(){i(n).hide()}),h.done(function(){var t;i._removeData(n,"fxshow");for(t in p)i.style(n,t,p[t])}),o=0;o<v;o++)u=w[o],l=h.createTween(u,c?s[u]:0),p[u]=s[u]||i.style(n,u),u in s||(s[u]=l.start,c&&(l.end=l.start,l.start=u==="width"||u==="height"?1:0))}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function ot(n,t){var r,i={height:n},u=0;for(t=t?1:0;u<4;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function wr(n){return i.isWindow(n)?n:n.nodeType===9?n.defaultView||n.parentWindow:!1}var st,br,o=typeof t,r=n.document,pf=n.location,wf=n.jQuery,bf=n.$,ht={},k=[],ni="1.9.1",kr=k.concat,ti=k.push,l=k.slice,dr=k.indexOf,kf=ht.toString,rt=ht.hasOwnProperty,ii=ni.trim,i=function(n,t){return new i.fn.init(n,t,br)},ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,s=/\S+/g,df=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,gf=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,gr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ne=/^[\],:{}\s]*$/,te=/(?:^|:|,)(?:\s*\[)+/g,ie=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,re=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ue=/^-ms-/,fe=/-([\da-z])/gi,ee=function(n,t){return t.toUpperCase()},h=function(n){(r.addEventListener||n.type==="load"||r.readyState==="complete")&&(nu(),i.ready())},nu=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",h,!1),n.removeEventListener("load",h,!1)):(r.detachEvent("onreadystatechange",h),n.detachEvent("onload",h))},ri,tu,iu,ui,lt,d,g,ru,at;i.fn=i.prototype={jquery:ni,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if(typeof n=="string"){if(e=n.charAt(0)==="<"&&n.charAt(n.length-1)===">"&&n.length>=3?[null,n,null]:gf.exec(n),e&&(e[1]||!u)){if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),gr.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1;this[0]=o}return this.context=r,this.selector=n,this}return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n)}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(n){return n==null?this.toArray():n<0?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:ti,sort:[].sort,splice:[].splice};i.fn.init.prototype=i.fn;i.extend=i.fn.extend=function(){var u,o,r,e,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for(typeof n=="boolean"&&(c=n,n=arguments[1]||{},f=2),typeof n=="object"||i.isFunction(n)||(n={}),l===f&&(n=this,--f);f<l;f++)if((s=arguments[f])!=null)for(e in s)(u=n[e],r=s[e],n!==r)&&(c&&r&&(i.isPlainObject(r)||(o=i.isArray(r)))?(o?(o=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n};i.extend({noConflict:function(t){return n.$===i&&(n.$=bf),t&&n.jQuery===i&&(n.jQuery=wf),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);(i.isReady=!0,n!==!0&&--i.readyWait>0)||(st.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return i.type(n)==="function"},isArray:Array.isArray||function(n){return i.type(n)==="array"},isWindow:function(n){return n!=null&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return n==null?String(n):typeof n=="object"||typeof n=="function"?ht[kf.call(n)]||"object":typeof n},isPlainObject:function(n){if(!n||i.type(n)!=="object"||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!rt.call(n,"constructor")&&!rt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}for(var r in n);return r===t||rt.call(n,r)},isEmptyObject:function(n){for(var t in n)return!1;return!0},error:function(n){throw new Error(n);},parseHTML:function(n,t,u){if(!n||typeof n!="string")return null;typeof t=="boolean"&&(u=t,t=!1);t=t||r;var f=gr.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t);if(t===null)return t;if(typeof t=="string"&&(t=i.trim(t),t&&ne.test(t.replace(ie,"@").replace(re,"]").replace(te,""))))return new Function("return "+t)();i.error("Invalid JSON: "+t)},parseXML:function(r){var u,f;if(!r||typeof r!="string")return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(ue,"ms-").replace(fe,ee)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=wt(n);if(i){if(e){for(;r<f;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;r<f;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:ii&&!ii.call(" ")?function(n){return n==null?"":ii.call(n)}:function(n){return n==null?"":(n+"").replace(df,"")},makeArray:function(n,t){var r=t||[];return n!=null&&(wt(Object(n))?i.merge(r,typeof n=="string"?[n]:n):ti.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(dr)return dr.call(t,n,i);for(r=t.length,i=i?i<0?Math.max(0,r+i):i:0;i<r;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if(typeof f=="number")for(;r<f;r++)n[u++]=i[r];else while(i[r]!==t)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;r<e;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=wt(n),f=[];if(o)for(;r<e;r++)u=t(n[r],r,i),u!=null&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),u!=null&&(f[f.length]=u);return kr.apply([],f)},guid:1,proxy:function(n,r){var f,u,e;return(typeof r=="string"&&(e=n[r],r=n,n=e),!i.isFunction(n))?t:(f=l.call(arguments,2),u=function(){return n.apply(r||this,f.concat(l.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u)},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=u==null;if(i.type(u)==="object"){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;h<l;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return(new Date).getTime()}});i.ready.promise=function(t){if(!st)if(st=i.Deferred(),r.readyState==="complete")setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",h,!1),n.addEventListener("load",h,!1);else{r.attachEvent("onreadystatechange",h);n.attachEvent("onload",h);var u=!1;try{u=n.frameElement==null&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}nu();i.ready()}}()}return st.promise(t)};i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ht["[object "+t+"]"]=t.toLowerCase()});br=i(r);ri={};i.Callbacks=function(n){n=typeof n=="string"?ri[n]||ff(n):i.extend({},n);var o,f,c,s,e,l,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,e=l||0,l=0,s=r.length,o=!0;r&&e<s;e++)if(r[e].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}o=!1;r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);e==="function"?n.unique&&h.has(f)||r.push(f):f&&f.length&&e!=="string"&&u(f)})})(arguments);o?s=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),o&&(u<=s&&s--,u<=e&&e--)}),this},has:function(n){return n?i.inArray(n,r)>-1:!!(r&&r.length)},empty:function(){return r=[],this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return t=t||[],t=[n,t.slice?t.slice():t],r&&(!c||u)&&(o?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return n!=null?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[n^1][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=r!==1||n&&i.isFunction(n.promise)?r:0,f=e===1?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);t<r;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.support=function(){var u,s,e,f,h,c,l,a,y,v,t=r.createElement("div");if(t.setAttribute("className","t"),t.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",s=t.getElementsByTagName("*"),e=t.getElementsByTagName("a")[0],!s||!e||!s.length)return{};h=r.createElement("select");l=h.appendChild(r.createElement("option"));f=t.getElementsByTagName("input")[0];e.style.cssText="top:1px;float:left;opacity:.5";u={getSetAttribute:t.className!=="t",leadingWhitespace:t.firstChild.nodeType===3,tbody:!t.getElementsByTagName("tbody").length,htmlSerialize:!!t.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.5/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:!!f.value,optSelected:l.selected,enctype:!!r.createElement("form").enctype,html5Clone:r.createElement("nav").cloneNode(!0).outerHTML!=="<:nav><\/:nav>",boxModel:r.compatMode==="CSS1Compat",deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};f.checked=!0;u.noCloneChecked=f.cloneNode(!0).checked;h.disabled=!0;u.optDisabled=!l.disabled;try{delete t.test}catch(p){u.deleteExpando=!1}f=r.createElement("input");f.setAttribute("value","");u.input=f.getAttribute("value")==="";f.value="t";f.setAttribute("type","radio");u.radioValue=f.value==="t";f.setAttribute("checked","t");f.setAttribute("name","t");c=r.createDocumentFragment();c.appendChild(f);u.appendChecked=f.checked;u.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked;t.attachEvent&&(t.attachEvent("onclick",function(){u.noCloneEvent=!1}),t.cloneNode(!0).click());for(v in{submit:!0,change:!0,focusin:!0})t.setAttribute(a="on"+v,"t"),u[v+"Bubbles"]=a in n||t.attributes[a].expando===!1;return t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",u.clearCloneStyle=t.style.backgroundClip==="content-box",i(function(){var e,f,i,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=r.getElementsByTagName("body")[0];s&&(e=r.createElement("div"),e.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(e).appendChild(t),t.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",i=t.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",y=i[0].offsetHeight===0,i[0].style.display="",i[1].style.display="none",u.reliableHiddenOffsets=y&&i[0].offsetHeight===0,t.innerHTML="",t.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",u.boxSizing=t.offsetWidth===4,u.doesNotIncludeMarginInBodyOffset=s.offsetTop!==1,n.getComputedStyle&&(u.pixelPosition=(n.getComputedStyle(t,null)||{}).top!=="1%",u.boxSizingReliable=(n.getComputedStyle(t,null)||{width:"4px"}).width==="4px",f=t.appendChild(r.createElement("div")),f.style.cssText=t.style.cssText=h,f.style.marginRight=f.style.width="0",t.style.width="1px",u.reliableMarginRight=!parseFloat((n.getComputedStyle(f,null)||{}).marginRight)),typeof t.style.zoom!==o&&(t.innerHTML="",t.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",u.inlineBlockNeedsLayout=t.offsetWidth===3,t.style.display="block",t.innerHTML="<div><\/div>",t.firstChild.style.width="5px",u.shrinkWrapBlocks=t.offsetWidth!==3,u.inlineBlockNeedsLayout&&(s.style.zoom=1)),s.removeChild(e),e=t=i=f=null)}),s=h=c=l=e=f=null,u}();tu=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;iu=/([A-Z])/g;i.extend({cache:{},expando:"jQuery"+(ni+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!bt(n)},data:function(n,t,i){return wi(n,t,i)},removeData:function(n,t){return bi(n,t)},_data:function(n,t,i){return wi(n,t,i,!0)},_removeData:function(n,t){return bi(n,t,!0)},acceptData:function(n){if(n.nodeType&&n.nodeType!==1&&n.nodeType!==9)return!1;var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}});i.fn.extend({data:function(n,r){var e,f,u=this[0],o=0,s=null;if(n===t){if(this.length&&(s=i.data(u),u.nodeType===1&&!i._data(u,"parsedAttrs"))){for(e=u.attributes;o<e.length;o++)f=e[o].name,f.indexOf("data-")||(f=i.camelCase(f.slice(5)),ki(u,f,s[f]));i._data(u,"parsedAttrs",!0)}return s}return typeof n=="object"?this.each(function(){i.data(this,n)}):i.access(this,function(r){if(r===t)return u?ki(u,n,i.data(u,n)):null;this.each(function(){i.data(this,n,r)})},null,r,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[]},dequeue:function(n,t){t=t||"fx";var f=i.queue(n,t),e=f.length,r=f.shift(),u=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};r==="inprogress"&&(r=f.shift(),e--);u.cur=r;r&&(t==="fx"&&f.unshift("inprogress"),delete u.stop,r.call(n,o,u));!e&&u&&u.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,r){var u=2;return(typeof n!="string"&&(r=n,n="fx",u--),arguments.length<u)?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n);n==="fx"&&t[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var nt,uu,fi=/[\t\r\n]/g,oe=/\r/g,se=/^(?:input|select|textarea|button|object)$/i,he=/^(?:a|area)$/i,fu=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ei=/^(?:checked|selected)$/i,a=i.support.getSetAttribute,oi=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t;delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,u,o,f=0,h=this.length,c=typeof n=="string"&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];f<h;f++)if(t=this[f],r=t.nodeType===1&&(t.className?(" "+t.className+" ").replace(fi," "):" "),r){for(o=0;u=e[o++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,r,t,u,o,f=0,h=this.length,c=arguments.length===0||typeof n=="string"&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];f<h;f++)if(r=this[f],t=r.nodeType===1&&(r.className?(" "+r.className+" ").replace(fi," "):""),t){for(o=0;u=e[o++];)while(t.indexOf(" "+u+" ")>=0)t=t.replace(" "+u+" "," ");r.className=n?i.trim(t):""}return this},toggleClass:function(n,t){var r=typeof n,u=typeof t=="boolean";return i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if(r==="string")for(var f,c=0,h=i(this),e=t,l=n.match(s)||[];f=l[c++];)e=u?e:!h.hasClass(f),h[e?"addClass":"removeClass"](f);else(r===o||r==="boolean")&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;t<r;t++)if(this[t].nodeType===1&&(" "+this[t].className+" ").replace(fi," ").indexOf(i)>=0)return!0;return!1},val:function(n){var u,r,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f,o=i(this);this.nodeType===1&&(f=e?n.call(this,u,o.val()):n,f==null?f="":typeof f=="number"?f+="":i.isArray(f)&&(f=i.map(f,function(n){return n==null?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t)?u:(u=f.value,typeof u=="string"?u.replace(oe,""):u==null?"":u):void 0}});i.extend({valHooks:{option:{get:function(n){var t=n.attributes.value;return!t||t.specified?n.value:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,u=n.type==="select-one"||r<0,s=u?null:[],h=u?r+1:o.length,f=r<0?h:u?r:0;f<h;f++)if(t=o[f],(t.selected||f===r)&&(i.support.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),u)return e;s.push(e)}return s},set:function(n,t){var r=i.makeArray(t);return i(n).find("option").each(function(){this.selected=i.inArray(i(this).val(),r)>=0}),r.length||(n.selectedIndex=-1),r}}},attr:function(n,r,u){var f,s,e,h=n.nodeType;if(n&&h!==3&&h!==8&&h!==2){if(typeof n.getAttribute===o)return i.prop(n,r,u);if(s=h!==1||!i.isXMLDoc(n),s&&(r=r.toLowerCase(),f=i.attrHooks[r]||(fu.test(r)?uu:nt)),u!==t)if(u===null)i.removeAttr(n,r);else return f&&s&&"set"in f&&(e=f.set(n,u,r))!==t?e:(n.setAttribute(r,u+""),u);else return f&&s&&"get"in f&&(e=f.get(n,r))!==null?e:(typeof n.getAttribute!==o&&(e=n.getAttribute(r)),e==null?t:e)}},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(s);if(f&&n.nodeType===1)while(r=f[e++])u=i.propFix[r]||r,fu.test(r)?!a&&ei.test(r)?n[i.camelCase("default-"+r)]=n[u]=!1:n[u]=!1:i.attr(n,r,""),n.removeAttribute(a?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&t==="radio"&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&o!==3&&o!==8&&o!==2)return s=o!==1||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&(e=f.get(n,r))!==null?e:n[r]},propHooks:{tabIndex:{get:function(n){var i=n.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):se.test(n.nodeName)||he.test(n.nodeName)&&n.href?0:t}}}});uu={get:function(n,r){var u=i.prop(n,r),f=typeof u=="boolean"&&n.getAttribute(r),e=typeof u=="boolean"?oi&&a?f!=null:ei.test(r)?n[i.camelCase("default-"+r)]:!!f:n.getAttributeNode(r);return e&&e.value!==!1?r.toLowerCase():t},set:function(n,t,r){return t===!1?i.removeAttr(n,r):oi&&a||!ei.test(r)?n.setAttribute(!a&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};oi&&a||(i.attrHooks.value={get:function(n,r){var u=n.getAttributeNode(r);return i.nodeName(n,"input")?n.defaultValue:u&&u.specified?u.value:t},set:function(n,t,r){if(i.nodeName(n,"input"))n.defaultValue=t;else return nt&&nt.set(n,t,r)}});a||(nt=i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&(i==="id"||i==="name"||i==="coords"?r.value!=="":r.specified)?r.value:t},set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="",r==="value"||i===n.getAttribute(r)?i:t}},i.attrHooks.contenteditable={get:nt.get,set:function(n,t,i){nt.set(n,t===""?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]=i.extend(i.attrHooks[t],{set:function(n,i){if(i==="")return n.setAttribute(t,"auto"),i}})}));i.support.hrefNormalized||(i.each(["href","src","width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{get:function(n){var i=n.getAttribute(r,2);return i==null?t:i}})}),i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}}));i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}});i.support.optSelected||(i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}));i.support.enctype||(i.propFix.enctype="encoding");i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(n){return n.getAttribute("value")===null?"on":n.value}}});i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}})});var si=/^(?:input|select|textarea)$/i,ce=/^key/,le=/^(?:mouse|contextmenu)|click/,eu=/^(?:focusinfocus|focusoutblur)$/,ou=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var b,p,k,w,c,l,a,v,h,d,g,y=i._data(n);if(y){for(u.handler&&(w=u,u=w.handler,e=w.selector),u.guid||(u.guid=i.guid++),(p=y.events)||(p=y.events={}),(l=y.handle)||(l=y.handle=function(n){return typeof i!==o&&(!n||i.event.triggered!==n.type)?i.event.dispatch.apply(l.elem,arguments):t},l.elem=n),r=(r||"").match(s)||[""],k=r.length;k--;)b=ou.exec(r[k])||[],h=g=b[1],d=(b[2]||"").split(".").sort(),c=i.event.special[h]||{},h=(e?c.delegateType:c.bindType)||h,c=i.event.special[h]||{},a=i.extend({type:h,origType:g,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:d.join(".")},w),(v=p[h])||(v=p[h]=[],v.delegateCount=0,c.setup&&c.setup.call(n,f,d,l)!==!1||(n.addEventListener?n.addEventListener(h,l,!1):n.attachEvent&&n.attachEvent("on"+h,l))),c.add&&(c.add.call(n,a),a.handler.guid||(a.handler.guid=u.guid)),e?v.splice(v.delegateCount++,0,a):v.push(a),i.event.global[h]=!0;n=null}},remove:function(n,t,r,u,f){var y,o,h,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(s)||[""],p=t.length;p--;){if(h=ou.exec(t[p])||[],e=k=h[1],w=(h[2]||"").split(".").sort(),!e){for(e in a)i.event.remove(n,e+t[p],r,u,!0);continue}for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],h=h[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],(f||k===o.origType)&&(!r||r.guid===o.guid)&&(!h||h.test(o.namespace))&&(!u||u===o.selector||u==="**"&&o.selector)&&(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var a,v,h,p,l,c,w,b=[e||r],s=rt.call(u,"type")?u.type:u,y=rt.call(u,"namespace")?u.namespace.split("."):[];if((h=c=e=e||r,e.nodeType!==3&&e.nodeType!==8)&&!eu.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(y=s.split("."),s=y.shift(),y.sort()),v=s.indexOf(":")<0&&"on"+s,u=u[i.expando]?u:new i.Event(s,typeof u=="object"&&u),u.isTrigger=!0,u.namespace=y.join("."),u.namespace_re=u.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=f==null?[u]:i.makeArray(f,[u]),l=i.event.special[s]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(p=l.delegateType||s,eu.test(p+s)||(h=h.parentNode);h;h=h.parentNode)b.push(h),c=h;c===(e.ownerDocument||r)&&b.push(c.defaultView||c.parentWindow||n)}for(w=0;(h=b[w++])&&!u.isPropagationStopped();)u.type=w>1?p:l.bindType||s,a=(i._data(h,"events")||{})[u.type]&&i._data(h,"handle"),a&&a.apply(h,f),a=v&&h[v],a&&i.acceptData(h)&&a.apply&&a.apply(h,f)===!1&&u.preventDefault();if(u.type=s,!o&&!u.isDefaultPrevented()&&(!l._default||l._default.apply(e.ownerDocument,f)===!1)&&!(s==="click"&&i.nodeName(e,"a"))&&i.acceptData(e)&&v&&e[s]&&!i.isWindow(e)){c=e[v];c&&(e[v]=null);i.event.triggered=s;try{e[s]()}catch(k){}i.event.triggered=t;c&&(e[v]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var o,e,r,u,s,h=[],c=l.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,a),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(r=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(u.elem,c),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,r){var e,o,f,s,c=[],h=r.delegateCount,u=n.target;if(h&&u.nodeType&&(!n.button||n.type!=="click"))for(;u!=this;u=u.parentNode||this)if(u.nodeType===1&&(u.disabled!==!0||n.type!=="click")){for(f=[],s=0;s<h;s++)o=r[s],e=o.selector+" ",f[e]===t&&(f[e]=o.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(o);f.length&&c.push({elem:u,handlers:f})}return h<r.length&&c.push({elem:this,handlers:r.slice(h)}),c},fix:function(n){if(n[i.expando])return n;var e,o,s,u=n.type,f=n,t=this.fixHooks[u];for(t||(this.fixHooks[u]=t=le.test(u)?this.mouseHooks:ce.test(u)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||r),n.target.nodeType===3&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return n.which==null&&(n.which=t.charCode!=null?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var u,o,f,e=i.button,s=i.fromElement;return n.pageX==null&&i.clientX!=null&&(o=n.target.ownerDocument||r,f=o.documentElement,u=o.body,n.pageX=i.clientX+(f&&f.scrollLeft||u&&u.scrollLeft||0)-(f&&f.clientLeft||u&&u.clientLeft||0),n.pageY=i.clientY+(f&&f.scrollTop||u&&u.scrollTop||0)-(f&&f.clientTop||u&&u.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=e&1?1:e&2?3:e&4?2:0),n}},special:{load:{noBubble:!0},click:{trigger:function(){if(i.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==r.activeElement&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===r.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?et:b):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,preventDefault:function(){var n=this.originalEvent;(this.isDefaultPrevented=et,n)&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;(this.isPropagationStopped=et,n)&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=et;this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.support.submitBubbles||(i.event.special.submit={setup:function(){if(i.nodeName(this,"form"))return!1;i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){if(i.nodeName(this,"form"))return!1;i.event.remove(this,"._submit")}});i.support.changeBubbles||(i.event.special.change={setup:function(){if(si.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(i.event.add(this,"propertychange._change",function(n){n.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1;i.event.add(this,"beforeactivate._change",function(n){var t=n.target;si.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!si.test(this.nodeName)}});i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){u++==0&&r.addEventListener(n,f,!0)},teardown:function(){--u==0&&r.removeEventListener(n,f,!0)}}});i.fn.extend({on:function(n,r,u,f,e){var s,o;if(typeof n=="object"){typeof r!="string"&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(u==null&&f==null?(f=r,u=r=t):f==null&&(typeof r=="string"?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=b;else if(!f)return this;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if(typeof n=="object"){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||typeof r=="function")&&(u=r,r=t),u===!1&&(u=b),this.each(function(){i.event.remove(this,n,u,r)})},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}}); /*! * Sizzle CSS Selector Engine * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ (function(n,t){function bt(n){return er.test(n+"")}function kt(){var n,t=[];return n=function(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}}function c(n){return n[f]=!0,n}function p(n){var t=s.createElement("div");try{return n(t)}catch(i){return!1}finally{t=null}}function u(n,t,i,r){var y,u,e,c,p,v,w,h,k,b;if((t?t.ownerDocument||t:d)!==s&&it(t),t=t||s,i=i||[],!n||typeof n!="string")return i;if((c=t.nodeType)!==1&&c!==9)return[];if(!l&&!r){if(y=or.exec(n))if(e=y[1]){if(c===9)if(u=t.getElementById(e),u&&u.parentNode){if(u.id===e)return i.push(u),i}else return i;else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(e))&&et(t,u)&&u.id===e)return i.push(u),i}else{if(y[2])return ut.apply(i,ft.call(t.getElementsByTagName(n),0)),i;if((e=y[3])&&o.getByClassName&&t.getElementsByClassName)return ut.apply(i,ft.call(t.getElementsByClassName(e),0)),i}if(o.qsa&&!a.test(n)){if(w=!0,h=f,k=t,b=c===9&&n,c===1&&t.nodeName.toLowerCase()!=="object"){for(v=ot(n),(w=t.getAttribute("id"))?h=w.replace(cr,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",p=v.length;p--;)v[p]=h+st(v[p]);k=ei.test(n)&&t.parentNode||t;b=v.join(",")}if(b)try{return ut.apply(i,ft.call(k.querySelectorAll(b),0)),i}catch(g){}finally{w||t.removeAttribute("id")}}}return gi(n.replace(pt,"$1"),t,i,r)}function oi(n,t){var i=t&&n,r=i&&(~t.sourceIndex||vi)-(~n.sourceIndex||vi);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function wi(n){return function(t){var i=t.nodeName.toLowerCase();return i==="input"&&t.type===n}}function bi(n){return function(t){var i=t.nodeName.toLowerCase();return(i==="input"||i==="button")&&t.type===n}}function k(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ot(n,t){var e,f,s,o,i,h,c,l=li[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],c=r.preFilter;i;){(!e||(f=ir.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(s=[]));e=!1;(f=rr.exec(i))&&(e=f.shift(),s.push({value:e,type:f[0].replace(pt," ")}),i=i.slice(e.length));for(o in r.filter)(f=wt[o].exec(i))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):li(n,h).slice(0)}function st(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function dt(n,t,i){var r=t.dir,u=i&&r==="parentNode",e=nr++;return t.first?function(t,i,f){while(t=t[r])if(t.nodeType===1||u)return n(t,i,f)}:function(t,i,o){var h,s,c,l=v+" "+e;if(o){while(t=t[r])if((t.nodeType===1||u)&&n(t,i,o))return!0}else while(t=t[r])if(t.nodeType===1||u)if(c=t[f]||(t[f]={}),(s=c[r])&&s[0]===l){if((h=s[1])===!0||h===ct)return h===!0}else if(s=c[r]=[l],s[1]=n(t,i,o)||ct,s[1]===!0)return!0}}function gt(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ht(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ni(n,t,i,r,u,e){return r&&!r[f]&&(r=ni(r)),u&&!u[f]&&(u=ni(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||di(t||"*",o.nodeType?[o]:o,[]),v=n&&(f||!t)?ht(b,p,n,o,s):b,h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=ht(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?ui.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=ht(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):ut.apply(e,h)})}function ti(n){for(var s,u,i,o=n.length,h=r.relative[n[0].type],c=h||r.relative[" "],t=h?1:0,l=dt(function(n){return n===s},c,!0),a=dt(function(n){return ui.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==at)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];t<o;t++)if(u=r.relative[n[t].type])e=[dt(gt(e),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[f]){for(i=++t;i<o;i++)if(r.relative[n[i].type])break;return ni(t>1&>(e),t>1&&st(n.slice(0,t-1)).replace(pt,"$1"),u,t<i&&ti(n.slice(t,i)),i<o&&ti(n=n.slice(i)),i<o&&st(n))}e.push(u)}return gt(e)}function ki(n,t){var f=0,i=t.length>0,e=n.length>0,o=function(o,h,c,l,a){var p,d,b,w=[],k=0,y="0",g=o&&[],nt=a!=null,tt=at,rt=o||e&&r.find.TAG("*",a&&h.parentNode||h),it=v+=tt==null?1:Math.random()||.1;for(nt&&(at=h!==s&&h,ct=f);(p=rt[y])!=null;y++){if(e&&p){for(d=0;b=n[d++];)if(b(p,h,c)){l.push(p);break}nt&&(v=it,ct=++f)}i&&((p=!b&&p)&&k--,o&&g.push(p))}if(k+=y,i&&y!==k){for(d=0;b=t[d++];)b(g,w,h,c);if(o){if(k>0)while(y--)g[y]||w[y]||(w[y]=tr.call(l));w=ht(w)}ut.apply(l,w);nt&&!o&&w.length>0&&k+t.length>1&&u.uniqueSort(l)}return nt&&(v=it,at=tt),g};return i?c(o):o}function di(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function gi(n,t,i,u){var o,f,e,h,c,s=ot(n);if(!u&&s.length===1){if(f=s[0]=s[0].slice(0),f.length>2&&(e=f[0]).type==="ID"&&t.nodeType===9&&!l&&r.relative[f[1].type]){if(t=r.find.ID(e.matches[0].replace(w,b),t)[0],!t)return i;n=n.slice(f.shift().value.length)}for(o=wt.needsContext.test(n)?0:f.length;o--;){if(e=f[o],r.relative[h=e.type])break;if((c=r.find[h])&&(u=c(e.matches[0].replace(w,b),ei.test(f[0].type)&&t.parentNode||t))){if(f.splice(o,1),n=u.length&&st(f),!n)return ut.apply(i,ft.call(u,0)),i;break}}}return ii(n,s)(u,t,l,i,ei.test(n)),i}function si(){}var nt,ct,r,lt,hi,ii,tt,at,it,s,h,l,a,rt,vt,et,ri,f="sizzle"+-new Date,d=n.document,o={},v=0,nr=0,ci=kt(),li=kt(),ai=kt(),y=typeof t,vi=-2147483648,yt=[],tr=yt.pop,ut=yt.push,ft=yt.slice,ui=yt.indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]===n)return t;return-1},e="[\\x20\\t\\r\\n\\f]",g="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=g.replace("w","w#"),pi="\\["+e+"*("+g+")"+e+"*(?:([*^$|!~]?=)"+e+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+yi+")|)|)"+e+"*\\]",fi=":("+g+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+pi.replace(3,8)+")*)|.*)\\)|)",pt=new RegExp("^"+e+"+|((?:^|[^\\\\])(?:\\\\.)*)"+e+"+$","g"),ir=new RegExp("^"+e+"*,"+e+"*"),rr=new RegExp("^"+e+"*([\\x20\\t\\r\\n\\f>+~])"+e+"*"),ur=new RegExp(fi),fr=new RegExp("^"+yi+"$"),wt={ID:new RegExp("^#("+g+")"),CLASS:new RegExp("^\\.("+g+")"),NAME:new RegExp("^\\[name=['\"]?("+g+")['\"]?\\]"),TAG:new RegExp("^("+g.replace("w","w*")+")"),ATTR:new RegExp("^"+pi),PSEUDO:new RegExp("^"+fi),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+e+"*(even|odd|(([+-]|)(\\d*)n|)"+e+"*(?:([+-]|)"+e+"*(\\d+)|))"+e+"*\\)|)","i"),needsContext:new RegExp("^"+e+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+e+"*((?:-\\d)?\\d*)"+e+"*\\)|)(?=[^-]|$)","i")},ei=/[\x20\t\r\n\f]*[+~]/,er=/^[^{]+\{\s*\[native code/,or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,cr=/'|\\/g,lr=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,w=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,b=function(n,t){var i="0x"+t-65536;return i!==i?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)};try{ft.call(d.documentElement.childNodes,0)[0].nodeType}catch(ar){ft=function(n){for(var t,i=[];t=this[n++];)i.push(t);return i}}hi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?t.nodeName!=="HTML":!1};it=u.setDocument=function(n){var i=n?n.ownerDocument||n:d;return i===s||i.nodeType!==9||!i.documentElement?s:(s=i,h=i.documentElement,l=hi(i),o.tagNameNoComments=p(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),o.attributes=p(function(n){n.innerHTML="<select><\/select>";var t=typeof n.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),o.getByClassName=p(function(n){return(n.innerHTML="<div class='hidden e'><\/div><div class='hidden'><\/div>",!n.getElementsByClassName||!n.getElementsByClassName("e").length)?!1:(n.lastChild.className="e",n.getElementsByClassName("e").length===2)}),o.getByName=p(function(n){n.id=f+0;n.innerHTML="<a name='"+f+"'><\/a><div name='"+f+"'><\/div>";h.insertBefore(n,h.firstChild);var t=i.getElementsByName&&i.getElementsByName(f).length===2+i.getElementsByName(f+0).length;return o.getIdNotName=!i.getElementById(f),h.removeChild(n),t}),r.attrHandle=p(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild&&typeof n.firstChild.getAttribute!==y&&n.firstChild.getAttribute("href")==="#"})?{}:{href:function(n){return n.getAttribute("href",2)},type:function(n){return n.getAttribute("type")}},o.getIdNotName?(r.find.ID=function(n,t){if(typeof t.getElementById!==y&&!l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(w,b);return function(n){return n.getAttribute("id")===t}}):(r.find.ID=function(n,i){if(typeof i.getElementById!==y&&!l){var r=i.getElementById(n);return r?r.id===n||typeof r.getAttributeNode!==y&&r.getAttributeNode("id").value===n?[r]:t:[]}},r.filter.ID=function(n){var t=n.replace(w,b);return function(n){var i=typeof n.getAttributeNode!==y&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=o.tagNameNoComments?function(n,t){if(typeof t.getElementsByTagName!==y)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if(n==="*"){while(i=u[f++])i.nodeType===1&&r.push(i);return r}return u},r.find.NAME=o.getByName&&function(n,t){if(typeof t.getElementsByName!==y)return t.getElementsByName(name)},r.find.CLASS=o.getByClassName&&function(n,t){if(typeof t.getElementsByClassName!==y&&!l)return t.getElementsByClassName(n)},rt=[],a=[":focus"],(o.qsa=bt(i.querySelectorAll))&&(p(function(n){n.innerHTML="<select><option selected=''><\/option><\/select>";n.querySelectorAll("[selected]").length||a.push("\\["+e+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");n.querySelectorAll(":checked").length||a.push(":checked")}),p(function(n){n.innerHTML="<input type='hidden' i=''/>";n.querySelectorAll("[i^='']").length&&a.push("[*^$]="+e+"*(?:\"\"|'')");n.querySelectorAll(":enabled").length||a.push(":enabled",":disabled");n.querySelectorAll("*,:x");a.push(",.*:")})),(o.matchesSelector=bt(vt=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&p(function(n){o.disconnectedMatch=vt.call(n,"div");vt.call(n,"[s!='']:x");rt.push("!=",fi)}),a=new RegExp(a.join("|")),rt=new RegExp(rt.join("|")),et=bt(h.contains)||h.compareDocumentPosition?function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},ri=h.compareDocumentPosition?function(n,t){var r;return n===t?(tt=!0,0):(r=t.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(t))?r&1||n.parentNode&&n.parentNode.nodeType===11?n===i||et(d,n)?-1:t===i||et(d,t)?1:0:r&4?-1:1:n.compareDocumentPosition?-1:1}:function(n,t){var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(n===t)return tt=!0,0;if(o&&s){if(o===s)return oi(n,t)}else return n===i?-1:t===i?1:o?-1:s?1:0;for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?oi(f[u],e[u]):f[u]===d?-1:e[u]===d?1:0},tt=!1,[0,0].sort(ri),o.detectDuplicates=tt,s)};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&it(n),t=t.replace(lr,"='$1']"),o.matchesSelector&&!l&&(!rt||!rt.test(t))&&!a.test(t))try{var i=vt.call(n,t);if(i||o.disconnectedMatch||n.document&&n.document.nodeType!==11)return i}catch(r){}return u(t,s,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==s&&it(n),et(n,t)};u.attr=function(n,t){var i;return((n.ownerDocument||n)!==s&&it(n),l||(t=t.toLowerCase()),i=r.attrHandle[t])?i(n):l||o.attributes?n.getAttribute(t):((i=n.getAttributeNode(t))||n.getAttribute(t))&&n[t]===!0?t:i&&i.specified?i.value:null};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=1,i=0;if(tt=!o.detectDuplicates,n.sort(ri),tt){for(;r=n[t];t++)r===n[t-1]&&(i=u.push(t));while(i--)n.splice(u[i],1)}return n};lt=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=lt(n)}else if(t===3||t===4)return n.nodeValue}else for(;r=n[u];u++)i+=lt(r);return i};r=u.selectors={cacheLength:50,createPseudo:c,match:wt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(w,b),n[3]=(n[4]||n[5]||"").replace(w,b),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1].slice(0,3)==="nth"?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*(n[3]==="even"||n[3]==="odd")),n[5]=+(n[7]+n[8]||n[3]==="odd")):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[5]&&n[2];return wt.CHILD.test(n[0])?null:(n[4]?n[2]=n[4]:t&&ur.test(t)&&(i=ot(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){return n==="*"?function(){return!0}:(n=n.replace(w,b).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===n})},CLASS:function(n){var t=ci[n+" "];return t||(t=new RegExp("(^|"+e+")"+n+"("+e+"|$)"))&&ci(n,function(n){return t.test(n.className||typeof n.getAttribute!==y&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return f==null?t==="!=":t?(f+="",t==="="?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.slice(-i.length)===i:t==="~="?(" "+f+" ").indexOf(i)>-1:t==="|="?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s=n.slice(0,3)!=="nth",o=n.slice(-4)!=="last",e=t==="of-type";return r===1&&u===0?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;w=b=n==="only"&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(c.nodeType===1&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,t){var e,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[f]?i(t):i.length>1?(e=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=ui.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,e)}):i}},pseudos:{not:c(function(n){var i=[],r=[],t=ii(n.replace(pt,"$1"));return t[f]?c(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:c(function(n){return function(t){return u(n,t).length>0}}),contains:c(function(n){return function(t){return(t.textContent||t.innerText||lt(t)).indexOf(n)>-1}}),lang:c(function(n){return fr.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(w,b).toLowerCase(),function(t){var i;do if(i=l?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return i=i.toLowerCase(),i===n||i.indexOf(n+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===h},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&!!n.checked||t==="option"&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||n.nodeType===3||n.nodeType===4)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&n.type==="button"||t==="button"},text:function(n){var t;return n.nodeName.toLowerCase()==="input"&&n.type==="text"&&((t=n.getAttribute("type"))==null||t.toLowerCase()===n.type)},first:k(function(){return[0]}),last:k(function(n,t){return[t-1]}),eq:k(function(n,t,i){return[i<0?i+t:i]}),even:k(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:k(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:k(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:k(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};for(nt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[nt]=wi(nt);for(nt in{submit:!0,reset:!0})r.pseudos[nt]=bi(nt);ii=u.compile=function(n,t){var r,u=[],e=[],i=ai[n+" "];if(!i){for(t||(t=ot(n)),r=t.length;r--;)i=ti(t[r]),i[f]?u.push(i):e.push(i);i=ai(n,ki(e,u))}return i};r.pseudos.nth=r.pseudos.eq;r.filters=si.prototype=r.pseudos;r.setFilters=new si;it();u.attr=i.attr;i.find=u;i.expr=u.selectors;i.expr[":"]=i.expr.pseudos;i.unique=u.uniqueSort;i.text=u.getText;i.isXMLDoc=u.isXML;i.contains=u.contains})(n);var ae=/Until$/,ve=/^(?:parents|prev(?:Until|All))/,ye=/^.[^:#\[\.,]*$/,su=i.expr.match.needsContext,pe={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r,f,u=this.length;if(typeof n!="string")return f=this,this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(r=[],t=0;t<u;t++)i.find(n,this[t],r);return r=this.pushStack(u>1?i.unique(r):r),r.selector=(this.selector?this.selector+" ":"")+n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;t<u;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(gi(this,n,!1))},filter:function(n){return this.pushStack(gi(this,n,!0))},is:function(n){return!!n&&(typeof n=="string"?su.test(n)?i(n,this.context).index(this[0])>=0:i.filter(n,this).length>0:this.filter(n).length>0)},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=su.test(n)||typeof n!="string"?i(n,t||this.context):0;f<o;f++)for(r=this[f];r&&r.ownerDocument&&r!==t&&r.nodeType!==11;){if(e?e.index(r)>-1:i.find.matchesSelector(r,n)){u.push(r);break}r=r.parentNode}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?typeof n=="string"?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var r=typeof n=="string"?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),u=i.merge(this.get(),r);return this.pushStack(i.unique(u))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.fn.andSelf=i.fn.addBack;i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return di(n,"nextSibling")},prev:function(n){return di(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return ae.test(n)||(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),f=this.length>1&&!pe[n]?i.unique(f):f,this.length>1&&ve.test(n)&&(f=f.reverse()),this.pushStack(f)}});i.extend({filter:function(n,t,r){return r&&(n=":not("+n+")"),t.length===1?i.find.matchesSelector(t[0],n)?[t[0]]:[]:i.find.matches(n,t)},dir:function(n,r,u){for(var e=[],f=n[r];f&&f.nodeType!==9&&(u===t||f.nodeType!==1||!i(f).is(u));)f.nodeType===1&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i}});var hu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",we=/ jQuery\d+="(?:null|\d+)"/g,cu=new RegExp("<(?:"+hu+")[\\s/>]","i"),hi=/^\s+/,lu=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,au=/<([\w:]+)/,vu=/<tbody/i,be=/<|&#?\w+;/,ke=/<(?:script|style|link)/i,ci=/^(?:checkbox|radio)$/i,de=/checked\s*(?:[^=]|=\s*.checked.)/i,yu=/^$|\/(?:java|ecma)script/i,ge=/^true\/(.*)/,no=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},to=nr(r),li=to.appendChild(r.createElement("div"));e.optgroup=e.option;e.tbody=e.tfoot=e.colgroup=e.caption=e.thead;e.th=e.td;i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&n.firstChild.nodeType===1;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(n){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.appendChild(n)})},prepend:function(){return this.domManip(arguments,!0,function(n){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.insertBefore(n,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,f=0;(r=this[f])!=null;f++)(!n||i.filter(n,[r]).length>0)&&(t||r.nodeType!==1||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&kt(u(r,"script")),r.parentNode.removeChild(r)));return this},empty:function(){for(var n,t=0;(n=this[t])!=null;t++){for(n.nodeType===1&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return r.nodeType===1?r.innerHTML.replace(we,""):t;if(typeof n=="string"&&!ke.test(n)&&(i.support.htmlSerialize||!cu.test(n))&&(i.support.leadingWhitespace||!hi.test(n))&&!e[(au.exec(n)||["",""])[1].toLowerCase()]){n=n.replace(lu,"<$1><\/$2>");try{for(;f<o;f++)r=this[f]||{},r.nodeType===1&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(n){var t=i.isFunction(n);return t||typeof n=="string"||(n=i(n).not(this).detach()),this.domManip([n],!0,function(n){var r=this.nextSibling,t=this.parentNode;t&&(i(this).remove(),t.insertBefore(n,r))})},detach:function(n){return this.remove(n,!0)},domManip:function(n,r,f){n=kr.apply([],n);var c,e,l,s,y,h,o=0,a=this.length,w=this,b=a-1,v=n[0],p=i.isFunction(v);if(p||!(a<=1||typeof v!="string"||i.support.checkClone||!de.test(v)))return this.each(function(i){var u=w.eq(i);p&&(n[0]=v.call(this,i,r?u.html():t));u.domManip(n,r,f)});if(a&&(h=i.buildFragment(n,this[0].ownerDocument,!1,this),c=h.firstChild,h.childNodes.length===1&&(h=c),c)){for(r=r&&i.nodeName(c,"tr"),s=i.map(u(h,"script"),tr),l=s.length;o<a;o++)e=h,o!==b&&(e=i.clone(e,!0,!0),l&&i.merge(s,u(e,"script"))),f.call(r&&i.nodeName(this[o],"table")?ef(this[o],"tbody"):this[o],e,o);if(l)for(y=s[s.length-1].ownerDocument,i.map(s,ir),o=0;o<l;o++)e=s[o],yu.test(e.type||"")&&!i._data(e,"globalEval")&&i.contains(y,e)&&(e.src?i.ajax({url:e.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):i.globalEval((e.text||e.textContent||e.innerHTML||"").replace(no,"")));h=c=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ti.apply(f,u.get());return this.pushStack(f)}});i.extend({clone:function(n,t,r){var f,h,o,e,s,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!cu.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(li.innerHTML=n.outerHTML,li.removeChild(o=li.firstChild)),(!i.support.noCloneEvent||!i.support.noCloneChecked)&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(f=u(o),s=u(n),e=0;(h=s[e])!=null;++e)f[e]&&of(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;(h=s[e])!=null;e++)rr(h,f[e]);else rr(n,o);return f=u(o,"script"),f.length>0&&kt(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var h,o,w,s,y,p,l,b=n.length,a=nr(t),c=[],v=0;v<b;v++)if(o=n[v],o||o===0)if(i.type(o)==="object")i.merge(c,o.nodeType?[o]:o);else if(be.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(au.exec(o)||["",""])[1].toLowerCase(),l=e[y]||e._default,s.innerHTML=l[1]+o.replace(lu,"<$1><\/$2>")+l[2],h=l[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&hi.test(o)&&c.push(t.createTextNode(hi.exec(o)[0])),!i.support.tbody)for(o=y==="table"&&!vu.test(o)?s.firstChild:l[1]==="<table>"&&!vu.test(o)?s:0,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),sf),v=0;o=c[v++];)if((!f||i.inArray(o,f)===-1)&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&kt(s),r))for(h=0;o=s[h++];)yu.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,t){for(var r,e,u,f,c=0,s=i.expando,h=i.cache,l=i.support.deleteExpando,a=i.event.special;(r=n[c])!=null;c++)if((t||i.acceptData(r))&&(u=r[s],f=u&&h[u],f)){if(f.events)for(e in f.events)a[e]?i.event.remove(r,e):i.removeEvent(r,e,f.handle);h[u]&&(delete h[u],l?delete r[s]:typeof r.removeAttribute!==o?r.removeAttribute(s):r[s]=null,k.push(u))}}});var ut,v,y,ai=/alpha\([^)]*\)/i,io=/opacity\s*=\s*([^)]*)/,ro=/^(top|right|bottom|left)$/,uo=/^(none|table(?!-c[ea]).+)/,pu=/^margin/,fo=new RegExp("^("+ct+")(.*)$","i"),vt=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),eo=new RegExp("^([+-])=("+ct+")","i"),wu={BODY:"block"},oo={position:"absolute",visibility:"hidden",display:"block"},bu={letterSpacing:0,fontWeight:400},p=["Top","Right","Bottom","Left"],ku=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,o,s={},f=0;if(i.isArray(r)){for(o=v(n),e=r.length;f<e;f++)s[r[f]]=i.css(n,r[f],!1,o);return s}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return fr(this,!0)},hide:function(){return fr(this)},toggle:function(n){var t=typeof n=="boolean";return this.each(function(){(t?n:it(this))?i(this).show():i(this).hide()})}});i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=y(n,"opacity");return i===""?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=ur(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u!==t){if(s=typeof u,s==="string"&&(o=eo.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),u==null||s==="number"&&isNaN(u))return;if(s!=="number"||i.cssNumber[h]||(u+="px"),i.support.clearCloneStyle||u!==""||r.indexOf("background")!==0||(c[r]="inherit"),!e||!("set"in e)||(u=e.set(n,u,f))!==t)try{c[r]=u}catch(l){}}else return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r]}},css:function(n,r,u,f){var h,e,o,s=i.camelCase(r);return(r=i.cssProps[s]||(i.cssProps[s]=ur(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=y(n,r,f)),e==="normal"&&r in bu&&(e=bu[r]),u===""||u)?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e},swap:function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f}});n.getComputedStyle?(v=function(t){return n.getComputedStyle(t,null)},y=function(n,r,u){var s,h,c,o=u||v(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(e!==""||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),vt.test(e)&&pu.test(r)&&(s=f.width,h=f.minWidth,c=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=s,f.minWidth=h,f.maxWidth=c)),e}):r.documentElement.currentStyle&&(v=function(n){return n.currentStyle},y=function(n,i,r){var s,e,o,h=r||v(n),u=h?h[i]:t,f=n.style;return u==null&&f&&f[i]&&(u=f[i]),vt.test(u)&&!ro.test(i)&&(s=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left=i==="fontSize"?"1em":u,u=f.pixelLeft+"px",f.left=s,o&&(e.left=o)),u===""?"auto":u});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return n.offsetWidth===0&&uo.test(i.css(n,"display"))?i.swap(n,oo,function(){return sr(n,t,u)}):sr(n,t,u)},set:function(n,r,u){var f=u&&v(n);return er(n,r,u?or(n,t,u,i.support.boxSizing&&i.css(n,"boxSizing",!1,f)==="border-box",f):0)}}});i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return io.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+t*100+")":"",f=u&&u.filter||r.filter||"";(r.zoom=1,(t>=1||t==="")&&i.trim(f.replace(ai,""))===""&&r.removeAttribute&&(r.removeAttribute("filter"),t===""||u&&!u.filter))||(r.filter=ai.test(f)?f.replace(ai,e):f+" "+e)}});i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,t){if(t)return i.swap(n,{display:"inline-block"},y,[n,"marginRight"])}});!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,t){i.cssHooks[t]={get:function(n,r){if(r)return r=y(n,t),vt.test(r)?i(n).position()[t]+"px":r}}})});i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!i.support.reliableHiddenOffsets&&(n.style&&n.style.display||i.css(n,"display"))==="none"},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u=typeof i=="string"?i.split(" "):[i];r<4;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};pu.test(n)||(i.cssHooks[n+t].set=er)});var so=/%20/g,ho=/\[\]$/,du=/\r?\n/g,co=/^(?:submit|button|image|reset|file)$/i,lo=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&lo.test(this.nodeName)&&!co.test(n)&&(this.checked||!ci.test(n))}).map(function(n,t){var r=i(this).val();return r==null?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(du,"\r\n")}}):{name:t.name,value:r.replace(du,"\r\n")}}).get()}});i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():t==null?"":t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)dt(u,n[u],r,e);return f.join("&").replace(so,"+")};i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.hover=function(n,t){return this.mouseenter(n).mouseleave(t||n)};var w,c,vi=i.now(),yi=/\?/,ao=/#.*$/,gu=/([?&])_=[^&]*/,vo=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,yo=/^(?:GET|HEAD)$/,po=/^\/\//,nf=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,tf=i.fn.load,rf={},pi={},uf="*/".concat("*");try{c=pf.href}catch(go){c=r.createElement("a");c.href="";c=c.href}w=nf.exec(c.toLowerCase())||[];i.fn.load=function(n,r,u){if(typeof n!="string"&&tf)return tf.apply(this,arguments);var f,s,h,e=this,o=n.indexOf(" ");return o>=0&&(f=n.slice(o,n.length),n=n.slice(0,o)),i.isFunction(r)?(u=r,r=t):r&&typeof r=="object"&&(h="POST"),e.length>0&&i.ajax({url:n,type:h,dataType:"html",data:r}).done(function(n){s=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).complete(u&&function(n,t){e.each(u,s||[n.responseText,t,n])}),this};i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}});i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:c,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(w[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":uf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":n.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?gt(gt(n,i.ajaxSettings),t):gt(i.ajaxSettings,n)},ajaxPrefilter:lr(rf),ajaxTransport:lr(pi),ajax:function(n,r){function p(n,r,s,c){var l,b,w,rt,p,a=r;o!==2&&(o=2,g&&clearTimeout(g),v=t,d=c||"",f.readyState=n>0?4:0,s&&(rt=hf(u,f,s)),n>=200&&n<300||n===304?(u.ifModified&&(p=f.getResponseHeader("Last-Modified"),p&&(i.lastModified[e]=p),p=f.getResponseHeader("etag"),p&&(i.etag[e]=p)),n===204?(l=!0,a="nocontent"):n===304?(l=!0,a="notmodified"):(l=cf(u,rt),a=l.state,b=l.data,w=l.error,l=!w)):(w=a,(n||!a)&&(a="error",n<0&&(n=0))),f.status=n,f.statusText=(r||a)+"",l?tt.resolveWith(h,[b,a,f]):tt.rejectWith(h,[f,a,w]),f.statusCode(k),k=t,y&&nt.trigger(l?"ajaxSuccess":"ajaxError",[f,u,l?b:w]),it.fireWith(h,[f,a]),y&&(nt.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}typeof n=="object"&&(r=n,n=t);r=r||{};var l,a,e,d,g,y,v,b,u=i.ajaxSetup({},r),h=u.context||u,nt=u.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),k=u.statusCode||{},rt={},ut={},o=0,ft="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(o===2){if(!b)for(b={};t=vo.exec(d);)b[t[1].toLowerCase()]=t[2];t=b[n.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return o===2?d:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return o||(n=ut[i]=ut[i]||n,rt[n]=t),this},overrideMimeType:function(n){return o||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(o<2)for(t in n)k[t]=[k[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||ft;return v&&v.abort(t),p(0,t),this}};if(tt.promise(f).complete=it.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||c)+"").replace(ao,"").replace(po,w[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(s)||[""],u.crossDomain==null&&(l=nf.exec(u.url.toLowerCase()),u.crossDomain=!!(l&&(l[1]!==w[1]||l[2]!==w[2]||(l[3]||(l[1]==="http:"?80:443))!=(w[3]||(w[1]==="http:"?80:443))))),u.data&&u.processData&&typeof u.data!="string"&&(u.data=i.param(u.data,u.traditional)),ar(rf,u,r,f),o===2)return f;y=u.global;y&&i.active++==0&&i.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!yo.test(u.type);e=u.url;u.hasContent||(u.data&&(e=u.url+=(yi.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=gu.test(e)?e.replace(gu,"$1_="+vi++):e+(yi.test(e)?"&":"?")+"_="+vi++));u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e]));(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType);f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+(u.dataTypes[0]!=="*"?", "+uf+"; q=0.01":""):u.accepts["*"]);for(a in u.headers)f.setRequestHeader(a,u.headers[a]);if(u.beforeSend&&(u.beforeSend.call(h,f,u)===!1||o===2))return f.abort();ft="abort";for(a in{success:1,error:1,complete:1})f[a](u[a]);if(v=ar(pi,u,r,f),v){f.readyState=1;y&&nt.trigger("ajaxSend",[f,u]);u.async&&u.timeout>0&&(g=setTimeout(function(){f.abort("timeout")},u.timeout));try{o=1;v.send(rt,p)}catch(et){if(o<2)p(-1,et);else throw et;}}else p(-1,"No Transport");return f},getScript:function(n,r){return i.get(n,t,r,"script")},getJSON:function(n,t,r){return i.get(n,t,r,"json")}});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script");u.async=!0;n.scriptCharset&&(u.charset=n.scriptCharset);u.src=n.url;u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))};f.insertBefore(u,f.firstChild)},abort:function(){if(u)u.onload(t,!0)}}}});ui=[];lt=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ui.pop()||i.expando+"_"+vi++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(lt.test(r.url)?"url":typeof r.data=="string"&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&<.test(r.data)&&"data");if(h||r.dataTypes[0]==="jsonp")return e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(lt,"$1"+e):r.jsonp!==!1&&(r.url+=(yi.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s;r[e]&&(r.jsonpCallback=u.jsonpCallback,ui.push(e));o&&i.isFunction(s)&&s(o[0]);o=s=t}),"script"});ru=0;at=n.ActiveXObject&&function(){for(var n in d)d[n](t,!0)};i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&vr()||lf()}:vr;g=i.ajaxSettings.xhr();i.support.cors=!!g&&"withCredentials"in g;g=i.support.ajax=!!g;g&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType);r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null);u=function(n,f){var s,a,l,c;try{if(u&&(f||o.readyState===4))if(u=t,h&&(o.onreadystatechange=i.noop,at&&delete d[h]),f)o.readyState!==4&&o.abort();else{c={};s=o.status;a=o.getAllResponseHeaders();typeof o.responseText=="string"&&(c.text=o.responseText);try{l=o.statusText}catch(y){l=""}s||!r.isLocal||r.crossDomain?s===1223&&(s=204):s=c.text?200:404}}catch(v){f||e(-1,v)}c&&e(s,l,c,a)};r.async?o.readyState===4?setTimeout(u):(h=++ru,at&&(d||(d={},i(n).unload(at)),d[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var tt,yt,wo=/^(?:toggle|show|hide)$/,bo=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),ko=/queueHooks$/,pt=[yf],ft={"*":[function(n,t){var o,s,r=this.createTween(n,t),e=bo.exec(t),h=r.cur(),u=+h||0,f=1,c=20;if(e){if(o=+e[2],s=e[3]||(i.cssNumber[n]?"":"px"),s!=="px"&&u){u=i.css(r.elem,n,!0)||o||1;do f=f||".5",u=u/f,i.style(r.elem,n,u+s);while(f!==(f=r.cur()/h)&&f!==1&&--c)}r.unit=s;r.start=u;r.end=e[1]?u+(e[1]+1)*o:o}return r}]};i.Animation=i.extend(pr,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;u<f;u++)r=n[u],ft[r]=ft[r]||[],ft[r].unshift(t)},prefilter:function(n,t){t?pt.unshift(n):pt.push(n)}});i.Tween=f;f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var r,t=f.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):f.propHooks._default.set(this),this}};f.prototype.init.prototype=f.prototype;f.propHooks={_default:{get:function(n){var t;return n.elem[n.prop]!=null&&(!n.elem.style||n.elem.style[n.prop]==null)?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(n.elem.style[i.cssProps[n.prop]]!=null||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return n==null||typeof n=="boolean"?r.apply(this,arguments):this.animate(ot(t,!0),n,i,u)}});i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(it).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=pr(this,i.extend({},n),e);f.finish=function(){t.stop(!0)};(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return typeof n!="string"&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=n!=null&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&ko.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem===this&&(n==null||e[t].queue===n)&&(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.cur&&e.cur.finish&&e.cur.finish.call(this),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each({slideDown:ot("show"),slideUp:ot("hide"),slideToggle:ot("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:typeof u.duration=="number"?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.timers=[];i.fx=f.prototype.init;i.fx.tick=function(){var u,n=i.timers,r=0;for(tt=i.now();r<n.length;r++)u=n[r],u()||n[r]!==u||n.splice(r--,1);n.length||i.fx.stop();tt=t};i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()};i.fx.interval=13;i.fx.start=function(){yt||(yt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(yt);yt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fx.step={};i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length});i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,e,f={top:0,left:0},u=this[0],s=u&&u.ownerDocument;if(s)return(r=s.documentElement,!i.contains(r,u))?f:(typeof u.getBoundingClientRect!==o&&(f=u.getBoundingClientRect()),e=wr(s),{top:f.top+(e.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(e.pageXOffset||r.scrollLeft)-(r.clientLeft||0)})};i.offset={setOffset:function(n,t,r){var f=i.css(n,"position");f==="static"&&(n.style.position="relative");var e=i(n),o=e.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=(f==="absolute"||f==="fixed")&&i.inArray("auto",[l,a])>-1,u={},s={},h,c;v?(s=e.position(),h=s.top,c=s.left):(h=parseFloat(l)||0,c=parseFloat(a)||0);i.isFunction(t)&&(t=t.call(n,r,o));t.top!=null&&(u.top=t.top-o.top+h);t.left!=null&&(u.left=t.left-o.left+c);"using"in t?t.using.call(n,u):e.css(u)}};i.fn.extend({position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return i.css(u,"position")==="fixed"?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||r.documentElement;n&&!i.nodeName(n,"html")&&i.css(n,"position")==="static";)n=n.offsetParent;return n||r.documentElement})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=wr(n);if(e===t)return o?r in o?o[r]:o.document.documentElement[f]:n[f];o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e},n,f,arguments.length,null)}});i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||typeof f!="boolean"),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:r.nodeType===9?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})});n.jQuery=n.$=i;typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})}(window),JSON||(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var s,l,h,a,v=n,c,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i));typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,c=[],Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,s=0;s<a;s+=1)c[s]=r(s,o)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",u="",typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return r("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;if(n=String(n),e.lastIndex=0,e.test(n)&&(n=n.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=eval("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}(),actJQuery=jQuery.noConflict(!0),typeof actJQuery=="undefined"){if(typeof jQuery=="undefined"||jQuery.fn.jquery!=="1.9.1")throw"jQuery 1.9.1 required.";actJQuery=jQuery.noConflict()}if(function(n,t){var u={jQueryVersion:t.fn.jquery,browser:{InternetExplorer:{},Firefox:{},Safari:{},Opera:{},agent:null,hasDebuggerStatement:!1,name:navigator.appName,version:parseFloat(navigator.appVersion),documentMode:0},initialized:!1,widgets:[],behaviors:[],createWidget:function(n,i,r,f){var e=r||i,s="act"+n.substr(0,1).toLocaleUpperCase()+n.toLocaleLowerCase().substr(1),o;r||(i=t.Widget);f||(u.widgets[s]=n);e._addHandler=function(t,i){this._handlers[n+t]=i};e._removeHandler=function(t){this._handlers[n+t]&&delete this._handlers[n+t]};e._invokeHandler=function(t,i){var r=this._handlers[n+t];r&&(typeof r=="string"?eval(r)(i):r.call(this,i))};o=e._create;e._create=function(){function r(n,t,i){return function(){var r=[],u;if(r.push(t),arguments)for(u in arguments)r.push(arguments[u]);return i.apply(n,r)}}var f,n,i,h,u,e,s;if(this._handlers=[],this._clientStateElement=t("#"+this.element.attr("id")+"_ClientState"),this.dispose=this.destroy,this._events)for(f=0;f<this._events.length;f++)n=this._events[f],i="add_"+n,this[i]||(this[i]=r(this,n,this._addHandler)),i="remove_"+n,this[i]||(this[i]=r(this,n,this._removeHandler)),i="raise"+$act.common.pascalCase(n),this[i]||(this[i]=r(this,n,this._invokeHandler)),this.options[n]&&(h=this.options[n],delete this.options[n],this["add_"+n](h));if(this.options)for(u in this.options)e="get_"+u,s="set_"+u,this[e]||(this[e]=r(this,u,this.option)),this[s]||(this[s]=r(this,u,this.option));o&&o.apply(this)};t.widget("ajaxControlToolkit."+n,i,e)},activateWidgets:function(n){var r=this,i=t(n).map(function(){var n=this,u=t(n).data(),i=[];for(var r in u)r.indexOf("act")===0&&i.push({key:r,value:n});return i}).get();t.each(i,function(n,t){var i=$act.widgets[t.key];i&&$act.common.activateWidget(i,t.value)})},init:function(){var n=this;n.initialized||(n.initialized=!0,n.activateWidgets("*"))}},r,i;t(document).ready(function(){$act.init()});r=navigator.userAgent;i=u.browser;r.indexOf(" MSIE ")>-1?(i.agent=i.InternetExplorer,i.version=parseFloat(r.match(/MSIE (\d+\.\d+)/)[1]),i.version>7&&document.documentMode>6&&(i.documentMode=document.documentMode),i.hasDebuggerStatement=!0):r.indexOf(" Firefox/")>-1?(i.agent=i.Firefox,i.version=parseFloat(r.match(/ Firefox\/(\d+\.\d+)/)[1]),i.name="Firefox",i.hasDebuggerStatement=!0):r.indexOf(" AppleWebKit/")>-1?(i.agent=i.Safari,i.version=parseFloat(r.match(/ AppleWebKit\/(\d+(\.\d+)?)/)[1]),i.name="Safari"):r.indexOf("Opera/")>-1&&(i.agent=i.Opera);n.$act=u}(window,actJQuery),function(n,t){$act.args={cancelEventArgs:function(){this._cancel=!1;this.get_cancel=function(){return this._cancel};this.set_cancel=function(n){this._cancel=n}}};$act.string={format:function(){for(var t=arguments[0],i,n=0;n<arguments.length-1;n++)i=new RegExp("\\{"+n+"\\}","gm"),t=t.replace(i,arguments[n+1]);return t}};$act.resources=Sys.Extended.UI.Resources;$act.common={activateWidget:function(n,i,r){var f=this.parseMetaData(n,t(i)),u=t(i)[n](t.extend(f,r)).data("ajaxControlToolkit-"+n),e=u.options.id||u.element.attr("id");return $act.behaviors[e]=u,u},parseMetaData:function(n,i){var y="act-"+n.toLowerCase(),f=i.data(y),h,u,o;if(f||(h=t("data[data-act-target='"+i.attr("id")+"']"),h&&(f=h.data(self.dataAttrName))),!f)return null;var l=/(\w+)(.|\s+)(:)/g,c=function(n){return"#$%<*"+n+"$%@#<"},e=f.match(l),s=f.replace(l,c("$1$2$3")),a={};for(u=0;u<e.length;u++){var v=c(e[u]),p=s.indexOf(v)+v.length,w=u<e.length-1?s.indexOf(c(e[u+1]))-1:s.length,r=s.substring(p,w);r.startsWith("'")&&r.endsWith("'")?r=t("<div/>").html(r.substr(1,r.length-2)).text():isNaN(r)?(o=r.toLowerCase().trim(),(o=="true"||o=="false")&&(r=Boolean(o=="true"?1:0))):r=parseFloat(r);a[e[u].trim().slice(0,-1)]=r}return a},doPostBack:function(){if(!n.__doPostBack)throw"can't find MS Ajax __doPostBack method";return n.__doPostBack.apply(n,arguments)},pascalCase:function(n){return n.charAt(0).toUpperCase()+n.substr(1)}}}(window,actJQuery),function(n,t){var r=0,i=Array.prototype.slice,u=n.cleanData;n.cleanData=function(t){for(var i=0,r;(r=t[i])!=null;i++)try{n(r).triggerHandler("remove")}catch(f){}u(t)};n.widget=function(t,i,r){var s,f,u,o,h={},e=t.split(".")[0];return t=t.split(".")[1],s=e+"-"+t,r||(r=i,i=n.Widget),n.expr[":"][s.toLowerCase()]=function(t){return!!n.data(t,s)},n[e]=n[e]||{},f=n[e][t],u=n[e][t]=function(n,t){if(!this._createWidget)return new u(n,t);arguments.length&&this._createWidget(n,t)},n.extend(u,f,{version:r.version,_proto:n.extend({},r),_childConstructors:[]}),o=new i,o.options=n.widget.extend({},o.options),n.each(r,function(t,r){if(!n.isFunction(r)){h[t]=r;return}h[t]=function(){var n=function(){return i.prototype[t].apply(this,arguments)},u=function(n){return i.prototype[t].apply(this,n)};return function(){var i=this._super,f=this._superApply,t;return this._super=n,this._superApply=u,t=r.apply(this,arguments),this._super=i,this._superApply=f,t}}()}),u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix||t:t},h,{constructor:u,namespace:e,widgetName:t,widgetFullName:s}),f?(n.each(f._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,u,i._proto)}),delete f._childConstructors):i._childConstructors.push(u),n.widget.bridge(t,u),u};n.widget.extend=function(r){for(var o=i.call(arguments,1),e=0,s=o.length,u,f;e<s;e++)for(u in o[e])f=o[e][u],o[e].hasOwnProperty(u)&&f!==t&&(r[u]=n.isPlainObject(f)?n.isPlainObject(r[u])?n.widget.extend({},r[u],f):n.widget.extend({},f):f);return r};n.widget.bridge=function(r,u){var f=u.prototype.widgetFullName||r;n.fn[r]=function(e){var h=typeof e=="string",s=i.call(arguments,1),o=this;return e=!h&&s.length?n.widget.extend.apply(null,[e].concat(s)):e,h?this.each(function(){var i,u=n.data(this,f);return e==="instance"?(o=u,!1):u?!n.isFunction(u[e])||e.charAt(0)==="_"?n.error("no such method '"+e+"' for "+r+" widget instance"):(i=u[e].apply(u,s),i!==u&&i!==t?(o=i&&i.jquery?o.pushStack(i.get()):i,!1):void 0):n.error("cannot call methods on "+r+" prior to initialization; attempted to call method '"+e+"'")}):this.each(function(){var t=n.data(this,f);t?t.option(e||{})._init():n.data(this,f,new u(e,this))}),o}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=r++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=n();this.hoverable=n();this.focusable=n();i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:n.noop,_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(n.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:n.noop,widget:function(){return this.element},option:function(i,r){var o=i,u,f,e;if(arguments.length===0)return n.widget.extend({},this.options);if(typeof i=="string")if(o={},u=i.split("."),i=u.shift(),u.length){for(f=o[i]=n.widget.extend({},this.options[i]),e=0;e<u.length-1;e++)f[u[e]]=f[u[e]]||{},f=f[u[e]];if(i=u.pop(),r===t)return f[i]===t?null:f[i];f[i]=r}else{if(r===t)return this.options[i]===t?null:this.options[i];o[i]=r}return this._setOptions(o),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return this.options[n]=t,n==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,r){var f,u=this;typeof t!="boolean"&&(r=i,i=t,t=!1);r?(i=f=n(i),this.bindings=this.bindings.add(i)):(r=i,i=this.element,f=this.widget());n.each(r,function(r,e){function o(){if(t||u.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled"))return(typeof e=="string"?u[e]:e).apply(u,arguments)}typeof e!="string"&&(o.guid=e.guid=e.guid||o.guid||n.guid++);var s=r.match(/^(\w+)\s*(.*)$/),h=s[1]+u.eventNamespace,c=s[2];c?f.delegate(c,h,o):i.bind(h,o)})},_off:function(n,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;n.unbind(t).undelegate(t)},_delay:function(n,t){function r(){return(typeof n=="string"?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){n(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){n(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){n(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){n(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent,f)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){typeof u=="string"&&(u={effect:u});var o,e=u?u===!0||typeof u=="number"?i:u.effect||i:t;u=u||{};typeof u=="number"&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}})}(actJQuery),Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager&&$act){if(!$act.isPostBackActivatorHandled){$act.isPostBackActivatorHandled=!0;function pageLoaded(n,t){for(var r=t.get_panelsUpdated(),i=0;i<r.length;i++)$act.activateWidgets("#"+r[i].id+" *")}prm=Sys.WebForms.PageRequestManager.getInstance();prm.add_pageLoaded(pageLoaded)}Sys.Application.add_load(function(){$act.init();var n=window.$find;window.$find=function(t){var i=$act.behaviors[t];return i?i:n?n(t):null}})}if(function(n,t){$act.createWidget("dynamicPopulateExtender",{options:{clearContentsDuringUpdate:!0,contextKey:null,servicePath:null,serviceMethod:null,populateTriggerID:null,cacheDynamicResults:!1,updatingCssClass:"",customScript:""},_events:["populating","populated"],_create:function(){var n=this,i=n.options;n._clickHandler=null;n._callID=0;n._currentCallID=-1;n._oldCss=null;n._populated=!1;i.populateTriggerID&&t("#"+i.populateTriggerID).click(function(){n.populate(i.contextKey)})},populate:function(n){var i,r,e,o,u,f,s,h;if(n&&this._setOption("contextKey",n),i=this,r=i.options,!r.populated||!r.cacheDynamicResults){if(i._currentCallID==-1){if(e=new $act.args.cancelEventArgs,i.raisePopulating(e),e.get_cancel())return;i._setUpdating(!0)}r.customScript?(o=eval(r.customScript),i._setTargetHtml(o),i._setUpdating(!1)):(i._currentCallID=++i._callID,u=r.servicePath||location.pathname,f=r.serviceMethod,(u||f)&&(s=u?u+"/"+encodeURIComponent(f):encodeURIComponent(f),h=n?n:r.contextKey,t.ajax({url:s,type:"POST",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify({contextKey:h})}).done(function(n){n&&n.d&&(n=n.d);i._onMethodComplete(n,i._currentCallID)}).fail(function(n){i._onMethodError(n,i._currentCallID)})))}},_onMethodComplete:function(n,t){t==this._currentCallID&&(this._setTargetHtml(n),this._setUpdating(!1))},_onMethodError:function(n,t){t==this._currentCallID&&(n.statusText=="timeout"?this._setTargetHtml($act.resources.DynamicPopulate_WebServiceTimeout):this._setTargetHtml($act.string.format($act.resources.DynamicPopulate_WebServiceError,n.status)),this._setUpdating(!1))},_setUpdating:function(n){var t=this;t.setStyle(n);n||(t._currentCallID=-1,t._populated=!0,t.raisePopulated(this))},_setTargetHtml:function(n){var i=t(this.element);i&&(i.is("input")?i.val(n):i.html(n))},setStyle:function(n){var i=this,r=i.options,u=t(i.element);r.updatingCssClass&&(n?(i._oldCss=u.attr("class"),u.removeClass().addClass(r.updatingCssClass)):(u.removeClass().addClass(i._oldCss),i._oldCss=null));n&&r.clearContentsDuringUpdate&&i._setTargetHtml("")}})}(window,actJQuery),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BalloonPopupControlBehavior=function(n){Sys.Extended.UI.BalloonPopupControlBehavior.initializeBase(this,[n]);this._balloonPopupControlID=null;this._position=Sys.Extended.UI.BalloonPopupPosition.Auto;this._balloonStyle=Sys.Extended.UI.BalloonPopupStyle.Rectangle;this._offsetX=0;this._offsetY=0;this._extenderControlID=null;this._displayOnMouseOver=!1;this._displayOnFocus=!1;this._displayOnClick=!0;this._balloonSize="small";this._shadow=!0;this._scrollBars=Sys.Extended.UI.ScrollBars.Auto;this._popupElement=null;this._styleElement=null;this._sizeElement=null;this._shadowElement=null;this._directionElement=null;this._contentElement=null;this._popupBehavior=null;this._popupVisible=!1;this._focusHandler=null;this._mouseOverHandler=null;this._clickHandler=null;this._popupClickHandler=null;this._bodyClickHandler=null;this._onShowJson=null;this._onHideJson=null;this._popupWidth=0;this._popupHeight=0;this._AutoPosition=null;this._directionClassName=null};Sys.Extended.UI.BalloonPopupControlBehavior.prototype={initialize:function(){Sys.Extended.UI.BalloonPopupControlBehavior.callBaseMethod(this,"initialize");var n=this.get_element();this.createPopupElement();this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"BalloonPopupBehavior",parentElement:n},null,null,this._popupElement);this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson);this._displayOnFocus&&(this._focusHandler=Function.createDelegate(this,this._onFocus));this._displayOnMouseOver&&(this._mouseOverHandler=Function.createDelegate(this,this._onMouseOver));this._displayOnClick&&(this._clickHandler=Function.createDelegate(this,this._onFocus));this._popupClickHandler=Function.createDelegate(this,this._onPopupClick);this._bodyClickHandler=Function.createDelegate(this,this._onBodyClick);this._displayOnFocus&&$addHandler(n,"focus",this._focusHandler);this._displayOnMouseOver&&$addHandler(n,"mouseover",this._mouseOverHandler);this._displayOnClick&&$addHandler(n,"click",this._clickHandler);$addHandler(document,"click",this._bodyClickHandler);$addHandler(this._popupElement,"click",this._popupClickHandler)},dispose:function(){var n=this.get_element();this._onShowJson=null;this._onHideJson=null;this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._mouseOverHandler&&($removeHandler(n,"mouseover",this._mouseOverHandler),this._mouseOverHandler=null);this._clickHandler&&($removeHandler(n,"click",this._clickHandler),this._clickHandler=null);this._bodyClickHandler&&($removeHandler(document,"click",this._bodyClickHandler),this._bodyClickHandler=null);this._popupClickHandler&&($removeHandler(this._popupElement,"click",this._popupClickHandler),this._popupClickHandler=null);Sys.Extended.UI.BalloonPopupControlBehavior.callBaseMethod(this,"dispose")},createPopupElement:function(){var n=this.get_element();if(this._popupElement=$common.createElementFromTemplate({nodeName:"div",properties:{id:this.get_id()+"_balloonPopup",style:{display:"block",position:"absolute"}},cssClasses:["ajax__balloon_popup"]},n.parentNode),this._styleElement=$common.createElementFromTemplate({nodeName:"span",Properties:{id:"ajax__style_wrapper"}},this._popupElement),this._sizeElement=$common.createElementFromTemplate({nodeName:"span",Properties:{id:"ajax__size_wrapper"}},this._styleElement),this._shadowElement=$common.createElementFromTemplate({nodeName:"div",Properties:{id:"ajax__shadow_wrapper"}},this._sizeElement),this._directionElement=$common.createElementFromTemplate({nodeName:"div",Properties:{id:"ajax__direction_wrapper"}},this._shadowElement),this._contentElement=$common.createElementFromTemplate({nodeName:"div",Properties:{id:"ajax__content"},cssClasses:["ajax__content"]},this._directionElement),$get(this._balloonPopupControlID)==null)throw"Referred BalloonPopupControlId did not find.";$get(this._balloonPopupControlID).style.display="none";this.setStyle();this.setSize();this._directionElement.className=this._directionClassName;this._popupWidth=this._directionElement.offsetWidth;this._popupHeight=this._directionElement.offsetHeight;this.get_balloonPopupPosition()!=Sys.Extended.UI.BalloonPopupPosition.Auto&&(this.setPosition(),this.setContentPadding(),this.setScrollBar())},setStyle:function(){switch(this.get_balloonPopupStyle()){case Sys.Extended.UI.BalloonPopupStyle.Rectangle:this._styleElement.className="rect";this._directionClassName="rect";break;case Sys.Extended.UI.BalloonPopupStyle.Cloud:this._styleElement.className="cloud";this._directionClassName="cloud";break;case Sys.Extended.UI.BalloonPopupStyle.Custom:this._styleElement.className=this.get_customClassName();this._directionClassName=this.get_customClassName();break;default:this._styleElement.className="rect";this._directionClassName="rect"}},setSize:function(){switch(this.get_balloonSize()){case Sys.Extended.UI.BalloonPopupSize.Small:this._sizeElement.className+=" small";this._directionClassName+=" small";break;case Sys.Extended.UI.BalloonPopupSize.Medium:this._sizeElement.className+=" medium";this._directionClassName+=" medium";break;case Sys.Extended.UI.BalloonPopupSize.Large:this._sizeElement.className+=" large";this._directionClassName+=" large";break;default:this._sizeElement.className+=" small";this._directionClassName+=" small"}},setPosition:function(){var n=this.get_balloonPopupPosition()==Sys.Extended.UI.BalloonPopupPosition.Auto?this._autoPosition:this.get_balloonPopupPosition();switch(n){case Sys.Extended.UI.BalloonPopupPosition.TopLeft:this._directionElement.className=this._directionClassName+" top_left";this._shadowElement.className=this._directionClassName+" top_left_shadow";break;case Sys.Extended.UI.BalloonPopupPosition.TopRight:this._directionElement.className=this._directionClassName+" top_right";this._shadowElement.className=this._directionClassName+" top_right_shadow";break;case Sys.Extended.UI.BalloonPopupPosition.BottomLeft:this._directionElement.className=this._directionClassName+" bottom_left";this._shadowElement.className=this._directionClassName+" bottom_left_shadow";break;case Sys.Extended.UI.BalloonPopupPosition.BottomRight:this._directionElement.className=this._directionClassName+" bottom_right";this._shadowElement.className=this._directionClassName+" bottom_right_shadow";break;default:this._directionElement.className=this._directionClassName+" top_right";this._shadowElement.className=this._directionClassName+" top_right_shadow"}},setContentPadding:function(){var n=$common.getPaddingBox(this._contentElement),t=$get(this._balloonPopupControlID);$common.setBounds(t,{x:this._offsetX+n.left,y:this._offsetY+n.top,width:this._popupWidth-n.left-n.right,height:this._popupHeight-n.top-n.bottom})},setScrollBar:function(){var n=$get(this._balloonPopupControlID);switch(this.get_scrollBars()){case Sys.Extended.UI.ScrollBars.Horizontal:$common.setStyle(n,{overflowX:"scroll",overflowY:"hidden"});break;case Sys.Extended.UI.ScrollBars.Vertical:$common.setStyle(n,{overflowY:"scroll",overflowX:"hidden"});break;case Sys.Extended.UI.ScrollBars.Both:$common.setStyle(n,{overflow:"scroll"});break;case Sys.Extended.UI.ScrollBars.None:$common.setStyle(n,{overflow:"hidden"});break;default:$common.setStyle(n,{overflow:"auto"})}},showPopup:function(){var n,t,i;this._contentElement.appendChild($get(this._balloonPopupControlID));$get(this._balloonPopupControlID).style.display="block";Sys.Extended.UI.BalloonPopupPosition.Auto==this._position&&(this._setAutoPosition(),this.setPosition(),this.setContentPadding(),this.setScrollBar());this._shadow||(this._shadowElement.className="");n=Sys.Extended.UI.BalloonPopupControlBehavior.__VisiblePopup;n&&n._popupBehavior&&n.hidePopup();Sys.Extended.UI.BalloonPopupControlBehavior.callBaseMethod(this,"populate");this._popupBehavior.set_x(this._getLeftOffset());this._popupBehavior.set_y(this._getTopOffset());this._popupBehavior.show();this._popupVisible=!0;Sys.Extended.UI.BalloonPopupControlBehavior.__VisiblePopup=this;t=$common.getCurrentStyle(this._directionElement,"backgroundPositionX");i=$common.getCurrentStyle(this._directionElement,"backgroundPositionY");$common.setStyle(this._styleElement,{backgroundPositionX:t,backgroundPositionY:i})},hidePopup:function(){this._popupBehavior.hide();this._popupVisible=!1;Sys.Extended.UI.BalloonPopupControlBehavior.__VisiblePopup=null},_onFocus:function(n){this._popupVisible||this.showPopup();n&&n.stopPropagation()},_onMouseOver:function(n){this._popupVisible||this.showPopup();n&&n.stopPropagation()},_onPopupClick:function(n){n.stopPropagation()},_onBodyClick:function(){this._popupVisible&&this.hidePopup()},_onPopulated:function(n,t){Sys.Extended.UI.BalloonPopupControlBehavior.callBaseMethod(this,"_onPopulated",[n,t]);this._popupVisible&&this._popupBehavior.show()},_getLeftOffset:function(){var n=Sys.Extended.UI.BalloonPopupPosition.Auto==this._position?this._autoPosition:this._position;return Sys.Extended.UI.BalloonPopupPosition.BottomLeft==n||Sys.Extended.UI.BalloonPopupPosition.TopLeft==n?-1*this._popupWidth+this._offsetX:Sys.Extended.UI.BalloonPopupPosition.BottomRight==n||Sys.Extended.UI.BalloonPopupPosition.TopRight==n?this.get_element().offsetWidth+this._offsetX:this._offsetX},_getTopOffset:function(){var n=Sys.Extended.UI.BalloonPopupPosition.Auto==this._position?this._autoPosition:this._position;return Sys.Extended.UI.BalloonPopupPosition.TopLeft==n||Sys.Extended.UI.BalloonPopupPosition.TopRight==n?-1*this._popupHeight+this._offsetY:Sys.Extended.UI.BalloonPopupPosition.BottomLeft==n||Sys.Extended.UI.BalloonPopupPosition.BottomRight==n?this.get_element().offsetHeight+this._offsetY:this._offsetY},_setAutoPosition:function(){var t=0,i=0,n=this.get_element();if(n.offsetParent)do i+=n.offsetLeft,t+=n.offsetTop;while(n=n.offsetParent);var r=this.posTop(),o=this.posLeft(),s=this.pageWidth(),h=this.pageHeight(),c=r+h,u=o+s,f=t-this._popupHeight,a=i-this._popupWidth,l=t+this.get_element().offsetHeight+this._popupHeight,e=i+this.get_element().offsetWidth+this._popupWidth;this._autoPosition=f-r>0&&f-r>c-l?u<e?Sys.Extended.UI.BalloonPopupPosition.TopLeft:Sys.Extended.UI.BalloonPopupPosition.TopRight:u<e?Sys.Extended.UI.BalloonPopupPosition.BottomLeft:Sys.Extended.UI.BalloonPopupPosition.BottomRight},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_BalloonPopupControlID:function(){return this._balloonPopupControlID},set_BalloonPopupControlID:function(n){this._balloonPopupControlID!=n&&(this._balloonPopupControlID=n,this.raisePropertyChanged("BalloonPopupControlID"))},get_balloonPopupPosition:function(){return this._position},set_balloonPopupPosition:function(n){this._position!=n&&(this._position=n,this.raisePropertyChanged("Position"))},get_balloonPopupStyle:function(){return this._balloonStyle},set_balloonPopupStyle:function(n){this._balloonStyle!=n&&(this._balloonStyle=n,this.raisePropertyChanged("BalloonStyle"))},get_ExtenderControlID:function(){return this._extenderControlID},set_ExtenderControlID:function(n){this._extenderControlID!=n&&(this._extenderControlID=n,this.raisePropertyChanged("ExtenderControlID"))},get_OffsetX:function(){return this._offsetX},set_OffsetX:function(n){this._offsetX!=n&&(this._offsetX=n,this.raisePropertyChanged("OffsetX"))},get_OffsetY:function(){return this._offsetY},set_OffsetY:function(n){this._offsetY!=n&&(this._offsetY=n,this.raisePropertyChanged("OffsetY"))},get_displayOnMouseOver:function(){return this._displayOnMouseOver},set_displayOnMouseOver:function(n){this._displayOnMouseOver!=n&&(this._displayOnMouseOver=n,this.raisePropertyChanged("DisplayOnMouseOver"))},get_displayOnFocus:function(){return this._displayOnFocus},set_displayOnFocus:function(n){this._displayOnFocus!=n&&(this._displayOnFocus=n,this.raisePropertyChanged("DisplayOnFocus"))},get_displayOnClick:function(){return this._displayOnClick},set_displayOnClick:function(n){this.displayOnClick!=n&&(this.displayOnClick=n,this.raisePropertyChanged("DisplayOnClick"))},get_balloonSize:function(){return this._balloonSize},set_balloonSize:function(n){this._balloonSize!=n&&(this._balloonSize=n,this.raisePropertyChanged("BalloonSize"))},get_useShadow:function(){return this._shadow},set_useShadow:function(n){this._shadow!=n&&(this._shadow=n,this.raisePropertyChanged("UseShadow"))},get_scrollBars:function(){return this._scrollBars},set_scrollBars:function(n){this._scrollBars!=n&&(this._scrollBars=n,this.raisePropertyChanged("ScrollBars"))},get_PopupVisible:function(){return this._popupVisible},get_customClassName:function(){return this._customClassName},set_customClassName:function(n){this._customClassName!=n&&(this._customClassName=n,this.raisePropertyChanged("CustomClassName"))},add_showing:function(n){this._popupBehavior&&this._popupBehavior.add_showing(n)},remove_showing:function(n){this._popupBehavior&&this._popupBehavior.remove_showing(n)},raiseShowing:function(n){this._popupBehavior&&this._popupBehavior.raiseShowing(n)},add_shown:function(n){this._popupBehavior&&this._popupBehavior.add_shown(n)},remove_shown:function(n){this._popupBehavior&&this._popupBehavior.remove_shown(n)},raiseShown:function(n){this._popupBehavior&&this._popupBehavior.raiseShown(n)},add_hiding:function(n){this._popupBehavior&&this._popupBehavior.add_hiding(n)},remove_hiding:function(n){this._popupBehavior&&this._popupBehavior.remove_hiding(n)},raiseHiding:function(n){this._popupBehavior&&this._popupBehavior.raiseHiding(n)},add_hidden:function(n){this._popupBehavior&&this._popupBehavior.add_hidden(n)},remove_hidden:function(n){this._popupBehavior&&this._popupBehavior.remove_hidden(n)},raiseHidden:function(n){this._popupBehavior&&this._popupBehavior.raiseHidden(n)},posTop:function(){var n=0;return typeof pageYOffset!="undefined"?n=window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?n=document.documentElement.scrollTop:document.body.scrollTop&&(n=document.body.scrollTop),n},posLeft:function(){var n=0;return typeof pageXOffset!="undefined"?n=window.pageXOffset:document.documentElement&&document.documentElement.scrollLeft?n=document.documentElement.scrollLeft:document.body.scrollLeft&&(n=document.body.scrollLeft),n},pageHeight:function(){var n=null;return window.innerHeight!=null?n=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?n=document.documentElement.clientHeight:document.body!=null&&(n=document.body.clientHeight),n},pageWidth:function(){var n=null;return window.innerWidth!=null?n=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?n=document.documentElement.clientWidth:document.body!=null&&(n=document.body.clientWidth),n}};Sys.Extended.UI.BalloonPopupControlBehavior.registerClass("Sys.Extended.UI.BalloonPopupControlBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.BalloonPopupControlBehavior,{name:"balloonPopupBehavior"});Sys.Extended.UI.BalloonPopupControlBehavior.__VisiblePopup=null;Sys.Extended.UI.BalloonPopupPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.BalloonPopupPosition.prototype={Auto:0,TopRight:1,TopLeft:2,BottomRight:3,BottomLeft:4};Sys.Extended.UI.BalloonPopupPosition.registerEnum("Sys.Extended.UI.BalloonPopupPosition",!1);Sys.Extended.UI.BalloonPopupStyle=function(){throw Error.invalidOperation();};Sys.Extended.UI.BalloonPopupStyle.prototype={Rectangle:0,Cloud:1,Custom:2};Sys.Extended.UI.BalloonPopupStyle.registerEnum("Sys.Extended.UI.BalloonPopupStyle",!1);Sys.Extended.UI.BalloonPopupSize=function(){throw Error.invalidOperation();};Sys.Extended.UI.BalloonPopupSize.prototype={Small:0,Medium:1,Large:2};Sys.Extended.UI.BalloonPopupSize.registerEnum("Sys.Extended.UI.BalloonPopupSize",!1)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedBalloonPopupBehavior",["ExtendedDynamicPopulate","ExtendedPopup","ExtendedAnimationBehavior"],n):n()}(),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.BarChart=function(n){Sys.Extended.UI.BarChart.initializeBase(this,[n]);var t=this.get_id();t=t.replace("_ctl00","");this._parentDiv=document.getElementById(t+"__ParentDiv");this._chartWidth="300";this._chartHeight="200";this._chartTitle="";this._categoriesAxis="";this._series=null;this._chartType=Sys.Extended.UI.BarChartType.Column;this._theme="BarChart";this._valueAxisLines=9;this._chartTitleColor="";this._valueAxisLineColor="";this._categoryAxisLineColor="";this._baseLineColor="";this.yMax=0;this.yMin=0;this.xMax=0;this.xMin=0;this.roundedTickRange=0;this.startX=0;this.startY=0;this.endX=0;this.endY=0;this.xInterval=0;this.yInterval=0;this.arrXAxis;this.arrXAxisLength=0;this.arrYAxis;this.arrYAxisLength=0;this.charLength=3.5;this.arrCombinedData=null},Sys.Extended.UI.BarChart.prototype={initialize:function(){if(Sys.Extended.UI.BarChart.callBaseMethod(this,"initialize"),!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"))throw"Browser does not support SVG.";this._valueAxisLines==0&&(this._valueAxisLines=9);this._chartType==Sys.Extended.UI.BarChartType.Column||this._chartType==Sys.Extended.UI.BarChartType.StackedColumn?this.generateColumnChart():(this._chartType==Sys.Extended.UI.BarChartType.Bar||this._chartType==Sys.Extended.UI.BarChartType.StackedBar)&&this.generateBarChart()},dispose:function(){Sys.Extended.UI.BarChart.callBaseMethod(this,"dispose")},generateColumnChart:function(){this.arrXAxis=this._categoriesAxis.split(",");this.arrXAxisLength=this.arrXAxis.length;this.calculateMinMaxValuesForColumnType();this.calculateIntervalForColumnType();this.calculateValueAxisForColumnType();var n=this.initializeSVG();n=n+String.format('<text x="{0}" y="{1}" id="ChartTitle" style="fill:{3}">{2}<\/text>',parseInt(this._chartWidth)/2-this._chartTitle.length*this.charLength,parseInt(this._chartHeight)/20,this._chartTitle,this._chartTitleColor);n=n+this.drawBackgroundHorizontalLinesForColumnType();n=n+this.drawBackgroundVerticalLinesForColumnType();n=n+this.drawBaseLinesForColumnType();n=n+this.drawLegendArea();n=n+this.drawAxisValuesForColumnType();n=n+this.drawBarsForColumnType();n=n+"<\/svg>";this._parentDiv.innerHTML=n},calculateIntervalForColumnType:function(){this.startX=this._chartWidth/10+.5;this.endX=parseInt(this._chartWidth)-4.5;this.startY=this.yMin>=0?Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)*24/100)+.5:Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)*12/100)/2+.5;this.yInterval=this.startY/(this._valueAxisLines+1)},calculateMinMaxValuesForColumnType:function(){var u,i,r,t,n;if(this._chartType==Sys.Extended.UI.BarChartType.Column)for(n=0;n<this._series.length;n++)r=this._series[n].Data,u=Math.max.apply(null,r),i=Math.min.apply(null,r),n==0?(this.yMax=u,this.yMin=i):(u>this.yMax&&(this.yMax=u),i<this.yMin&&(this.yMin=i));else{for(this.arrCombinedData=null,n=0;n<this._series.length;n++){for(r=[],t=0;t<this._series[n].Data.length;t++)r[t]=this._series[n].Data[t];if(this.arrCombinedData==null)this.arrCombinedData=r;else for(t=0;t<r.length;t++)this.arrCombinedData[t]=parseFloat(this.arrCombinedData[t])+parseFloat(r[t])}for(n=0;n<this._series.length;n++)i=Math.min.apply(null,this._series[n].Data),n==0?this.yMin=i:i<this.yMin&&(this.yMin=i);this.yMax=Math.max.apply(null,this.arrCombinedData)}this.yMin<0&&(this._valueAxisLines=Math.round(this._valueAxisLines/2))},calculateValueAxisForColumnType:function(){var i,n,r,t;i=this.yMin>=0?this.yMax:this.yMax>Math.abs(this.yMin)?this.yMax:Math.abs(this.yMin);n=i/(this._valueAxisLines-1);n<1?this.roundedTickRange=n.toFixed(1):(r=Math.ceil(Math.log(n)/Math.log(10)-1),t=Math.pow(10,r),this.roundedTickRange=Math.ceil(n/t)*t);this.startX=this.startX+(this.roundedTickRange*10*this._valueAxisLines/10).toString().length*this.charLength},drawBackgroundHorizontalLinesForColumnType:function(){for(var t="",n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY-this.yInterval*n,this._categoryAxisLineColor);if(this.yMin<0)for(n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY+this.yInterval*n,this._categoryAxisLineColor);return t},drawBackgroundVerticalLinesForColumnType:function(){var t="",n;for(this.xInterval=Math.round((parseInt(this._chartWidth)-this.startX)/this.arrXAxisLength),n=0;n<this.arrXAxisLength;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*n,this.startY-this.yInterval*this._valueAxisLines,this.startY,this._valueAxisLineColor);if(this.yMin<0)for(n=0;n<this.arrXAxisLength;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*n,this.startY+this.yInterval*this._valueAxisLines,this.startY,this._valueAxisLineColor);return t},drawBaseLinesForColumnType:function(){var n="",t;for(n=n+String.format('<path d="M{0} {1} {2} {1}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.endX,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY-this.yInterval*this._valueAxisLines,this.startY,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.startY+4,this._baseLineColor),t=0;t<this.arrXAxisLength;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);for(t=0;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY-this.yInterval*t,this._baseLineColor);if(this.yMin<0)for(n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY+this.yInterval*this._valueAxisLines,this.startY,this._baseLineColor),t=1;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY+this.yInterval*t,this._baseLineColor);return n},drawAxisValuesForColumnType:function(){for(var t="",i=0,n=0;n<this.arrXAxisLength;n++)i=this.arrXAxis[n].toString().length*5.5,t=t+String.format('<text id="SeriesAxis" x="{0}" y="{1}" fill-opacity="1">{2}<\/text>',Math.round(this.startX+this.xInterval*10*n/10+this.xInterval/2-i),this.startY+Math.round(this.yInterval*65/100),this.arrXAxis[n]);for(n=0;n<=this._valueAxisLines;n++)i=(this.roundedTickRange*10*n/10).toString().length*5.5,t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">{2}<\/text>',this.startX-i-15,this.startY-this.yInterval*10*n/10+3.5,this.roundedTickRange*10*n/10);if(this.yMin<0)for(n=1;n<=this._valueAxisLines;n++)i=(this.roundedTickRange*10*n/10).toString().length*5.5,t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">-{2}<\/text>',this.startX-i-19,this.startY+this.yInterval*10*n/10,this.roundedTickRange*10*n/10);return t},drawBarsForColumnType:function(){var i="",o=this._series.length,e=this.xInterval/10,r,s,t,u,f,n;for(r=this._chartType==Sys.Extended.UI.BarChartType.Column?Math.round((this.xInterval*80/100-e*o)/o):Math.round(this.xInterval*80/100),s="",t=0;t<this.arrXAxisLength;t++){if(i=i+"<g>",this._chartType==Sys.Extended.UI.BarChartType.Column)for(n=0;n<this._series.length;n++)this.yVal=parseFloat(this._series[n].Data[t]),i=t==0?i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX+this.xInterval*t+this.xInterval*15/100+(e+r)*n,this.startX+this.xInterval*t+this.xInterval*15/100+(e+r)*n+r,this.startY,this.startY-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)),n+1,this._series[n].BarColor):i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX+this.xInterval*t+this.xInterval*12.5/100+(e+r)*n,this.startX+this.xInterval*t+this.xInterval*12.5/100+(e+r)*n+r,this.startY,this.startY-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)),n+1,this._series[n].BarColor),i=this.yVal>0?i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*t+this.xInterval/5+(e+r)*n+r/10-Math.round(this.yVal.toString().length*this.charLength/2),this.startY-Math.round(this.yVal*(this.yInterval/this.roundedTickRange))-7.5,this.yVal):i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*t+this.xInterval/5+(e+r)*n+r/10-Math.round(this.yVal.toString().length*this.charLength/2),this.startY-Math.round(this.yVal*(this.yInterval/this.roundedTickRange))+7.5,this.yVal);else for(u=this.startY,f=this.startY,n=0;n<this._series.length;n++)this.yVal=parseFloat(this._series[n].Data[t]),i=t==0?this.yVal>0?i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX+this.xInterval*10*t/10+this.xInterval*7.5/100,this.startX+this.xInterval*10*t/10+this.xInterval*7.5/100+r,u,u-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)),n+1,this._series[n].BarColor):i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX+this.xInterval*10*t/10+this.xInterval*7.5/100,this.startX+this.xInterval*10*t/10+this.xInterval*7.5/100+r,f,f-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)),n+1,this._series[n].BarColor):this.yVal>0?i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX+this.xInterval*10*t/10+this.xInterval/20,this.startX+this.xInterval*10*t/10+this.xInterval/20+r,u,u-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)),n+1,this._series[n].BarColor):i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX+this.xInterval*10*t/10+this.xInterval/20,this.startX+this.xInterval*10*t/10+this.xInterval/20+r,f,f-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)),n+1,this._series[n].BarColor),this.yVal>0?(i=i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*10*t/10+this.xInterval*30/100+r/10,u-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)/2),this.yVal),u=u-Math.round(this.yVal*(this.yInterval/this.roundedTickRange))):(i=i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*10*t/10+this.xInterval*30/100+r/10,f+Math.round(Math.abs(this.yVal)*(this.yInterval/this.roundedTickRange)/2),this.yVal),f=f-Math.round(this.yVal*(this.yInterval/this.roundedTickRange)));i=i+"<\/g>"}return i},initializeSVG:function(){var n=String.format('<?xml-stylesheet type="text/css" href="{0}.css"?>',this._theme);return n=n+String.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="{0}" height="{1}" style="position: relative; display: block;">',this._chartWidth,this._chartHeight),n=n+"<defs>",n=n+'<linearGradient gradientTransform="rotate(0)">',n=n+'<stop offset="0%" id="LinearGradient1"><\/stop>',n=n+'<stop offset="25%" id="LinearGradient2"><\/stop>',n=n+'<stop offset="100%" id="LinearGradient3"><\/stop><\/linearGradient>',n=n+"<\/defs>",n=n+String.format('<path fill="none" stroke-opacity="1" fill-opacity="1" stroke-linejoin="round" stroke-linecap="square" d="M5 {0} {1} {0} {1} {2} 5 {2} z"/>',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10),n=n+String.format('<path id="ChartBackGround" stroke="" d="M0 0 {0} 0 {0} {1} 0 {1} z"/>',this._chartWidth,this._chartHeight),n+String.format('<path fill="#ffffff" stroke-opacity="1" fill-opacity="0" stroke-linejoin="round" stroke-linecap="square" stroke="" d="M5 {0} {1} {0} {1} {2} 5 {2} z" />',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10)},drawLegendArea:function(){for(var i="",o=parseInt(this._chartHeight)*84/100+5,r=7.5,u=5,l=0,t,c,n=0;n<this._series.length;n++)l=l+this._series[n].Name.length;t=Math.round(l*5/2)+Math.round((r+u*2)*this._series.length);c=!1;t>parseInt(this._chartWidth)/2&&(t=t/2,c=!0);i=i+"<g>";i=i+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="LegendArea" stroke=""><\/path>',Math.round(parseInt(this._chartWidth)/2-t/2),o,Math.round(parseInt(this._chartWidth)/2+t/2),Math.round(parseInt(this._chartHeight)*97.5/100));var e=parseInt(this._chartWidth)*40/100-t/2+r+u,s=e,f=parseInt(this._chartWidth)*40/100-t/2,h=f;for(n=0;n<this._series.length;n++)c&&n==Math.round(this._series.length/2)&&(e=parseInt(this._chartWidth)*40/100-t/2+r+u,s=e,f=parseInt(this._chartWidth)*40/100-t/2,h=f,o=parseInt(this._chartHeight)*91/100+5,c=!1),f=h,e=s,i=i+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="Legend{4}" style="fill:{5}"><\/path>',f,o+7.5,f+r,o+15,n+1,this._series[n].BarColor),i=i+String.format('<text x="{0}" y="{1}" id="LegendText">{2}<\/text>',e,o+15,this._series[n].Name),this._series[n].Name.length>10?(h=f+this._series[n].Name.length*5+r+u*2,s=e+this._series[n].Name.length*5+r+u*2):(h=h+this._series[n].Name.length*6+r+u*2,s=s+this._series[n].Name.length*6+r+u*2);return i+"<\/g>"},generateBarChart:function(){this.arrYAxis=this._categoriesAxis.split(",");this.arrYAxisLength=this.arrYAxis.length;this.calculateMinMaxValuesForBarType();this.calculateIntervalForBarType();this.calculateValueAxisForBarType();var n=this.initializeSVG();n=n+String.format('<text x="{0}" y="{1}" id="ChartTitle" style="fill:{3}">{2}<\/text>',parseInt(this._chartWidth)/2-this._chartTitle.length*this.charLength,parseInt(this._chartHeight)/20,this._chartTitle,this._chartTitleColor);n=n+this.drawBackgroundHorizontalLinesForBarType();n=n+this.drawBackgroundVerticalLinesForBarType();n=n+this.drawBaseLinesForBarType();n=n+this.drawLegendArea();n=n+this.drawAxisValuesForBarType();n=n+this.drawBarsForBarType();n=n+"<\/svg>";this._parentDiv.innerHTML=n},calculateIntervalForBarType:function(){this.startY=Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)/5)+.5;this.endY=parseInt(this._chartHeight)*8/100+5;this.endX=parseInt(this._chartWidth)-10+.5;this.startX=this.xMin>=0?this._chartWidth*15/100+.5:Math.round(parseInt(this._chartWidth)/2)+.5;this.xInterval=Math.round((this.endX-this.startX)/this._valueAxisLines)},calculateMinMaxValuesForBarType:function(){var u,i,r,t,n;if(this._chartType==Sys.Extended.UI.BarChartType.Bar)for(n=0;n<this._series.length;n++)r=this._series[n].Data,u=Math.max.apply(null,r),i=Math.min.apply(null,r),n==0?(this.xMax=u,this.xMin=i):(u>this.xMax&&(this.xMax=u),i<this.yMin&&(this.xMin=i));else{for(this.arrCombinedData=null,n=0;n<this._series.length;n++){for(r=[],t=0;t<this._series[n].Data.length;t++)r[t]=this._series[n].Data[t];if(this.arrCombinedData==null)this.arrCombinedData=r;else for(t=0;t<r.length;t++)this.arrCombinedData[t]=parseFloat(this.arrCombinedData[t])+parseFloat(r[t])}for(n=0;n<this._series.length;n++)i=Math.min.apply(null,this._series[n].Data),n==0?this.xMin=i:i<this.xMin&&(this.xMin=i);this.xMax=Math.max.apply(null,this.arrCombinedData)}this.xMin<0&&(this._valueAxisLines=Math.round(this._valueAxisLines/2))},calculateValueAxisForBarType:function(){var i,n,r,t;i=this.xMin>=0?this.xMax:this.xMax>Math.abs(this.xMin)?this.xMax:Math.abs(this.xMin);n=i/(this._valueAxisLines-1);n<1?this.roundedTickRange=n.toFixed(1):(r=Math.ceil(Math.log(n)/Math.log(10)-1),t=Math.pow(10,r),this.roundedTickRange=Math.ceil(n/t)*t)},drawBackgroundVerticalLinesForBarType:function(){for(var t="",n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',this.startX+this.xInterval*n,this.startY,this.startY-this.yInterval*this.arrYAxisLength,this._categoryAxisLineColor);if(this.xMin<0)for(n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',this.startX-this.xInterval*n,this.startY,this.startY-this.yInterval*this.arrYAxisLength,this._categoryAxisLineColor);return t},drawBackgroundHorizontalLinesForBarType:function(){var t="",n;for(this.yInterval=Math.round((this.startY-this.endY)/this.arrYAxisLength),n=0;n<=this.arrYAxisLength;n++)t=t+String.format('<path id="HorizontalLine" d="M{0} {2} {1} {2}" style="stroke:{3}"><\/path>',this.startX,this.startX+this.xInterval*this._valueAxisLines,this.startY-this.yInterval*n,this._valueAxisLineColor);if(this.xMin<0)for(n=0;n<=this.arrYAxisLength;n++)t=t+String.format('<path id="HorizontalLine" d="M{0} {2} {1} {2}" style="stroke:{3}"><\/path>',this.startX,this.startX-this.xInterval*this._valueAxisLines,this.startY-this.yInterval*n,this._valueAxisLineColor);return t},drawBaseLinesForBarType:function(){var n="",t;for(n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.endY,this._baseLineColor),n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startX-4,this.startY,this._baseLineColor),n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY,this._baseLineColor),t=0;t<this.arrYAxisLength;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startX-4,this.startY-this.yInterval*t,this._baseLineColor);for(t=0;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX+this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);if(this.xMin<0)for(n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startX-this.xInterval*this._valueAxisLines,this.startY,this._baseLineColor),t=1;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);return n},drawAxisValuesForBarType:function(){for(var t="",i=0,n=0;n<this.arrYAxisLength;n++)i=this.arrYAxis[n].toString().length*6.5,t=t+String.format('<text id="SeriesAxis" x="{0}" y="{1}">{2}<\/text>',this.startX-this.xInterval*15/100-i,Math.round(this.startY-this.yInterval*(n+1)+this.yInterval*60/100),this.arrYAxis[n]);for(n=0;n<=this._valueAxisLines;n++)t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">{2}<\/text>',this.startX+this.xInterval*n-(this.roundedTickRange*n).toString().length*this.charLength,this.startY+this.yInterval*35/100,this.roundedTickRange*n);if(this.xMin<0)for(n=1;n<=this._valueAxisLines;n++)t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">-{2}<\/text>',this.startX-this.xInterval*n-(this.roundedTickRange*n).toString().length*this.charLength,this.startY+this.yInterval*35/100,this.roundedTickRange*n);return t},drawBarsForBarType:function(){for(var i="",o=this._series.length,e=this.yInterval/10,r=this._chartType==Sys.Extended.UI.BarChartType.Bar?Math.round((this.yInterval*80/100-e*o)/o):Math.round(this.yInterval*80/100),u,f,n,t=0;t<this.arrYAxisLength;t++){if(i=i+"<g>",this._chartType==Sys.Extended.UI.BarChartType.Bar)for(n=0;n<this._series.length;n++)this.xVal=this._series[n].Data[t],i=t==0?i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX,this.startX+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)),this.startY-this.yInterval*t-this.yInterval*15/100-(e+r)*n,this.startY-this.yInterval*t-this.yInterval*15/100-(e+r)*n-r,n+1,this._series[n].BarColor):i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',this.startX,this.startX+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)),this.startY-this.yInterval*t-this.yInterval*12.5/100-(e+r)*n,this.startY-this.yInterval*t-this.yInterval*12.5/100-(e+r)*n-r,n+1,this._series[n].BarColor),i=this.xVal>0?i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+Math.round(this.xVal*(this.xInterval/this.roundedTickRange))+this.xVal.toString().length*this.charLength,this.startY-this.yInterval*t-this.yInterval/5-(e+r)*n-r/10,this.xVal):i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',this.startX+Math.round(this.xVal*(this.xInterval/this.roundedTickRange))-(this.xVal.toString().length+1)*this.charLength-5,this.startY-this.yInterval*t-this.yInterval/5-(e+r)*n-r/10,this.xVal);else for(u=this.startX,f=this.startX,n=0;n<this._series.length;n++)this.xVal=this._series[n].Data[t],i=t==0?this.xVal>0?i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',u,u+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)),this.startY-this.yInterval*t-this.yInterval/10,this.startY-this.yInterval*t-this.xInterval/10-r,n+1,this._series[n].BarColor):i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',f,f+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)),this.startY-this.yInterval*t-this.yInterval/10,this.startY-this.yInterval*t-this.xInterval/10-r,n+1,this._series[n].BarColor):this.xVal>0?i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',u,u+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)),this.startY-this.yInterval*t-this.yInterval*7.55/100,this.startY-this.yInterval*t-this.xInterval*7.5/100-r,n+1,this._series[n].BarColor):i+String.format('<path id="Bar{4}" style="fill:{5}" d="M{0} {2} {1} {2} {1} {3} {0} {3} z" />',f,f+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)),this.startY-this.yInterval*t-this.yInterval*7.55/100,this.startY-this.yInterval*t-this.xInterval*7.5/100-r,n+1,this._series[n].BarColor),this.xVal>0?(i=i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',u+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)/2),this.startY-this.yInterval*t-this.yInterval*30/100-r/10,this.xVal),u=u+Math.round(this.xVal*(this.xInterval/this.roundedTickRange))):(i=i+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',f+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)/2),this.startY-this.yInterval*t-this.yInterval*30/100-r/10,this.xVal),f=f+Math.round(this.xVal*(this.xInterval/this.roundedTickRange)));i=i+"<\/g>"}return i},get_chartWidth:function(){return this._chartWidth},set_chartWidth:function(n){this._chartWidth=n},get_chartHeight:function(){return this._chartHeight},set_chartHeight:function(n){this._chartHeight=n},get_chartTitle:function(){return this._chartTitle},set_chartTitle:function(n){this._chartTitle=n},get_categoriesAxis:function(){return this._categoriesAxis},set_categoriesAxis:function(n){this._categoriesAxis=n},get_ClientSeries:function(){return this._series},set_ClientSeries:function(n){this._series=n},get_chartType:function(){return this._chartType},set_chartType:function(n){this._chartType=n},get_theme:function(){return this._theme},set_theme:function(n){this._theme=n},get_valueAxisLines:function(){return this._valueAxisLines},set_valueAxisLines:function(n){this._valueAxisLines=n},get_chartTitleColor:function(){return this._chartTitleColor},set_chartTitleColor:function(n){this._chartTitleColor=n},get_valueAxisLineColor:function(){return this._valueAxisLineColor},set_valueAxisLineColor:function(n){this._valueAxisLineColor=n},get_categoryAxisLineColor:function(){return this._categoryAxisLineColor},set_categoryAxisLineColor:function(n){this._categoryAxisLineColor=n},get_baseLineColor:function(){return this._baseLineColor},set_baseLineColor:function(n){this._baseLineColor=n}},Sys.Extended.UI.BarChart.registerClass("Sys.Extended.UI.BarChart",Sys.Extended.UI.ControlBase),Sys.registerComponent(Sys.Extended.UI.BarChart,{name:"BarChart",parameters:[{name:"ClientSeries",type:"BarChartSeries[]"}]}),Sys.Extended.UI.BarChartType=function(){throw Error.invalidOperation();},Sys.Extended.UI.BarChartType.prototype={Column:0,Bar:1,StackedColumn:2,StackedBar:3},Sys.Extended.UI.BarChartType.registerEnum("Sys.Extended.UI.BarChartType",!1),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.BubbleChart=function(n){Sys.Extended.UI.BubbleChart.initializeBase(this,[n]);var t=this.get_id();t=t.replace("_ctl00","");this._parentDiv=document.getElementById(t+"__ParentDiv");this._chartWidth="300";this._chartHeight="200";this._chartTitle="";this._bubbleChartClientValues=null;this._theme="BubbleChart";this._yAxisLines=6;this._xAxisLines=6;this._bubbleSizes=5;this._chartTitleColor="";this._yAxisLineColor="";this._xAxisLineColor="";this._baseLineColor="";this._tooltipBackgroundColor="#ffffff";this._tooltipFontColor="#0E426C";this._tooltipBorderColor="#B85B3E";this._xAxisLabel="";this._yAxisLabel="";this._bubbleLabel="";this._axislabelFontColor="#000000";this.yMax=0;this.yMin=0;this.xMax=0;this.xMin=0;this.dataMax=0;this.dataMin=0;this.yRoundedIntervalLabelSize=0;this.xRoundedIntervalLabelSize=0;this.roundedBubbleSize=0;this.startX=0;this.startY=0;this.endX=0;this.endY=0;this.xInterval=0;this.yInterval=0;this.charLength=3.5;this._divTooltip=null},Sys.Extended.UI.BubbleChart.prototype={initialize:function(){if(Sys.Extended.UI.BubbleChart.callBaseMethod(this,"initialize"),!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"))throw"Current version of browser does not support SVG.";this._yAxisLines==0&&(this._yAxisLines=6);this._xAxisLines==0&&(this._xAxisLines=6);this._bubbleSizes==0&&(this._bubbleSizes=5);this.generateTooltipDiv();this.generateBubbleChart()},dispose:function(){Sys.Extended.UI.BubbleChart.callBaseMethod(this,"dispose")},generateTooltipDiv:function(){this._divTooltip=$common.createElementFromTemplate({nodeName:"div",properties:{id:this.get_id()+"_tooltipDiv",style:{position:"absolute",backgroundColor:this._tooltipBackgroundColor,borderStyle:"solid",borderWidth:"5px",borderColor:this._tooltipBorderColor,left:"0px",top:"0px",color:this._tooltipFontColor,visibility:"hidden",zIndex:"10000",padding:"10px"}}},this._parentDiv)},generateBubbleChart:function(){this.calculateMinMaxValues();this.calculateBubbleSize();this.calculateAxisValues();var n=this.intializeSVG();n=n+String.format('<text x="{0}" y="{1}" id="ChartTitle" style="fill:{3}">{2}<\/text>',parseInt(this._chartWidth)/2-this._chartTitle.length*this.charLength,parseInt(this._chartHeight)/20,this._chartTitle,this._chartTitleColor);this.calculateIntervals();n=n+this.drawBackgroundHorizontalLines();n=n+this.drawBackgroundVerticalLines();n=n+this.drawBaseLines();n=n+this.drawAxisValues();this._parentDiv.innerHTML=this._parentDiv.innerHTML+n;this.drawBubbles(this,0)},intializeSVG:function(){var n=String.format('<?xml-stylesheet type="text/css" href="{0}.css"?>',this._theme);return n=String.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="{0}" height="{1}" preserveAspectRatio="xMidYMid meet" viewbox="0 0 {2} {3}" style="position: relative; display: block;" onload="init(evt)">',this._chartWidth,this._chartHeight,parseFloat(this._chartWidth)*.99,parseFloat(this._chartHeight)*.99),n=n+String.format('<path fill="none" stroke-opacity="1" fill-opacity="1" stroke-linejoin="round" stroke-linecap="square" d="M5 {0} {1} {0} {1} {2} 5 {2} z"/>',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10),n=n+String.format('<path id="ChartBackGround" stroke="" d="M0 0 {0} 0 {0} {1} 0 {1} z"/>',this._chartWidth,parseInt(this._chartHeight)-5),n+String.format('<path fill="#ffffff" stroke-opacity="1" fill-opacity="0" stroke-linejoin="round" stroke-linecap="square" stroke="" d="M5 {0} {1} {0} {1} {2} 5 {2} z" />',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10)},drawBubbles:function(n,t){n._parentDiv.innerHTML=n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{4}" cx="{0}" cy="{1}" r="{2}" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt,\'{5}\',{6}, \'{7}\')" onmouseout="HideTooltip(this, evt)"><\/circle><\/svg>',n.startX+Math.round(parseFloat(n._bubbleChartClientValues[t].X)/n.xRoundedIntervalLabelSize*n.xInterval),n.startY+Math.round(-1*parseFloat(n._bubbleChartClientValues[t].Y)/n.yRoundedIntervalLabelSize*n.yInterval),Math.round(parseFloat(n._bubbleChartClientValues[t].Data)/n.roundedBubbleSize*n._bubbleSizes),n._bubbleChartClientValues[t].BubbleColor,t+1,n._bubbleChartClientValues[t].Category,n._bubbleChartClientValues[t].Data,n._bubbleLabel);t++;t<n._bubbleChartClientValues.length&&setTimeout(function(){n.drawBubbles(n,t)},400)},calculateMinMaxValues:function(){for(var n=0;n<this._bubbleChartClientValues.length;n++)n==0?(this.dataMax=parseFloat(this._bubbleChartClientValues[n].Data),this.dataMin=parseFloat(this._bubbleChartClientValues[n].Data),this.yMax=parseFloat(this._bubbleChartClientValues[n].Y),this.yMin=parseFloat(this._bubbleChartClientValues[n].Y),this.xMax=parseFloat(this._bubbleChartClientValues[n].X),this.xMin=parseFloat(this._bubbleChartClientValues[n].X)):(parseFloat(this._bubbleChartClientValues[n].Data)>this.dataMax&&(this.dataMax=parseFloat(this._bubbleChartClientValues[n].Data)),parseFloat(this._bubbleChartClientValues[n].Data)<this.dataMin&&(this.dataMin=parseFloat(this._bubbleChartClientValues[n].Data)),parseFloat(this._bubbleChartClientValues[n].X)>this.xMax&&(this.xMax=parseFloat(this._bubbleChartClientValues[n].X)),parseFloat(this._bubbleChartClientValues[n].Data)<this.xMin&&(this.xMin=parseFloat(this._bubbleChartClientValues[n].X)),parseFloat(this._bubbleChartClientValues[n].Y)>this.yMax&&(this.yMax=parseFloat(this._bubbleChartClientValues[n].Y)),parseFloat(this._bubbleChartClientValues[n].Y)<this.yMin&&(this.yMin=parseFloat(this._bubbleChartClientValues[n].Y)));this.xMin<0&&(this._xAxisLines=Math.round(this._xAxisLines/2));this.yMin<0&&(this._yAxisLines=Math.round(this._yAxisLines/2))},calculateBubbleSize:function(){var n,i,r,t;r=this.dataMax;t=r/(this._bubbleSizes-1);i=Math.ceil(Math.log(t)/Math.log(10)-1);n=Math.pow(10,i);this.roundedBubbleSize=Math.ceil(t/n)*n},calculateAxisValues:function(){var i,n,r,t;i=this.yMin<0?this.yMax>Math.abs(this.yMin)?this.yMax:Math.abs(this.yMin):this.yMax;n=i/(this._yAxisLines-1);n<1?this.yRoundedIntervalLabelSize=n.toFixed(1):(x=Math.ceil(Math.log(n)/Math.log(10)-1),pow10x=Math.pow(10,x),this.yRoundedIntervalLabelSize=Math.ceil(n/pow10x)*pow10x);r=this.xMin<0?this.xMax>Math.abs(this.xMin)?this.xMax:Math.abs(this.xMin):this.xMax;t=r/(this._xAxisLines-1);n<1?this.xRoundedIntervalLabelSize=t.toFixed(1):(x=Math.ceil(Math.log(t)/Math.log(10)-1),pow10x=Math.pow(10,x),this.xRoundedIntervalLabelSize=Math.ceil(t/pow10x)*pow10x)},calculateIntervals:function(){this.endX=parseFloat(this._chartWidth)-parseFloat(this._chartWidth)/20;this.startX=this.xMin<0?Math.round(parseFloat(this._chartWidth)+parseFloat(this._chartWidth)/10)/2+.5:parseFloat(this._chartWidth)/5+.5;this.xInterval=this.xMin<0?(this.endX-this.startX)/this._xAxisLines:Math.round((this.endX-this.startX)/this._xAxisLines);this.startY=this.yMin<0?Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)/20)/2+.5:Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)/5)+.5;this.yInterval=this.startY/(this._yAxisLines+1);this.endY=this.startY-this.yInterval*this._yAxisLines},drawBackgroundHorizontalLines:function(){for(var t="",n=1;n<=this._yAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY-this.yInterval*n,this._xAxisLineColor);if(this.yMin<0)for(n=1;n<=this._yAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY+this.yInterval*n,this._xAxisLineColor);if(this.xMin<0)for(n=1;n<=this._yAxisLines;n++)t=t+String.format('<path id="HorizontalLine" d="M{0} {2} {1} {2}" style="stroke:{3}"><\/path>',this.startX,this.startX-this.xInterval*this._xAxisLines,this.startY-this.yInterval*n,this._xAxisLineColor);if(this.xMin<0&&this.yMin<0)for(n=1;n<=this._yAxisLines;n++)t=t+String.format('<path id="HorizontalLine" d="M{0} {2} {1} {2}" style="stroke:{3}"><\/path>',this.startX,this.startX-this.xInterval*this._xAxisLines,this.startY+this.yInterval*n,this._xAxisLineColor);return t},drawBackgroundVerticalLines:function(){for(var t="",n=1;n<=this._xAxisLines;n++)t=t+String.format('<path d="M{0} {1} {0} {2}" id="VerticalLine" style="stroke:{3}"><\/path>',this.startX+this.xInterval*n,this.startY,this.endY,this._yAxisLineColor);if(this.xMin<0)for(n=1;n<=this._xAxisLines;n++)t=t+String.format('<path d="M{0} {1} {0} {2}" id="VerticalLine" style="stroke:{3}"><\/path>',this.startX-this.xInterval*n,this.startY,this.endY,this._yAxisLineColor);if(this.yMin<0)for(n=1;n<=this._xAxisLines;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',this.startX+this.xInterval*n,this.startY,this.startY+this.yInterval*this._yAxisLines,this._yAxisLineColor);if(this.xMin<0&&this.yMin<0)for(n=1;n<=this._xAxisLines;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',this.startX-this.xInterval*n,this.startY,this.startY+this.yInterval*this._yAxisLines,this._yAxisLineColor);return t},drawBaseLines:function(){var n="",t;for(n=n+String.format('<path d="M{0} {1} {2} {1}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.endX,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.startY+4,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.endY,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {2} {1}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.startX+4,this._baseLineColor),t=0;t<=this._yAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY-this.yInterval*t,this._baseLineColor);if(this.yMin<0){for(t=1;t<=this._yAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY+this.yInterval*t,this._baseLineColor);n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-this.xInterval*this._xAxisLines,this.startY,this.startY+4,this._baseLineColor);n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.startY+this.yInterval*this._yAxisLines,this._baseLineColor)}for(t=0;t<=this._xAxisLines;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX+this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);if(this.xMin<0){for(t=1;t<=this._xAxisLines;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startX-this.xInterval*this._xAxisLines,this.startY,this._baseLineColor)}return n},drawAxisValues:function(){for(var t="",i=0,r,n=1;n<=this._yAxisLines;n++)i=(this.yRoundedIntervalLabelSize*10*n/10).toString().length*5.5,t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">{2}<\/text>',this.startX-i-10,this.startY-this.yInterval*n+4,this.yRoundedIntervalLabelSize*10*n/10);if(this.yMin<0)for(n=1;n<=this._yAxisLines;n++)i=(this.yRoundedIntervalLabelSize*10*n/10).toString().length*5.5+5.5,t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">-{2}<\/text>',this.startX-i-10,this.startY+this.yInterval*n+4,this.yRoundedIntervalLabelSize*10*n/10);for(n=1;n<=this._xAxisLines;n++)i=(this.xRoundedIntervalLabelSize*10*n/10).toString().length*5.5,t=t+String.format('<text id="SeriesAxis" x="{0}" y="{1}">{2}<\/text>',Math.round(this.startX+this.xInterval*n-i/2),this.startY+Math.round(this.yInterval/4)+5,this.xRoundedIntervalLabelSize*10*n/10);if(this.xMin<0)for(n=1;n<=this._xAxisLines;n++)i=(this.xRoundedIntervalLabelSize*10*n/10).toString().length*5.5+5.5,t=t+String.format('<text id="SeriesAxis" x="{0}" y="{1}">-{2}<\/text>',Math.round(this.startX-this.xInterval*n-i/2),this.startY+Math.round(this.yInterval/4)+5,this.xRoundedIntervalLabelSize*10*n/10);return r=this.yMin<0?Math.round(this.startY+this.yInterval*this._yAxisLines-(this.startY-this.yInterval*this._yAxisLines))/2:Math.round((this.startY-this.endY)/2),t=t+String.format('<text id="AxisLabels" x="{0}" y="{1}" style="fill:{3};" transform="rotate(-90, {0}, {1})">{2}<\/text>',Math.round(parseFloat(this._chartWidth)/20),r+this._yAxisLabel.toString().length*this.charLength,this._yAxisLabel,this._axislabelFontColor),t+String.format('<text id="AxisLabels" x="{0}" y="{1}" style="fill:{3};">{2}<\/text>',Math.round(parseInt(this._chartWidth)/2-this._xAxisLabel.toString().length*this.charLength/2),Math.round(parseInt(this._chartHeight)*90/100+5),this._xAxisLabel,this._axislabelFontColor)},get_chartWidth:function(){return this._chartWidth},set_chartWidth:function(n){this._chartWidth=n},get_chartHeight:function(){return this._chartHeight},set_chartHeight:function(n){this._chartHeight=n},get_chartTitle:function(){return this._chartTitle},set_chartTitle:function(n){this._chartTitle=n},get_BubbleChartClientValues:function(){return this._bubbleChartClientValues},set_BubbleChartClientValues:function(n){this._bubbleChartClientValues=n},get_theme:function(){return this._theme},set_theme:function(n){this._theme=n},get_yAxisLines:function(){return this._yAxisLines},set_yAxisLines:function(n){this._yAxisLines=n},get_xAxisLines:function(){return this._xAxisLines},set_xAxisLines:function(n){this._xAxisLines=n},get_chartTitleColor:function(){return this._chartTitleColor},set_chartTitleColor:function(n){this._chartTitleColor=n},get_yAxisLineColor:function(){return this._yAxisLineColor},set_yAxisLineColor:function(n){this._yAxisLineColor=n},get_xAxisLineColor:function(){return this._xAxisLineColor},set_xAxisLineColor:function(n){this._xAxisLineColor=n},get_bubbleSizes:function(){return this._bubbleSizes},set_bubbleSizes:function(n){this._bubbleSizes=n},get_baseLineColor:function(){return this._baseLineColor},set_baseLineColor:function(n){this._baseLineColor=n},get_tooltipBackgroundColor:function(){return this.tooltipBackgroundColor},set_tooltipBackgroundColor:function(n){this.tooltipBackgroundColor=n},get_tooltipFontColor:function(){return this._tooltipFontColor},set_tooltipFontColor:function(n){this._tooltipFontColor=n},get_tooltipBorderColor:function(){return this._tooltipBorderColor},set_tooltipBorderColor:function(n){this._tooltipBorderColor=n},get_xAxisLabel:function(){return this._xAxisLabel},set_xAxisLabel:function(n){this._xAxisLabel=n},get_yAxisLabel:function(){return this._yAxisLabel},set_yAxisLabel:function(n){this._yAxisLabel=n},get_bubbleLabel:function(){return this._bubbleLabel},set_bubbleLabel:function(n){this._bubbleLabel=n},get_axislabelFontColor:function(){return this._axislabelFontColor},set_axislabelFontColor:function(n){this._axislabelFontColor=n}},Sys.Extended.UI.BubbleChart.registerClass("Sys.Extended.UI.BubbleChart",Sys.Extended.UI.ControlBase),Sys.registerComponent(Sys.Extended.UI.BubbleChart,{name:"BubbleChart",parameters:[{name:"BubbleChartClientValues",type:"BubbleChartValue[]"}]}),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.TimeSpan=function(){if(arguments.length==0)this._ctor$0.apply(this,arguments);else if(arguments.length==1)this._ctor$1.apply(this,arguments);else if(arguments.length==3)this._ctor$2.apply(this,arguments);else if(arguments.length==4)this._ctor$3.apply(this,arguments);else if(arguments.length==5)this._ctor$4.apply(this,arguments);else throw Error.parameterCount();};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 u,t;if(n||(n="F"),n.length==1)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 f=/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(u=f.lastIndex,t=f.exec(n),i.append(n.slice(u,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")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedDateTime",["ExtendedCommon"],n):n()}(),function(){function n(){var n=Sys.version;if(!n&&!Sys._versionChecked){Sys._versionChecked=!0;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.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 this._timer!=null},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(r){if(this._isComplete=!0,this._completedSynchronously=!1,this._exception=r,i&&i(this))return;if(this._throwExceptions)throw r;}}};Sys.Extended.UI.DeferredOperation.registerClass("Sys.Extended.UI.DeferredOperation")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedThreading",["Core"],n):n()}(),function(){function n(){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"))},set_startDate:function(n){this._startDate!=n&&(this._startDate=new Date(n),this.raisePropertyChanged("startDate"))},get_startDate:function(){return this._startDate},set_endDate:function(n){this._endDate!=n&&(this._endDate=new Date(n),this.raisePropertyChanged("_endDate"))},get_endDate:function(){return this._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(this._selectedDate==null){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)&&n.length!=0&&(n=new Date(n));this._selectedDate!=n&&(this._selectedDate=n,this._selectedDateChanging=!0,i="",n&&(i=this._convertToLocal(n).localeFormat(this._format),this._clearTime||(t=this._textbox.get_Value(),t&&(t=this._parseTextValue(t)),t&&n!=t.getDateOnly()&&(n.setUTCHours(t.getUTCHours()),n.setUTCMinutes(t.getUTCMinutes()),n.setUTCMilliseconds(t.getUTCMilliseconds()),i=this._convertToLocal(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)&&n.length!=0&&(n=new Date(n));this._visibleDate!=n&&(this._switchMonth(n,!this._isOpen),this.raisePropertyChanged("visibleDate"))},get_isOpen:function(){return this._isOpen},get_todaysDate:function(){return this._todaysDate!=null?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)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(){var n=this.get_events().getHandler("shown");n&&n(this,Sys.EventArgs.Empty)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(){var n=this.get_events().getHandler("hidden");n&&n(this,Sys.EventArgs.Empty)},add_dateSelectionChanged:function(n){this.get_events().addHandler("dateSelectionChanged",n)},remove_dateSelectionChanged:function(n){this.get_events().removeHandler("dateSelectionChanged",n)},raiseDateSelectionChanged:function(){var n=this.get_events().getHandler("dateSelectionChanged");n&&n(this,Sys.EventArgs.Empty)},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.raiseShowing(n),n.get_cancel())return;if(this._isOpen=!0,this._popupBehavior.show(),this._firstPopUp){this._switchMonth(null,!0);switch(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.raiseShown()}},hide:function(){if(this._isOpen){var n=new Sys.CancelEventArgs;if(this.raiseHiding(n),n.get_cancel())return;this._container&&this._popupBehavior.hide();this._isOpen=!1;this.raiseHidden();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 e=Sys.CultureInfo.CurrentCulture.dateTimeFormat,t=this.get_id(),n,u,i,r,f;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",cellPadding:0,cellSpacing:0,border:0,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++)r=$common.createElementFromTemplate({nodeName:"td"},this._daysTableHeaderRow),f=$common.createElementFromTemplate({nodeName:"div",cssClasses:["ajax__calendar_dayname"]},r);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),i=0;i<7;i++)r=$common.createElementFromTemplate({nodeName:"td"},u),f=$common.createElementFromTemplate({nodeName:"div",properties:{mode:"day",id:t+"_day_"+n+"_"+i,innerHTML:" "},events:this._cell$delegates,cssClasses:["ajax__calendar_day"]},r)},_buildMonths:function(){var f=Sys.CultureInfo.CurrentCulture.dateTimeFormat,i=this.get_id(),n,r,t,u,e;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",cellPadding:0,cellSpacing:0,border:0,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),e=$common.createElementFromTemplate({nodeName:"div",properties:{id:i+"_month_"+n+"_"+t,mode:"month",month:n*4+t,innerHTML:"<br />"+f.AbbreviatedMonthNames[n*4+t]},events:this._cell$delegates,cssClasses:["ajax__calendar_month"]},u)},_buildYears:function(){var i=this.get_id(),n,r,t,u,f;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",cellPadding:0,cellSpacing:0,border:0,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),f=$common.createElementFromTemplate({nodeName:"div",properties:{id:i+"_year_"+n+"_"+t,mode:"year",year:n*4+t-1},events:this._cell$delegates,cssClasses:["ajax__calendar_year"]},u)},_isInDateRange:function(n,t){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.getUTCFullYear()<this._startDate.getUTCFullYear()||this._endDate&&n.getUTCFullYear()>this._endDate.getUTCFullYear())return!1}return!0},_getDateOnly:function(n){return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))},_getMonthOnly:function(n){return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1))},_convertToUTC:function(n){return n&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()))),n},_convertToLocal:function(n){var t=new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds());return t.getDate()!=n.getUTCDate()&&(t=new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours()+1,n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())),t},_performLayout:function(){var p=this.get_element(),a,s,h,u,c,y,l,t,e,r,o,f,n;if(p&&this.get_isInitialized()&&this._isOpen){var w=Sys.CultureInfo.CurrentCulture.dateTimeFormat,b=this.get_selectedDate(),i=this._getEffectiveVisibleDate(),v=this.get_todaysDate();switch(this._mode){case"days":for(a=this._getFirstDayOfWeek(),s=i.getUTCDay()-a,s<=0&&(s+=7),h=new Date(i),h.setUTCDate(h.getUTCDate()-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+a)%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.getUTCDate())),t.title=this._convertToLocal(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.setUTCDate(u.getUTCDate()+1);this._prevArrow.date=new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth()-1,1));this._nextArrow.date=new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth()+1,1));this._title.firstChild&&this._title.removeChild(this._title.firstChild);this._title.appendChild(document.createTextNode(this._convertToLocal(i).localeFormat(this.get_daysModeTitleFormat())));this._title.date=i;break;case"months":for(r=0;r<this._monthsBody.rows.length;r++)for(o=this._monthsBody.rows[r],f=0;f<o.cells.length;f++)n=o.cells[f].firstChild,n.date=new Date(Date.UTC(i.getUTCFullYear(),n.month,1)),n.title=this._convertToLocal(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(this._convertToLocal(i).localeFormat("yyyy")));this._title.date=i;this._prevArrow.date=new Date(Date.UTC(i.getUTCFullYear()-1,0,1));this._nextArrow.date=new Date(Date.UTC(i.getUTCFullYear()+1,0,1));break;case"years":for(e=Math.floor(i.getUTCFullYear()/10)*10,r=0;r<this._yearsBody.rows.length;r++)for(o=this._yearsBody.rows[r],f=0;f<o.cells.length;f++)n=o.cells[f].firstChild,n.date=new Date(Date.UTC(e+n.year,0,1)),n.firstChild?n.removeChild(n.lastChild):n.appendChild(document.createElement("br")),n.appendChild(document.createTextNode(e+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(e.toString()+"-"+(e+9).toString()));this._title.date=i;this._prevArrow.date=new Date(Date.UTC(e-10,0,1));this._nextArrow.date=new Date(Date.UTC(e+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,v.localeFormat(this.get_todaysDateFormat()))));this._isInDateRange(v,"d")||Sys.UI.DomElement.addCssClass(this._today.parentNode,"ajax__calendar_invalid");this._today.date=this._convertToUTC(v)}},_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))},_switchMonth:function(n,t){var u,r,i,f;this._isAnimating||(!n||this._canSwitchMonth(n))&&(u=this._getEffectiveVisibleDate(),n&&n.getFullYear()==u.getFullYear()&&n.getMonth()==u.getMonth()&&(t=!0),this._animated&&!t?(this._isAnimating=!0,r=this._modes[this._mode],i=r.cloneNode(!0),this._body.appendChild(i),u>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(),f=Function.createDelegate(this,function(){this._body.removeChild(i);i=null;this._isAnimating=!1;this._modeChangeAnimation.remove_ended(f)}),this._modeChangeAnimation.add_ended(f),this._modeChangeAnimation.play()):(this._visibleDate=n,this.invalidate()))},_canSwitchMonth:function(n){switch(this._mode){case"days":if(!this._isInDateRange(n,"M"))return!1;break;case"months":if(!this._isInDateRange(n,"y"))return!1;break;case"years":if(!this._isInDateRange(n,"y"))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.getUTCDate()!=i.getUTCDate())return!1;case"M":if(n.getUTCMonth()!=i.getUTCMonth())return!1;case"y":if(n.getUTCFullYear()!=i.getUTCFullYear())return!1}return!0},_isOther:function(n,t){var i=this._getEffectiveVisibleDate(),r;switch(t){case"d":return n.getUTCFullYear()!=i.getUTCFullYear()||n.getUTCMonth()!=i.getUTCMonth();case"M":return!1;case"y":return r=Math.floor(i.getUTCFullYear()/10)*10,n.getUTCFullYear()<r||r+10<=n.getUTCFullYear()}return!1},_isTodaysDate:function(n){return this._getDateOnly(this._convertToUTC(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 n==null&&(n=this.get_selectedDate()),n==null&&(n=this.get_todaysDate()),n=new Date(n),n.setUTCDate(1),this._getDateOnly(n)},_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=this._convertToUTC(Date.parseLocale(n,this.get_format()))),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._switchMonth(this._selectedDate,this._selectedDate==null)}},_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();Sys.UI.DomElement.removeCssClass(t.parentNode,"ajax__calendar_hover");switch(t.mode){case"prev":case"next":this._switchMonth(t.date);break;case"title":switch(this._mode){case"days":this._switchMode("months");break;case"months":this._switchMode("years")}break;case"month":t.month==i.getUTCMonth()?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._switchMonth(t.date);this._blur.post(!0);this.raiseDateSelectionChanged();break;case"today":this.set_selectedDate(t.date);this._switchMonth(t.date);this._blur.post(!0);this.raiseDateSelectionChanged()}}},_button_onclick:function(n){(n.preventDefault(),n.stopPropagation(),this._enabled)&&n.clientX!=0&&(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)}};Sys.Extended.UI.CalendarBehavior.registerClass("Sys.Extended.UI.CalendarBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.CalendarBehavior,{name:"calendar"});Sys.Extended.UI.CalendarPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.CalendarPosition.prototype={BottomLeft:0,BottomRight:1,TopLeft:2,TopRight:3,Right:4,Left:5};Sys.Extended.UI.CalendarPosition.registerEnum("Sys.Extended.UI.CalendarPosition");Sys.Extended.UI.CalendarDefaultView=function(){throw Error.invalidOperation();};Sys.Extended.UI.CalendarDefaultView.prototype={Days:0,Months:1,Years:2};Sys.Extended.UI.CalendarDefaultView.registerEnum("Sys.Extended.UI.CalendarDefaultView")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedCalendar",["Globalization","ExtendedBase","ExtendedDateTime","ExtendedThreading","ExtendedAnimationBehavior","ExtendedPopup"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.CascadingDropDownSelectionChangedEventArgs=function(n,t){Sys.Extended.UI.CascadingDropDownSelectionChangedEventArgs.initializeBase(this);this._oldValue=n;this._newValue=t};Sys.Extended.UI.CascadingDropDownSelectionChangedEventArgs.prototype={get_oldValue:function(){return this._oldValue},get_newValue:function(){return this._newValue}};Sys.Extended.UI.CascadingDropDownSelectionChangedEventArgs.registerClass("Sys.Extended.UI.CascadingDropDownSelectionChangedEventArgs",Sys.EventArgs);Sys.Extended.UI.CascadingDropDownBehavior=function(n){Sys.Extended.UI.CascadingDropDownBehavior.initializeBase(this,[n]);this._parentControlID=null;this._category=null;this._promptText=null;this._loadingText=null;this._promptValue=null;this._emptyValue=null;this._emptyText=null;this._servicePath=location.pathname;this._serviceMethod=null;this._contextKey=null;this._useContextKey=!1;this._useHttpGet=!1;this._enableAtLoading=!1;this._parentElement=null;this._changeHandler=null;this._parentChangeHandler=null;this._lastParentValues=null;this._selectedValue=null;this._actualDisabledStatus=!1};Sys.Extended.UI.CascadingDropDownBehavior.prototype={initialize:function(){var n,t;Sys.Extended.UI.CascadingDropDownBehavior.callBaseMethod(this,"initialize");$common.prepareHiddenElementForATDeviceUpdate();n=this.get_element();this._actualDisabledStatus=n.disabled;this._clearItems();n.CascadingDropDownCategory=this._category;this._changeHandler=Function.createDelegate(this,this._onChange);$addHandler(n,"change",this._changeHandler);this._parentControlID&&(this._parentElement=$get(this._parentControlID),this._parentElement||Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.CascadingDropDown_NoParentElement,this._parentControlID)),this._parentElement&&(n.CascadingDropDownParentControlID=this._parentControlID,this._parentChangeHandler=Function.createDelegate(this,this._onParentChange),$addHandler(this._parentElement,"change",this._parentChangeHandler),this._parentElement.childDropDown||(this._parentElement.childDropDown=[]),this._parentElement.childDropDown.push(this)));this._onParentChange(null,!0);t=this;setTimeout(function(){t._actualDisabledStatus&&(n.disabled=t._actualDisabledStatus)},50)},dispose:function(){var n=this.get_element();this._changeHandler&&($removeHandler(n,"change",this._changeHandler),this._changeHandler=null);this._parentChangeHandler&&(this._parentElement&&$removeHandler(this._parentElement,"change",this._parentChangeHandler),this._parentChangeHandler=null);Sys.Extended.UI.CascadingDropDownBehavior.callBaseMethod(this,"dispose")},_clearItems:function(){var n=this.get_element();if(n!=null&&n.options!=null)while(0<n.options.length)n.remove(0)},_isPopulated:function(){var n=this.get_element().options.length;return this._promptText?n>1:n>0},_setOptions:function(n,t,i){var r,s,h,o,f,e,u,l;if(this.get_isInitialized()){if(r=this.get_element(),this._clearItems(),h="",i&&this._loadingText?(s=this._loadingText,this._selectedValue&&(h=this._selectedValue)):!i&&n&&0==n.length&&null!=this._emptyText?(s=this._emptyText,this._emptyValue&&(h=this._emptyValue)):this._promptText&&(s=this._promptText,this._promptValue&&(h=this._promptValue)),s&&(o=new Option(s,h),r.options[r.options.length]=o),f=null,e=-1,n){for(u=0;u<n.length;u++){var c=n[u],y=c.name,a=c.value,v=c.optionTitle;c.isDefaultValue&&(this.set_SelectedValue(a,y,v),e=u,this._promptText&&e++);o=new Option(y,a);a==this._selectedValue&&(f=o);v&&o.setAttribute("title",v);r.options[r.options.length]=o}f&&(f.selected=!0)}if(f?this.set_SelectedValue(r.options[r.selectedIndex].value,r.options[r.selectedIndex].text):f||e==-1?t||f||i||this._promptText||!(r.options.length>0)?t||f||i||this.set_SelectedValue("",""):this.set_SelectedValue(r.options[0].value,r.options[0].text):(r.options[e].selected=!0,this.set_SelectedValue(r.options[e].value,r.options[e].text)),r.childDropDown&&!i)for(u=0;u<r.childDropDown.length;u++)r.childDropDown[u]._onParentChange();else n&&Sys.Browser.agent!==Sys.Browser.Safari&&Sys.Browser.agent!==Sys.Browser.Opera&&(document.createEvent?(l=document.createEvent("HTMLEvents"),l.initEvent("change",!0,!1),this.get_element().dispatchEvent(l)):document.createEventObject&&this.get_element().fireEvent("onchange"));this._enableAtLoading||((this._loadingText||this._promptText||this._emptyText)&&(r.disabled=!n||0==n.length),this._actualDisabledStatus&&(r.disabled=this._actualDisabledStatus));i&&this.raisePopulated(Sys.EventArgs.Empty)}},_onChange:function(){if(this._isPopulated()){var n=this.get_element();-1==n.selectedIndex||this._promptText&&0==n.selectedIndex?this.set_SelectedValue("",""):this.set_SelectedValue(n.options[n.selectedIndex].value,n.options[n.selectedIndex].text,n.options[n.selectedIndex].title)}},_onParentChange:function(n,t){for(var s=this.get_element(),i="",f=this._parentControlID,r,u,e,o;f;){if(r=$get(f),r&&-1!=r.selectedIndex&&(u=r.options[r.selectedIndex].value,u&&u!="")){i=r.CascadingDropDownCategory+":"+u+";"+i;f=r.CascadingDropDownParentControlID;continue}break}if(i==""||this._lastParentValues!=i){if(this._lastParentValues=i,i==""&&this._parentControlID){this._setOptions(null,t);return}if(this._setOptions(null,t,!0),this._servicePath&&this._serviceMethod){if(e=new Sys.CancelEventArgs,this.raisePopulating(e),e.get_cancel())return;o={knownCategoryValues:i,category:this._category};this._useContextKey&&(o.contextKey=this._contextKey);Sys.Net.WebServiceProxy.invoke(this._servicePath,this._serviceMethod,this._useHttpGet,o,Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodError));$common.updateFormToRefreshATDeviceBuffer()}}},_onMethodComplete:function(n){this._setOptions(n)},_onMethodError:function(n){n.get_timedOut()?this._setOptions([this._makeNameValueObject(Sys.Extended.UI.Resources.CascadingDropDown_MethodTimeout)]):this._setOptions([this._makeNameValueObject(String.format(Sys.Extended.UI.Resources.CascadingDropDown_MethodError,n.get_statusCode()))])},_makeNameValueObject:function(n){return{name:n,value:n}},get_ParentControlID:function(){return this._parentControlID},set_ParentControlID:function(n){this._parentControlID!=n&&(this._parentControlID=n,this.raisePropertyChanged("ParentControlID"))},get_Category:function(){return this._category},set_Category:function(n){this._category!=n&&(this._category=n,this.raisePropertyChanged("Category"))},get_PromptText:function(){return this._promptText},set_PromptText:function(n){this._promptText!=n&&(this._promptText=n,this.raisePropertyChanged("PromptText"))},get_PromptValue:function(){return this._promptValue},set_PromptValue:function(n){this._promptValue!=n&&(this._promptValue=n,this.raisePropertyChanged("PromptValue"))},get_EmptyText:function(){return this._emptyText},set_EmptyText:function(n){this._emptyText!=n&&(this._emptyText=n,this.raisePropertyChanged("EmptyText"))},get_EmptyValue:function(){return this._emptyValue},set_EmptyValue:function(n){this._emptyValue!=n&&(this._emptyValue=n,this.raisePropertyChanged("EmptyValue"))},get_LoadingText:function(){return this._loadingText},set_LoadingText:function(n){this._loadingText!=n&&(this._loadingText=n,this.raisePropertyChanged("LoadingText"))},get_SelectedValue:function(){return this._selectedValue},set_SelectedValue:function(n,t,i){var r,u;this._selectedValue!=n&&(t||(r=n.indexOf(":::"),-1!=r&&(t=n.slice(r+3),n=n.slice(0,r),r=t.indexOf(":::"),-1!=r&&(i=t.slice(r+3),t=t.slice(0,r)))),u=this._selectedValue,this._selectedValue=n,this.raisePropertyChanged("SelectedValue"),this.raiseSelectionChanged(new Sys.Extended.UI.CascadingDropDownSelectionChangedEventArgs(u,n)));Sys.Extended.UI.CascadingDropDownBehavior.callBaseMethod(this,"set_ClientState",[this._selectedValue+":::"+t+":::"+(i?":::"+i:"")])},get_ServicePath:function(){return this._servicePath},set_ServicePath:function(n){this._servicePath!=n&&(this._servicePath=n,this.raisePropertyChanged("ServicePath"))},get_ServiceMethod:function(){return this._serviceMethod},set_ServiceMethod:function(n){this._serviceMethod!=n&&(this._serviceMethod=n,this.raisePropertyChanged("ServiceMethod"))},get_contextKey:function(){return this._contextKey},set_contextKey:function(n){this._contextKey!=n&&(this._contextKey=n,this.set_useContextKey(!0),this.raisePropertyChanged("contextKey"))},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(n){this._useContextKey!=n&&(this._useContextKey=n,this.raisePropertyChanged("useContextKey"))},get_useHttpGet:function(){return this._useHttpGet},set_useHttpGet:function(n){this._useHttpGet!=n&&(this._useHttpGet=n,this.raisePropertyChanged("useHttpGet"))},get_enableAtLoading:function(){return this._enableAtLoading},set_enableAtLoading:function(n){this._enableAtLoading!=n&&(this._enableAtLoading=n,this.raisePropertyChanged("enableAtLoading"))},add_selectionChanged:function(n){this.get_events().addHandler("selectionChanged",n)},remove_selectionChanged:function(n){this.get_events().removeHandler("selectionChanged",n)},raiseSelectionChanged:function(n){var t=this.get_events().getHandler("selectionChanged");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)},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)}};Sys.Extended.UI.CascadingDropDownBehavior.registerClass("Sys.Extended.UI.CascadingDropDownBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.CascadingDropDownBehavior,{name:"cascadingDropDown"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedCascadingDropDown",["ExtendedBase","ExtendedCommon","WebServices"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.CollapsiblePanelExpandDirection=function(){throw Error.invalidOperation();};Sys.Extended.UI.CollapsiblePanelExpandDirection.prototype={Horizontal:0,Vertical:1};Sys.Extended.UI.CollapsiblePanelExpandDirection.registerEnum("Sys.Extended.UI.CollapsiblePanelExpandDirection",!1);Sys.Extended.UI.CollapsiblePanelBehavior=function(n){Sys.Extended.UI.CollapsiblePanelBehavior.initializeBase(this,[n]);this._collapsedSize=0;this._expandedSize=0;this._scrollContents=null;this._collapsed=!1;this._expandControlID=null;this._collapseControlID=null;this._textLabelID=null;this._collapsedText=null;this._expandedText=null;this._imageControlID=null;this._expandedImage=null;this._collapsedImage=null;this._suppressPostBack=null;this._autoExpand=null;this._autoCollapse=null;this._expandDirection=Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical;this._collapseClickHandler=null;this._expandClickHandler=null;this._panelMouseEnterHandler=null;this._panelMouseLeaveHandler=null;this._childDiv=null;this._animation=null};Sys.Extended.UI.CollapsiblePanelBehavior.prototype={initialize:function(){var n,t,i,r,u;if(Sys.Extended.UI.CollapsiblePanelBehavior.callBaseMethod(this,"initialize"),n=this.get_element(),this._animation=new Sys.Extended.UI.Animation.LengthAnimation(n,.25,10,"style",null,0,0,"px"),this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?this._animation.set_propertyKey("height"):this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Horizontal&&this._animation.set_propertyKey("width"),this._animation.add_ended(Function.createDelegate(this,this._onAnimateComplete)),this._suppressPostBack==null&&(n.tagName=="INPUT"&&n.type=="checkbox"?(this._suppressPostBack=!1,this.raisePropertyChanged("SuppressPostBack")):n.tagName=="A"&&(this._suppressPostBack=!0,this.raisePropertyChanged("SuppressPostBack"))),t=Sys.Extended.UI.CollapsiblePanelBehavior.callBaseMethod(this,"get_ClientState"),t&&t!=""&&(i=Boolean.parse(t),this._collapsed!=i&&(this._collapsed=i,this.raisePropertyChanged("Collapsed"))),this._setupChildDiv(),this._collapsed?this._setTargetSize(this._getCollapsedSize()):this._setTargetSize(this._getExpandedSize()),this._setupState(this._collapsed),this._collapseControlID==this._expandControlID?(this._collapseClickHandler=Function.createDelegate(this,this.togglePanel),this._expandClickHandler=null):(this._collapseClickHandler=Function.createDelegate(this,this.collapsePanel),this._expandClickHandler=Function.createDelegate(this,this.expandPanel)),this._autoExpand&&(this._panelMouseEnterHandler=Function.createDelegate(this,this._onMouseEnter),$addHandler(n,"mouseover",this._panelMouseEnterHandler)),this._autoCollapse&&(this._panelMouseLeaveHandler=Function.createDelegate(this,this._onMouseLeave),$addHandler(n,"mouseout",this._panelMouseLeaveHandler)),this._collapseControlID)if(r=$get(this._collapseControlID),r)$addHandler(r,"click",this._collapseClickHandler);else throw Error.argument("CollapseControlID",String.format(Sys.Extended.UI.Resources.CollapsiblePanel_NoControlID,this._collapseControlID));if(this._expandControlID&&this._expandClickHandler)if(u=$get(this._expandControlID),u)$addHandler(u,"click",this._expandClickHandler);else throw Error.argument("ExpandControlID",String.format(Sys.Extended.UI.Resources.CollapsiblePanel_NoControlID,this._expandControlID));},dispose:function(){var i=this.get_element(),n,t;this._collapseClickHandler&&(n=this._collapseControlID?$get(this._collapseControlID):null,n&&$removeHandler(n,"click",this._collapseClickHandler),this._collapseClickHandler=null);this._expandClickHandler&&(t=this._expandControlID?$get(this._expandControlID):null,t&&$removeHandler(t,"click",this._expandClickHandler),this._expandClickHandler=null);this._panelMouseEnterHandler&&$removeHandler(i,"mouseover",this._panelMouseEnterHandler);this._panelMouseLeaveHandler&&$removeHandler(i,"mouseout",this._panelMouseLeaveHandler);this._animation&&(this._animation.dispose(),this._animation=null);Sys.Extended.UI.CollapsiblePanelBehavior.callBaseMethod(this,"dispose")},togglePanel:function(n){this._toggle(n)},expandPanel:function(n){this._doOpen(n)},collapsePanel:function(n){this._doClose(n)},_checkCollapseHide:function(){if(this._collapsed&&this._getTargetSize()==0){var n=this.get_element(),t=$common.getCurrentStyle(n,"display");return n.oldDisplay||t=="none"||(n.oldDisplay=t,n.style.display="none"),!0}return!1},_doClose:function(n){var t=new Sys.CancelEventArgs;if((this.raiseCollapsing(t),!t.get_cancel())&&(this._animation&&(this._animation.stop(),this._animation.set_startValue(this._getTargetSize()),this._animation.set_endValue(this._getCollapsedSize()),this._animation.play()),this._setupState(!0),this._suppressPostBack))if(n&&n.preventDefault)n.preventDefault();else return n&&(n.returnValue=!1),!1},_doOpen:function(n){var i=new Sys.CancelEventArgs,t;if((this.raiseExpanding(i),!i.get_cancel())&&(this._animation&&(this._animation.stop(),t=this.get_element(),this._checkCollapseHide()&&$common.getCurrentStyle(t,"display",t.style.display)&&(t.oldDisplay?t.style.display=t.oldDisplay:t.style.removeAttribute?t.style.removeAttribute("display"):t.style.removeProperty("display"),t.oldDisplay=null),this._animation.set_startValue(this._getTargetSize()),this._animation.set_endValue(this._getExpandedSize()),this._animation.play()),this._setupState(!1),this._suppressPostBack))if(n&&n.preventDefault)n.preventDefault();else return n&&(n.returnValue=!1),!1},_onAnimateComplete:function(){var n=this.get_element();this._collapsed||this._expandedSize?this._checkCollapseHide():this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?this._childDiv.offsetHeight<=n.offsetHeight?(n.style.height="auto",this.raisePropertyChanged("TargetHeight")):this._checkCollapseHide():this._childDiv.offsetWidth<=n.offsetWidth?(n.style.width="auto",this.raisePropertyChanged("TargetWidth")):this._checkCollapseHide();this._collapsed?(this.raiseCollapseComplete(),this.raiseCollapsed(Sys.EventArgs.Empty)):(this.raiseExpandComplete(),this.raiseExpanded(new Sys.EventArgs))},_onMouseEnter:function(n){this._autoExpand&&this.expandPanel(n)},_onMouseLeave:function(n){this._autoCollapse&&this.collapsePanel(n)},_getExpandedSize:function(){return this._expandedSize?this._expandedSize:this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?this._childDiv.offsetHeight:this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Horizontal?this._childDiv.offsetWidth:void 0},_getCollapsedSize:function(){return this._collapsedSize?this._collapsedSize:0},_getTargetSize:function(){var n;return this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?n=this.get_TargetHeight():this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Horizontal&&(n=this.get_TargetWidth()),n===undefined&&(n=0),n},_setTargetSize:function(n){var i=this._collapsed||this._expandedSize,t=this.get_element();this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?i||n<t.offsetHeight?this.set_TargetHeight(n):(t.style.height="auto",this.raisePropertyChanged("TargetHeight")):this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Horizontal&&(i||n<t.offsetWidth?this.set_TargetWidth(n):(t.style.width="auto",this.raisePropertyChanged("TargetWidth")));this._checkCollapseHide()},_setupChildDiv:function(){var t=this._getTargetSize(),n=this.get_element(),i;for(this._childDiv=n.cloneNode(!1),n.id="",this._childDiv.style.visibility="visible",this._childDiv.style.display="";n.hasChildNodes();)i=n.childNodes[0],i=n.removeChild(i),this._childDiv.appendChild(i);n.setAttribute("style","");n.className="";n.style.border="0px";n.style.margin="0px";n.style.padding="0px";this._scrollContents?(this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?(n.style.overflowY="scroll",this._childDiv.style.overflowY=""):(n.style.overflowX="scroll",this._childDiv.style.overflowX=""),(Sys.Browser.agent==Sys.Browser.Safari||Sys.Browser.agent==Sys.Browser.Opera)&&(n.style.overflow="scroll",this._childDiv.style.overflow="")):(this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?(n.style.overflowY="hidden",this._childDiv.style.overflowY=""):(n.style.overflowX="hidden",this._childDiv.style.overflowX=""),(Sys.Browser.Agent==Sys.Browser.Safari||Sys.Browser.Agent==Sys.Browser.Opera)&&(n.style.overflow="hidden",this._childDiv.style.overflow=""));this._childDiv.style.position="";t==this._collapsedSize&&(this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?this._childDiv.style.height="auto":this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Horizontal&&(this._childDiv.style.width="auto"));n.appendChild(this._childDiv);n.style.visibility="visible";n.style.display="";t=this._collapsed?this._getCollapsedSize():this._getExpandedSize();this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical?(n.style.height=t+"px",n.style.height=this._expandedSize?this._expandedSize+"px":"auto",this._childDiv.style.height="auto"):this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Horizontal&&(n.style.width=t+"px",n.style.width=this._expandedSize?this._expandedSize+"px":"auto",this._childDiv.style.width="auto")},_setupState:function(n){var i,t;n?(this._textLabelID&&this._collapsedText&&(i=$get(this._textLabelID),i&&(i.innerHTML=this._collapsedText)),this._imageControlID&&this._collapsedImage&&(t=$get(this._imageControlID),t&&t.src&&(t.src=this._collapsedImage,(this._expandedText||this._collapsedText)&&(t.title=this._collapsedText)))):(this._textLabelID&&this._expandedText&&(i=$get(this._textLabelID),i&&(i.innerHTML=this._expandedText)),this._imageControlID&&this._expandedImage&&(t=$get(this._imageControlID),t&&t.src&&(t.src=this._expandedImage,(this._expandedText||this._collapsedText)&&(t.title=this._expandedText))));this._collapsed!=n&&(this._collapsed=n,this.raisePropertyChanged("Collapsed"));Sys.Extended.UI.CollapsiblePanelBehavior.callBaseMethod(this,"set_ClientState",[this._collapsed.toString()])},_toggle:function(n){return this.get_Collapsed()?this.expandPanel(n):this.collapsePanel(n)},add_collapsing:function(n){this.get_events().addHandler("collapsing",n)},remove_collapsing:function(n){this.get_events().removeHandler("collapsing",n)},raiseCollapsing:function(n){var t=this.get_events().getHandler("collapsing");t&&t(this,n)},add_collapsed:function(n){this.get_events().addHandler("collapsed",n)},remove_collapsed:function(n){this.get_events().removeHandler("collapsed",n)},raiseCollapsed:function(n){var t=this.get_events().getHandler("collapsed");t&&t(this,n)},add_collapseComplete:function(n){this.get_events().addHandler("collapseComplete",n)},remove_collapseComplete:function(n){this.get_events().removeHandler("collapseComplete",n)},raiseCollapseComplete:function(){var n=this.get_events().getHandler("collapseComplete");n&&n(this,Sys.EventArgs.Empty)},add_expanding:function(n){this.get_events().addHandler("expanding",n)},remove_expanding:function(n){this.get_events().removeHandler("expanding",n)},raiseExpanding:function(n){var t=this.get_events().getHandler("expanding");t&&t(this,n)},add_expanded:function(n){this.get_events().addHandler("expanded",n)},remove_expanded:function(n){this.get_events().removeHandler("expanded",n)},raiseExpanded:function(n){var t=this.get_events().getHandler("expanded");t&&t(this,n)},add_expandComplete:function(n){this.get_events().addHandler("expandComplete",n)},remove_expandComplete:function(n){this.get_events().removeHandler("expandComplete",n)},raiseExpandComplete:function(){var n=this.get_events().getHandler("expandComplete");n&&n(this,Sys.EventArgs.Empty)},get_TargetHeight:function(){return this.get_element().offsetHeight},set_TargetHeight:function(n){this.get_element().style.height=n+"px";this.raisePropertyChanged("TargetHeight")},get_TargetWidth:function(){return this.get_element().offsetWidth},set_TargetWidth:function(n){this.get_element().style.width=n+"px";this.raisePropertyChanged("TargetWidth")},get_Collapsed:function(){return this._collapsed},set_Collapsed:function(n){this.get_isInitialized()&&this.get_element()&&n!=this.get_Collapsed()?this.togglePanel():(this._collapsed=n,this.raisePropertyChanged("Collapsed"))},get_CollapsedSize:function(){return this._collapsedSize},set_CollapsedSize:function(n){this._collapsedSize!=n&&(this._collapsedSize=n,this.raisePropertyChanged("CollapsedSize"))},get_ExpandedSize:function(){return this._expandedSize},set_ExpandedSize:function(n){this._expandedSize!=n&&(this._expandedSize=n,this.raisePropertyChanged("ExpandedSize"))},get_CollapseControlID:function(){return this._collapseControlID},set_CollapseControlID:function(n){this._collapseControlID!=n&&(this._collapseControlID=n,this.raisePropertyChanged("CollapseControlID"))},get_ExpandControlID:function(){return this._expandControlID},set_ExpandControlID:function(n){this._expandControlID!=n&&(this._expandControlID=n,this.raisePropertyChanged("ExpandControlID"))},get_ScrollContents:function(){return this._scrollContents},set_ScrollContents:function(n){this._scrollContents!=n&&(this._scrollContents=n,this.raisePropertyChanged("ScrollContents"))},get_SuppressPostBack:function(){return this._suppressPostBack},set_SuppressPostBack:function(n){this._suppressPostBack!=n&&(this._suppressPostBack=n,this.raisePropertyChanged("SuppressPostBack"))},get_TextLabelID:function(){return this._textLabelID},set_TextLabelID:function(n){this._textLabelID!=n&&(this._textLabelID=n,this.raisePropertyChanged("TextLabelID"))},get_ExpandedText:function(){return this._expandedText},set_ExpandedText:function(n){this._expandedText!=n&&(this._expandedText=n,this.raisePropertyChanged("ExpandedText"))},get_CollapsedText:function(){return this._collapsedText},set_CollapsedText:function(n){this._collapsedText!=n&&(this._collapsedText=n,this.raisePropertyChanged("CollapsedText"))},get_ImageControlID:function(){return this._imageControlID},set_ImageControlID:function(n){this._imageControlID!=n&&(this._imageControlID=n,this.raisePropertyChanged("ImageControlID"))},get_ExpandedImage:function(){return this._expandedImage},set_ExpandedImage:function(n){this._expandedImage!=n&&(this._expandedImage=n,this.raisePropertyChanged("ExpandedImage"))},get_CollapsedImage:function(){return this._collapsedImage},set_CollapsedImage:function(n){this._collapsedImage!=n&&(this._collapsedImage=n,this.raisePropertyChanged("CollapsedImage"))},get_AutoExpand:function(){return this._autoExpand},set_AutoExpand:function(n){this._autoExpand!=n&&(this._autoExpand=n,this.raisePropertyChanged("AutoExpand"))},get_AutoCollapse:function(){return this._autoCollapse},set_AutoCollapse:function(n){this._autoCollapse!=n&&(this._autoCollapse=n,this.raisePropertyChanged("AutoCollapse"))},get_ExpandDirection:function(){return this._expandDirection==Sys.Extended.UI.CollapsiblePanelExpandDirection.Vertical},set_ExpandDirection:function(n){this._expandDirection!=n&&(this._expandDirection=n,this.raisePropertyChanged("ExpandDirection"))}};Sys.Extended.UI.CollapsiblePanelBehavior.registerClass("Sys.Extended.UI.CollapsiblePanelBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.CollapsiblePanelBehavior,{name:"collapsiblePanel"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedCollapsiblePanel",["ExtendedBase","ExtendedCommon","ExtendedAnimations"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ColorPickerBehavior=function(n){Sys.Extended.UI.ColorPickerBehavior.initializeBase(this,[n]);this._textbox=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n);this._button=null;this._sample=null;this._cssClass="ajax__colorPicker";this._popupPosition=Sys.Extended.UI.PositioningMode.BottomLeft;this._selectedColor=null;this._enabled=!0;this._selectedColorChanging=!1;this._popupMouseDown=!1;this._isOpen=!1;this._blur=new Sys.Extended.UI.DeferredOperation(1,this,this._doBlur);this._popupBehavior=null;this._container=null;this._popupDiv=null;this._colorsTable=null;this._colorsBody=null;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),select: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.ColorPickerBehavior.prototype={initialize:function(){var t,n;Sys.Extended.UI.ColorPickerBehavior.callBaseMethod(this,"initialize");Sys.Extended.UI.ColorPickerBehavior._colorRegex||(Sys.Extended.UI.ColorPickerBehavior._colorRegex=new RegExp("^[A-Fa-f0-9]{6}$"));t=this.get_element();$addHandlers(t,this._element$delegates);this._button&&$addHandlers(this._button,this._button$delegates);n=this.get_selectedColor();n&&this.set_selectedColor(n);this._restoreSample()},dispose:function(){var n,i,t,r;if(this._sample=null,this._button&&($clearHandlers(this._button),this._button=null),this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null),this._container&&(this._container.parentNode&&this._container.parentNode.removeChild(this._container),this._container=null),this._popupDiv&&($clearHandlers(this._popupDiv),this._popupDiv=null),this._colorsBody){for(n=0;n<this._colorsBody.rows.length;n++)for(i=this._colorsBody.rows[n],t=0;t<i.cells.length;t++)$clearHandlers(i.cells[t].firstChild);this._colorsBody=null}this._colorsTable=null;r=this.get_element();r&&$clearHandlers(r);Sys.Extended.UI.ColorPickerBehavior.callBaseMethod(this,"dispose")},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_sample:function(){return this._sample},set_sample:function(n){this._sample!==n&&(this._sample=n,this.raisePropertyChanged("sample"))},get_selectedColor:function(){if(this._selectedColor===null){var n=this._textbox.get_Value();this._validate(n)&&(this._selectedColor=n)}return this._selectedColor},set_selectedColor:function(n){this._selectedColor!==n&&this._validate(n)&&(this._selectedColor=n,this._selectedColorChanging=!0,n!==this._textbox.get_Value()&&this._textbox.set_Value(n),this._showSample(n),this._selectedColorChanging=!1,this.raisePropertyChanged("selectedColor"))},get_enabled:function(){return this._enabled},set_enabled:function(n){this._enabled!==n&&(this._enabled=n,this.raisePropertyChanged("enabled"))},get_popupPosition:function(){return this._popupPosition},set_popupPosition:function(n){this._popupPosition!==n&&(this._popupPosition=n,this.raisePropertyChanged("popupPosition"))},add_colorSelectionChanged:function(n){this.get_events().addHandler("colorSelectionChanged",n)},remove_colorSelectionChanged:function(n){this.get_events().removeHandler("colorSelectionChanged",n)},raiseColorSelectionChanged:function(){var n=this.get_events().getHandler("colorSelectionChanged");n&&n(this,Sys.EventArgs.Empty)},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(){var n=this.get_events().getHandler("shown");n&&n(this,Sys.EventArgs.Empty)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(){var n=this.get_events().getHandler("hidden");n&&n(this,Sys.EventArgs.Empty)},show:function(){if(this._ensureColorPicker(),!this._isOpen){var n=new Sys.CancelEventArgs;if(this.raiseShowing(n),n.get_cancel())return;this._isOpen=!0;this._popupBehavior.show();this.raiseShown()}},hide:function(){if(this._isOpen){var n=new Sys.CancelEventArgs;if(this.raiseHiding(n),n.get_cancel())return;this._container&&this._popupBehavior.hide();this._isOpen=!1;this.raiseHidden();this._popupMouseDown=!1}},_focus:function(){this._button?this._button.focus():this.get_element().focus()},_doBlur:function(n){n||Sys.Browser.agent!==Sys.Browser.Opera?(this._popupMouseDown||this.hide(),this._popupMouseDown=!1):this._blur.post(!0)},_buildColorPicker:function(){var t=this.get_element(),n=this.get_id();this._container=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_container"},cssClasses:[this._cssClass]},t.parentNode);this._popupDiv=$common.createElementFromTemplate({nodeName:"div",events:this._popup$delegates,properties:{id:n+"_popupDiv"},cssClasses:["ajax__colorPicker_container"],visible:!1},this._container)},_buildColors:function(){var e=this.get_id(),n,i,o,r,u,s,t,f,h,c;for(this._colorsTable=$common.createElementFromTemplate({nodeName:"table",properties:{id:e+"_colorsTable",cellPadding:0,cellSpacing:1,border:0,style:{margin:"auto"}}},this._popupDiv),this._colorsBody=$common.createElementFromTemplate({nodeName:"tbody",properties:{id:e+"_colorsBody"}},this._colorsTable),n=["00","99","33","66","FF","CC"],r=n.length,u=0;u<r;u++)for(s=$common.createElementFromTemplate({nodeName:"tr"},this._colorsBody),t=0;t<r;t++)for(t===3&&(s=$common.createElementFromTemplate({nodeName:"tr"},this._colorsBody)),f=0;f<r;f++)i=n[u]+n[t]+n[f],o="#"+i,h=$common.createElementFromTemplate({nodeName:"td"},s),c=$common.createElementFromTemplate({nodeName:"div",properties:{id:e+"_color_"+i,color:i,title:o,style:{backgroundColor:o},innerHTML:" "},events:this._cell$delegates},h)},_ensureColorPicker:function(){if(!this._container){var n=this.get_element();this._buildColorPicker();this._buildColors();this._popupBehavior=new $create(Sys.Extended.UI.PopupBehavior,{parentElement:n},{},{},this._popupDiv);this._popupBehavior.set_positioningMode(this._popupPosition)}},_showSample:function(n){if(this._sample){var t="";n&&(t="#"+n);this._sample.style.backgroundColor=t}},_restoreSample:function(){this._showSample(this._selectedColor)},_validate:function(n){return n&&Sys.Extended.UI.ColorPickerBehavior._colorRegex.test(n)},_element_onfocus:function(){this._enabled&&(this._button||(this.show(),this._popupMouseDown=!1))},_element_onblur:function(){this._enabled&&(this._button||this._doBlur())},_element_onchange:function(){if(!this._selectedColorChanging){var n=this._textbox.get_Value();(this._validate(n)||n==="")&&(this._selectedColor=n,this._restoreSample())}},_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){n.stopPropagation();var t=n.target;this._showSample(t.color)},_cell_onmouseout:function(n){n.stopPropagation();this._restoreSample()},_cell_onclick:function(n){if(n.stopPropagation(),n.preventDefault(),this._enabled){var t=n.target;this.set_selectedColor(t.color);this._blur.post(!0);this.raiseColorSelectionChanged()}},_button_onclick:function(n){(n.preventDefault(),n.stopPropagation(),this._enabled)&&(this._isOpen?this.hide():this.show(),this._focus(),this._popupMouseDown=!1)},_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)}};Sys.Extended.UI.ColorPickerBehavior.registerClass("Sys.Extended.UI.ColorPickerBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.ColorPickerBehavior,{name:"colorPicker"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedColorPicker",["ExtendedBase","ExtendedCommon","ExtendedThreading","ExtendedPopup"],n):n()}(),Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.ComboBoxAutoCompleteMode=function(){},Sys.Extended.UI.ComboBoxAutoCompleteMode.prototype={None:0,Append:1,Suggest:2,SuggestAppend:3},Sys.Extended.UI.ComboBoxAutoCompleteMode.registerEnum("Sys.Extended.UI.ComboBoxAutoCompleteMode",!1),Sys.Extended.UI.ComboBoxStyle=function(){},Sys.Extended.UI.ComboBoxStyle.prototype={DropDownList:0,DropDown:1,Simple:2},Sys.Extended.UI.ComboBoxStyle.registerEnum("Sys.Extended.UI.ComboBoxStyle",!1),Sys.Extended.UI.ComboBoxTextSelectionStrategy=function(){},Sys.Extended.UI.ComboBoxTextSelectionStrategy.prototype={Unknown:0,Microsoft:1,W3C:2},Sys.Extended.UI.ComboBoxTextSelectionStrategy.registerEnum("Sys.Extended.UI.ComboBoxTextSelectionStrategy",!1),Sys.Extended.UI.ComboBox=function(n){Sys.Extended.UI.ComboBox.initializeBase(this,[n]);this._comboTableControl=null;this._textBoxControl=null;this._optionListControl=null;this._buttonControl=null;this._hiddenFieldControl=null;this._autoPostBack=!1;this._autoCompleteMode=null;this._dropDownStyle=null;this._caseSensitive=!1;this._originalSelectedIndex=null;this._listItemHoverCssClass=null;this._popupBehavior=null;this._supressFocusHide=!0;this._doingPostBack=!1;this._textSelectionStrategy=null;this._highlightSuggestedItem=!1;this._highlightedIndex=null;this._optionListItems=null;this._optionListItemHeight=null;this._optionListHeight=null;this._optionListWidth=null;this.clearDelegates()},Sys.Extended.UI.ComboBox.prototype={initialize:function(){Sys.Extended.UI.ComboBox.callBaseMethod(this,"initialize");ComboBox_Elements[ComboBox_Elements.length]=this;var n=this._findHiddenParent(this.get_comboTableControl()),t,i;n!=null&&(t=n.style.display,i=n.style.visibility,n.style.visibility="visible",n.style.display="block");this.createDelegates();this.initializeTextBox();this.initializeButton();this.initializeOptionList();this.addHandlers();n!=null&&(n.style.visibility=i,n.style.display=t)},dispose:function(){this._popupBehavior&&(this._popupBehavior.remove_showing(this._popupShowingHandler),this._popupBehavior.remove_shown(this._popupShownHandler),this._popupBehavior.remove_hiding(this._popupHidingHandler),this._popupBehavior.dispose(),this._popupBehavior=null);this.clearHandlers();this.clearDelegates();Sys.Extended.UI.ComboBox.callBaseMethod(this,"dispose")},_findHiddenParent:function(n){var t=n.parentElement;return t==null||t.style.visibility=="hidden"||t.style.display=="none"?t:this._findHiddenParent(t)},createDelegates:function(){this._listMouseOverHandler=Function.createDelegate(this,this._onListMouseOver);this._listMouseOutHandler=Function.createDelegate(this,this._onListMouseOut);this._listMouseDownHandler=Function.createDelegate(this,this._onListMouseDown);this._listClickHandler=Function.createDelegate(this,this._onListClick);this._listDragHandler=Function.createDelegate(this,this._onListDrag);this._listSelectStartHandler=Function.createDelegate(this,this._onListSelectStart);this._listMouseWheelHandler=Function.createDelegate(this,this._onListMouseWheel);this._textBoxClickHandler=Function.createDelegate(this,this._onTextBoxClick);this._textBoxFocusHandler=Function.createDelegate(this,this._onTextBoxFocus);this._textBoxBlurHandler=Function.createDelegate(this,this._onTextBoxBlur);this._textBoxKeyPressHandler=Function.createDelegate(this,this._onTextBoxKeyPress);this._textBoxKeyDownHandler=Function.createDelegate(this,this._onTextBoxKeyDown);this._buttonClickHandler=Function.createDelegate(this,this._onButtonClick);this._buttonBlurHandler=Function.createDelegate(this,this._onButtonBlur);this._buttonKeyDownHandler=Function.createDelegate(this,this._onButtonKeyDown);this._buttonKeyPressHandler=Function.createDelegate(this,this._onButtonKeyPress);this._documentClickHandler=Function.createDelegate(this,this._onDocumentClick);this._documentMouseWheelHandler=Function.createDelegate(this,this._onDocumentMouseWheel);this._popupShowingHandler=Function.createDelegate(this,this._popupShowing);this._popupShownHandler=Function.createDelegate(this,this._popupShown);this._popupHidingHandler=Function.createDelegate(this,this._popupHiding)},clearDelegates:function(){this._listMouseOverHandler=null;this._listMouseOutHandler=null;this._listMouseDownHandler=null;this._listClickHandler=null;this._listDragHandler=null;this._listSelectStartHandler=null;this._listMouseWheelHandler=null;this._textBoxClickHandler=null;this._textBoxFocusHandler=null;this._textBoxBlurHandler=null;this._textBoxKeyPressHandler=null;this._textBoxKeyDownHandler=null;this._buttonClickHandler=null;this._buttonBlurHandler=null;this._buttonKeyDownHandler=null;this._buttonKeyPressHandler=null;this._documentClickHandler=null;this._documentMouseWheelHandler=null;this._popupShowingHandler=null;this._popupShownHandler=null;this._popupHidingHandler=null},addHandlers:function(){var n=this.get_optionListControl();$addHandlers(n,{mouseover:this._listMouseOverHandler,mouseout:this._listMouseOutHandler,mousedown:this._listMouseDownHandler,click:this._listClickHandler,drag:this._listDragHandler,selectstart:this._listSelectStartHandler},this);$addHandlers(this.get_textBoxControl(),{click:this._textBoxClickHandler,focus:this._textBoxFocusHandler,blur:this._textBoxBlurHandler,keypress:this._textBoxKeyPressHandler},this);(Sys.Browser.agent==Sys.Browser.InternetExplorer||Sys.Browser.agent===Sys.Browser.Safari||Sys.Browser.agent===Sys.Browser.WebKit)&&$addHandler(this.get_textBoxControl(),"keydown",this._textBoxKeyDownHandler);$addHandlers(this.get_buttonControl(),{click:this._buttonClickHandler,blur:this._buttonBlurHandler,keydown:this._buttonKeyDownHandler,keypress:this._buttonKeyPressHandler},this);$addHandler(document,"click",this._documentClickHandler);typeof n.onmousewheel=="undefined"?($addHandler(n,"DOMMouseScroll",this._listMouseWheelHandler),$addHandler(document,"DOMMouseScroll",this._documentMouseWheelHandler)):($addHandler(n,"mousewheel",this._listMouseWheelHandler),$addHandler(document,"mousewheel",this._documentMouseWheelHandler))},clearHandlers:function(){$clearHandlers(this.get_optionListControl());$clearHandlers(this.get_textBoxControl());$clearHandlers(this.get_buttonControl());$clearHandlers(document)},initializeTextBox:function(){var n=this.get_textBoxControl().style;n.margin==""&&(n.margin="0px")},initializeButton:function(){var n=this.get_buttonControl().style;n.height==""&&this.get_textBoxControl().offsetHeight>=0&&(n.height=this.get_textBoxControl().offsetHeight+"px");n.width==""&&(n.width=n.height);n.margin==""&&(n.margin="0px");n.padding==""&&(n.padding="0px");this._buttonControl.style.visibility="visible"},initializeOptionList:function(){var h,t,c,r,o,u,l,f,i,e;if(this.get_optionListControl()==null&&(h=document.createElement("ul"),this.get_element().appendChild(h),this.set_optionListControl(h)),t=this.get_optionListControl(),Sys.Browser.agent===Sys.Browser.Safari||Sys.Browser.agent===Sys.Browser.WebKit){for(c=t.parentNode,c!=null&&c.removeChild(t),r=this.get_element().parentNode;typeof r!=typeof document.forms[0];)r=r.parentNode;o=document.createElement("div");o.className=this.get_element().className;o.appendChild(t);r.appendChild(o)}for(u=t.style,u.display="block",u.zIndex="10000",this._optionListItems=[],l=t.childNodes,f=0;f<l.length;f++){if(i=l[f],i.tagName==undefined||i.tagName.toUpperCase()!="LI"){t.removeChild(i);f--;continue}for(var a={},n=i.innerHTML.trim(),s=n.indexOf("\r");s>=0;)n=n.substring(0,s).trim()+" "+n.substring(s+1,n.length).trim(),s=n.indexOf("\r");for(e=n.indexOf("\n");e>=0;)n=n.substring(0,e).trim()+" "+n.substring(e+1,n.length).trim(),e=n.indexOf("\n");n=n.replace(/\&/g,"&").replace(/\"/g,'"').replace(/\>/g,">").replace(/\</g,"<");a.text=n.trim();Array.add(this._optionListItems,a);this.initializeOptionListItem(i)}u.width=this._getOptionListBounds().width+"px";u.width="0px";this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"_PopupBehavior",parentElement:this.get_textBoxControl(),positioningMode:Sys.Extended.UI.PositioningMode.BottomLeft},null,null,t);this._popupBehavior.add_showing(this._popupShowingHandler);this._popupBehavior.add_shown(this._popupShownHandler);this._popupBehavior.add_hiding(this._popupHidingHandler);this.get_selectedIndex()>=0?(this._highlightListItem(this.get_selectedIndex()),this.get_textBoxControl().value=this._optionListItems[this.get_selectedIndex()].text):this.get_textBoxControl().value="";this._popupShowing();t.style.display="none"},initializeOptionListItem:function(n){n._textIsEmpty=!1;n.innerHTML.length<1&&(n.innerHTML=" ",n._textIsEmpty=!0)},_popupShowing:function(){var t=this._getWindowBounds(),i=Sys.UI.DomElement.getBounds(this.get_comboTableControl()),c=this._getOptionListBounds(),v=t.y+t.height/2,y=i.y+i.height,p=t.x+t.width/2,w=i.x+i.width/2,r=i.y-t.y,s="Top",h,n,e,f,u,o,a,l;y<=v&&(s="Bottom",r=t.height-i.height-r);h=this._getOptionListItemHeight();r=r>=c.height?c.height:h*(Math.floor(r/h)-2);a=r/h;l=a<this._optionListItems.length;s=="Top"&&r<t.height-i.y&&(s="Bottom");n=i.x-t.x;e="Left";w<=p?n=t.width-n:(e="Right",n=i.width+n);n-=30;f=c.width;l?(f+=20,n>=f&&(n=f)):n>=f&&(n=f);e=="Right"&&n<t.width-i.x&&(e="Left");r<0&&(r=0);n<0&&(n=0);u=this.get_optionListControl().style;u.height=r+"px";u.width=n+"px";l?(u.overflow="auto",u.overflowX="hidden"):u.overflow="hidden";o=s+e;o=="BottomLeft"?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomLeft):o=="BottomRight"?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomRight):o=="TopLeft"?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopLeft):o=="TopRight"&&this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopRight);u.visibility="hidden"},_popupShown:function(){var n=this.get_optionListControl();n.style.display="block";var f=Sys.UI.DomElement.getBounds(this.get_comboTableControl()),r=Sys.UI.DomElement.getBounds(n),t=Sys.UI.DomElement.getBounds(this.get_textBoxControl()),u=r.y,i;this._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.BottomLeft||this._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.TopLeft?i=t.x:(this._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.BottomRight||this._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.TopRight)&&(i=t.x-(r.width-t.width));Sys.UI.DomElement.setLocation(n,i,u);this._ensureHighlightedIndex();this._ensureScrollTop();n.style.visibility="visible"},_popupHiding:function(){this._highlightSuggestedItem=!1;var n=this.get_optionListControl().style;n.display="none";n.visibility="hidden"},_onButtonClick:function(n){return Sys.Extended.UI.ComboBox.IsOpen(this),this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple?this._popupBehavior.show():this._popupBehavior._visible?this._popupBehavior.hide():this._popupBehavior.show(),n.preventDefault(),n.stopPropagation(),!1},_onButtonBlur:function(){this.get_autoPostBack()!=!0||this._doingPostBack||this._originalSelectedIndex==this.get_selectedIndex()||(this._doingPostBack=!0,__doPostBack(this.get_element().id,""))},_onButtonKeyDown:function(n){if(n.keyCode==Sys.UI.Key.tab||n.keyCode==16)return!0;this._popupBehavior._visible||n.keyCode!=Sys.UI.Key.enter&&n.keyCode!=Sys.UI.Key.down?this._popupBehavior._visible&&(n.keyCode==Sys.UI.Key.enter||n.keyCode==Sys.UI.Key.up)&&this._popupBehavior.hide():this._popupBehavior.show();n.stopPropagation();n.preventDefault();var t=this.get_textBoxControl().id;return setTimeout(function(){document.getElementById(t).focus()},0),!1},_onButtonKeyPress:function(n){return n.charCode==Sys.UI.Key.tab||n.charCode==16?!0:(n.stopPropagation(),n.preventDefault(),!1)},_onListMouseWheel:function(n){var t;return t=typeof n.rawEvent.wheelDelta=="undefined"?n.rawEvent.detail>=1?1:-1:n.rawEvent.wheelDelta>1?-1:1,this.get_optionListControl().scrollTop+=this._getOptionListItemHeight()*t,n.stopPropagation(),n.preventDefault(),!1},_onListMouseOver:function(n){var r=this.get_optionListControl(),u,i,t;if(n.target!==r)for(u=n.target,i=r.childNodes,t=0;t<i.length;++t)if(u===i[t]){this._highlightListItem(t,!0);break}},_onListMouseOut:function(){this._popupBehavior._visible&&this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend&&this._highlightListItem(this._highlightedIndex,!1)},_onListMouseDown:function(n){var t=this.get_optionListControl(),r,i;if(n.target==t||n.target.tagName=="scrollbar")return!0;if(n.target!==t)r=t.childNodes[this._highlightedIndex],i=this._optionListItems[this._highlightedIndex].text,this.get_textBoxControl().value=i,this.set_selectedIndex(this._highlightedIndex),this._supressFocusHide=!1,this._handleTextBoxFocus(null);else return!0;return n.preventDefault(),n.stopPropagation(),!1},_onListClick:function(n){return n.target==this.get_optionListControl()?!0:(n.preventDefault(),n.stopPropagation(),!1)},_onListDrag:function(n){return n.preventDefault(),n.stopPropagation(),!1},_onListSelectStart:function(n){return n.preventDefault(),n.stopPropagation(),!1},_onTextBoxClick:function(n){return this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple&&this._popupBehavior.show(),n.preventDefault(),n.stopPropagation(),!1},_onTextBoxFocus:function(n){Sys.Extended.UI.ComboBox.IsOpen(this);this._handleTextBoxFocus(n)},_onTextBoxBlur:function(){for(var i=this.get_textBoxControl().value.trim(),n=-3,r,t=0;t<this._optionListItems.length;t++)if(r=this._optionListItems[t],this._isExactMatch(r.text,i)){n=t;break}this._highlightSuggestedItem==!0&&this._highlightedIndex!=null&&this._highlightedIndex>=0?(this.set_selectedIndex(this._highlightedIndex),this.get_textBoxControl().value=this._optionListItems[this.get_selectedIndex()].text):n==-3&&i.length>0&&this.get_dropDownStyle()!=Sys.Extended.UI.ComboBoxStyle.DropDownList?this.set_selectedIndex(-2):this._optionListItems.length<1&&(i==""||this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDownList)?(this.set_selectedIndex(-1),this.get_textBoxControl().value=""):this._optionListItems.length>=0&&n==-3&&this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDownList?(this.set_selectedIndex(0),this.get_textBoxControl().value=this._optionListItems[0].text):n>=0&&(this.set_selectedIndex(n),this.get_textBoxControl().value=this._optionListItems[n].text);this._popupBehavior.hide();this.get_autoPostBack()!=!0||this._doingPostBack||this._originalSelectedIndex==this.get_selectedIndex()||(this._doingPostBack=!0,__doPostBack(this.get_element().id,""))},_onTextBoxKeyDown:function(n){var i=this._handleEnterKey(n),t;return i!=null?i:(this._handleArrowKey(n),t=this._handleErasureKeys(n),t!=null)?t:!0},_onTextBoxKeyPress:function(n){var h=this._handleEnterKey(n),e,o,r,s;if(h!=null)return h;if(e=this._handleArrowKey(n),e!=null)return e;if(o=this._handleNonCharacterKey(n),o!=null)return o;if(this.get_dropDownStyle()!=Sys.Extended.UI.ComboBoxStyle.Simple||this._popupBehavior._visible||this._popupBehavior.show(),this.get_selectedIndex()==-1&&this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDownList)return this.get_textBoxControl().value="",n.preventDefault(),n.stopPropagation(),!1;var t=this._getTextSelectionInfo(this.get_textBoxControl(),n),u=t.selectionStart,f=t.selectionEnd,c=t.selectionPrefix+t.typedCharacter+t.selectionText.substring(1)+t.selectionSuffix,i=t.selectionPrefix+t.typedCharacter;return(i.length>this.get_textBoxControl().maxLength&&(i=i.substring(0,this.get_textBoxControl().maxLength)),r=this._suggestIndex(c,i),(this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.Suggest||this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend)&&(this._highlightSuggestedItem=!0,this._popupBehavior._visible||this._popupBehavior.show()),r>=0?this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.Append||this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend?(this.get_textBoxControl().value=this._optionListItems[r].text,u=t.selectionStart+1,f=this.get_textBoxControl().value.length):(this.get_textBoxControl().value=this._optionListItems[r].text.substring(0,i.length),u=this.get_textBoxControl().value.length,f=this.get_textBoxControl().value.length):(this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple||this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDown)&&(this.get_textBoxControl().value=i,u=i.length,f=i.length),s=this._handleErasureKeys(n),s!=null)?s:(this._ensureHighlightedIndex(),this._ensureScrollTop(),this._setTextSelectionRange(this.get_textBoxControl(),u,f),n.preventDefault(),n.stopPropagation(),!1)},_onDocumentClick:function(){this._popupBehavior._visible&&this._popupBehavior.hide()},_onDocumentMouseWheel:function(){return this._popupBehavior&&this._popupBehavior.hide(),!0},_handleTextBoxFocus:function(n){!this._supressFocusHide&&this._popupBehavior._visible&&(this._popupBehavior.hide(),this._supressFocusHide=!0,this.get_autoPostBack()&&!this._doingPostBack&&this._originalSelectedIndex!=this.get_selectedIndex()&&(this._doingPostBack=!0,__doPostBack(this.get_element().id,"")));this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple&&this._popupBehavior.show();this._setTextSelectionRange(this.get_textBoxControl(),0,this.get_textBoxControl().value.length);n!=null&&(n.preventDefault(),n.stopPropagation())},_highlightListItem:function(n,t){if(n==undefined||n<0){this._highlightedIndex!=undefined&&this._highlightedIndex>=0&&this._highlightListItem(this._highlightedIndex,!1);return}var r=this.get_optionListControl().childNodes,i=r[n];if(t==!0){if(this._highlightedIndex==n)return;n>=0&&(this.get_listItemHoverCssClass()==undefined||this.get_listItemHoverCssClass()==""?(i.style.backgroundColor="Highlight",i.style.color="HighlightText"):i.className=this.get_listItemHoverCssClass);this._highlightedIndex!=null&&this._highlightedIndex!=n&&this._highlightedIndex>=0&&this._highlightListItem(this._highlightedIndex,!1);this._highlightedIndex=n}else this.get_listItemHoverCssClass()==undefined||this.get_listItemHoverCssClass()==""?(i.style.backgroundColor="",i.style.color=""):i.className="",n==this._highlightedIndex&&(this._highlightedIndex=-1)},_suggestIndex:function(n,t){for(var f=-1,i=!1,u=!1,e,o,r=0;r<this._optionListItems.length;r++)if((itemText=this._optionListItems[r].text,!(itemText.length<1))&&itemText.substring(0,1).toLowerCase()==t.substring(0,1).toLowerCase())if(e=itemText.substring(0,n.length),u=e==n,u||this.get_caseSensitive()||(u=e.toLowerCase()==n.toLowerCase()),u){f=r;break}else i||(o=itemText.substring(0,t.length),i=o==t,i||this.get_caseSensitive()||(i=o.toLowerCase()==t.toLowerCase()),i&&(f=r));return f},_getKeyboardCode:function(n){return n.type=="keypress"?n.charCode:n.type=="keydown"?n.keyCode:undefined},_handleArrowKey:function(n){var t,i,r;return n.shiftKey==!0?null:(t=this._getKeyboardCode(n),t==Sys.UI.Key.up||t==Sys.UI.Key.down)?(this._popupBehavior._visible?(i=t-39,(i==-1&&this._highlightedIndex>0||i==1&&this._highlightedIndex<this._optionListItems.length-1)&&(r=this._highlightedIndex+i,this.get_textBoxControl().value=this._optionListItems[r].text,this._highlightListItem(r,!0),this.set_selectedIndex(r),this._ensureScrollTop())):this._popupBehavior.show(),n.type=="keypress")?(n.preventDefault(),n.stopPropagation(),!1):!0:null},_handleEnterKey:function(n){var t=this._getKeyboardCode(n);return t==Sys.UI.Key.enter?this._popupBehavior._visible?(this._highlightedIndex>=0&&(this.get_textBoxControl().value=this._optionListItems[this._highlightedIndex].text,this.set_selectedIndex(this._highlightedIndex),__doPostBack(this.get_element().id,"")),this._popupBehavior.hide(),n.preventDefault(),n.stopPropagation(),!1):this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple||this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDown||this._highlightedIndex==this.get_selectedIndex()?!0:(n.preventDefault(),n.stopPropagation(),!1):null},_handleErasureKeys:function(n){var o=this._getKeyboardCode(n),s=o==Sys.UI.Key.backspace,f=o==Sys.UI.Key.del,t,r,u,i,e,h;return(typeof event=="undefined"&&n.type=="keypress"&&(f=n.rawEvent.keyCode==46),s||f)?(t=this._getTextSelectionInfo(this.get_textBoxControl(),n),t.selectionStart<t.selectionEnd?(this.get_textBoxControl().value=t.selectionPrefix+t.selectionSuffix,r=t.selectionStart,u=t.selectionStart):t.selectionStart==t.selectionEnd&&(s&&t.selectionStart>0?(e=1,t.selectionPrefix.charCodeAt(t.selectionPrefix.length-1)==8&&(e=2),i=t.selectionPrefix.substr(0,t.selectionPrefix.length-e),i+=t.selectionSuffix,this.get_textBoxControl().value=i,r=t.selectionStart-1,u=t.selectionStart-1):f&&t.selectionStart<t.textBoxValue.length&&(i=t.selectionSuffix,i=t.selectionPrefix+i.substr(1,t.selectionSuffix.length-1),this.get_textBoxControl().value=i,r=t.selectionStart,u=t.selectionStart,this._setTextSelectionRange(this.get_textBoxControl(),t.selectionStart,t.selectionStart))),this._ensureHighlightedIndex(),this._ensureScrollTop(),this._setTextSelectionRange(this.get_textBoxControl(),r,u),(this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple||this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDown)&&(this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.Suggest||this.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend)&&this._highlightedIndex!=null&&this._highlightedIndex>=0&&(h=this._isExactMatch(this._optionListItems[this._highlightedIndex].text,this.get_textBoxControl().value),h||this._highlightListItem(this._highlightedIndex,!1)),n.preventDefault(),n.stopPropagation(),!1):null},_handleNonCharacterKey:function(n){var t=this._getKeyboardCode(n),r=t==Sys.UI.Key.backspace,i=t==Sys.UI.Key.del;return(n.type=="keypress"&&(i=n.rawEvent.code==46),r||i)?null:this._isNonCharacterKey(n)?t==Sys.UI.Key.esc?(this._popupBehavior.hide(),this.get_textBoxControl().blur(),n.preventDefault(),n.stopPropagation(),!1):!0:null},_isNonCharacterKey:function(n){var t=this._getKeyboardCode(n);if(t==Sys.UI.Key.enter||t==Sys.UI.Key.esc)return!0;if(Sys.Browser.agent==Sys.Browser.Safari&&Sys.Browser.version<500){if(t==8||t==9||t==63272||t==63276||t==63277||t==63275||t==63273||t==63234||t==63235||t>=63236&&t<=63243||t==63248)return!0}else if(Sys.Browser.agent==Sys.Browser.WebKit){if(t==8||t==9||t==19||t==33||t==34||t==35||t==36||t==37||t==39||t==45||t==46||t==91||t==92||t==93||t==113||t==115||t==118||t==119||t==120||t==122||t==145)return!0}else if(Sys.Browser.agent!=Sys.Browser.InternetExplorer)if(t==8||t==9||t==33||t==34||t==35||t==36||t==37||t==39||t==45||t==46){if(!n.shiftKey)return!0}else{if(t==145||t==19)return!0;if(Sys.Browser.agent==Sys.Browser.Opera){if(t==0||t==16||t==17)return!0}else if(Sys.Browser.agent==Sys.Browser.Firefox&&(t==91||t==92||t==93))return!0}else if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&t==46)return!0;return!1},_ensureScrollTop:function(){var n=this.get_optionListControl();if(this._highlightedIndex>=0){var t=this._getOptionListItemHeight(),i=t*this._highlightedIndex,r=n.scrollTop+n.clientHeight;(i<=n.scrollTop||i>=r)&&(n.scrollTop=this._highlightedIndex*t)}},_ensureSelectedIndex:function(){var n=this.get_hiddenFieldControl().value;n==""&&(n=this._optionListItems.length>0?0:-1,this.get_hiddenFieldControl().value=n.toString());this._originalSelectedIndex==null&&(this._originalSelectedIndex=parseInt(n))},_ensureHighlightedIndex:function(){var i=this.get_textBoxControl().value,t,r,n,u;if(this._highlightedIndex==null||!(this._highlightedIndex>=0)||!this._isExactMatch(this._optionListItems[this._highlightedIndex].text,i)){for(t=-1,r=!1,n=0;n<this._optionListItems.length;n++)if(u=this._optionListItems[n].text,this._isExactMatch(u,i)){this._highlightListItem(n,!0);r=!0;break}else t<0&&this._highlightSuggestedItem&&this._isPrefixMatch(u,i)&&(t=n);r||this._highlightListItem(t,!0)}},_isExactMatch:function(n,t){var i=n==t;return i||this.get_caseSensitive()||(i=n.toLowerCase()==t.toLowerCase()),i},_isPrefixMatch:function(n,t){return this._isExactMatch(n.substring(0,t.length),t)},_setTextSelectionRange:function(n,t,i){var u=this._getTextSelectionStrategy(),r;u==Sys.Extended.UI.ComboBoxTextSelectionStrategy.Microsoft?(r=n.createTextRange(),r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r.select(),Sys.Browser.agent==Sys.Browser.Opera&&n.setSelectionRange(t,i)):u==Sys.Extended.UI.ComboBoxTextSelectionStrategy.W3C&&n.setSelectionRange(t,i)},_getTextSelectionStrategy:function(){return this._textSelectionStrategy==null&&(this._textSelectionStrategy=this.get_textBoxControl().createTextRange?Sys.Extended.UI.ComboBoxTextSelectionStrategy.Microsoft:this.get_textBoxControl().setSelectionRange?Sys.Extended.UI.ComboBoxTextSelectionStrategy.W3C:Sys.Extended.UI.ComboBoxTextSelectionStrategy.Unknown),this._textSelectionStrategy},_getTextSelectionInfo:function(n,t){var i={},r;if(i.strategy=this._getTextSelectionStrategy(),i.strategy==Sys.Extended.UI.ComboBoxTextSelectionStrategy.Microsoft){for(r=document.selection.createRange(),i.selectionStart=0,i.selectionEnd=n.value.length;r.moveStart("character",-1)!=0;)i.selectionStart++;while(r.moveEnd("character",1)!=0)i.selectionEnd--}else i.strategy==Sys.Extended.UI.ComboBoxTextSelectionStrategy.W3C&&(i.selectionStart=n.selectionStart,i.selectionEnd=n.selectionEnd);return i.typedCharacter=String.fromCharCode(t.charCode),i.textBoxValue=n.value,i.selectionPrefix=i.textBoxValue.length>=i.selectionStart?i.textBoxValue.substring(0,i.selectionStart):"",i.selectionText=i.textBoxValue.length>=i.selectionEnd?i.textBoxValue.substring(i.selectionStart,i.selectionEnd):"",i.selectionSuffix=i.textBoxValue.length>=i.selectionEnd?i.textBoxValue.substring(i.selectionEnd,i.textBoxValue.length):"",i.selectionTextFirst=i.selectionText.substring(0,1),i},_getOptionListItemHeight:function(){var n=this.get_optionListControl();return this._optionListItemHeight==null&&n.scrollHeight>0?this._optionListItemHeight=Math.round(n.scrollHeight/this._optionListItems.length):Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7&&Math.round(n.scrollHeight/this._optionListItems.length)<this._optionListItemHeight&&(this._optionListItemHeight=Math.round(n.scrollHeight/this._optionListItems.length)),this._optionListItemHeight},_getOptionListBounds:function(){return{width:this._getOptionListWidth(),height:this._getOptionListHeight()}},_getOptionListHeight:function(){return(this._optionListHeight==null||this._getOptionListItemHeight()*this._optionListItems.length<this._optionListHeight)&&(this._optionListHeight=this._getOptionListItemHeight()*this._optionListItems.length),this._optionListHeight<0&&(this._optionListHeight=0),this._optionListHeight},_getOptionListWidth:function(){var i=this.get_optionListControl(),n,r,t;return this._optionListWidth==null&&(t=i.style,t.overflow="auto",n=this.get_comboTableControl().offsetWidth,n-=2,n<0&&(n=0),r=t.width,t.width=n+"px",this.get_comboTableControl().offsetWidth<i.scrollWidth&&(n=i.scrollWidth+0+0),t.overflow="hidden",t.width=r,this._optionListWidth=n),this._optionListWidth<0&&(this._optionListWidth=0),this._optionListWidth},_getWindowBounds:function(){return{x:this._getScrollLeft(),y:this._getScrollTop(),width:this._getWindowWidth(),height:this._getWindowHeight()}},_getWindowHeight:function(){var n=0;return typeof innerHeight=="number"?n=window.innerHeight: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 typeof innerWidth=="number"?n=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?n=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(n=document.body.clientWidth),n},_getScrollTop:function(){var n=0;return typeof pageYOffset=="number"&&(n=window.pageYOffset),document.body&&document.body.scrollTop?n=document.body.scrollTop:document.documentElement&&document.documentElement.scrollTop&&(n=document.documentElement.scrollTop),n},_getScrollLeft:function(){var n=0;return typeof pageXOffset=="number"?n=window.pageXOffset:document.body&&document.body.scrollLeft?n=document.body.scrollLeft:document.documentElement&&document.documentElement.scrollLeft&&(n=document.documentElement.scrollLeft),n},set_comboTableControl:function(n){this._comboTableControl!==n&&(this._comboTableControl=n,this.raisePropertyChanged("comboTableControl"))},get_comboTableControl:function(){return this._comboTableControl},set_textBoxControl:function(n){this._textBoxControl!==n&&(this._textBoxControl=n,this.raisePropertyChanged("textBoxControl"))},get_textBoxControl:function(){return this._textBoxControl},set_buttonControl:function(n){this._buttonControl!==n&&(this._buttonControl=n,this.raisePropertyChanged("buttonControl"))},get_buttonControl:function(){return this._buttonControl},set_optionListControl:function(n){this._optionListControl!==n&&(this._optionListControl=n,this.raisePropertyChanged("optionListControl"))},get_optionListControl:function(){return this._optionListControl},set_hiddenFieldControl:function(n){this._hiddenFieldControl!==n&&(this._hiddenFieldControl=n,this.raisePropertyChanged("hiddenFieldControl"))},get_hiddenFieldControl:function(){return this._hiddenFieldControl},set_selectedIndex:function(n){this.get_hiddenFieldControl().value!==n.toString()&&(this.get_hiddenFieldControl().value=n.toString(),this._ensureSelectedIndex(),this.raisePropertyChanged("selectedIndex"))},get_selectedIndex:function(){this._ensureSelectedIndex();var n=this.get_hiddenFieldControl().value;return parseInt(n)},set_autoPostBack:function(n){this._autoPostBack!==n&&(this._autoPostBack=n,this.raisePropertyChanged("autoPostBack"))},get_autoPostBack:function(){return this._autoPostBack},set_autoCompleteMode:function(n){this._autoCompleteMode!==n&&(this._autoCompleteMode=n,this.raisePropertyChanged("autoCompleteMode"))},get_autoCompleteMode:function(){return this._autoCompleteMode},set_dropDownStyle:function(n){this._dropDownStyle!==n&&(this._dropDownStyle=n,this.raisePropertyChanged("dropDownStyle"))},get_dropDownStyle:function(){return this._dropDownStyle},set_caseSensitive:function(n){this._caseSensitive!==n&&(this._caseSensitive=n,this.raisePropertyChanged("caseSensitive"))},get_caseSensitive:function(){return this._caseSensitive},set_listItemHoverCssClass:function(n){this._listItemHoverCssClass!==n&&(this._listItemHoverCssClass=n,this.raisePropertyChanged("listItemHoverCssClass"))},get_listItemHoverCssClass:function(){return this._listItemHoverCssClass}},Sys.Extended.UI.ComboBox.registerClass("Sys.Extended.UI.ComboBox",Sys.UI.Control),ComboBox_Elements=[],Sys.Extended.UI.ComboBox.IsOpen=function(n){for(var r=Sys.Application.getComponents(),t,i=0;i<r.length;i++)t=r[i],Sys.Extended.UI.ComboBox.isInstanceOfType(t)&&t!=n&&t._popupBehavior._visible&&t._popupBehavior.hide()},function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ConfirmButtonHiddenEventArgs=function(n){Sys.Extended.UI.ConfirmButtonHiddenEventArgs.initializeBase(this);this._confirmed=n};Sys.Extended.UI.ConfirmButtonHiddenEventArgs.prototype={get_confirmed:function(){return this._confirmed}};Sys.Extended.UI.ConfirmButtonHiddenEventArgs.registerClass("Sys.Extended.UI.ConfirmButtonHiddenEventArgs",Sys.EventArgs);Sys.Extended.UI.ConfirmButtonBehavior=function(n){Sys.Extended.UI.ConfirmButtonBehavior.initializeBase(this,[n]);this._ConfirmTextValue=null;this._OnClientCancelValue=null;this._ConfirmOnFormSubmit=!1;this._displayModalPopupID=null;this._postBackScript=null;this._clickHandler=null;this._oldScript=null};Sys.Extended.UI.ConfirmButtonBehavior.prototype={initialize:function(){Sys.Extended.UI.ConfirmButtonBehavior.callBaseMethod(this,"initialize");var n=this.get_element();this._clickHandler=Function.createDelegate(this,this._onClick);$addHandler(n,"click",this._clickHandler);this._oldScript=n.getAttribute("onclick");this._oldScript&&n.setAttribute("onclick",null);this._ConfirmOnFormSubmit&&typeof WebForm_OnSubmit=="function"&&!Sys.Extended.UI.ConfirmButtonBehavior._originalWebForm_OnSubmit&&(Sys.Extended.UI.TextBoxWatermarkBehavior&&Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit?(Sys.Extended.UI.ConfirmButtonBehavior._originalWebForm_OnSubmit=Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit,Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit=Sys.Extended.UI.ConfirmButtonBehavior.WebForm_OnSubmit):(Sys.Extended.UI.ConfirmButtonBehavior._originalWebForm_OnSubmit=WebForm_OnSubmit,WebForm_OnSubmit=Sys.Extended.UI.ConfirmButtonBehavior.WebForm_OnSubmit))},dispose:function(){this._clickHandler&&($removeHandler(this.get_element(),"click",this._clickHandler),this._clickHandler=null);this._oldScript&&(this.get_element().setAttribute("onclick",this._oldScript),this._oldScript=null);Sys.Extended.UI.ConfirmButtonBehavior.callBaseMethod(this,"dispose")},_onClick:function(n){if(this.get_element()&&!this.get_element().disabled)if(this._ConfirmOnFormSubmit)Sys.Extended.UI.ConfirmButtonBehavior._clickedBehavior=this;else if(this._displayConfirmDialog())this._oldScript&&(String.isInstanceOfType(this._oldScript)?eval(this._oldScript):typeof this._oldScript=="function"&&this._oldScript());else return n.preventDefault(),!1},_displayConfirmDialog:function(){var i=new Sys.CancelEventArgs,n,t;if(this.raiseShowing(i),!i.get_cancel()){if(this._displayModalPopupID){if(n=$find(this._displayModalPopupID),!n)throw Error.argument("displayModalPopupID",String.format(Sys.Extended.UI.Resources.CollapsiblePanel_NoControlID,this._displayModalPopupID));return n.set_OnOkScript("$find('"+this.get_id()+"')._handleConfirmDialogCompletion(true);"),n.set_OnCancelScript("$find('"+this.get_id()+"')._handleConfirmDialogCompletion(false);"),n.show(),!1}return t=window.confirm(this._ConfirmTextValue),this._handleConfirmDialogCompletion(t),t}},_handleConfirmDialogCompletion:function(n){this.raiseHidden(new Sys.Extended.UI.ConfirmButtonHiddenEventArgs(n));n?this._postBackScript&&eval(this._postBackScript):this._OnClientCancelValue&&window[this._OnClientCancelValue]()},get_OnClientCancel:function(){return this._OnClientCancelValue},set_OnClientCancel:function(n){this._OnClientCancelValue!=n&&(this._OnClientCancelValue=n,this.raisePropertyChanged("OnClientCancel"))},get_ConfirmText:function(){return this._ConfirmTextValue},set_ConfirmText:function(n){this._ConfirmTextValue!=n&&(this._ConfirmTextValue=n,this.raisePropertyChanged("ConfirmText"))},get_ConfirmOnFormSubmit:function(){return this._ConfirmOnFormSubmit},set_ConfirmOnFormSubmit:function(n){this._ConfirmOnFormSubmit!=n&&(this._ConfirmOnFormSubmit=n,this.raisePropertyChanged("ConfirmOnFormSubmit"))},get_displayModalPopupID:function(){return this._displayModalPopupID},set_displayModalPopupID:function(n){this._displayModalPopupID!=n&&(this._displayModalPopupID=n,this.raisePropertyChanged("displayModalPopupID"))},get_postBackScript:function(){return this._postBackScript},set_postBackScript:function(n){this._postBackScript!=n&&(this._postBackScript=n,this.raisePropertyChanged("postBackScript"))},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)}};Sys.Extended.UI.ConfirmButtonBehavior.registerClass("Sys.Extended.UI.ConfirmButtonBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.ConfirmButtonBehavior,{name:"confirmButton",parameters:[{name:"ConfirmText",type:"String"}]});Sys.Extended.UI.ConfirmButtonBehavior.WebForm_OnSubmit=function(){var n=Sys.Extended.UI.ConfirmButtonBehavior._originalWebForm_OnSubmit();return n&&Sys.Extended.UI.ConfirmButtonBehavior._clickedBehavior&&(n=Sys.Extended.UI.ConfirmButtonBehavior._clickedBehavior._displayConfirmDialog()),Sys.Extended.UI.ConfirmButtonBehavior._clickedBehavior=null,n}}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedConfirmButton",["ExtendedBase"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.IDragSource=function(){};Sys.Extended.UI.IDragSource.prototype={get_dragDataType:function(){throw Error.notImplemented();},getDragData:function(){throw Error.notImplemented();},get_dragMode:function(){throw Error.notImplemented();},onDragStart:function(){throw Error.notImplemented();},onDrag:function(){throw Error.notImplemented();},onDragEnd:function(){throw Error.notImplemented();}};Sys.Extended.UI.IDragSource.registerInterface("Sys.Extended.UI.IDragSource");Sys.Extended.UI.IDropTarget=function(){};Sys.Extended.UI.IDropTarget.prototype={get_dropTargetElement:function(){throw Error.notImplemented();},canDrop:function(){throw Error.notImplemented();},drop:function(){throw Error.notImplemented();},onDragEnterTarget:function(){throw Error.notImplemented();},onDragLeaveTarget:function(){throw Error.notImplemented();},onDragInTarget:function(){throw Error.notImplemented();}};Sys.Extended.UI.IDropTarget.registerInterface("Sys.Extended.UI.IDropTarget");Sys.Extended.UI.DragMode=function(){throw Error.invalidOperation();};Sys.Extended.UI.DragMode.prototype={Copy:0,Move:1};Sys.Extended.UI.DragMode.registerEnum("Sys.Extended.UI.DragMode");Sys.Extended.UI.DragDropEventArgs=function(n,t,i){this._dragMode=n;this._dataType=t;this._data=i};Sys.Extended.UI.DragDropEventArgs.prototype={get_dragMode:function(){return this._dragMode||null},get_dragDataType:function(){return this._dataType||null},get_dragData:function(){return this._data||null}};Sys.Extended.UI.DragDropEventArgs.registerClass("Sys.Extended.UI.DragDropEventArgs");Sys.Extended.UI._DragDropManager=function(){this._instance=null;this._events=null};Sys.Extended.UI._DragDropManager.prototype={add_dragStart:function(n){this.get_events().addHandler("dragStart",n)},remove_dragStart:function(n){this.get_events().removeHandler("dragStart",n)},get_events:function(){return this._events||(this._events=new Sys.EventHandlerList),this._events},add_dragStop:function(n){this.get_events().addHandler("dragStop",n)},remove_dragStop:function(n){this.get_events().removeHandler("dragStop",n)},_getInstance:function(){return this._instance||(this._instance=Sys.Browser.agent===Sys.Browser.InternetExplorer?new Sys.Extended.UI.IEDragDropManager:new Sys.Extended.UI.GenericDragDropManager,this._instance.initialize(),this._instance.add_dragStart(Function.createDelegate(this,this._raiseDragStart)),this._instance.add_dragStop(Function.createDelegate(this,this._raiseDragStop))),this._instance},startDragDrop:function(n,t,i,r){this._getInstance().startDragDrop(n,t,i,r)},registerDropTarget:function(n){this._getInstance().registerDropTarget(n)},unregisterDropTarget:function(n){this._getInstance().unregisterDropTarget(n)},dispose:function(){delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this)},_raiseDragStart:function(n,t){var i=this.get_events().getHandler("dragStart");i&&i(this,t)},_raiseDragStop:function(n,t){var i=this.get_events().getHandler("dragStop");i&&i(this,t)}};Sys.Extended.UI._DragDropManager.registerClass("Sys.Extended.UI._DragDropManager");Sys.Extended.UI.DragDropManager=new Sys.Extended.UI._DragDropManager;Sys.Extended.UI.IEDragDropManager=function(){Sys.Extended.UI.IEDragDropManager.initializeBase(this);this._dropTargets=null;this._radius=10;this._useBuiltInDragAndDropFunctions=!0;this._activeDragVisual=null;this._activeContext=null;this._activeDragSource=null;this._underlyingTarget=null;this._oldOffset=null;this._potentialTarget=null;this._isDragging=!1;this._mouseUpHandler=null;this._documentMouseMoveHandler=null;this._documentDragOverHandler=null;this._dragStartHandler=null;this._mouseMoveHandler=null;this._dragEnterHandler=null;this._dragLeaveHandler=null;this._dragOverHandler=null;this._dropHandler=null};Sys.Extended.UI.IEDragDropManager.prototype={add_dragStart:function(n){this.get_events().addHandler("dragStart",n)},remove_dragStart:function(n){this.get_events().removeHandler("dragStart",n)},add_dragStop:function(n){this.get_events().addHandler("dragStop",n)},remove_dragStop:function(n){this.get_events().removeHandler("dragStop",n)},initialize:function(){Sys.Extended.UI.IEDragDropManager.callBaseMethod(this,"initialize");this._mouseUpHandler=Function.createDelegate(this,this._onMouseUp);this._documentMouseMoveHandler=Function.createDelegate(this,this._onDocumentMouseMove);this._documentDragOverHandler=Function.createDelegate(this,this._onDocumentDragOver);this._dragStartHandler=Function.createDelegate(this,this._onDragStart);this._mouseMoveHandler=Function.createDelegate(this,this._onMouseMove);this._dragEnterHandler=Function.createDelegate(this,this._onDragEnter);this._dragLeaveHandler=Function.createDelegate(this,this._onDragLeave);this._dragOverHandler=Function.createDelegate(this,this._onDragOver);this._dropHandler=Function.createDelegate(this,this._onDrop)},dispose:function(){if(this._dropTargets){for(var n=0;n<this._dropTargets;n++)this.unregisterDropTarget(this._dropTargets[n]);this._dropTargets=null}Sys.Extended.UI.IEDragDropManager.callBaseMethod(this,"dispose")},startDragDrop:function(n,t,i,r){var s=window._event,e,h,u,f,c,o;this._isDragging||(this._underlyingTarget=null,this._activeDragSource=n,this._activeDragVisual=t,this._activeContext=i,this._useBuiltInDragAndDropFunctions=typeof r!="undefined"?r:!0,e={x:s.clientX,y:s.clientY},t.originalPosition=t.style.position,t.style.position="absolute",document._lastPosition=e,t.startingPoint=e,h=this.getScrollOffset(t,!0),t.startingPoint=this.addPoints(t.startingPoint,h),u=parseInt(t.style.left),f=parseInt(t.style.top),isNaN(u)&&(u="0"),isNaN(f)&&(f="0"),t.startingPoint=this.subtractPoints(t.startingPoint,{x:u,y:f}),this._prepareForDomChanges(),n.onDragStart(),c=new Sys.Extended.UI.DragDropEventArgs(n.get_dragMode(),n.get_dragDataType(),n.getDragData(i)),o=this.get_events().getHandler("dragStart"),o&&o(this,c),this._recoverFromDomChanges(),this._wireEvents(),this._drag(!0))},_stopDragDrop:function(n){var i=window._event,t;if(this._activeDragSource!=null){this._unwireEvents();n||(n=this._underlyingTarget==null);n||this._underlyingTarget==null||this._underlyingTarget.drop(this._activeDragSource.get_dragMode(),this._activeDragSource.get_dragDataType(),this._activeDragSource.getDragData(this._activeContext));this._activeDragSource.onDragEnd(n);t=this.get_events().getHandler("dragStop");t&&t(this,Sys.EventArgs.Empty);this._activeDragVisual.style.position=this._activeDragVisual.originalPosition;this._activeDragSource=null;this._activeContext=null;this._activeDragVisual=null;this._isDragging=!1;this._potentialTarget=null;i.preventDefault()}},_drag:function(n){var r=window._event,u={x:r.clientX,y:r.clientY},f,t,i;(document._lastPosition=u,f=this.getScrollOffset(this._activeDragVisual,!0),t=this.addPoints(this.subtractPoints(u,this._activeDragVisual.startingPoint),f),n||parseInt(this._activeDragVisual.style.left)!=t.x||parseInt(this._activeDragVisual.style.top)!=t.y)&&($common.setLocation(this._activeDragVisual,t),this._prepareForDomChanges(),this._activeDragSource.onDrag(),this._recoverFromDomChanges(),this._potentialTarget=this._findPotentialTarget(this._activeDragSource,this._activeDragVisual),i=this._potentialTarget!=this._underlyingTarget||this._potentialTarget==null,i&&this._underlyingTarget!=null&&this._leaveTarget(this._activeDragSource,this._underlyingTarget),this._potentialTarget!=null?i?(this._underlyingTarget=this._potentialTarget,this._enterTarget(this._activeDragSource,this._underlyingTarget)):this._moveInTarget(this._activeDragSource,this._underlyingTarget):this._underlyingTarget=null)},_wireEvents:function(){this._useBuiltInDragAndDropFunctions?($addHandler(document,"mouseup",this._mouseUpHandler),$addHandler(document,"mousemove",this._documentMouseMoveHandler),$addHandler(document.body,"dragover",this._documentDragOverHandler),$addHandler(this._activeDragVisual,"dragstart",this._dragStartHandler),$addHandler(this._activeDragVisual,"dragend",this._mouseUpHandler),$addHandler(this._activeDragVisual,"drag",this._mouseMoveHandler)):($addHandler(document,"mouseup",this._mouseUpHandler),$addHandler(document,"mousemove",this._mouseMoveHandler))},_unwireEvents:function(){this._useBuiltInDragAndDropFunctions?($removeHandler(this._activeDragVisual,"drag",this._mouseMoveHandler),$removeHandler(this._activeDragVisual,"dragend",this._mouseUpHandler),$removeHandler(this._activeDragVisual,"dragstart",this._dragStartHandler),$removeHandler(document.body,"dragover",this._documentDragOverHandler),$removeHandler(document,"mousemove",this._documentMouseMoveHandler),$removeHandler(document,"mouseup",this._mouseUpHandler)):($removeHandler(document,"mousemove",this._mouseMoveHandler),$removeHandler(document,"mouseup",this._mouseUpHandler))},registerDropTarget:function(n){this._dropTargets==null&&(this._dropTargets=[]);Array.add(this._dropTargets,n);this._wireDropTargetEvents(n)},unregisterDropTarget:function(n){this._unwireDropTargetEvents(n);this._dropTargets&&Array.remove(this._dropTargets,n)},_wireDropTargetEvents:function(n){var t=n.get_dropTargetElement();t._dropTarget=n;$addHandler(t,"dragenter",this._dragEnterHandler);$addHandler(t,"dragleave",this._dragLeaveHandler);$addHandler(t,"dragover",this._dragOverHandler);$addHandler(t,"drop",this._dropHandler)},_unwireDropTargetEvents:function(n){var t=n.get_dropTargetElement();t._dropTarget&&(t._dropTarget=null,$removeHandler(t,"dragenter",this._dragEnterHandler),$removeHandler(t,"dragleave",this._dragLeaveHandler),$removeHandler(t,"dragover",this._dragOverHandler),$removeHandler(t,"drop",this._dropHandler))},_onDragStart:function(n){var i,r,t;window._event=n;document.selection.empty();i=n.dataTransfer;!i&&n.rawEvent&&(i=n.rawEvent.dataTransfer);r=this._activeDragSource.get_dragDataType().toLowerCase();t=this._activeDragSource.getDragData(this._activeContext);t&&(r!="text"&&r!="url"&&(r="text",t.innerHTML!=null&&(t=t.innerHTML)),i.effectAllowed="move",i.setData(r,t.toString()))},_onMouseUp:function(n){window._event=n;this._stopDragDrop(!1)},_onDocumentMouseMove:function(n){window._event=n;this._dragDrop()},_onDocumentDragOver:function(n){window._event=n;this._potentialTarget&&n.preventDefault()},_onMouseMove:function(n){window._event=n;this._drag()},_onDragEnter:function(n){var i,t;if(window._event=n,this._isDragging)n.preventDefault();else for(i=Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(n.target)),t=0;t<i.length;t++)this._dropTarget.onDragEnterTarget(Sys.Extended.UI.DragMode.Copy,i[t].type,i[t].value)},_onDragLeave:function(n){var i,t;if(window._event=n,this._isDragging)n.preventDefault();else for(i=Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(n.target)),t=0;t<i.length;t++)this._dropTarget.onDragLeaveTarget(Sys.Extended.UI.DragMode.Copy,i[t].type,i[t].value)},_onDragOver:function(n){var i,t;if(window._event=n,this._isDragging)n.preventDefault();else for(i=Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(n.target)),t=0;t<i.length;t++)this._dropTarget.onDragInTarget(Sys.Extended.UI.DragMode.Copy,i[t].type,i[t].value)},_onDrop:function(n){var i,t;if(window._event=n,!this._isDragging)for(i=Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(n.target)),t=0;t<i.length;t++)this._dropTarget.drop(Sys.Extended.UI.DragMode.Copy,i[t].type,i[t].value);n.preventDefault()},_getDropTarget:function(n){while(n){if(n._dropTarget!=null)return n._dropTarget;n=n.parentNode}return null},_dragDrop:function(){this._isDragging||(this._isDragging=!0,this._activeDragVisual.dragDrop(),document.selection.empty())},_moveInTarget:function(n,t){this._prepareForDomChanges();t.onDragInTarget(n.get_dragMode(),n.get_dragDataType(),n.getDragData(this._activeContext));this._recoverFromDomChanges()},_enterTarget:function(n,t){this._prepareForDomChanges();t.onDragEnterTarget(n.get_dragMode(),n.get_dragDataType(),n.getDragData(this._activeContext));this._recoverFromDomChanges()},_leaveTarget:function(n,t){this._prepareForDomChanges();t.onDragLeaveTarget(n.get_dragMode(),n.get_dragDataType(),n.getDragData(this._activeContext));this._recoverFromDomChanges()},_findPotentialTarget:function(n){var i=window._event,t;if(this._dropTargets==null)return null;var f=n.get_dragDataType(),e=n.get_dragMode(),o=n.getDragData(this._activeContext),r=this.getScrollOffset(document.body,!0),s=i.clientX+r.x,h=i.clientY+r.y,c={x:s-this._radius,y:h-this._radius,width:this._radius*2,height:this._radius*2},u;for(t=0;t<this._dropTargets.length;t++)if(u=$common.getBounds(this._dropTargets[t].get_dropTargetElement()),$common.overlaps(c,u)&&this._dropTargets[t].canDrop(e,f,o))return this._dropTargets[t];return null},_prepareForDomChanges:function(){this._oldOffset=$common.getLocation(this._activeDragVisual)},_recoverFromDomChanges:function(){var n=$common.getLocation(this._activeDragVisual),t;(this._oldOffset.x!=n.x||this._oldOffset.y!=n.y)&&(this._activeDragVisual.startingPoint=this.subtractPoints(this._activeDragVisual.startingPoint,this.subtractPoints(this._oldOffset,n)),scrollOffset=this.getScrollOffset(this._activeDragVisual,!0),t=this.addPoints(this.subtractPoints(document._lastPosition,this._activeDragVisual.startingPoint),scrollOffset),$common.setLocation(this._activeDragVisual,t))},addPoints:function(n,t){return{x:n.x+t.x,y:n.y+t.y}},subtractPoints:function(n,t){return{x:n.x-t.x,y:n.y-t.y}},getScrollOffset:function(n,t){var r=n.scrollLeft,u=n.scrollTop,i;if(t)for(i=n.parentNode;i!=null&&i.scrollLeft!=null;){if(r+=i.scrollLeft,u+=i.scrollTop,i==document.body&&r!=0&&u!=0)break;i=i.parentNode}return{x:r,y:u}},getBrowserRectangle:function(){var n=window.innerWidth,t=window.innerHeight;return n==null&&(n=document.documentElement.clientWidth),t==null&&(t=document.documentElement.clientHeight),{x:0,y:0,width:n,height:t}},getNextSibling:function(n){for(n=n.nextSibling;n!=null;n=n.nextSibling)if(n.innerHTML!=null)return n;return null},hasParent:function(n){return n.parentNode!=null&&n.parentNode.tagName!=null}};Sys.Extended.UI.IEDragDropManager.registerClass("Sys.Extended.UI.IEDragDropManager",Sys.Component);Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget=function(n){var t,i;if(n==null)return[];var f=window._event,e=[],r=["URL","Text"],u;for(t=0;t<r.length;t++)i=f.dataTransfer,!i&&f.rawEvent&&(i=f.rawEvent.dataTransfer),u=i.getData(r[t]),n.canDrop(Sys.Extended.UI.DragMode.Copy,r[t],u)&&u&&Array.add(e,{type:r[t],value:u});return e};Sys.Extended.UI.GenericDragDropManager=function(){Sys.Extended.UI.GenericDragDropManager.initializeBase(this);this._dropTargets=null;this._scrollEdgeConst=40;this._scrollByConst=10;this._scroller=null;this._scrollDeltaX=0;this._scrollDeltaY=0;this._activeDragVisual=null;this._activeContext=null;this._activeDragSource=null;this._oldOffset=null;this._potentialTarget=null;this._mouseUpHandler=null;this._mouseMoveHandler=null;this._keyPressHandler=null;this._scrollerTickHandler=null};Sys.Extended.UI.GenericDragDropManager.prototype={initialize:function(){Sys.Extended.UI.GenericDragDropManager.callBaseMethod(this,"initialize");this._mouseUpHandler=Function.createDelegate(this,this._onMouseUp);this._mouseMoveHandler=Function.createDelegate(this,this._onMouseMove);this._keyPressHandler=Function.createDelegate(this,this._onKeyPress);this._scrollerTickHandler=Function.createDelegate(this,this._onScrollerTick);this._scroller=new Sys.Timer;this._scroller.set_interval(10);this._scroller.add_tick(this._scrollerTickHandler)},startDragDrop:function(n,t,i){this._activeDragSource=n;this._activeDragVisual=t;this._activeContext=i;Sys.Extended.UI.GenericDragDropManager.callBaseMethod(this,"startDragDrop",[n,t,i])},_stopDragDrop:function(n){this._scroller.set_enabled(!1);Sys.Extended.UI.GenericDragDropManager.callBaseMethod(this,"_stopDragDrop",[n])},_drag:function(n){Sys.Extended.UI.GenericDragDropManager.callBaseMethod(this,"_drag",[n]);this._autoScroll()},_wireEvents:function(){$addHandler(document,"mouseup",this._mouseUpHandler);$addHandler(document,"mousemove",this._mouseMoveHandler);$addHandler(document,"keypress",this._keyPressHandler)},_unwireEvents:function(){$removeHandler(document,"keypress",this._keyPressHandler);$removeHandler(document,"mousemove",this._mouseMoveHandler);$removeHandler(document,"mouseup",this._mouseUpHandler)},_wireDropTargetEvents:function(){},_unwireDropTargetEvents:function(){},_onMouseUp:function(n){window._event=n;this._stopDragDrop(!1)},_onMouseMove:function(n){window._event=n;this._drag()},_onKeyPress:function(n){window._event=n;var t=n.keyCode?n.keyCode:n.rawEvent.keyCode;t==27&&this._stopDragDrop(!0)},_autoScroll:function(){var t=window._event,n=this.getBrowserRectangle();n.width>0&&(this._scrollDeltaX=this._scrollDeltaY=0,t.clientX<n.x+this._scrollEdgeConst?this._scrollDeltaX=-this._scrollByConst:t.clientX>n.width-this._scrollEdgeConst&&(this._scrollDeltaX=this._scrollByConst),t.clientY<n.y+this._scrollEdgeConst?this._scrollDeltaY=-this._scrollByConst:t.clientY>n.height-this._scrollEdgeConst&&(this._scrollDeltaY=this._scrollByConst),this._scrollDeltaX!=0||this._scrollDeltaY!=0?this._scroller.set_enabled(!0):this._scroller.set_enabled(!1))},_onScrollerTick:function(){var t=document.body.scrollLeft,i=document.body.scrollTop;window.scrollBy(this._scrollDeltaX,this._scrollDeltaY);var r=document.body.scrollLeft,u=document.body.scrollTop,n=this._activeDragVisual,f={x:parseInt(n.style.left)+(r-t),y:parseInt(n.style.top)+(u-i)};$common.setLocation(n,f)}};Sys.Extended.UI.GenericDragDropManager.registerClass("Sys.Extended.UI.GenericDragDropManager",Sys.Extended.UI.IEDragDropManager)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedDragDrop",["ExtendedTimer","ExtendedCommon"],n):n()}(),function(){function n(){Sys.Extended.UI.FloatingBehavior=function(n){function o(n){window._event=n;var t=this.get_element();this.checkCanDrag(n.target)&&(u=$common.getLocation(t),n.preventDefault(),this.startDragDrop(t))}Sys.Extended.UI.FloatingBehavior.initializeBase(this,[n]);var i,t,u,f,e,r=Function.createDelegate(this,o);this.add_move=function(n){this.get_events().addHandler("move",n)};this.remove_move=function(n){this.get_events().removeHandler("move",n)};this.get_handle=function(){return i};this.set_handle=function(n){i!=null&&$removeHandler(i,"mousedown",r);i=n;$addHandler(i,"mousedown",r)};this.get_profileProperty=function(){return f};this.set_profileProperty=function(n){f=n};this.get_profileComponent=function(){return e};this.set_profileComponent=function(n){e=n};this.get_location=function(){return t};this.set_location=function(n){t!=n&&(t=n,this.get_isInitialized()&&$common.setLocation(this.get_element(),t),this.raisePropertyChanged("location"))};this.initialize=function(){Sys.Extended.UI.FloatingBehavior.callBaseMethod(this,"initialize");Sys.Extended.UI.DragDropManager.registerDropTarget(this);var n=this.get_element();t||(t=$common.getLocation(n));n.style.position="fixed";$common.setLocation(n,t)};this.dispose=function(){Sys.Extended.UI.DragDropManager.unregisterDropTarget(this);i&&r&&$removeHandler(i,"mousedown",r);r=null;Sys.Extended.UI.FloatingBehavior.callBaseMethod(this,"dispose")};this.checkCanDrag=function(n){var t=n.tagName;return t.toLowerCase()=="a"&&n.href!=null&&n.href.length>0?!1:Array.indexOf(["input","button","select","textarea","label"],t.toLowerCase())>-1?!1:!0};this.get_dragDataType=function(){return"_floatingObject"};this.getDragData=function(){return null};this.get_dragMode=function(){return Sys.Extended.UI.DragMode.Move};this.onDragStart=function(){};this.onDrag=function(){};this.onDragEnd=function(n){var i,r,f;n||(i=this.get_events().getHandler("move"),i&&(r=new Sys.CancelEventArgs,i(this,r),n=r.get_cancel()));f=this.get_element();n?$common.setLocation(f,u):(t=$common.getLocation(f),this.raisePropertyChanged("location"))};this.startDragDrop=function(n){Sys.Extended.UI.DragDropManager.startDragDrop(this,n,null)};this.get_dropTargetElement=function(){return document.body};this.canDrop=function(n,t){return t=="_floatingObject"};this.drop=function(){};this.onDragEnterTarget=function(){};this.onDragLeaveTarget=function(){};this.onDragInTarget=function(){}};Sys.Extended.UI.FloatingBehavior.registerClass("Sys.Extended.UI.FloatingBehavior",Sys.Extended.UI.BehaviorBase,Sys.Extended.UI.IDragSource,Sys.Extended.UI.IDropTarget,Sys.IDisposable);Sys.registerComponent(Sys.Extended.UI.FloatingBehavior,{name:"draggable"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedFloating",["ExtendedBase","ExtendedCommon","ExtendedDragDrop"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.HoverBehavior=function(n){Sys.Extended.UI.HoverBehavior.initializeBase(this,[n]);this._elementHandlers=null;this._hoverElementHandlers=null;this._hoverElement=null;this._hoverCount=0;this._unhoverDelay=0;this._hoverDelay=0;this._hoverScript=null;this._unhoverScript=null;this._hoverFired=!1};Sys.Extended.UI.HoverBehavior.prototype={_setupHandlersArray:function(){var n=[];return n[0]=Function.createDelegate(this,this._onHover),n[1]=Function.createDelegate(this,this._onUnhover),n},get_elementHandlers:function(){return this._elementHandlers||(this._elementHandlers=this._setupHandlersArray()),this._elementHandlers},get_hoverElementHandlers:function(){return this._hoverElementHandlers||(this._hoverElementHandlers=this._setupHandlersArray()),this._hoverElementHandlers},get_hoverElement:function(){return this._hoverElement},set_hoverElement:function(n){n!=this._hoverElement&&(this._hoverElement&&this._setupHandlers(this._hoverElement,this.get_hoverElementHandlers(),!1),this._hoverElement=n,this._hoverElement&&this._setupHandlers(this._hoverElement,this.get_hoverElementHandlers(),!0))},get_hoverDelay:function(){return this._hoverDelay},set_hoverDelay:function(n){this._hoverDelay=n;this.raisePropertyChanged("hoverDelay")},get_hoverScript:function(){return this._hoverScript},set_hoverScript:function(n){this._hoverScript=n},get_unhoverDelay:function(){return this._unhoverDelay},set_unhoverDelay:function(n){this._unhoverDelay=n;this.raisePropertyChanged("unhoverDelay")},get_unhoverScript:function(){return this._unhoverScript},set_unhoverScript:function(n){this._unhoverScript=n},dispose:function(){var t=this.get_element(),n;this._elementHandlers&&(n=this.get_elementHandlers(),this._setupHandlers(t,n,!1),this._elementHandlers=null);this._hoverElement&&(n=this.get_hoverElementHandlers(),this._setupHandlers(this._hoverElement,n,!1),this._hoverElement=null);Sys.Extended.UI.HoverBehavior.callBaseMethod(this,"dispose")},initialize:function(){Sys.Extended.UI.HoverBehavior.callBaseMethod(this,"initialize");var n=this.get_elementHandlers();this._setupHandlers(this.get_element(),n,!0);this._hoverElement&&(n=this.get_hoverElementHandlers(),this._setupHandlers(this._hoverElement,n,!0))},add_hover:function(n){this.get_events().addHandler("hover",n)},remove_hover:function(n){this.get_events().removeHandler("hover",n)},_fireHover:function(){if(this._hoverCount&&!this._hoverFired){var n=this.get_events().getHandler("hover");n&&n(this,Sys.EventArgs.Empty);this._hoverScript&&eval(this._hoverScript);this._hoverFired=!0}},_onHover:function(){this._hoverCount++;this._hoverDelay?window.setTimeout(Function.createDelegate(this,this._fireHover),this._hoverDelay):this._fireHover()},add_unhover:function(n){this.get_events().addHandler("unhover",n)},remove_unhover:function(n){this.get_events().removeHandler("unhover",n)},_fireUnhover:function(){if(this._hoverFired&&!this._hoverCount){this._hoverFired=!1;var n=this.get_events().getHandler("unhover");n&&n(this,Sys.EventArgs.Empty);this._unhoverScript&&eval(this._unhoverScript)}},_onUnhover:function(){this._hoverCount--;this._hoverCount<=0&&(this._hoverCount=0,this._unhoverDelay?window.setTimeout(Function.createDelegate(this,this._fireUnhover),this._unhoverDelay):this._fireUnhover())},_setupHandlers:function(n,t,i){this.get_isInitialized()&&n&&(i?($addHandler(n,"mouseover",t[0]),$addHandler(n,"focus",t[0]),$addHandler(n,"mouseout",t[1]),$addHandler(n,"blur",t[1])):($removeHandler(n,"mouseover",t[0]),$removeHandler(n,"focus",t[0]),$removeHandler(n,"mouseout",t[1]),$removeHandler(n,"blur",t[1])))}};Sys.Extended.UI.HoverBehavior.descriptor={properties:[{name:"hoverElement",isDomElement:!0},{name:"unhoverDelay",type:Number}],events:[{name:"hover"},{name:"unhover"}]};Sys.Extended.UI.HoverBehavior.registerClass("Sys.Extended.UI.HoverBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.HoverBehavior,{name:"hover"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedHover",["ExtendedBase","ExtendedCommon"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.DropDownBehavior=function(n){if(Sys.Extended.UI.DropDownBehavior.initializeBase(this,[n]),this._dropDownControl=null,this._highlightBorderColor="#2353B2",this._highlightBackgroundColor="#FFF3DB",this._dropArrowBackgroundColor="#C6E1FF",this._dropArrowImageUrl=null,Sys.loader){var t=Sys.loader.basePath;t&&(t.charAt(t.length-1)!=="/"&&(t+="/"),this._dropArrowImageUrl=t+"extended/dropdown/drop-arrow.gif")}this._dropArrowWidth="16px";this._oldBackgroundColor=null;this._dropFrame=null;this._dropArrow=null;this._dropArrowImage=null;this._dropWrapper=null;this._isOpen=!1;this._isOver=!1;this._wasClicked=null;this._dropWrapperHoverBehavior=null;this._dropPopupPopupBehavior=null;this._onShowJson=null;this._onHideJson=null;this._dropDownControl$delegates={click:Function.createDelegate(this,this._dropDownControl_onclick),contextmenu:Function.createDelegate(this,this._dropDownControl_oncontextmenu)};this._dropFrame$delegates={click:Function.createDelegate(this,this._dropFrame_onclick),contextmenu:Function.createDelegate(this,this._dropFrame_oncontextmenu)};this._dropWrapper$delegates={click:Function.createDelegate(this,this._dropWrapper_onclick),contextmenu:Function.createDelegate(this,this._dropWrapper_oncontextmenu)};this._document$delegates={click:Function.createDelegate(this,this._document_onclick),contextmenu:Function.createDelegate(this,this._document_oncontextmenu)};this._dropWrapperHoverBehavior$delegates={hover:Function.createDelegate(this,this._dropWrapperHoverBehavior_onhover),unhover:Function.createDelegate(this,this._dropWrapperHoverBehavior_onunhover)}};Sys.Extended.UI.DropDownBehavior.prototype={initialize:function(){var n,t,i;Sys.Extended.UI.DropDownBehavior.callBaseMethod(this,"initialize");n=this.get_element();t=n.parentNode;this._dropDownControl==null&&$common.createElementFromTemplate({parent:t,nameTable:this,name:"_dropDownControl",nodeName:"div",visible:!1,cssClasses:this._dropDownControl?null:["ajax__dropdown_panel"],properties:{__GENERATED:!0}});$addHandlers(this._dropDownControl,this._dropDownControl$delegates);i={};this._dropArrowImageUrl&&(i.src=this._dropArrowImageUrl);$common.createElementFromTemplate({parent:t,nameTable:this,name:"_dropFrame",nodeName:"span",visible:!1,children:[{name:"_dropFrameTop",nodeName:"div",cssClasses:["ajax__dropdown_frame_line"]},{name:"_dropFrameRight",nodeName:"div",cssClasses:["ajax__dropdown_frame_line"]},{name:"_dropFrameBottom",nodeName:"div",cssClasses:["ajax__dropdown_frame_line"]},{name:"_dropFrameLeft",nodeName:"div",cssClasses:["ajax__dropdown_frame_line"]},{name:"_dropArrow",nodeName:"div",cssClasses:this._dropArrowImageUrl?["ajax__dropdown_arrow"]:["ajax__dropdown_arrow","ajax__dropdown_arrow_image"],properties:{style:{width:this._dropArrowWidth,backgroundColor:this._dropArrowBackgroundColor}},events:this._dropFrame$delegates,children:[{name:"_dropArrowWrapper",nodeName:"div",visible:!!this._dropArrowImageUrl,cssClasses:["ajax__dropdown_arrow_wrapper"],children:[{name:"_dropArrowImage",nodeName:"img",properties:i}]}]}]});$common.createElementFromTemplate({parent:null,nameTable:this,name:"_dropWrapper",nodeName:"span",properties:{id:n.id+"_dropWrapper",style:{cursor:"default"}},events:this._dropWrapper$delegates,content:n});this._dropPopupPopupBehavior=$create(Sys.Extended.UI.PopupBehavior,{positioningMode:Sys.Extended.UI.PositioningMode.BottomRight,parentElement:n,y:-1},null,null,this._dropDownControl);this._onShowJson&&this._dropPopupPopupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._dropPopupPopupBehavior.set_onHide(this._onHideJson);this._dropWrapperHoverBehavior=$create(Sys.Extended.UI.HoverBehavior,{hoverElement:this._dropFrame},this._dropWrapperHoverBehavior$delegates,null,this._dropWrapper);$addHandlers(document,this._document$delegates)},dispose:function(){var n=this.get_element();this._isOpen&&(this.hide(),this.unhover(),this._isOpen=!1);$common.removeHandlers(document,this._document$delegates);this._onShowJson=null;this._onHideJson=null;this._dropPopupPopupBehavior&&(this._dropPopupPopupBehavior.dispose(),this._dropPopupPopupBehavior=null);this._dropWrapperHoverBehavior&&(this._dropWrapperHoverBehavior.dispose(),this._dropWrapperHoverBehavior=null);this._dropFrame&&($common.removeElement(this._dropFrame),this._dropFrame=null,this._dropFrameTop=null,this._dropFrameRight=null,this._dropFrameBottom=null,this._dropFrameLeft=null,this._dropArrow=null,this._dropArrowWrapper=null,this._dropArrowImage=null);this._dropWrapper&&($common.removeHandlers(this._dropWrapper,this._dropWrapper$delegates),$common.unwrapElement(n,this._dropWrapper),this._dropWrapper=null);this._dropDownControl&&($common.removeHandlers(this._dropDownControl,this._dropDownControl$delegates),this._dropDownControl.__GENERATED&&$common.removeElement(this._dropDownControl),this._dropDownControl=null);Sys.Extended.UI.DropDownBehavior.callBaseMethod(this,"dispose")},hover:function(){var t=this.get_element(),n,i;this._isOver||(this._isOver=!0,this.raiseHoverOver(Sys.EventArgs.Empty),n=$common.getBounds(t),$common.setLocation(this._dropFrame,{x:0,y:0}),$common.setVisible(this._dropFrame,!0),i=$common.getLocation(this._dropFrame),$common.setVisible(this._dropFrame,!1),n.x-=i.x,n.y-=i.y,$common.setBounds(this._dropFrameTop,{x:n.x,y:n.y,width:n.width,height:1}),$common.setBounds(this._dropFrameRight,{x:n.x+n.width-1,y:n.y,width:1,height:n.height}),$common.setBounds(this._dropFrameBottom,{x:n.x,y:n.y+n.height-1,width:n.width,height:1}),$common.setBounds(this._dropFrameLeft,{x:n.x,y:n.y,width:1,height:n.height}),$common.setBounds(this._dropArrow,{x:n.x+n.width-17,y:n.y+1,width:16,height:n.height-2}),this._dropFrameTop.style.backgroundColor=this._highlightBorderColor,this._dropFrameRight.style.backgroundColor=this._highlightBorderColor,this._dropFrameBottom.style.backgroundColor=this._highlightBorderColor,this._dropFrameLeft.style.backgroundColor=this._highlightBorderColor,$common.setVisible(this._dropFrame,!0),this._oldBackgroundColor||(this._oldBackgroundColor=$common.getCurrentStyle(t,"backgroundColor")),t.style.backgroundColor=this._highlightBackgroundColor)},unhover:function(){var n=this.get_element();(this._isOver||!this._isOpen)&&(this._isOver=!1,this._isOpen||($common.setVisible(this._dropFrame,!1),this._oldBackgroundColor?(n.style.backgroundColor=this._oldBackgroundColor,this._oldBackgroundColor=null):n.style.backgroundColor="transparent"),this.raiseHoverOut(Sys.EventArgs.Empty))},show:function(){if(!this._isOpen){this.hover();var n=new Sys.CancelEventArgs;if(this.raiseShowing(n),this.raisePopup(n),n.get_cancel())return;this._isOpen=!0;this.populate();(!this._dynamicPopulateBehavior||this._dynamicPopulateBehavior._populated&&this._cacheDynamicResults)&&this._showPopup()}},_showPopup:function(){this._dropPopupPopupBehavior.show();this.raiseShown(Sys.EventArgs.Empty)},hide:function(){if(this._isOpen){var n=new Sys.CancelEventArgs;if(this.raiseHiding(n),n.get_cancel())return;this._isOpen=!1;this._dropPopupPopupBehavior.hide();this.raiseHidden(Sys.EventArgs.Empty)}},_dropWrapperHoverBehavior_onhover:function(){this.hover()},_dropWrapperHoverBehavior_onunhover:function(){this.unhover()},_dropWrapper_onclick:function(n){n.target.tagName!="A"&&(this._isOpen?this.hide():this.show(),this._wasClicked=!0)},_dropWrapper_oncontextmenu:function(n){n.target.tagName!="A"&&(this._wasClicked=!0,n.preventDefault(),this.show())},_dropFrame_onclick:function(){this._isOpen?this.hide():this.show();this._wasClicked=!0},_dropFrame_oncontextmenu:function(n){this._wasClicked=!0;n.preventDefault();this.show()},_dropDownControl_onclick:function(){},_dropDownControl_oncontextmenu:function(n){this._wasClicked=!0;n.preventDefault()},_document_onclick:function(){this._wasClicked?this._wasClicked=!1:this._isOpen&&(this.hide(),this.unhover())},_document_oncontextmenu:function(){this._wasClicked?this._wasClicked=!1:this._isOpen&&(this.hide(),this.unhover())},_onPopulated:function(n,t){Sys.Extended.UI.DropDownBehavior.callBaseMethod(this,"_onPopulated",[n,t]);this._isOpen&&this._showPopup()},get_onShow:function(){return this._dropPopupPopupBehavior?this._dropPopupPopupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._dropPopupPopupBehavior?this._dropPopupPopupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._dropPopupPopupBehavior?this._dropPopupPopupBehavior.get_onShowBehavior():null},onShow:function(){this._dropPopupPopupBehavior&&this._dropPopupPopupBehavior.onShow()},get_onHide:function(){return this._dropPopupPopupBehavior?this._dropPopupPopupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._dropPopupPopupBehavior?this._dropPopupPopupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._dropPopupPopupBehavior?this._dropPopupPopupBehavior.get_onHideBehavior():null},onHide:function(){this._dropPopupPopupBehavior&&this._dropPopupPopupBehavior.onHide()},get_dropDownControl:function(){return this._dropDownControl},set_dropDownControl:function(n){this._dropDownControl!=n&&(this._dropDownControl=n,this.raisePropertyChanged("dropDownControl"))},get_highlightBorderColor:function(){return this._highlightBorderColor},set_highlightBorderColor:function(n){this._highlightBorderColor!=n&&(this._highlightBorderColor=n,this.raisePropertyChanged("highlightBorderColor"))},get_highlightBackgroundColor:function(){return this._highlightBackgroundColor},set_highlightBackgroundColor:function(n){this._highlightBackgroundColor!=n&&(this._highlightBackgroundColor=n,this.get_isInitialized()&&this._isOpen&&(this._dropWrapper.style.backgroundColor=n),this.raisePropertyChanged("highlightBackgroundColor"))},get_dropArrowBackgroundColor:function(){return this._dropArrowBackgroundColor},set_dropArrowBackgroundColor:function(n){this._dropArrowBackgroundColor!=n&&(this._dropArrowBackgroundColor=n,this.get_isInitialized()&&(this._dropArrow.style.backgroundColor=n),this.raisePropertyChanged("dropArrowBackgroundColor"))},get_dropArrowImageUrl:function(){return this._dropArrowImageUrl},set_dropArrowImageUrl:function(n){this._dropArrowImageUrl!=n&&(this._dropArrowImageUrl=n,this.get_isInitialized()&&(this._dropArrow.className&&(this._dropArrow.className="",this._dropArrowWrapper.style.display="block"),this._dropArrowImage.src=n),this.raisePropertyChanged("dropArrowImageUrl"))},get_dropArrowWidth:function(){return this._dropArrowWidth},set_dropArrowWidth:function(n){this._dropArrowWidth!=n&&(this._dropArrowWidth=n,this.get_isInitialized()&&(this._dropArrow.style.width=n),this.raisePropertyChanged("dropArrowWidth"))},get_isOver:function(){return this._isOver},get_isOpen:function(){return this._isOpen},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(n){var t=this.get_events().getHandler("shown");t&&t(this,n)},add_popup:function(n){this.get_events().addHandler("popup",n)},remove_popup:function(n){this.get_events().removeHandler("popup",n)},raisePopup:function(n){var t=this.get_events().getHandler("popup");t&&t(this,n)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)},add_hoverOver:function(n){this.get_events().addHandler("hoverOver",n)},remove_hoverOver:function(n){this.get_events().removeHandler("hoverOver",n)},raiseHoverOver:function(n){var t=this.get_events().getHandler("hoverOver");t&&t(this,n)},add_hoverOut:function(n){this.get_events().addHandler("hoverOut",n)},remove_hoverOut:function(n){this.get_events().removeHandler("hoverOut",n)},raiseHoverOut:function(n){var t=this.get_events().getHandler("hoverOut");t&&t(this,n)}};Sys.Extended.UI.DropDownBehavior.registerClass("Sys.Extended.UI.DropDownBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.DropDownBehavior,{name:"dropDown"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedDropDown",["ExtendedDynamicPopulate","ExtendedAnimationBehavior","ExtendedPopup","ExtendedHover"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BoxCorners=function(){throw Error.invalidOperation();};Sys.Extended.UI.BoxCorners.prototype={None:0,TopLeft:1,TopRight:2,BottomRight:4,BottomLeft:8,Top:3,Right:6,Bottom:12,Left:9,All:15};Sys.Extended.UI.BoxCorners.registerEnum("Sys.Extended.UI.BoxCorners",!0);Sys.Extended.UI.RoundedCornersBehavior=function(n){Sys.Extended.UI.RoundedCornersBehavior.initializeBase(this,[n]);this._corners=Sys.Extended.UI.BoxCorners.All;this._radius=5;this._color=null;this._parentDiv=null;this._originalStyle=null;this._borderColor=null;this._isDirty=!0};Sys.Extended.UI.RoundedCornersBehavior.prototype={initialize:function(){Sys.Extended.UI.RoundedCornersBehavior.callBaseMethod(this,"initialize");this.update()},dispose:function(){this.disposeParentDiv();Sys.Extended.UI.RoundedCornersBehavior.callBaseMethod(this,"dispose")},update:function(){var n=this.get_element(),f,s,r,u;if(n&&this._isDirty&&!this.get_isUpdating())if(this.disposeParentDiv(),n.style.borderRadius!=undefined)n.style.borderRadius=this._radius+"px",this._borderColor?(n.style.border="solid",n.style.borderWidth="1px",n.style.borderColor=this._borderColor):(n.style.border="none",n.style.borderWidth="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(n.style.borderTopLeftRadius="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(n.style.borderBottomLeftRadius="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(n.style.borderTopRightRadius="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(n.style.borderBottomRightRadius="0px");else if(n.style.MozBorderRadius!=undefined)n.style.MozBorderRadius=this._radius+"px",this._borderColor?(n.style.border="solid",n.style.borderWidth="1px",n.style.borderColor=this._borderColor):(n.style.border="none",n.style.borderWidth="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(n.style.MozBorderRadiusTopleft="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(n.style.MozBorderRadiusBottomleft="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(n.style.MozBorderRadiusTopright="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(n.style.MozBorderRadiusBottomright="0px");else if(n.style.WebkitBorderRadius!=undefined)n.style.WebkitBorderRadius=this._radius+"px",this._borderColor?(n.style.border="solid",n.style.borderWidth="1px",n.style.borderColor=this._borderColor):(n.style.border="none",n.style.borderWidth="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(n.style.WebkitBorderRadiusTopLeft="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(n.style.WebkitBorderRadiusBottomLeft="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(n.style.WebkitBorderRadiusTopRight="0px"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(n.style.WebkitBorderRadiusBottomRight="0px");else{var v=this.getBackgroundColor(),c=n.offsetWidth,t=n.cloneNode(!1);this.moveChildren(n,t);this._originalStyle=n.style.cssText;n.style.backgroundColor="transparent";n.style.verticalAlign="top";n.style.padding="0";n.style.overflow="";n.style.className="";n.style.height&&n.style.height!="auto"?n.style.height=parseInt($common.getCurrentStyle(n,"height"))+this._radius*2+"px":!n.style.width&&0<c&&(n.style.width=c+"px");t.style.position="";t.style.border="";t.style.margin="";t.style.width="100%";t.style.overflow==""&&$common.getCurrentStyle(n,"overflow")=="visible"&&(t.style.overflow="auto");t.id="";t.removeAttribute("control");this._borderColor?(t.style.borderTopStyle="none",t.style.borderBottomStyle="none",t.style.borderLeftStyle="solid",t.style.borderRightStyle="solid",t.style.borderLeftColor=this._borderColor,t.style.borderRightColor=this._borderColor,t.style.borderLeftWidth="1px",t.style.borderRightWidth="1px",this._radius==0&&(t.style.borderTopStyle="solid",t.style.borderBottomStyle="solid",t.style.borderTopColor=this._borderColor,t.style.borderBottomColor=this._borderColor,t.style.borderTopWidth="1px",t.style.borderBottomWidth="1px")):(t.style.borderTopStyle="none",t.style.borderBottomStyle="none",t.style.borderLeftStyle="none",t.style.borderRightStyle="none");var e=null,h=this._radius,l=this._radius,a=0;for(f=l;f>0;f--){var y=Math.acos(f/h),o=h-Math.round(Math.sin(y)*h),i=document.createElement("DIV");i.__roundedDiv=!0;i.style.backgroundColor=v;i.style.marginLeft=o+"px";i.style.marginRight=o-(this._borderColor?2:0)+"px";i.style.height="1px";i.style.fontSize="1px";i.style.overflow="hidden";this._borderColor&&(i.style.borderLeftStyle="solid",i.style.borderRightStyle="solid",i.style.borderLeftColor=this._borderColor,i.style.borderRightColor=this._borderColor,s=Math.max(0,a-o-1),i.style.borderLeftWidth=s+1+"px",i.style.borderRightWidth=s+1+"px",f==l&&(i.__roundedDivNoBorder=!0,i.style.backgroundColor=this._borderColor));n.insertBefore(i,e);r=i;i=i.cloneNode(!0);i.__roundedDiv=!0;n.insertBefore(i,e);u=i;e=i;a=o;this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(r.style.marginLeft="0",this._borderColor&&(r.style.borderLeftWidth="1px"));this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(r.style.marginRight="0",this._borderColor&&(r.style.borderRightWidth="1px",r.style.marginRight="-2px"));this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(u.style.marginLeft="0",this._borderColor&&(u.style.borderLeftWidth="1px"));this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(u.style.marginRight="0",this._borderColor&&(u.style.borderRightWidth="1px",u.style.marginRight="-2px"))}n.insertBefore(t,e);this._parentDiv=t;this._isDirty=!1}},disposeParentDiv:function(){var n,r,i,t;if(this._parentDiv){for(n=this.get_element(),r=n.childNodes,i=r.length-1;i>=0;i--)if(t=r[i],t){t==this._parentDiv&&this.moveChildren(t,n);try{n.removeChild(t)}catch(n){}}this._originalStyle&&(n.style.cssText=this._originalStyle,this._originalStyle=null);this._parentDiv=null}},getBackgroundColor:function(){return this._color?this._color:$common.getCurrentStyle(this.get_element(),"backgroundColor")},moveChildren:function(n,t){for(var r=0,i;n.hasChildNodes();)i=n.childNodes[0],i=n.removeChild(i),t.appendChild(i),r++;return r},isCornerSet:function(n){return(this._corners&n)!=Sys.Extended.UI.BoxCorners.None},setCorner:function(n,t){t?this.set_Corners(this._corners|n):this.set_Corners(this._corners&~n)},get_Color:function(){return this._color},set_Color:function(n){n!=this._color&&(this._color=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("Color"))},get_Radius:function(){return this._radius},set_Radius:function(n){n!=this._radius&&(this._radius=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("Radius"))},get_Corners:function(){return this._corners},set_Corners:function(n){n!=this._corners&&(this._corners=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("Corners"))},get_BorderColor:function(){return this._borderColor},set_BorderColor:function(n){n!=this._borderColor&&(this._borderColor=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("BorderColor"))}};Sys.Extended.UI.RoundedCornersBehavior.registerClass("Sys.Extended.UI.RoundedCornersBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.RoundedCornersBehavior,{name:"rounded"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedRoundedCorners",["ExtendedBase","ExtendedCommon"],n):n()}(),function(){function t(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.DropShadowBehavior=function(n){Sys.Extended.UI.DropShadowBehavior.initializeBase(this,[n]);this._opacity=1;this._width=5;this._shadowDiv=null;this._trackPosition=null;this._trackPositionDelay=50;this._timer=null;this._tickHandler=null;this._roundedBehavior=null;this._shadowRoundedBehavior=null;this._rounded=!1;this._radius=5;this._lastX=null;this._lastY=null;this._lastW=null;this._lastH=null};Sys.Extended.UI.DropShadowBehavior.prototype={initialize:function(){Sys.Extended.UI.DropShadowBehavior.callBaseMethod(this,"initialize");n=this.get_element();$common.getCurrentStyle(n,"position",n.style.position)!="absolute"&&(n.style.position="relative");this._rounded&&this.setupRounded();this._trackPosition&&this.startTimer();this.setShadow()},dispose:function(){this.stopTimer();this.disposeShadowDiv();Sys.Extended.UI.DropShadowBehavior.callBaseMethod(this,"dispose")},buildShadowDiv:function(){if((n=this.get_element(),this.get_isInitialized()&&n&&this._width)&&n.style.boxShadow==undefined&&n.style.MozBoxShadow==undefined&&n.style.WebkitBoxShadow==undefined){var t=document.createElement("DIV");t.style.backgroundColor="black";t.style.position="absolute";n.id&&(t.id=n.id+"_DropShadow");this._shadowDiv=t;n.parentNode.appendChild(t);this._rounded?(this._shadowDiv.style.height=Math.max(0,n.offsetHeight-2*this._radius)+"px",this._shadowRoundedBehavior?this._shadowRoundedBehavior.set_Radius(this._radius):this._shadowRoundedBehavior=$create(Sys.Extended.UI.RoundedCornersBehavior,{Radius:this._radius},null,null,this._shadowDiv)):this._shadowRoundedBehavior&&this._shadowRoundedBehavior.set_Radius(0);this._opacity!=1&&this.setupOpacity();this.setShadow(!1,!0);this.updateZIndex()}},disposeShadowDiv:function(){this._shadowDiv&&(this._shadowDiv.parentNode&&this._shadowDiv.parentNode.removeChild(this._shadowDiv),this._shadowDiv=null);this._shadowRoundedBehavior&&(this._shadowRoundedBehavior.dispose(),this._shadowRoundedBehavior=null)},onTimerTick:function(){this.setShadow()},startTimer:function(){this._timer||(this._tickHandler||(this._tickHandler=Function.createDelegate(this,this.onTimerTick)),this._timer=new Sys.Timer,this._timer.set_interval(this._trackPositionDelay),this._timer.add_tick(this._tickHandler),this._timer.set_enabled(!0))},stopTimer:function(){this._timer&&(this._timer.remove_tick(this._tickHandler),this._timer.set_enabled(!1),this._timer.dispose(),this._timer=null)},setShadow:function(t,i){var f,r,e,u,o;(n=this.get_element(),this.get_isInitialized()&&n&&(this._width||t))&&(n.style.boxShadow==undefined&&n.style.MozBoxShadow==undefined&&n.style.WebkitBoxShadow==undefined?(f=this._shadowDiv,f||this.buildShadowDiv(),r={x:n.offsetLeft,y:n.offsetTop},(t||this._lastX!=r.x||this._lastY!=r.y||!f)&&(this._lastX=r.x,this._lastY=r.y,u=this.get_Width(),r.x+=u,r.y+=u,$common.setLocation(this._shadowDiv,r)),e=n.offsetHeight,u=n.offsetWidth,(t||e!=this._lastH||u!=this._lastW||!f)&&(this._lastW=u,this._lastH=e,this._rounded&&f&&!i?(this.disposeShadowDiv(),this.setShadow()):(this._shadowDiv.style.width=u+"px",this._shadowDiv.style.height=e+"px")),this._shadowDiv&&(this._shadowDiv.style.visibility=$common.getCurrentStyle(n,"visibility"))):(o=this._opacity==".25"?this._width+"px "+this._width+"px "+this._width+"px #D3D3D3":this._opacity==".5"?this._width+"px "+this._width+"px "+this._width+"px #778899":this._opacity==".75"?this._width+"px "+this._width+"px "+this._width+"px #808080":this._width+"px "+this._width+"px "+this._width+"px #000",n.style.boxShadow!=undefined?n.style.boxShadow=o:n.style.MozBoxShadow!=undefined?n.style.MozBoxShadow=o:n.style.WebkitBoxShadow!=undefined&&(n.style.WebkitBoxShadow=o)))},setupOpacity:function(){this.get_isInitialized()&&this._shadowDiv&&$common.setElementOpacity(this._shadowDiv,this._opacity)},setupRounded:function(){!this._roundedBehavior&&this._rounded&&(this._roundedBehavior=$create(Sys.Extended.UI.RoundedCornersBehavior,null,null,null,this.get_element()));this._roundedBehavior&&this._roundedBehavior.set_Radius(this._rounded?this._radius:0)},updateZIndex:function(){if(this._shadowDiv){var i=this.get_element(),n=i.style.zIndex,t=this._shadowDiv.style.zIndex;t&&n&&n>t||(n=Math.max(2,n),t=n-1,i.style.zIndex=n,this._shadowDiv.style.zIndex=t)}},updateRoundedCorners:function(){this.get_isInitialized()&&(this.setupRounded(),this.disposeShadowDiv(),this.setShadow())},get_Opacity:function(){return this._opacity},set_Opacity:function(n){this._opacity!=n&&(this._opacity=n,this.setShadow(),this.setupOpacity(),this.raisePropertyChanged("Opacity"))},get_Rounded:function(){return this._rounded},set_Rounded:function(n){n!=this._rounded&&(this._rounded=n,this.updateRoundedCorners(),this.raisePropertyChanged("Rounded"))},get_Radius:function(){return this._radius},set_Radius:function(n){n!=this._radius&&(this._radius=n,this.updateRoundedCorners(),this.raisePropertyChanged("Radius"))},get_Width:function(){return this._width},set_Width:function(n){n!=this._width&&(this._width=n,this._shadowDiv&&$common.setVisible(this._shadowDiv,n>0),this.setShadow(!0),this.raisePropertyChanged("Width"))},get_TrackPositionDelay:function(){return this._trackPositionDelay},set_TrackPositionDelay:function(t){t!=this._trackPositionDelay&&(this._trackPositionDelay=t,n||(n=this.get_element()),n.style.boxShadow==undefined&&n.style.MozBoxShadow==undefined&&n.style.WebkitBoxShadow==undefined&&(this._trackPosition&&(this.stopTimer(),this.startTimer()),this.raisePropertyChanged("TrackPositionDelay")))},get_TrackPosition:function(){return this._trackPosition},set_TrackPosition:function(t){t!=this._trackPosition&&(this._trackPosition=t,n||(n=this.get_element()),n.style.boxShadow==undefined&&n.style.MozBoxShadow==undefined&&n.style.WebkitBoxShadow==undefined&&(this.get_element()&&(t?this.startTimer():this.stopTimer()),this.raisePropertyChanged("TrackPosition")))}};Sys.Extended.UI.DropShadowBehavior.registerClass("Sys.Extended.UI.DropShadowBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.DropShadowBehavior,{name:"dropShadow"})}var n=null;window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedDropShadow",["ExtendedBase","ExtendedCommon","ExtendedTimer","ExtendedRoundedCorners"],t):t()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.FilteredTextBoxBehavior=function(n){Sys.Extended.UI.FilteredTextBoxBehavior.initializeBase(this,[n]);this._keypressHandler=null;this._changeHandler=null;this._intervalID=null;this._filterType=Sys.Extended.UI.FilterTypes.Custom;this._filterMode=Sys.Extended.UI.FilterModes.ValidChars;this._validChars=null;this._invalidChars=null;this._filterInterval=250;this.charTypes={};this.charTypes.LowercaseLetters="abcdefghijklmnopqrstuvwxyz";this.charTypes.UppercaseLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZ";this.charTypes.Numbers="0123456789"};Sys.Extended.UI.FilteredTextBoxBehavior.prototype={initialize:function(){var n,t;Sys.Extended.UI.FilteredTextBoxBehavior.callBaseMethod(this,"initialize");n=this.get_element();this._keypressHandler=Function.createDelegate(this,this._onkeypress);$addHandler(n,"keypress",this._keypressHandler);this._changeHandler=Function.createDelegate(this,this._onchange);$addHandler(n,"change",this._changeHandler);t=Function.createDelegate(this,this._intervalCallback);this._intervalID=window.setInterval(t,this._filterInterval)},dispose:function(){var n=this.get_element();$removeHandler(n,"keypress",this._keypressHandler);this._keypressHandler=null;$removeHandler(n,"change",this._changeHandler);this._changeHandler=null;window.clearInterval(this._intervalID);Sys.Extended.UI.FilteredTextBoxBehavior.callBaseMethod(this,"dispose")},_getValidChars:function(){if(this._validChars)return this._validChars;this._validChars="";for(type in this.charTypes){var n=Sys.Extended.UI.FilterTypes.toString(this._filterType);n.indexOf(type)!=-1&&(this._validChars+=this.charTypes[type])}return this._validChars},_getInvalidChars:function(){return this._invalidChars||(this._invalidChars=this.charTypes.Custom),this._invalidChars},_onkeypress:function(n){var t,i;if((n.rawEvent.charCode!=0&&(n.rawEvent.keyCode!=n.rawEvent.which||n.rawEvent.charCode!=undefined)||n.rawEvent.keyCode!=Sys.UI.Key.pageUp&&n.rawEvent.keyCode!=Sys.UI.Key.pageDown&&n.rawEvent.keyCode!=Sys.UI.Key.up&&n.rawEvent.keyCode!=Sys.UI.Key.down&&n.rawEvent.keyCode!=Sys.UI.Key.left&&n.rawEvent.keyCode!=Sys.UI.Key.right&&n.rawEvent.keyCode!=Sys.UI.Key.home&&n.rawEvent.keyCode!=Sys.UI.Key.end&&n.rawEvent.keyCode!=46)&&!n.ctrlKey){if(n.rawEvent.keyIdentifier){if(n.rawEvent.ctrlKey||n.rawEvent.altKey||n.rawEvent.metaKey)return;if(n.rawEvent.keyIdentifier.substring(0,2)!="U+")return;if(t=n.rawEvent.charCode,t==63272)return}else t=n.charCode;t&&t>=32&&(i=String.fromCharCode(t),this._processKey(i)||n.preventDefault())}},_processKey:function(n){var t="",i=!1,r;return(this._filterMode==Sys.Extended.UI.FilterModes.ValidChars?(t=this._getValidChars(),i=t&&t.length>0&&t.indexOf(n)==-1):(t=this._getInvalidChars(),i=t&&t.length>0&&t.indexOf(n)>-1),r=new Sys.Extended.UI.FilteredTextBoxProcessKeyEventArgs(n,Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value(),i),this.raiseProcessKey(r),r.get_allowKey())?!0:(this.raiseFiltered(new Sys.Extended.UI.FilteredTextBoxEventArgs(n)),!1)},_onchange:function(){for(var t=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),u=t.get_Value()||"",i=new Sys.StringBuilder,r,n=0;n<u.length;n++)r=u.substring(n,n+1),this._processKey(r)&&i.append(r);t.get_Value()!=i.toString()&&t.set_Value(i.toString())},_intervalCallback:function(){this._changeHandler()},get_ValidChars:function(){return this.charTypes.Custom},set_ValidChars:function(n){(this._validChars!=null||this.charTypes.Custom!=n)&&(this.charTypes.Custom=n,this._validChars=null,this.raisePropertyChanged("ValidChars"))},get_InvalidChars:function(){return this.charTypes.Custom},set_InvalidChars:function(n){(this._invalidChars!=null||this.charTypes.Custom!=n)&&(this.charTypes.Custom=n,this._invalidChars=null,this.raisePropertyChanged("InvalidChars"))},get_FilterType:function(){return this._filterType},set_FilterType:function(n){(this._validChars!=null||this._filterType!=n)&&(this._filterType=n,this._validChars=null,this.raisePropertyChanged("FilterType"))},get_FilterMode:function(){return this._filterMode},set_FilterMode:function(n){(this._validChars!=null||this._invalidChars!=null||this._filterMode!=n)&&(this._filterMode=n,this._validChars=null,this._invalidChars=null,this.raisePropertyChanged("FilterMode"))},get_FilterInterval:function(){return this._filterInterval},set_FilterInterval:function(n){this._filterInterval!=n&&(this._filterInterval=n,this.raisePropertyChanged("FilterInterval"))},add_processKey:function(n){this.get_events().addHandler("processKey",n)},remove_processKey:function(n){this.get_events().removeHandler("processKey",n)},raiseProcessKey:function(n){var t=this.get_events().getHandler("processKey");t&&t(this,n)},add_filtered:function(n){this.get_events().addHandler("filtered",n)},remove_filtered:function(n){this.get_events().removeHandler("filtered",n)},raiseFiltered:function(n){var t=this.get_events().getHandler("filtered");t&&t(this,n)}};Sys.Extended.UI.FilteredTextBoxBehavior.registerClass("Sys.Extended.UI.FilteredTextBoxBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.FilteredTextBoxBehavior,{name:"filteredTextBox"});Sys.Extended.UI.FilterTypes=function(){throw Error.invalidOperation();};Sys.Extended.UI.FilterTypes.prototype={Custom:1,Numbers:2,UppercaseLetters:4,LowercaseLetters:8};Sys.Extended.UI.FilterTypes.registerEnum("Sys.Extended.UI.FilterTypes",!0);Sys.Extended.UI.FilterModes=function(){throw Error.invalidOperation();};Sys.Extended.UI.FilterModes.prototype={ValidChars:1,InvalidChars:2};Sys.Extended.UI.FilterModes.registerEnum("Sys.Extended.UI.FilterModes",!0);Sys.Extended.UI.FilteredTextBoxProcessKeyEventArgs=function(n,t,i){Sys.Extended.UI.FilteredTextBoxProcessKeyEventArgs.initializeBase(this);this._key=n;this._text=t;this._shouldFilter=i;this._allowKey=!i};Sys.Extended.UI.FilteredTextBoxProcessKeyEventArgs.prototype={get_key:function(){return this._key},get_text:function(){return this._text},get_shouldFilter:function(){return this._shouldFilter},get_allowKey:function(){return this._allowKey},set_allowKey:function(n){this._allowKey=n}};Sys.Extended.UI.FilteredTextBoxProcessKeyEventArgs.registerClass("Sys.Extended.UI.FilteredTextBoxProcessKeyEventArgs",Sys.EventArgs);Sys.Extended.UI.FilteredTextBoxEventArgs=function(n){Sys.Extended.UI.FilteredTextBoxEventArgs.initializeBase(this);this._key=n};Sys.Extended.UI.FilteredTextBoxEventArgs.prototype={get_key:function(){return this._key}};Sys.Extended.UI.FilteredTextBoxEventArgs.registerClass("Sys.Extended.UI.FilteredTextBoxEventArgs",Sys.EventArgs)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedFilteredTextBox",["ExtendedBase","ExtendedCommon"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.HoverMenuBehavior=function(n){Sys.Extended.UI.HoverMenuBehavior.initializeBase(this,[n]);this._hoverBehavior=null;this._popupBehavior=null;this._mouseEnterHandler=null;this._mouseLeaveHandler=null;this._unhoverHandler=null;this._hoverHandler=null;this._inHover=null;this._oldClass=null;this._popupElement=null;this._onShowJson=null;this._onHideJson=null;this._popupElement=null;this._hoverCssClass=null;this._offsetX=0;this._offsetY=0;this._popDelay=100;this._hoverDelay=0;this._popupPosition=null};Sys.Extended.UI.HoverMenuBehavior.prototype={initialize:function(){Sys.Extended.UI.HoverMenuBehavior.callBaseMethod(this,"initialize");this._hoverHandler=Function.createDelegate(this,this._onHover);this._unhoverHandler=Function.createDelegate(this,this._onUnhover);this._mouseEnterHandler=Function.createDelegate(this,this._onmouseover);this._mouseLeaveHandler=Function.createDelegate(this,this._onmouseout);var n=this.get_element();$addHandler(n,"mouseover",this._mouseEnterHandler);$addHandler(n,"mouseout",this._mouseLeaveHandler);this._popupElement&&(this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"_PopupBehavior"},null,null,this._popupElement),this._popupPosition?this._popupBehavior.set_positioningMode(Sys.Extended.UI.HoverMenuPopupPosition.Absolute):this._popupBehavior.set_positioningMode(Sys.Extended.UI.HoverMenuPopupPosition.Center),this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson),this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson),this._hoverBehavior=$create(Sys.Extended.UI.HoverBehavior,{id:this.get_id()+"_HoverBehavior",hoverDelay:this._hoverDelay,unhoverDelay:this._popDelay,hoverElement:this._popupElement},null,null,n),this._hoverBehavior.add_hover(this._hoverHandler),this._hoverBehavior.add_unhover(this._unhoverHandler))},dispose:function(){this._onShowJson=null;this._onHideJson=null;this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null);this._popupElement&&(this._popupElement=null);this._mouseEnterHandler&&$removeHandler(this.get_element(),"mouseover",this._mouseEnterHandler);this._mouseLeaveHandler&&$removeHandler(this.get_element(),"mouseout",this._mouseLeaveHandler);this._hoverBehavior&&(this._hoverHandler&&(this._hoverBehavior.remove_hover(this._hoverHandler),this._hoverHandler=null),this._unhoverHandler&&(this._hoverBehavior.remove_hover(this._unhoverHandler),this._unhoverHandler=null),this._hoverBehavior.dispose(),this._hoverBehavior=null);Sys.Extended.UI.HoverMenuBehavior.callBaseMethod(this,"dispose")},_getLeftOffset:function(){var t=$common.getLocation(this.get_element()).x,i=$common.getLocation(this.get_popupElement().offsetParent).x,n=0;switch(this._popupPosition){case Sys.Extended.UI.HoverMenuPopupPosition.Left:n=-1*this._popupElement.offsetWidth;break;case Sys.Extended.UI.HoverMenuPopupPosition.Right:n=this.get_element().offsetWidth}return n+t-i+this._offsetX},_getTopOffset:function(){var t=$common.getLocation(this.get_element()).y,i=$common.getLocation(this.get_popupElement().offsetParent).y,n=0;switch(this._popupPosition){case Sys.Extended.UI.HoverMenuPopupPosition.Top:n=-1*this._popupElement.offsetHeight;break;case Sys.Extended.UI.HoverMenuPopupPosition.Bottom:n=this.get_element().offsetHeight}return t-i+n+this._offsetY},_onHover:function(){if(!this._inHover){var n=new Sys.CancelEventArgs;(this.raiseShowing(n),n.get_cancel())||(this._inHover=!0,this.populate(),this._popupBehavior.show(),$common.getCurrentStyle(this._popupElement,"display")=="none"&&(this._popupElement.style.display="block"),this._popupBehavior.set_x(this._getLeftOffset()),this._popupBehavior.set_y(this._getTopOffset()),this.raiseShown(Sys.EventArgs.Empty))}},_onUnhover:function(){var n=new Sys.CancelEventArgs;(this.raiseHiding(n),n.get_cancel())||(this._inHover=!1,this._resetCssClass(),this._popupBehavior.hide(),this.raiseHidden(Sys.EventArgs.Empty))},_onmouseover:function(){var n=this.get_element();this._hoverCssClass&&n.className!=this._hoverCssClass&&(this._oldClass=n.className,n.className=this._hoverCssClass)},_onmouseout:function(){this._resetCssClass()},_resetCssClass:function(){var n=this.get_element();!this._inHover&&this._hoverCssClass&&n.className==this._hoverCssClass&&(n.className=this._oldClass)},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_popupElement:function(){return this._popupElement},set_popupElement:function(n){this._popupElement!=n&&(this._popupElement=n,this.get_isInitialized()&&this._hoverBehavior&&this._hoverBehavior.set_hoverElement(this._popupElement),this.raisePropertyChanged("popupElement"))},get_HoverCssClass:function(){return this._hoverCssClass},set_HoverCssClass:function(n){this._hoverCssClass!=n&&(this._hoverCssClass=n,this.raisePropertyChanged("HoverCssClass"))},get_OffsetX:function(){return this._offsetX},set_OffsetX:function(n){this._offsetX!=n&&(this._offsetX=n,this.raisePropertyChanged("OffsetX"))},get_OffsetY:function(){return this._offsetY},set_OffsetY:function(n){this._offsetY!=n&&(this._offsetY=n,this.raisePropertyChanged("OffsetY"))},get_PopupPosition:function(){return this._popupPosition},set_PopupPosition:function(n){this._popupPosition!=n&&(this._popupPosition=n,this.raisePropertyChanged("PopupPosition"))},get_PopDelay:function(){return this._popDelay},set_PopDelay:function(n){this._popDelay!=n&&(this._popDelay=n,this.raisePropertyChanged("PopDelay"))},get_HoverDelay:function(){return this._hoverDelay},set_HoverDelay:function(n){this._hoverDelay!=n&&(this._hoverDelay=n,this.raisePropertyChanged("HoverDelay"))},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(n){var t=this.get_events().getHandler("shown");t&&t(this,n)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)}};Sys.Extended.UI.HoverMenuBehavior.registerClass("Sys.Extended.UI.HoverMenuBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.HoverMenuBehavior,{name:"hoverMenu"});Sys.Extended.UI.HoverMenuPopupPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.HoverMenuPopupPosition.prototype={Center:0,Top:1,Left:2,Bottom:3,Right:4};Sys.Extended.UI.HoverMenuPopupPosition.registerEnum("Sys.Extended.UI.HoverMenuPopupPosition")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedHoverMenu",["ExtendedDynamicPopulate","ExtendedHover","ExtendedAnimationBehavior","ExtendedPopup"],n):n()}(),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,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*\))/ig,r)}catch(u){}return i},Sys.Extended.UI.HTMLEditor._getScrollTop=function(n){var t=n.document,i=0;return typeof n.pageYOffset=="number"&&(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 typeof n.pageXOffset=="number"?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;window.theForm!=null&&typeof theForm!="undefined"&&((i.HTMLEditor_editPanels==null||typeof i.HTMLEditor_editPanels=="undefined")&&(i.originalOnSubmit_HTMLEditor=window.theForm.onsubmit,i.HTMLEditor_editPanels=[],window.theForm.onsubmit=Sys.Extended.UI.HTMLEditor.EditPanelsOnSubmit,window.__doPostBack!=null&&typeof __doPostBack!="undefined"&&(window.__doPostBack_HTMLEditor_original==null||typeof __doPostBack_HTMLEditor_original=="undefined")&&(window.__doPostBack_HTMLEditor_original=window.__doPostBack,window.__doPostBack=Sys.Extended.UI.HTMLEditor.EditPanelsOnPostBack),window.ValidatorGetValue!=null&&typeof ValidatorGetValue!="undefined"&&(window.ValidatorGetValue_HTMLEditor_original==null||typeof ValidatorGetValue_HTMLEditor_original=="undefined")&&(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(window.theForm!=null&&typeof theForm!="undefined"&&(f=t.originalOnSubmit_HTMLEditor,t.HTMLEditor_editPanels!=null&&typeof t.HTMLEditor_editPanels!="undefined")){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;t.HTMLEditor_editPanels.length==0&&(window.theForm.onsubmit=f,t.originalOnSubmit_HTMLEditor=null,t.HTMLEditor_editPanels=null,window.__doPostBack_HTMLEditor_original!=null&&typeof __doPostBack_HTMLEditor_original!="undefined"&&(window.__doPostBack=window.__doPostBack_HTMLEditor_original,window.__doPostBack_HTMLEditor_original=null),window.ValidatorGetValue_HTMLEditor_original!=null&&typeof ValidatorGetValue_HTMLEditor_original!="undefined"&&(window.ValidatorGetValue=window.ValidatorGetValue_HTMLEditor_original,window.ValidatorGetValue_HTMLEditor_original=null))}},Sys.Extended.UI.HTMLEditor.EditPanelsOnSubmit=function(n){for(var t=window.theForm,r=!0,i=0;i<t.HTMLEditor_editPanels.length;i++)if(r=t.HTMLEditor_editPanels[i].handler(n),!r)break;if(r&&t.originalOnSubmit_HTMLEditor!=null&&typeof t.originalOnSubmit_HTMLEditor!="undefined"&&(r=t.originalOnSubmit_HTMLEditor(n)),!r||!window.Page_IsValid)for(i=0;i<t.HTMLEditor_editPanels.length;i++)t.HTMLEditor_editPanels[i].editPanel._contentPrepared=!1;return r},Sys.Extended.UI.HTMLEditor.ValidatorGetValue=function(n){var i=$find(n),t,r;return i!=null&&(t=null,Sys.Extended.UI.HTMLEditor.Editor.isInstanceOfType(i)?t=i.get_editPanel():Sys.Extended.UI.HTMLEditor.EditPanel.isInstanceOfType(i)&&(t=i),t!=null)?(r=t._contentForValidation,(r==null||typeof r=="undefined")&&(r=t.get_content()),r):window.ValidatorGetValue_HTMLEditor_original(n)},Sys.Extended.UI.HTMLEditor.EditPanelsOnPostBack=function(n,t){for(var r=window.theForm,u,i=0;i<r.HTMLEditor_editPanels.length;i++)if(u=r.HTMLEditor_editPanels[i].handler(null),!u)return!1;return window.__doPostBack_HTMLEditor_original!=null&&typeof __doPostBack_HTMLEditor_original!="undefined"?window.__doPostBack_HTMLEditor_original(n,t):!0},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(/&/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));(t=="src"||t=="href")&&(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,s,c,h,l,f=n.childNodes.length,i=0;i<n.childNodes.length;i++)if(t=n.childNodes.item(i),t.nodeType==1)if(t.tagName.indexOf("/")>=0)i--,t.parentNode.removeChild(t);else{var r=t.tagName.toLowerCase(),a=!1,v=Sys.Extended.UI.HTMLEditor.enabledWordTags.length;for(e=0;e<v;e++)if(Sys.Extended.UI.HTMLEditor.enabledWordTags[e]==r){a=!0;break}if(u(t),a){o=t.style.backgroundColor;s=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(y){}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(y){}if(r=="table"&&(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=o,t.style.color=s),r=="td"&&(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=o,t.style.color=s),r=="font"||r=="span"){for(t.style.backgroundColor=o,t.style.color=s,c=t.attributes,f=0,h=0;h<c.length;++h)(l=c.item(h),l.specified)&&f++;if(f==0&&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)+?-->/ig,"").replace(/(<[\/]?)(?:o|v|x|p|w|\?xml):(\w+)([^>]*?>)/ig,"$1$2$3").replace(/<(IMAGEDATA)([^>]*?)>/ig,"<img$2>").replace(/<p[^>]*><p> <\/p><\/p>/ig,"<br>").replace(/<p[^>]*?\/>/ig,"").replace(/<(p|div)[^>]*?> <\/(\1)[^>]*?>/ig,"").replace(/<(p|div)[^>]*?><\/(\1)[^>]*?>/ig,""),i;do r=t,t=t.replace(/<([^>]*)(?:class|size|lang|face|start|type|border|[ovwxp]:\w+)=(?:\'[^\']*\'|\"[^\"]*\"|[^> ]+)([^>]*)>/ig,"<$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)[^>]*?>/ig,"").replace(/<(p|div)[^>]*?>/ig,"").replace(/<\/(p|div)[^>]*?>/ig,"<br>");do r=t,t=t.replace(/<b><\/b>/ig,"").replace(/<i><\/i>/ig,"").replace(/<u><\/u>/ig,"").replace(/<strong><\/strong>/ig,"").replace(/<em><\/em>/ig,"").replace(/<sub><\/sub>/ig,"").replace(/<sup><\/sup>/ig,""),t=t.replace(/<span[^>]*?><\/span>/ig,"").replace(/<span>([^<]+?)<\/span>/ig,"$1"),t=t.replace(/<font[^>]*?><\/font>/ig,"").replace(/<font>([^<]+?)<\/font>/ig,"$1");while(t!=r);return t=t.replace(/’/g,"'").replace(/‘/g,"'").replace(/–/g,"-").replace(/—/g,"-").replace(/…/g,"...").replace(/"/g,'"').replace(/“/g,'"').replace(/”/g,'"').replace(//g,"").replace(/•/g,"").replace(/[ \s]+/g," ").replace(/(( )+)/g," "),document.all&&(t=t.replace(/^[\x00-\x1F]* /,"")),t},Sys.Extended.UI.HTMLEditor.spanJoiner=function(n,t,i,r,u){var y=0,h=n.childNodes.length,c,f,p,w,a,o,b,e,l,s;for(typeof i!="undefined"&&i!=null&&(y=i),typeof r!="undefined"&&r!=null&&(h=r),c=y;c<h&&c<n.childNodes.length;c++)if(f=n.childNodes.item(c),f.parentNode==n)switch(f.nodeType){case 1:if(f.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName)&&f.tagName.toUpperCase()!="A"&&!(f.className.length>0||f.getAttribute("class")&&f.getAttribute("class").length>0)&&!Sys.Extended.UI.HTMLEditor.isTempElement(f)){n.removeChild(f);c--;h--;continue}if(f.tagName.toUpperCase()=="SPAN"){while(f.childNodes.length==1&&f.firstChild.nodeType==1){if(f.firstChild.tagName.toUpperCase()!="SPAN"||Sys.Extended.UI.HTMLEditor.isTempElement(f.firstChild))f.firstChild.tagName.toUpperCase()=="SPAN"&&Sys.Extended.UI.HTMLEditor.isTempElement(f.firstChild)&&(w=f.firstChild,f.parentNode.insertBefore(f.firstChild,f),f.parentNode.removeChild(f),f=w);else{for(var l=Sys.Extended.UI.HTMLEditor.differAttr(f.firstChild,[]),s=Sys.Extended.UI.HTMLEditor.differStyle(f.firstChild),v=f.firstChild,k=v.childNodes;v.firstChild!=null;)f.insertBefore(v.firstChild,v);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{p=f.style[s[e][0]];f.style[s[e][0]]=f.style[s[e][0]]+" "+s[e][1];p==f.style[s[e][0]]&&(f.style[s[e][0]]=s[e][1])}catch(d){f.style[s[e][0]]=s[e][1]}else f.style[s[e][0]]=s[e][1]}catch(g){}for(e=0;e<l.length;e++)l[e][1]&&f.setAttribute(l[e][0],l[e][1]);f.removeChild(v);continue}break}for(a=[],o=f.nextSibling;!Sys.Extended.UI.HTMLEditor.isTempElement(f)&&o&&c+1<h&&(o.nodeType==3||o.nodeType==1&&(o.tagName.toUpperCase()=="SPAN"||o.tagName.toUpperCase()=="BR"&&typeof u=="undefined")&&!Sys.Extended.UI.HTMLEditor.isTempElement(o));)if(o.nodeType==3)if((""+o.data+"").length==0)o.parentNode.removeChild(o),o=f.nextSibling,h--;else break;else if(o.tagName.toUpperCase()=="BR")a.push(o),o=o.nextSibling;else if(l=Sys.Extended.UI.HTMLEditor.differAttr(f,[],o),s=Sys.Extended.UI.HTMLEditor.differStyle(f,o),l.length==0&&s.length==0&&f.className==o.className){for(b=a.length,e=0;e<b;e++)f.appendChild(a[e]),h--;for(a=[];o.firstChild;)f.appendChild(o.firstChild);o.parentNode.removeChild(o);o=f.nextSibling;h--}else break;if(!Sys.Extended.UI.HTMLEditor.isTempElement(f)&&f.className.length==0&&(l=Sys.Extended.UI.HTMLEditor.differAttr(f,[]),s=Sys.Extended.UI.HTMLEditor.differStyle(f),l.length==0&&s.length==0)){for(c--,h--;f.firstChild;)f.parentNode.insertBefore(f.firstChild,f),h++;f.parentNode.removeChild(f);continue}}if(f.parentNode!=null)if(f.childNodes.length!=0||!Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName)||f.tagName.toUpperCase()=="A"||f.className.length>0||f.getAttribute("class")&&f.getAttribute("class").length>0||Sys.Extended.UI.HTMLEditor.isTempElement(f))Sys.Extended.UI.HTMLEditor.spanJoiner(f,t);else{n.removeChild(f);c--;h--;continue}}},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?!0:!1},Sys.Extended.UI.HTMLEditor.differAttr=function(n,t,i){var s=[],u=n.parentNode,f,r,h,e,o;if(typeof i!="undefined"&&(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(r=n.attributes[f],h=!1,e=0;e<t.length;e++)if(r.name.toUpperCase()==t[e].toUpperCase()){h=!0;break}if(!h&&r.name.toUpperCase()!="STYLE"&&r.name.toUpperCase().substr(0,4)!="_MOZ"&&r.specified)if(u&&u.attributes&&u.attributes[r.name])o=u.attributes[r.name],o&&(r.name!=o.name||r.value!=o.value)&&s.push([r.name,r.value]);else{if(r.name.toUpperCase()=="CLASS"&&r.value=="")continue;s.push([r.name,r.value])}}return s},Sys.Extended.UI.HTMLEditor.differStyle=function(n,t){function o(n,t){var r,i;if(t=""+t,n.toLowerCase()=="textdecoration")for(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;typeof t!="undefined"&&(f=t);f&&f.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName)||(f=null);for(r in n.style)if(r&&typeof r=="string"&&r!="accelerator"){if(i=r,!isNaN(parseInt(r))){if(!Sys.Extended.UI.HTMLEditor.isSafari)continue;i=n.style[r]}u=n.style[i];u&&typeof u=="string"&&u!="accelerator"&&(f&&f.style?(e=f.style[i],i.toLowerCase()!="csstext"&&i.toLowerCase()!="length"&&u!=e&&o(i,u)):i.toLowerCase()!="csstext"&&i.toLowerCase()!="length"&&o(i,u))}if(typeof t!="undefined")for(r in f.style)if(r&&typeof r=="string"&&r!="accelerator"){if(i=r,!isNaN(parseInt(r))){if(!Sys.Extended.UI.HTMLEditor.isSafari)continue;i=n.style[r]}u=f.style[i];u&&typeof u=="string"&&u!="accelerator"&&(e=n.style[i],r.toLowerCase()!="csstext"&&i.toLowerCase()!="length"&&u!=e&&o(i,u))}return s},Sys.Extended.UI.HTMLEditor.brXHTML=function(n){return n.replace(/<br>/ig,"<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(/&/ig,"&").replace(/</ig,"<").replace(/>/ig,">").replace(/\"/ig,""").replace(/\xA0/ig," ")},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&&n.style.display.toLowerCase()=="inline")return!0;if(r=n.tagName.toUpperCase(),r.length==2&&r.substr(0,1)=="H"&&parseInt(r.substr(1,1))>0)return!1;switch(r){case"TBODY":case"TR":case"TD":if(typeof t!="undefined"){for(i=n.parentNode;i&&i.tagName&&i.tagName.toUpperCase()!="TABLE";)i=i.parentNode;if(i.tagName.toUpperCase()=="TABLE"&&i.style&&i.style.display&&i.style.display.toLowerCase()=="inline")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(r){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,""")}return t},Sys.Extended.UI.HTMLEditor.getHTML=function(n,t,i){try{if(typeof i=="undefined")if(t||n.nodeType!=1){if(t&&n.nodeType==1&&Sys.Extended.UI.HTMLEditor.isIE)return n.outerHTML}else return n.innerHTML}catch(u){}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){var h,l,y,e,f,p,c,w,b,v,a,u,o,r,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,f=="embed")return;while(h!=null){if(h.nodeType==t.nodeType&&h.tagName&&h.tagName.toLowerCase()==f){n.append("<\/teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":"+t.tagName.toLowerCase().substr(t.tagName.indexOf("/")+1)+">");return}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&&typeof t.scopeName!="undefined"&&(p=t.scopeName.toUpperCase()=="HTML"?"":t.scopeName+":"),Sys.Extended.UI.HTMLEditor.isIE&&(l||f=="placeholder")&&!Sys.Extended.UI.HTMLEditor._noNeedsClosingTag(t)&&f!="embed")for(c=t.nextSibling;c!=null;){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?"teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":":p)+f),Sys.Extended.UI.HTMLEditor.isIE&&t.name&&t.name.length>0&&n.append(' name="'+t.name.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.value&&t.value.length>0&&f!="textarea"&&n.append(' value="'+t.value.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.className&&t.className.length>0&&n.append(' class="'+t.className.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.align&&t.align.length>0&&n.append(' align="'+t.align.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.color&&t.color.length>0&&n.append(' color="'+t.color.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.size&&t.size.length>0&&t.size!="+0"&&n.append(' size="'+t.size.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.shape&&t.shape.length>0&&n.write(' shape="'+t.shape.replace(/\"/g,""")+'"'),Sys.Extended.UI.HTMLEditor.isIE&&t.coords&&t.coords.length>0&&n.write(' coords="'+t.coords.replace(/\"/g,""")+'"'),b=t.attributes,v=null,e=0;e<b.length;++e)if((a=b.item(e),a.specified)&&(u=a.name.toLowerCase(),u.substr(0,4)!="_moz")&&u!="teoalign"){if(u!="style")if(u=="width")r=t.width,Sys.Extended.UI.HTMLEditor.isIE&&r==0&&(o=0,t.outerHTML.replace(new RegExp("^(?:<[^>]*?width=)([\\d]+)","ig"),function(n,t){o=t}),r!=o&&(r=o));else if(u=="height")r=t.height,Sys.Extended.UI.HTMLEditor.isIE&&r==0&&(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&&u=="name"&&t.name&&t.name.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="value"&&t.value&&t.value.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="align"&&t.align&&t.align.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="class"&&t.className&&t.className.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="color"&&t.color&&t.color.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="size"&&t.size&&t.size.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="shape"&&t.shape&&t.shape.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&u=="coords"&&t.coords&&t.coords.length>0)continue;else if(f=="embed"&&u=="align"&&Sys.Extended.UI.HTMLEditor.isIE)r=Sys.Extended.UI.HTMLEditor.convertAlign(a.value);else{if(r=a.value,Sys.Extended.UI.HTMLEditor.isSafari&&u=="class"&&/apple-style/ig.test(r))continue;(u=="src"||u=="href")&&(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,""")}else{Sys.Extended.UI.HTMLEditor.isSafari&&(v=a.value);continue}s='"';(""+r+"").indexOf('"')>=0&&(s="'");u!=null&&n.append(" "+u+"="+s+r+s)}if(t.style.cssText.length>0||v!=null){var u="style",d=/(url\((?:[^\)]*)\))/ig,g=[];function nt(n,t){g.push(t)}r=(v!=null?v:t.style.cssText).toLowerCase();r.replace(d,nt);k=0;function tt(){var n=g[k];return k++,n}if(r=Sys.Extended.UI.HTMLEditor.tryReplaceRgb(r.replace(d,tt)).replace(/(font-weight\s*:\s*)(700)/ig,"$1bold").replace(/([\s]*-moz-[^;]*[;][\s]*)/ig,"").replace(/(-moz-.*)$/i,"").replace(/(background-position: 0% 0%[;]*[\s]*)/ig,""),Sys.Extended.UI.HTMLEditor.isSafari){function it(n,t,i,r){return t+i.replace(/(,)/g,"")+r}r=r.replace(/(text-decoration:)([^;$]+)([;$])/ig,it)}if(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera){function rt(n,t,i,r){return t+i.replace(/(['"])/g,"")+r}r=r.replace(/(font-family:)([^;]+)([;]*)/ig,rt)}r.length>0&&(s='"',(""+r+"").indexOf('"')>=0&&(s="'"),n.append(" "+u+"="+s+r+s))}n.append(l?" />":">");f=="br"&&n.append("\n")}if(t.tagName&&t.tagName.toUpperCase()=="SCRIPT"&&n.append(t.text),t.tagName&&t.tagName.toUpperCase()=="STYLE")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;n!=null;){try{if(i=null,n.contentEditable==null||typeof n.contentEditable=="undefined"||Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera?(r=n.getAttribute("contenteditable"),typeof r=="boolean"?i=r:typeof r=="string"&&r.toLowerCase()=="false"&&(i=!1)):i=n.contentEditable&&n.contentEditable!="false"?!0:!1,i!=null&&typeof i=="boolean"&&!i)return n}catch(u){}if(typeof t!="undefined"&&t)return null;if(n.tagName!=null&&typeof n.tagName!="undefined"&&(n.tagName.toUpperCase()=="BODY"||n.tagName.toUpperCase()=="HTML"))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=r.type.toLowerCase()=="control"?i.item(0):n._getParent(i):(t=n._getParent(i),t.nodeType!=3&&i.startContainer==i.endContainer&&(u=t,t=t.childNodes.item(i.startOffset),t==null&&(t=u))),t},Sys.Extended.UI.HTMLEditor.__getIndex=function(n){var t=0;if(n.parentNode)for(;t<n.parentNode.childNodes.length;t++)if(n.parentNode.childNodes.item(t)==n)break;return t},Sys.Extended.UI.HTMLEditor.isInlineElement=function(n){if(n.nodeType==3)return!0;if(n.nodeType!=1||!n.tagName||n.tagName.length==0)return!1;if(n&&n.style&&n.style.display&&n.style.display.toLowerCase()=="inline")return!0;var t=n.tagName.toUpperCase();if(t.length==2&&t.substr(0,1)=="H"&&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:t==16?!0:!1;return t>=65&&t<=90&&!i||t>=97&&t<=122&&i?!0:!1},Sys.Extended.UI.HTMLEditor.operateAnchors=function(n,t,i){for(var h=t.getElementsByTagName("A"),c=!1,r,e,o,u,f,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),u.nodeType==1&&u.tagName&&u.tagName.toUpperCase()=="IMG"&&u.src==n._editPanel.get_imagePath_anchor()&&(e.push(u),c=!0);while(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,o,f,r,u,a,s,h;if(i){for(o=t.getElementsByTagName("IMG"),f=[],r=0;r<o.length;r++)f.push(o[r]);for(r=0;r<f.length;r++)u=f[r],c=u.getAttribute("dummytag"),c&&c.length>0&&c.toLowerCase()=="placeholder"&&(l=t.createElement("PLACEHOLDER"),e=u.title,(e==null||typeof e=="undefined")&&(e=u.getAttribute("title")),l.name=e,l.setAttribute("name",e),u.parentNode.insertBefore(l,u),u.parentNode.removeChild(u),v=!0)}else{for(o=t.getElementsByTagName("PLACEHOLDER"),f=[],r=0;r<o.length;r++)f.push(o[r]);for(r=0;r<f.length;r++){u=f[r];a=!0;try{u.childNodes.length>0&&(a=!1)}catch(y){}a&&(s=u.name,(s==null||typeof s=="undefined")&&(s=u.getAttribute("name")),h=t.createElement("IMG"),h.title=s,h.src=n._editPanel.get_imagePath_placeHolder(),h.setAttribute("dummytag","placeholder"),h.setAttribute("title",s),u.parentNode.insertBefore(h,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(r){}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 c=n.innerHTML,l=!1,a,o,i,f,s,r,h,e,u=0;u<Sys.Extended.UI.HTMLEditor.replacingRules.length;u++)if(a=new RegExp("<"+Sys.Extended.UI.HTMLEditor.replacingRules[u][0]+"[s>]","ig"),a.test(c)){l=!0;break}if(l||/<font[\s>]/ig.test(c))for(o=0;o<n.childNodes.length;o++)if(i=n.childNodes.item(o),i.nodeType==1){for(f=null,s=i.tagName.toLowerCase(),u=0;u<Sys.Extended.UI.HTMLEditor.replacingRules.length;u++)if(Sys.Extended.UI.HTMLEditor.replacingRules[u][0].toLowerCase()==s){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(s=="font"){for(r=t._doc.createElement("SPAN"),h=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),h)if(e=t._doc.createElement("FONT"),e.size=h,n.insertBefore(e,r),r.style.cssText.length>0)e.appendChild(r),i=r;else{while(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(n.nodeType==1)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,i.type.toLowerCase()=="control")try{for(r=t.item(0),this._tree=[];r&&(r.nodeType==3||!r.tagName||r.tagName.toUpperCase()!="BODY");){for(u=0;r.previousSibling;)u++,r=r.previousSibling;this._tree.push(u);r=r.parentNode}}catch(f){}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&&r.nodeType==1&&r.tagName.toUpperCase()=="HTML"&&(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(u){}},0));r&&r.nodeType&&(r.nodeType==3||!r.tagName||r.tagName.toUpperCase()!="BODY");){for(u=0;r.previousSibling;)u++,Sys.Extended.UI.HTMLEditor.isOpera&&r.nodeType==3&&r.previousSibling!=null&&r.previousSibling.nodeType==3&&u--,r=r.previousSibling;this._tree.push(u);r=r.parentNode}}catch(f){}}},Sys.Extended.UI.HTMLEditor.__stackMaxSize=30,Sys.Extended.UI.HTMLEditor.getNames=function(n){for(var f=n.all,e=[],o=[],t,i,u=0;u<f.length;u++)if(t=f[u],t.name&&t.name.length>0){var r=t.tagName,s=n.getElementsByTagName(r),h=0;for(i=0;i<s.length;i++)if(s[i]==t){h=i;break}o[r]=h;e.push([r,o[r],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 i,r=0;r<n.childNodes.length;r++)if((i=n.childNodes.item(r),i==t)||i.nodeType==1&&Sys.Extended.UI.HTMLEditor._lookChild(i,t)>=0)return r;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 r,f,i,e,u=0;u<t.length;u++)for(r=n.getElementsByTagName(t[u][0]),f=1,i=0;i<r.length;i++)r[i].href&&(t[u][f]&&t[u][f].length>0&&(Sys.Extended.UI.HTMLEditor.isIE&&(e=r[i].innerHTML),r[i].href=t[u][f].replace(/&/ig,"&"),Sys.Extended.UI.HTMLEditor.isIE&&(r[i].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=")(.*?)(")((?:.*?)>)/ig,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(/&/ig,"&")),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 r=n,e,f,u,i;if(Sys.Extended.UI.HTMLEditor.isIE){u=t._getSelection();i=t._createRange(u);u.type.toLowerCase()=="control"&&(i.remove(0),u.empty(),i=t._createRange());e=r.nodeType==3;e&&(f=t._doc.createElement("SPAN"),f.innerHTML=" ",r.parentNode.insertBefore(f,r),r=f);var o=$common.getLocation(r),s=o.x,h=o.y;e&&f.parentNode.removeChild(f);try{i.moveToPoint(s,h)}catch(c){}i.select()}else u=t._getSelection(),i=t._createRange(),i.setStart(r,0),i.setEnd(r,0),t._removeAllRanges(u),t._selectRange(u,i),t.focusEditor()},Sys.Extended.UI.HTMLEditor.myClone=function(n,t,i){var r,u;if(Sys.Extended.UI.HTMLEditor.isIE&&n.tagName&&(n.tagName.toUpperCase()=="EMBED"||n.tagName.toUpperCase()=="OBJECT")){u=t.createElement("DIV");try{u.innerHTML=n.outerHTML;r=u.firstChild}catch(f){r=n}delete u}else r=n.cloneNode(i);return r},Sys.Extended.UI.HTMLEditor.unStyle=function(n){var t=n.parentNode!=null&&typeof n.parentNode!="undefined"?n.parentNode:null,i,s,r;if(t){for(i=null;t&&t.tagName&&t.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(t.tagName)&&t.tagName.toUpperCase()!="A";)i=t,t=t.parentNode;if(i){function o(n,t,r,u,f){var e=r.cloneNode(!1),h,v,l,c,a,s;if(n)if(n.push&&typeof n.push=="function")for(h=0;h<n.length;h++)e.appendChild(n[h]);else e.appendChild(n);if(f)e.appendChild(t);else while(t)v=u?t.previousSibling:t.nextSibling,(t.nodeType==1||t.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+t.data+"").length>0)&&(t.nodeType==1&&t.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(t.tagName)&&t.childNodes.length==0&&!Sys.Extended.UI.HTMLEditor.isTempElement(t)&&(t=null),t&&(e.childNodes.length!=0&&u?e.insertBefore(t,e.firstChild):e.appendChild(t))),t=v;if(e.childNodes.length==0)delete e,e=null;else if(e.childNodes.length==1&&e.firstChild.nodeType==3&&(""+e.firstChild.data+"").length==0)delete e,e=null;else if(!f&&e.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(e)){for(l=e.childNodes.length,c=0;c<e.childNodes.length;c++)s=e.childNodes.item(c),s.nodeType==1&&s.tagName&&!Sys.Extended.UI.HTMLEditor.isStyleTag(s.tagName)&&(s.tagName.toUpperCase()=="BR"||s.tagName.toUpperCase()=="TABLE"||Sys.Extended.UI.HTMLEditor.isTempElement(s))&&l--;if(l==0){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)}t=n.parentNode;n.previousSibling==null&&n.nextSibling==null&&t&&t.tagName&&t.tagName.toUpperCase()!="BODY"&&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&&typeof f.push=="function")for(r=0;r<f.length;r++)u.insertBefore(f[r],i);else u.insertBefore(f,i);if(n.nodeType==1&&n.tagName&&(n.tagName.toUpperCase()=="BR"||n.tagName.toUpperCase()=="TABLE"||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&&typeof e.push=="function")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?!0:!1},Sys.Extended.UI.HTMLEditor._moveTagsUp=function(n,t){function r(n){var t,i;if(Sys.Extended.UI.HTMLEditor.isInlineElement(n)&&n.nodeType!=3){if(n.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(n.tagName)&&n.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(n))for(t=n.firstChild;t!=null;)i=t.nextSibling,r(t),t=i}else Sys.Extended.UI.HTMLEditor.unStyle(n)}for(var i=n,u;i!=null&&i!=t;)u=i.nextSibling,r(i),i=u},Sys.Extended.UI.HTMLEditor._commonTotalParent=function(n,t){for(var i=n.parentNode,e=n,u,f,r;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 i=n.parentNode,e=n,u,f,r;i&&i.tagName.toUpperCase()!="BODY"&&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(f!=null)return f;if(r.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(r.tagName)&&r.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(r))t=i?r.previousSibling:r.nextSibling,r=r.parentNode;else return i&&r.firstChild!=null?r.insertBefore(n,r.firstChild):r.appendChild(n),n}},Sys.Extended.UI.HTMLEditor.positionInParagraphLevel=function(n,t,i,r){for(var s,u,e,f,h,o;t;){if(s=i?t.previousSibling:t.nextSibling,Sys.Extended.UI.HTMLEditor.isInlineElement(t)){if(typeof r=="function"&&t.nodeType==3){if(e=""+t.data+"",i){for(u=e.length-1;u>=0;u--)if(r(e.substr(u,1)))break}else for(u=0;u<e.length;u++)if(r(e.substr(u,1)))break;if(u>=0&&u<e.length)return f=t.parentNode,(u>0||i&&u==0)&&(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}}else return f=t.parentNode,i?t.nextSibling?f.insertBefore(n,t.nextSibling):f.appendChild(n):f.insertBefore(n,t),n;if(t=i?t.lastChild:t.firstChild,t&&(o=Sys.Extended.UI.HTMLEditor.positionInParagraphLevel(n,t,i,r),o!=null))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&&n.scopeName.toUpperCase()!="HTML"?!0:!1},Sys.Extended.UI.HTMLEditor.jsDocument=function(n){this.noExtraLf=typeof n!="undefined"&&n;this.text=[];this.write=function(n){(!this.noExtraLf||this.text.length==0&&n!="\n"||this.text.length>0&&(this.text[this.text.length-1]!="\n"||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 t.length==2&&t.substr(0,1)=="H"&&parseInt(t.substr(1,1))>0?!0:!1},Sys.Extended.UI.HTMLEditor._getReallyFirst=function(n){return typeof n.firstChild!="undefined"&&n.firstChild!=null&&typeof n.firstChild.childNodes!="undefined"&&n.firstChild.childNodes!=null?Sys.Extended.UI.HTMLEditor._getReallyFirst(n.firstChild):n},Sys.Extended.UI.HTMLEditor._getReallyLast=function(n){return typeof n.lastChild!="undefined"&&n.lastChild!=null&&typeof n.lastChild.childNodes!="undefined"&&n.lastChild.childNodes!=null?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&&Sys.Extended.UI.HTMLEditor._lookChild(n.firstChild,t)==0)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(n.nodeType==1)for(r=0;r<n.childNodes.length;r++){if(i=n.childNodes.item(r),t==i)return i;if(i.nodeType==1&&(u=Sys.Extended.UI.HTMLEditor._lookChild(i,t),u>=0))return i.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName)&&i.tagName.toUpperCase()!="A"&&!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],typeof i!="undefined"&&(o=document.getElementById(i),o!=null)){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 n.nodeType==9?n:n.ownerDocument||n.document},Sys.Extended.UI.HTMLEditor.getClientViewportElement=function(n){var t;return(t=n.nodeType==9?n:Sys.Extended.UI.HTMLEditor.getOwnerDocument(n),Sys.Extended.UI.HTMLEditor.isIE&&t.compatMode!="CSS1Compat")?t.body:t.documentElement},Sys.Extended.UI.HTMLEditor.isReallyVisible=function(n){for(var t=n,i=!0;t;){if(t.style&&Sys.Extended.UI.HTMLEditor.getStyle(t,"display")=="none"){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 u=[],t=n,i,r;t&&t.nodeType==1&&t.tagName.toUpperCase()!="BODY";)i=t.style.display,r=t.style.visibility,t.style&&(i=="none"||r=="hidden")&&(u.push({element:t,display:i,visibility:r}),t.style.display="",t.style.visibility="visible"),t=t.parentNode;return u},Sys.Extended.UI.HTMLEditor.restoreElementVisibility=function(n){for(var t,i,r=0;r<n.length;r++)t=n[r],i=t.element.style,i.display=t.display,i.visibility=t.visibility},!Sys.Extended.UI.HTMLEditor.isIE)try{Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText=function(n,t){for(var u=n.childNodes,i,f,e,r=0;r<u.length;r++)i=u[r],i.nodeType==3&&t.write(i.nodeValue.replace("\n","")),i.nodeType==1&&(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"),f!="none"&&e!="hidden"&&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(ex){}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():this._cachedContent!=null?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 this._cachedContent!=null?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.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(this._panel_timer==null){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 this._panel_timer!=null&&(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(/&/ig,"&"));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.ActiveModeChangedArgs=function(n,t,i){if(arguments.length!=3)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?!0:!1};Sys.Extended.UI.HTMLEditor.ActiveModeType.registerEnum("Sys.Extended.UI.HTMLEditor.ActiveModeType",!0);Sys.Extended.UI.HTMLEditor.MSIE_list=function(n){function e(){var a,h,i,l,s,r,e,n;if(t!=null){for(i=t.cloneNode(!1),t.parentNode.insertBefore(i,t);t.firstChild!=u[0];)i.appendChild(t.firstChild);if(i.firstChild==null&&i.parentNode.removeChild(i),t.tagName.toUpperCase()==c)for(e=0;e<u.length;e++)if(n=u[e],n.nodeType==1&&n.tagName&&n.tagName.toUpperCase()=="LI"){if(a=!1,t.parentNode.insertBefore(n,t),n.style.textAlign==""&&(n.style.textAlign=t.style.textAlign),t.childNodes.length==0&&e==u.length-1&&(t.parentNode.removeChild(t),t=null),(n.style.textAlign==""||n.style.textAlign.toLowerCase()=="left"&&!f.rtlState()||n.style.textAlign.toLowerCase()=="right"&&f.rtlState())&&(a=f.tryUnWrap(n,o),a&&(v=!0)),!a){for(h=f._doc.createElement(f.dfltBlockElement),l=n.attributes,s=0;s<l.length;++s)(r=l.item(s),r.specified)&&r.name.toLowerCase()!="style"&&h.setAttribute(r.name,r.value);for(h.style.cssText=n.style.cssText,h.tagName.toUpperCase()=="P"&&(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(i=f._doc.createElement(c),l=t.attributes,s=0;s<l.length;++s)(r=l.item(s),r.specified)&&r.name.toLowerCase()!="style"&&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(t!=null){for(i=t.cloneNode(!1),t.parentNode.insertBefore(i,t);t.firstChild;)i.appendChild(t.firstChild);i.firstChild==null&&i.parentNode.removeChild(i);t.parentNode.removeChild(t)}}t=null;u=[]}function a(){var ot=r.firstChild,st=r.lastChild,p=r.tagName.toUpperCase(),n,l,d,ft,v,y,a,g,rt,ut,w,b,et,s,k,tt,it;if(!Sys.Extended.UI.HTMLEditor.isInlineElement(r)&&i[0][0]==ot&&i[i.length-1][i[i.length-1].length-1]==st&&(p=="OL"||p=="UL"||p=="DL"||p=="LI"||(p=="P"||p=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(r))&&p=="LI")){if(e(),u=[],p=="LI")t=r.parentNode,u.push(r);else if(p=="P"||p=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(r))t=r.parentNode.parentNode,u.push(r.parentNode);else for(t=r,v=0;v<i.length;v++)for(y=i[v],s=0;s<y.length;s++)u.push(y[s]);e()}else if(p=="LI"&&i.length<h.length)t!=r.parentNode&&(e(),t=r.parentNode,u=[]),u.push(r);else if(p=="OL"||p=="UL"||p=="DL"){for(e(),t=r,u=[],v=0;v<i.length;v++)for(y=i[v],s=0;s<y.length;s++)u.push(y[s]);e()}else{n=null;l=null;function nt(){n!=null&&n.childNodes==1&&(n.firstChild==o[0]||n.firstChild==o[1])&&(n.parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n));n=null}if(t!=null&&e(),d="",i.length==1&&i[0].length==1&&i[0][0].nodeType==1&&i[0][0].tagName&&(d=i[0][0].tagName.toUpperCase()),d=="OL"||d=="UL"||d=="DL"){for(a=i[0][0],t=a,u=[],v=0;v<a.childNodes.length;v++)ft=a.childNodes.item(v),u.push(ft);e()}else for(v=0;v<i.length;v++){for(y=i[v],s=0;s<y.length;s++)a=y[s],g=a.tagName?a.tagName.toUpperCase():"",l==null&&(l=f._doc.createElement(c),a.parentNode.insertBefore(l,a)),Sys.Extended.UI.HTMLEditor.isInlineElement(a)||g=="BR"?(n==null&&(n=f._doc.createElement("LI"),l.appendChild(n)),rt=y[y.length-1]==o[1]?y.length-1:y.length,ut=y[0]==o[0]?1:0,g=="BR"&&s==rt-1&&s==ut?Sys.Extended.UI.HTMLEditor.isIE?(n.appendChild(f._doc.createTextNode(String.fromCharCode(160))),a.parentNode.removeChild(a)):n.appendChild(a):g=="BR"&&s==rt-1&&s>ut?a.parentNode.removeChild(a):n.appendChild(a),g=="BR"&&s==y.length-1&&(nt(),n=null),a==o[1]&&s==y.length-1&&(nt(),n=null)):(n&&n.firstChild&&nt(),n==null&&(n=f._doc.createElement("LI"),l.appendChild(n)),n.appendChild(a),nt());n&&n.firstChild&&nt()}if(l!=null){for(w=[],s=0;s<l.childNodes.length;s++)w.push(l.childNodes.item(s).style.textAlign);for(b=1;b<w.length;b++)if(w[b-1]!=w[b])break;if(b==w.length){for(et=w[0]=="left"&&!f.rtlState()||w[0]=="right"&&f.rtlState()?"":w[0],s=0;s<l.childNodes.length;s++)l.childNodes.item(s).style.textAlign="";l.style.textAlign=et}}if(l!=null&&l.parentNode.tagName.toUpperCase()=="P"&&l.parentNode.childNodes.length==1)if(k=l.parentNode,tt=k.cloneNode(!1),k.parentNode.insertBefore(l,k),k.parentNode.removeChild(k),l.childNodes.length==1){for(it=l.firstChild;it.firstChild;)tt.appendChild(it.firstChild);it.appendChild(tt)}else delete tt}}for(var h=this.get_paragraphs(),o=this.getSelectionAfterOperation(h),r=null,i=[],f=this,t=null,u=[],c=n.toUpperCase(),v=!1,s,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();t!=null&&e();this.setSelectionAfterOperation(o,v)};Sys.Extended.UI.HTMLEditor.MSIE_justify=function(n,t,i){function a(n){n!=null&&n.childNodes==1&&(n.firstChild==e[0]||n.firstChild==e[1])&&(n.parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n))}function p(){var vt=r.firstChild,yt=r.lastChild,at=!1,w,y,et,k,t,i,ot,rt,st,ut,ht,v,p,d,b,tt,c,g,ft,it,nt,ct,lt;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(),w!="TD"&&w!="TH"&&w!="FIELDSET"&&w!="LEGEND"&&(at=!0)),at)if(tt="",r.getAttribute("align")&&r.getAttribute("align").length>0&&(tt=r.getAttribute("align")),r.align&&r.align.length>0&&(tt=r.align),r.style.textAlign&&r.style.textAlign.length>0&&(tt=r.style.textAlign),r.align="",r.setAttribute("align",""),r.removeAttribute("align"),(w=="DIV"||w=="P"||Sys.Extended.UI.HTMLEditor.isHeader(r))&&n=="left"&&u)o.tryUnWrap(r,e,u)&&(l=!0);else{if(n!="remain"&&(r.style.textAlign=!(n=="left"&&u)||w=="LI"&&r.parentNode.style.textAlign.length>0?n:""),u&&(r.style.margin=w=="P"?"0px":""),w=="LI"){for(v=r.parentNode,p=[],d=0;d<v.childNodes.length;d++)v.childNodes.item(d).nodeType==1&&p.push(v.childNodes.item(d).style.textAlign);for(b=1;b<p.length;b++)if(p[b-1]!=p[b])break;if(b==p.length){for(tt=p[0]=="left"&&u?"":p[0],c=0;c<v.childNodes.length;c++)v.childNodes.item(c).nodeType==1&&(v.childNodes.item(c).style.textAlign="",u&&(v.childNodes.item(c).style.margin=v.childNodes.item(c).tagName.toUpperCase()=="P"?"0px":""));v.style.textAlign=tt}}if((w=="DIV"||w=="P"||Sys.Extended.UI.HTMLEditor.isHeader(r))&&s&&h.toUpperCase()!=w){for(g=o._doc.createElement(h),ft=r.attributes,it=0;it<ft.length;++it)(nt=ft.item(it),nt.specified)&&nt.name.toLowerCase()!="style"&&g.setAttribute(nt.name,nt.value);for(g.style.cssText=r.style.cssText;r.firstChild;)g.appendChild(r.firstChild);r.parentNode.insertBefore(g,r);r.parentNode.removeChild(r)}}else for(y=null,et=0;et<f.length;et++)for(s||(y=null),k=f[et],c=0;c<k.length;c++)if(t=k[c],i=t.nodeType==1&&t.tagName?t.tagName.toUpperCase():null,i!=null&&(i=="UL"||i=="OL"||i=="DL"||i=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(t)||i=="P"||i=="LI"||i=="TABLE")){if(a(y),y=null,n!="remain"&&(i=="TABLE"||u||(t.style.textAlign=n)),u&&(t.style.margin=i=="P"?"0px":""),i=="UL"||i=="OL"||i=="DL"){for(ot=0;ot<t.childNodes.length;ot++)if(rt=t.childNodes.item(ot),rt.nodeType==1)for(rt.style.textAlign="",u&&(rt.style.margin=rt.tagName.toUpperCase()=="P"?"0px":""),st=0;st<rt.childNodes.length;st++)ut=rt.childNodes.item(st),ut.nodeType==1&&ut.tagName&&(ht=ut.tagName.toUpperCase(),u&&(ut.style.margin=ht=="P"?"0px":""),(ht=="DIV"||ht=="P"||Sys.Extended.UI.HTMLEditor.isHeader(ut))&&o.tryUnWrap(ut,e,u)&&(l=!0));n=="left"&&u&&(t.style.textAlign="");continue}else if(i=="LI"){for(n!="remain"&&(t.style.textAlign=!(n=="left"&&u)||t.parentNode.style.textAlign.length>0?n:""),u&&(t.style.margin=i=="P"?"0px":""),v=t.parentNode,p=[],d=0;d<v.childNodes.length;d++)v.childNodes.item(d).nodeType==1&&p.push(v.childNodes.item(d).style.textAlign);for(b=1;b<p.length;b++)if(p[b-1]!=p[b])break;if(b==p.length){for(tt=p[0]=="left"&&u?"":p[0],c=0;c<v.childNodes.length;c++)v.childNodes.item(c).nodeType==1&&(v.childNodes.item(c).style.textAlign="",u&&(v.childNodes.item(c).style.margin=v.childNodes.item(c).tagName.toUpperCase()=="P"?"0px":""));v.style.textAlign=tt}continue}else i=="TABLE"&&n!="remain"&&(n=="left"&&u?(t.align="",t.removeAttribute("align")):t.align=n);if((i=="DIV"||i=="P"||Sys.Extended.UI.HTMLEditor.isHeader(t))&&n=="left"&&u&&o.tryUnWrap(t,e,u)&&(l=!0),(i=="DIV"||i=="P"||Sys.Extended.UI.HTMLEditor.isHeader(t))&&s&&h.toUpperCase()!=i){for(g=o._doc.createElement(h),ft=t.attributes,it=0;it<ft.length;++it)(nt=ft.item(it),nt.specified)&&nt.name.toLowerCase()!="style"&&g.setAttribute(nt.name,nt.value);for(g.style.cssText=t.style.cssText;t.firstChild;)g.appendChild(t.firstChild);t.parentNode.insertBefore(g,t);t.parentNode.removeChild(t)}}else n=="left"&&u&&!s||(y==null&&(y=o._doc.createElement(s?h:o.dfltBlockElement),o.dfltBlockElement.toUpperCase()!="P"||s||(y.style.margin="0px"),s||(y.style.textAlign=n),t.parentNode.insertBefore(y,t)),ct=k[k.length-1]==e[1]?k.length-1:k.length,lt=k[0]==e[0]?1:0,i=="BR"&&c==ct-1&&c==lt?Sys.Extended.UI.HTMLEditor.isIE?(y.appendChild(o._doc.createTextNode(String.fromCharCode(160))),t.parentNode.removeChild(t)):y.appendChild(t):i=="BR"&&c==ct-1&&c>lt&&(!s||t.nextSibling!=null&&t.nextSibling==e[1])?t.parentNode.removeChild(t):y.appendChild(t),i!="BR"||c!=k.length-1||s||(a(y),y=null),t==e[1]&&c==k.length-1&&(a(y),y=null))}for(var v=this.get_paragraphs(),e=this.getSelectionAfterOperation(v),r=null,f=[],o=this,u=typeof t!="undefined"&&t?!0:!1,s=typeof i=="string"?!0:!1,h=typeof i=="string"?i:"",l=!1,c,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(n.nodeType==1){var t=i.rtlState()?n.style.marginRight:n.style.marginLeft;if(t.length>0)return parseInt(t)}return 0}function r(n,t){n.nodeType==1&&(n.tagName.toUpperCase()=="P"&&t==""&&(t="0px"),i.rtlState()?n.style.marginRight=t:n.style.marginLeft=t)}function h(t){n?r(t,e(t)+40+"px"):t.tagName.toUpperCase()=="P"?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){n!=null&&n.childNodes==1&&(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,it,p,k,o,v,rt,tt,ut,g,et,w,y,d,b,ft,a,l,ot,st;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(l="",t.getAttribute("align")&&t.getAttribute("align").length>0&&(l=t.getAttribute("align")),t.align&&t.align.length>0&&(l=t.align),t.style.textAlign&&t.style.textAlign.length>0&&(l=t.style.textAlign),(l.toLowerCase()=="left"&&!i.rtlState()||l.toLowerCase()=="right"&&i.rtlState())&&(l=""),t.align="",t.setAttribute("align",""),t.removeAttribute("align"),h(t),nt=t.tagName.toUpperCase(),(nt=="DIV"||nt=="P"||Sys.Extended.UI.HTMLEditor.isHeader(t))&&l=="")i.tryUnWrap(t,f)&&(s=!0);else if(t.style.textAlign=l!=""||nt=="LI"&&t.parentNode.style.textAlign.length>0?l:"",nt=="LI"){for(w=t.parentNode,y=[],d=0;d<w.childNodes.length;d++)y.push(e(w.childNodes.item(d)));for(b=1;b<y.length;b++)if(y[b-1]!=y[b])break;if(b==y.length){for(ft=y[0]==0?"":y[0]+"px",a=0;a<w.childNodes.length;a++)r(w.childNodes.item(a),"");r(w,ft)}}}else for(it=0;it<u.length;it++)for(p=null,k=u[it],a=0;a<k.length;a++)if(o=k[a],v=o.nodeType==1&&o.tagName?o.tagName.toUpperCase():null,v!=null&&(v=="UL"||v=="OL"||v=="DL"||v=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(o)||v=="P"||v=="LI")){if(c(p),p=null,h(o),v=="UL"||v=="OL"||v=="DL"){for(rt=0;rt<o.childNodes.length;rt++)if(tt=o.childNodes.item(rt),tt.nodeType==1)for(r(tt,""),ut=0;ut<tt.childNodes.length;ut++)g=tt.childNodes.item(ut),l=g.nodeType==1?o.style.textAlign:"",(l.toLowerCase()=="left"&&!i.rtlState()||l.toLowerCase()=="right"&&i.rtlState())&&(l=""),g.nodeType==1&&(r(g,""),l==""&&g.tagName&&(et=g.tagName.toUpperCase(),(et=="DIV"||et=="P")&&i.tryUnWrap(g,f)&&(s=!0)));continue}else if(v=="LI"){for(w=o.parentNode,y=[],d=0;d<w.childNodes.length;d++)y.push(e(w.childNodes.item(d)));for(b=1;b<y.length;b++)if(y[b-1]!=y[b])break;if(b==y.length){for(ft=y[0]==0?"":y[0]+"px",a=0;a<w.childNodes.length;a++)r(w.childNodes.item(a),"");r(w,ft)}continue}l=o.style.textAlign;(l.toLowerCase()=="left"&&!i.rtlState()||l.toLowerCase()=="right"&&i.rtlState())&&(l="");(v=="DIV"||v=="P"||Sys.Extended.UI.HTMLEditor.isHeader(o))&&l==""&&i.tryUnWrap(o,f)&&(s=!0)}else n&&(p==null&&(p=i._doc.createElement(i.dfltBlockElement),i.dfltBlockElement.toUpperCase()=="P"&&(p.style.margin="0px"),h(p),o.parentNode.insertBefore(p,o)),ot=k[k.length-1]==f[1]?k.length-1:k.length,st=k[0]==f[0]?1:0,v=="BR"&&a==ot-1&&a==st?Sys.Extended.UI.HTMLEditor.isIE?(p.appendChild(i._doc.createTextNode(String.fromCharCode(160))),o.parentNode.removeChild(o)):p.appendChild(o):v=="BR"&&a==ot-1&&a>st?o.parentNode.removeChild(o):p.appendChild(o),v=="BR"&&a==k.length-1&&(c(p),p=null),o==f[1]&&a==k.length-1&&(c(p),p=null))}for(var l=this.get_paragraphs(),f=this.getSelectionAfterOperation(l),t=null,u=[],i=this,s=!1,o,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 u,f,e,i;if(n.length==0)return[];var o=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&&t.nodeType==1&&t.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.canHaveChildren(t))t.appendChild(o),t.appendChild(r);else{if(u=Sys.Extended.UI.HTMLEditor._getReallyFirst(s),u.parentNode.insertBefore(o,u),u==s){for(f=[],f.push(o),e=0;e<n[0].length;e++)f.push(n[0][e]);n[0]=f}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[o,r]};Sys.Extended.UI.HTMLEditor.setSelectionAfterOperation=function(n,t){var o,c,s,y,a,v,l,u;if(n.length!=0){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{r!=null&&i!=null&&r.nextSibling==i&&(f=this._doc.createTextNode(" "),i.parentNode.insertBefore(f,i));this._TcurrentFormat=null;r!=null&&o.moveToElementText(r);i!=null&&c.moveToElementText(i);r!=null&&i!=null?(o.setEndPoint("EndToStart",c),o.select(),f!=null&&(o.collapse(!1),o.select(),f.parentNode.removeChild(f))):r!=null?o.select():i!=null&&c.select()}catch(p){}}else try{s=r.nextSibling;y=i.previousSibling;this._TcurrentFormat=null;s==y&&s.nodeType==1&&s.tagName.toUpperCase()=="BR"?(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(p){}v=Sys.Extended.UI.HTMLEditor._commonTotalParent(r==null?i:r,i==null?r:i);l=null;v!=null&&(l=v.parent);r!=null&&r.parentNode.removeChild(r);i!=null&&i.parentNode.removeChild(i);t&&l!=null&&(Sys.Extended.UI.HTMLEditor.spanJoiner(l,this._doc),Sys.Extended.UI.HTMLEditor.isIE||f==null||h==null||(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(),n.length==0)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(f){}return n};Sys.Extended.UI.HTMLEditor.getPseudoP=function(){var b=[],n,t,e,o,k,nt,v,f,a,tt,i,it,y,d,rt,p,r,ut,u;try{var s=this._getSelection(),h=this._createRange(s),w=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",g=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",c=null,l=null;if(Sys.Extended.UI.HTMLEditor.isIE?s.type.toLowerCase()!="control"&&(c=h.duplicate(),l=h.duplicate(),c.setEndPoint("EndToStart",h),l.setEndPoint("StartToEnd",h)):(c=h.cloneRange(),l=h.cloneRange(),c.setEnd(c.startContainer,c.startOffset),l.setStart(l.endContainer,l.endOffset)),n=null,t=null,Sys.Extended.UI.HTMLEditor.isIE&&s.type.toLowerCase()=="control")e=h.item(0),o=this._doc.createElement("SPAN"),o.id=g,e.parentNode.insertBefore(o,e),o=this._doc.createElement("SPAN"),o.id=w,e.nextSibling==null?e.parentNode.appendChild(o):e.parentNode.insertBefore(o,e.nextSibling);else{if(!this.insertHTML("<span id='"+w+"'/>",l))return[];if(!this.insertHTML("<span id='"+g+"'/>",c))return k=this._doc.getElementById(w),k!=null&&(a=k.parentNode,a.removeChild(k)),[]}if(n=this._doc.getElementById(g),t=this._doc.getElementById(w),n!=null&&t!=null)while(n.nextSibling==null)n.parentNode.nextSibling?n.parentNode.parentNode.insertBefore(n,n.parentNode.nextSibling):n.parentNode.parentNode.appendChild(n);if(n!=null&&t!=null){while(t.previousSibling==null)t.parentNode.parentNode.insertBefore(t,t.parentNode);t.previousSibling.nodeType==1&&(nt=t.previousSibling.tagName.toUpperCase(),nt!="BR"&&nt!="IMG"&&(v=Sys.Extended.UI.HTMLEditor._getReallyLast(t.previousSibling),v.nodeType==1&&Sys.Extended.UI.HTMLEditor.canHaveChildren(v)?v.appendChild(t):v.parentNode.appendChild(t)));t.previousSibling&&t.previousSibling.nodeType==1&&t.previousSibling.tagName.toUpperCase()=="BR"&&t.parentNode.insertBefore(t,t.previousSibling)}for(n==null&&(r=this._doc.createElement("SPAN"),r.id=g,t.parentNode.insertBefore(r,t),n=r),t==null&&(r=this._doc.createElement("SPAN"),r.id=w,n.nextSibling?n.parentNode.insertBefore(r,n.nextSibling):n.parentNode.appendChild(r),t=r),n!=null&&t!=null&&(n.parentNode==t?t.parentNode.insertBefore(n,t):t.parentNode==n&&(n.nextSibling!=null?n.parentNode.insertBefore(t,n.nextSibling):n.parentNode.appendChild(t)));n.nextSibling!=null&&n.nextSibling.nodeType==3&&(""+n.nextSibling.data+"").length==0;)n.parentNode.removeChild(n.nextSibling);if(this._TcurrentFormat==null&&n!=null&&t!=null&&n.nextSibling==t){for(f=t.parentNode,this._TcurrentFormat=null;f&&f.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName);)f.tagName.toUpperCase()!="A"&&(a=f.cloneNode(!1),this._TcurrentFormat==null?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)&&i.tagName.toUpperCase()!="A";)i=i.parentNode;for(i!=null&&i.tagName.toUpperCase()=="P"?i.firstChild!=null?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)&&i.tagName.toUpperCase()!="A";)i=i.parentNode;if(i!=null&&i.tagName.toUpperCase()=="P"?i.appendChild(t):Sys.Extended.UI.HTMLEditor.positionInParagraph(t,t.nextSibling,!1,t.parentNode),b=this.getPseudoP_Recur(n,t,0),it=n.parentNode.tagName.toUpperCase(),b.length==0&&n.previousSibling==null&&t.nextSibling==null&&n.nextSibling==t&&(it=="P"||llpTagName=="DIV"||it=="LI")&&(b=[[n.parentNode]]),Sys.Extended.UI.HTMLEditor.isIE){s.empty();s=this._getSelection();y=this._createRange(s);d=this._createRange(s);try{n!=null&&y.moveToElementText(n);t!=null&&d.moveToElementText(t);n!=null&&t!=null?(y.setEndPoint("EndToEnd",d),y.select()):n!=null?y.select():t!=null&&d.select()}catch(ft){}}n!=null&&n.parentNode.removeChild(n);t!=null&&t.parentNode.removeChild(t)}catch(ft){for(rt=this._doc.getElementsByTagName("SPAN"),p=[],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)&&p.push(r));for(u=0;u<p.length;u++)p[u].parentNode.removeChild(p[u])}return b};Sys.Extended.UI.HTMLEditor.getPseudoP_Recur=function(n,t,i){var y=[],u=n,c=t.nextSibling!=null&&t.nextSibling.tagName&&t.nextSibling.tagName.toUpperCase()=="BR"?t.nextSibling:t,a=null,tt,et,bt,lt,kt,ot,g,at,nt,b,h,v,it,rt,ut,k,st,ht,d,ft;if(u==null||c==null?(u!=null&&(a=Sys.Extended.UI.HTMLEditor._commonTotalParent(u,u)),c!=null&&(a=Sys.Extended.UI.HTMLEditor._commonTotalParent(c,c))):a=Sys.Extended.UI.HTMLEditor._commonTotalParent(u,c),a!=null){for(u=Sys.Extended.UI.HTMLEditor.getContainer(a.parent.childNodes.item(a.indexFirst),u),c=Sys.Extended.UI.HTMLEditor.getContainer(a.parent.childNodes.item(a.indexLast),c),Sys.Extended.UI.HTMLEditor.unStyle(u),Sys.Extended.UI.HTMLEditor.unStyle(c);u.parentNode!=a.parent;)u=u.parentNode;while(c.parentNode!=a.parent)c=c.parentNode;Sys.Extended.UI.HTMLEditor._moveTagsUp(u.nextSibling,c);a=null;n==null||t==null?(n!=null&&(a=Sys.Extended.UI.HTMLEditor._commonTotalParent(n,n)),t!=null&&(a=Sys.Extended.UI.HTMLEditor._commonTotalParent(t,t))):a=Sys.Extended.UI.HTMLEditor._commonTotalParent(n,t);a!=null&&Sys.Extended.UI.HTMLEditor.spanJoiner(a.parent,this._doc,a.indexFirst,a.indexLast+1,!0);function dt(n){var t,i;if(Sys.Extended.UI.HTMLEditor.isInlineElement(n)){if(n.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(n.tagName)&&n.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(n))for(t=n.firstChild;t!=null;){if(nnnNext=t.nextSibling,i=dt(t),i)return!0;t=nnnNext}}else return!0;return!1}var e=0,f=[],o=0;if(u.tagName&&c.tagName)if(tt=u.tagName.toUpperCase(),et=c.tagName.toUpperCase(),(tt=="TD"||tt=="TR")&&(et=="TD"||et=="TR")){while(u.tagName.toUpperCase()!="TABLE")u=u.parentNode;c=u}else if((tt=="DD"||tt=="DT")&&(et=="DD"||et=="DT")){while(u.tagName&&u.tagName.toUpperCase()!="DL")u=u.parentNode;c=u}else if(tt=="LI"&&et=="LI"){while(tt!="UL"&&tt!="OL")u=u.parentNode,tt=u.tagName?u.tagName.toUpperCase():null;c=u}for(var p=n?n:t,w=t?t:n,r=u;;){if(!Sys.Extended.UI.HTMLEditor.isTempElement(r))if(bt=dt(r),bt)if(r.tagName&&r.tagName.toUpperCase()=="BR")f[o]=r,y[e]=f,e++,f=[],o=0;else if(r!=c&&r!=u||(r==c&&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)))o>0&&(y[e]=f,e++,f=[],o=0),f[o]=r,y[e]=f,e++,f=[],o=0;else if(ot=r.tagName?r.tagName.toUpperCase():null,ot=="TABLE"||ot=="TBODY"){for(g=r;g.tagName.toUpperCase()!="TABLE";)g=g.parentNode;var gt=0,vt=0,ni=g.rows.item(g.rows.length-1).cells.length-1,yt=g.rows.length-1;for(h=0;h<g.rows.length;h++)for(at=g.rows.item(h),nt=0;nt<at.cells.length;nt++)b=at.cells.item(nt),Sys.Extended.UI.HTMLEditor._lookChild(b,p)>=0&&(gt=nt,vt=h),Sys.Extended.UI.HTMLEditor._lookChild(b,w)>=0&&(ni=nt,yt=h);for(h=vt;h<=yt;h++)for(nt=h==vt?gt:0;nt<=(h==yt?ni:g.rows.item(h).cells.length-1);nt++)if(b=g.rows.item(h).cells.item(nt),o>0&&(y[e]=f,e++,f=[],o=0),it=Sys.Extended.UI.HTMLEditor._lookChild(b,p)>=0,rt=Sys.Extended.UI.HTMLEditor._lookChild(b,w)>=0,it||rt){var s=p,l=w,pt=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_"+i,wt=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_"+i;for(it&&(l=this._doc.createElement("span"),l.id=pt,b.appendChild(l)),rt&&(s=this._doc.createElement("span"),s.id=wt,b.firstChild?b.insertBefore(s,b.firstChild):b.appendChild(s)),ut=this.getPseudoP_Recur(s,l,i+1),k=0;k<ut.length;k++)y[e]=ut[k],e++;s!=p&&s.parentNode.removeChild(s);l!=w&&l.parentNode.removeChild(l)}else{for(st=0,ht=b.childNodes.length,d=st;d<ht;d++)ft=b.childNodes.item(d),Sys.Extended.UI.HTMLEditor.isTempElement(ft)||(f[o]=ft,o++);f.length>0&&(y[e]=f,e++,f=[],o=0)}}else if(ot=="UL"||ot=="OL"||ot=="DL"){var ct=r,ti=0,ii=ct.childNodes.length-1;for(h=0;h<ct.childNodes.length;h++)v=ct.childNodes.item(h),v.nodeType==1&&((v==p||Sys.Extended.UI.HTMLEditor._lookChild(v,p)>=0)&&(ti=h),(v==w||Sys.Extended.UI.HTMLEditor._lookChild(v,w)>=0)&&(ii=h));for(h=ti;h<=ii;h++)if(v=ct.childNodes.item(h),o>0&&(y[e]=f,e++,f=[],o=0),it=Sys.Extended.UI.HTMLEditor._lookChild(v,p)>=0,rt=Sys.Extended.UI.HTMLEditor._lookChild(v,w)>=0,it||rt){var s=p,l=w,pt=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_"+i,wt=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_"+i;for(it&&(l=this._doc.createElement("span"),l.id=pt,v.appendChild(l)),rt&&(s=this._doc.createElement("span"),s.id=wt,v.firstChild?v.insertBefore(s,v.firstChild):v.appendChild(s)),ut=this.getPseudoP_Recur(s,l,i+1),k=0;k<ut.length;k++)y[e]=ut[k],e++;s!=p&&s.parentNode.removeChild(s);l!=w&&l.parentNode.removeChild(l)}else{for(st=0,ht=v.childNodes.length,d=st;d<ht;d++)ft=v.childNodes.item(d),Sys.Extended.UI.HTMLEditor.isTempElement(ft)||(f[o]=ft,o++);f.length>0&&(y[e]=f,e++,f=[],o=0)}}else if(it=Sys.Extended.UI.HTMLEditor._lookChild(r,p)>=0,rt=Sys.Extended.UI.HTMLEditor._lookChild(r,w)>=0,o>0&&(y[e]=f,e++,f=[],o=0),it||rt){var s=p,l=w,pt=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_"+i,wt=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_"+i;for(it&&(l=this._doc.createElement("span"),l.id=pt,r.appendChild(l)),rt&&(s=this._doc.createElement("span"),s.id=wt,r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s)),ut=this.getPseudoP_Recur(s,l,i+1),k=0;k<ut.length;k++)y[e]=ut[k],e++;s!=p&&s.parentNode.removeChild(s);l!=w&&l.parentNode.removeChild(l)}else{for(st=0,ht=r.childNodes.length,d=st;d<ht;d++)ft=r.childNodes.item(d),Sys.Extended.UI.HTMLEditor.isTempElement(ft)||(f[o]=ft,o++);f.length>0&&(y[e]=f,e++,f=[],o=0)}else{if(r.nodeType&&r.nodeType==3&&(lt=""+r.data+"",lt.length==0||/^[\n\r]+$/.test(lt))){if(kt=r.nextSibling,r.parentNode.removeChild(r),r==c)break;r=kt;continue}f[o]=r;o++}if(r==c)break;r=r.nextSibling}o>0&&(y[e]=f)}return y};Sys.Extended.UI.HTMLEditor.unWrap=function(n,t){var f=this,i,e,r,u;if(n.firstChild){while(n.firstChild&&n.firstChild.nodeType==3&&""+n.firstChild.data+""=="")n.removeChild(n.firstChild);for(i=[];n.firstChild;)n.firstChild!=t[0]&&n.firstChild!=t[1]&&i.push(n.firstChild),n.parentNode.insertBefore(n.firstChild,n);for(i.length==0&&(u=f._doc.createElement("BR"),n.parentNode.insertBefore(u,n)),Sys.Extended.UI.HTMLEditor.isIE&&i.length==1&&i[0].nodeType==3&&(e=""+i[0].data+"",e.length==1&&e.charCodeAt(0)==160&&(u=f._doc.createElement("BR"),i[0].parentNode.insertBefore(u,i[0]),i[0].parentNode.removeChild(i[0])));n.nextSibling&&n.nextSibling.nodeType==3&&""+n.nextSibling.data+""=="";)n.parentNode.removeChild(n.nextSibling);r=n.previousSibling&&t[1]==n.previousSibling?t[1].previousSibling:n.previousSibling;r&&Sys.Extended.UI.HTMLEditor.isInlineElement(r)&&r.nodeType==1&&r.childNodes.length>0&&(r=Sys.Extended.UI.HTMLEditor._getReallyLast(r));Sys.Extended.UI.HTMLEditor.isInlineElement(r)&&n.nextSibling!=null&&(u=f._doc.createElement("BR"),n.parentNode.insertBefore(u,n))}else u=f._doc.createElement("BR"),n.parentNode.insertBefore(u,n);n.parentNode.removeChild(n)};Sys.Extended.UI.HTMLEditor.tryUnWrap=function(n,t,i){var c=this,o,s,e,h;for(n.style.textAlign="",o=0,s=n.attributes,e=0;e<s.length;++e)(h=s.item(e),h.specified)&&h.name.toLowerCase()!="style"&&o++;var l=n.style.cssText,u=0,r,f=n.tagName.toUpperCase();if(!(typeof i!="undefined"&&i)&&f!="LI")try{r=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(n,"margin-top"));isNaN(r)&&(r=f=="P"?1:0);u+=r;r=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(n,"margin-bottom"));isNaN(r)&&(r=f=="P"?1:0);u+=r;r=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(n,"margin-right"));isNaN(r)&&(r=f=="P"?1:0);u+=r;r=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(n,"margin-left"));isNaN(r)&&(r=f=="P"?1:0);u+=r}catch(a){u=1}return n.style.margin="",o==0&&n.style.cssText.length==0&&u==0||typeof i!="undefined"&&i&&f!="LI"?(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(e==null)return"";try{if(n.toLowerCase()=="backcolor"){for(o=e.start;o;){if(s=Sys.Extended.UI.HTMLEditor.getStyle(o,"background-color").toLowerCase(),s.length>0&&s!="transparent")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((u=="font-size"||u=="font-family")&&this._FontNotSet)for(r="",i=e.start;i!=null;){if(u=="font-size"){if(i.style&&i.style.fontSize&&i.style.fontSize.length>0){r=i.style.fontSize;break}else if(i.tagName&&i.tagName.toUpperCase()=="FONT"&&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}else if(i.tagName&&i.tagName.toUpperCase()=="FONT"&&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();u=="font-size"&&(Sys.Extended.UI.HTMLEditor.isIE||(r=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(r,this,t)));break}if(f=i.tagName.toUpperCase(),f=="BODY"||f=="TD")break;i=i.parentNode}else if(r=Sys.Extended.UI.HTMLEditor.getStyle(e.start,u).toLowerCase(),u=="font-size"&&!Sys.Extended.UI.HTMLEditor.isIE)for(r=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(r,this,t),i=e.start;i!=null;){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(),f=="BODY"||f=="TD")break;i=i.parentNode}if(this._StyleForTyping!=null&&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(l){return""}};Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.DesignPanelEventHandler=function(n){var t,ui,vt,yt,fi,w,bi,ei,pt,ct,g,rt,u,oi,si,hi,y,ut,wt,bt,ki,c,a,ft,b,tt,et,f,it,kt,dt,ci,o,lt,l,gt,s,ni,ot,e,i;try{if(t=this,t._editPanel!=Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)return!0;if(Sys.Extended.UI.HTMLEditor.isIE)try{ui=this._doc.selection;fi=this._createRange(ui)}catch(ur){return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}if((n.type=="mousedown"||n.type=="dblclick")&&this._focus(!0),!Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keydown"&&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(vt=!1,t._contextElement&&t._contextElement!=null){if(Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.RemoveContextMenu)(),n.type=="keydown"||n.type=="keypress"){Sys.Extended.UI.HTMLEditor._stopEvent(n);return}vt=!0}if(typeof t.captureInDesign=="function"&&t.captureInDesign(n)===!1){Sys.Extended.UI.HTMLEditor._stopEvent(n);return}if(Sys.Extended.UI.HTMLEditor.isIE&&n.type=="mousedown"&&n.ctrlKey){var e=t._getSelection(),di=n.clientX,gi=n.clientY;return setTimeout(function(){var r=t._getSelection(),i,n;for(r.type.toLowerCase()!="control"&&(i=t._doc.body.createTextRange(),i.moveToPoint(di,gi),i.select()),r=t._getSelection(),i=t._createRange(r),n=Sys.Extended.UI.HTMLEditor.getSelParent(t);n!=null&&n.tagName.toUpperCase()!="BODY";){if(n.tagName.toUpperCase()=="A"&&n.href!=null&&typeof n.href!="undefined"&&n.href.length>0){window.open(n.href,"LinkViewWindow");break}n=n.parentNode}},0),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}if(u=Sys.Extended.UI.HTMLEditor.isIE?n.srcElement:n.target,u.tagName!=null&&typeof u.tagName!="undefined"&&(u.tagName.toUpperCase()=="HTML"||u.tagName.toUpperCase()=="BODY")?t.__kkoka!=!0&&(t.__kkoka=!0,setTimeout(function(){if(t._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&!t.toEndOfProtected())try{t.focusEditor()}catch(n){}t.__kkoka=!1},0)):Sys.Extended.UI.HTMLEditor.contentEditable(u)!=null&&setTimeout(function(){t._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&t.toEndOfProtected()},0),vt&&Sys.Extended.UI.HTMLEditor.isIE){yt=this._getSelection();try{if(fi=this._createRange(yt),yt.type.toLowerCase()=="control")return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}catch(fr){return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}}if(w=Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keydown"||n.type=="keypress",bi=n.type+"--"+w,w&&!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(),w&&t._editPanel.get_hotkeys()!=null&&t._editPanel.get_hotkeys().length>0)for(ei=t._editPanel.get_hotkeys().length,pt=o,(n.keyCode==18||n.keyCode==17||n.keyCode==16)&&(pt=null),ct=0;ct<ei;ct++)if(g=t._editPanel.get_hotkeys()[ct],g[1]==pt&&g[2]==n.altKey&&g[3]==n.shiftKey&&g[4]==n.ctrlKey)return typeof g[0]=="function"&&setTimeout(function(){g[0](t);t.onContentChanged();t.focusEditor()},0),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;if(w&&n.shiftKey&&n.keyCode==45)this._commonPaste(n);else if(w&&n.ctrlKey&&n.altKey&&n.keyCode==Sys.UI.Key.home){for(rt=null,u=Sys.Extended.UI.HTMLEditor.getSelParent(t);u&&(u.nodeType==3||u.tagName&&u.tagName.toUpperCase()!="BODY");){if(u.nodeType==3||!u.tagName){u=u.parentNode;continue}if(a=u.tagName.toUpperCase(),!Sys.Extended.UI.HTMLEditor.canBeInsideP(u)&&a!="P"){if(a=="TD")while(a!="TABLE")u=u.parentNode,a=u.tagName.toUpperCase();else if(a=="LI")while(a!="OL"&&a!="UL")u=u.parentNode,a=u.tagName.toUpperCase();rt=u;break}u=u.parentNode}if(rt!=null){var e=t._getSelection(),i=t._createRange(e),v=t._doc.createTextNode("");if(rt.parentNode.insertBefore(v,rt),Sys.Extended.UI.HTMLEditor.isIE){var ti=t._createRange(e),li=t._createRange(e),ii=t._doc.createElement("span"),at=t._doc.createElement("span");v.parentNode.insertBefore(ii,v);v.nextSibling?v.parentNode.insertBefore(at,v.nextSibling):v.parentNode.appendChild(at);try{ti.moveToElementText(ii);li.moveToElementText(at);ti.setEndPoint("EndToEnd",li);ti.select()}catch(ur){}v.parentNode.removeChild(ii);v.parentNode.removeChild(at)}else t._removeAllRanges(e),i.setStart(v,0),i.setEnd(v,0),t._selectRange(e,i)}}else if(Sys.Extended.UI.HTMLEditor.isIE&&n.keyCode>=33&&n.keyCode<=40&&!n.shiftKey)oi=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;u.type.toLowerCase()=="control"&&(n=r.item(0),n.contentEditable&&n.contentEditable!="false"||(r.remove(0),u.empty(),r=t._createRange(u),i=t._doc.createElement("SPAN"),i.appendChild(t._doc.createTextNode("")),oi?n.nextSibling==null?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((w&&!Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isSafari&&n.type=="keydown")&&n.ctrlKey&&!n.altKey){t._a_prize=!1;var e=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,st=null;if((Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isSafari)&&n.keyCode==17)return!1;if(Sys.Extended.UI.HTMLEditor.isIE||n.keyCode!=Sys.UI.Key.end||n.shiftKey){if(n.keyCode==46&&this.isShadowed())return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;if(n.keyCode==46||n.keyCode==Sys.UI.Key.backspace)(Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keydown"||!Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keypress")&&this._saveContent();else switch(o){case"a":if(Sys.Extended.UI.HTMLEditor.isIE)t._a_prize=!0;else return e=this._getSelection(),this._removeAllRanges(e),i=this._createRange(),i.selectNodeContents(this._doc.body),this._selectRange(e,i),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;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&&n.type=="keydown")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&&n.type=="keydown")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,st),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;case"i":return this._execCommand("italic",!1,st),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;case"u":return this._execCommand("underline",!1,st),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;case"s":return this._execCommand("strikethrough",!1,st),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 si="Your browser:\n\n"+navigator.userAgent,alert(si),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;case"9":if(Sys.Extended.UI.HTMLEditor.isIE)e=t._getSelection(),i=t._createRange(e),alert("boundingLeft: "+i.boundingLeft+" boundingTop: "+i.boundingTop+"\nboundingWidth: "+i.boundingWidth+" boundingHeight: "+i.boundingHeight);else{var e=t._getSelection(),i=t._createRange(e),r=i.startContainer,k=i.endContainer,d="";d+="startContainer: "+(r.nodeType==1?r.tagName:"text")+"\n";d+="endContainer : "+(k.nodeType==1?k.tagName:"text")+"\n";r==k&&(d+="startOffset: "+i.startOffset+"\n",d+="endOffset : "+i.endOffset+"\n",r.nodeType==1&&(r=r.childNodes.item(i.startOffset),r&&r.nodeType?(d+="startOffset node: "+(r.nodeType==1?r.tagName:"text")+"\n",i.startOffset!=i.endOffset&&(r=k.childNodes.item(i.endOffset),r&&r.nodeType&&(d+="endOffset node: "+(r.nodeType==1?r.tagName:"text")+"\n"))):d+=r));alert(d)}return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}}else t._setToEnd();p&&(this._execCommand(p,!1,st),p!="formatblock"||Sys.Extended.UI.HTMLEditor.isIE||(this._saveContent(),this._undo(!1)),Sys.Extended.UI.HTMLEditor._stopEvent(n),(p=="delete"||p=="paste")&&this._clearP())}else if(w||(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&n.type=="keydown"){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;function nr(){var i=t._createRange(t._getSelection()),n=i.parentElement();if(n&&n.nodeType==1&&n.tagName.toUpperCase()=="P"){while(n.firstChild)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}setTimeout(nr,0)}if(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)&&n.type!="keydown")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(" ");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)&&n.type!="keydown")break;if(((Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isSafari)&&n.type=="keydown"||!Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keypress")&&this._saveContent(),Sys.Extended.UI.HTMLEditor.isIE){if(e=t._getSelection(),e.type.toLowerCase()=="control"){if(n.keyCode==8){setTimeout(function(){t._ifShadow();t.onContentChanged()},0);Sys.Extended.UI.HTMLEditor._stopEvent(n);return}if(c=t._createRange(e),ut=c.item(0),ut.tagName.toUpperCase()=="EMBED"){for(ut.src="",ut.parentNode.removeChild(ut);c.length>0;)c.remove(0);try{c.collapse(!1)}catch(ur){}Sys.Extended.UI.HTMLEditor._stopEvent(n);t._saveContent();setTimeout(function(){t._undo(!1);t.onContentChanged()},0);return}}wt=t._doc.body.getElementsByTagName("EMBED").length;wt>0&&(bt=t._body.ownerDocument.createElement("div"),t._body.appendChild(bt),ki=n.keyCode,setTimeout(function(){t._body.removeChild(bt);var n=t._doc.body.getElementsByTagName("EMBED");wt!=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,k=i.endContainer;if(n.type=="keypress"&&(Sys.Extended.UI.HTMLEditor.contentEditable(r)!=null||Sys.Extended.UI.HTMLEditor.contentEditable(k)!=null))return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;if(r==k&&r.nodeType==1&&r.tagName.toUpperCase()=="TD"&&i.startOffset==i.startOffset&&r.childNodes.item(i.startOffset)&&r.childNodes.item(i.startOffset).tagName&&r.childNodes.item(i.startOffset).tagName.toUpperCase()=="BR"){for(var ai=r.childNodes.item(i.startOffset),vi=0,yi=0,nt=ai.previousSibling;nt;)vi++,nt=nt.previousSibling;for(nt=ai.nextSibling;nt;)yi++,nt=nt.nextSibling;if(n.keyCode==46&&yi==0||n.keyCode==Sys.UI.Key.backspace&&vi==0||n.keyCode==46&&r.firstChild==r.lastChild&&r.firstChild.nodeType==1)return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}if(r==k&&r.nodeType==3&&i.startOffset==i.endOffset&&!Sys.Extended.UI.HTMLEditor.isOpera){if(hi=r.data+"",n.keyCode==46&&i.startOffset==hi.length&&!(r.nextSibling&&r.nextSibling.nodeType==3))return r.nextSibling&&(r.parentNode.removeChild(r.nextSibling),t.onContentChanged()),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;if(n.keyCode==Sys.UI.Key.backspace&&i.startOffset==0&&!(r.previousSibling&&r.previousSibling.nodeType==3))return r.previousSibling&&(r.parentNode.removeChild(r.previousSibling),t.onContentChanged()),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}if(n.keyCode==Sys.UI.Key.backspace&&r.nodeType==1&&r==k&&i.startOffset==i.endOffset&&(y=r.childNodes.item(i.startOffset),y!=null&&y.nodeType==1&&y.tagName.toUpperCase()=="BR"&&(y=y.previousSibling,y!=null&&y.nodeType!=3)))return y.parentNode.removeChild(y),t.onContentChanged(),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1;setTimeout(function(){var o=t._getSelection(),n=t._createRange(o),f=n.startContainer,s=n.endContainer,i;if(Sys.Extended.UI.HTMLEditor.contentEditable(f)!=null||Sys.Extended.UI.HTMLEditor.contentEditable(s)!=null){t._undo(!1);return}if(Sys.Extended.UI.HTMLEditor.isOpera&&f==s&&f.nodeType==3&&f.data.length==0)f.parentNode.removeChild(f);else if(f==s&&f.nodeType==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName)&&n.startOffset==n.endOffset&&f.childNodes.length==0){while(f.parentNode.nodeType==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.parentNode.tagName)&&f.parentNode.childNodes.length==1)f=f.parentNode;var r=f.nextSibling,u=f.previousSibling,e=f.parentNode;e.removeChild(f);t.onContentChanged();r==null&&u==null?(n.setStart(e,0),n.setEnd(e,0)):r!=null&&u!=null?r.nodeType==3&&u.nodeType==3?(i=(""+u.data+"").length,u.appendData(r.data),e.removeChild(r),n.setStart(u,i),n.setEnd(u,i)):u.nodeType==3?(i=(""+u.data+"").length,n.setStart(u,i),n.setEnd(u,i)):r.nodeType==3?(n.setStart(r,0),n.setEnd(r,0)):r.childNodes.length>0?(n.setStart(r,0),n.setEnd(r,0)):(i=Sys.Extended.UI.HTMLEditor.__getIndex(r),n.setStart(e,i),n.setEnd(e,i)):u!=null?u.nodeType==3?(i=(""+u.data+"").length,n.setStart(u,i),n.setEnd(u,i)):(i=u.childNodes.length,i>0?(n.setStart(u,i),n.setEnd(u,i)):(i=Sys.Extended.UI.HTMLEditor.__getIndex(u),n.setStart(e,i),n.setEnd(e,i))):r!=null&&(r.nodeType==3?(n.setStart(r,0),n.setEnd(r,0)):(i=r.childNodes.length,i>0?(n.setStart(r,i),n.setEnd(r,i)):(i=Sys.Extended.UI.HTMLEditor.__getIndex(r),n.setStart(e,i),n.setEnd(e,i))));t._removeAllRanges(o);t._selectRange(o,n)}},0)}break;case Sys.UI.Key.enter:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&n.type=="keydown")break;if((!Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keypress"||Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keydown")&&this._saveContent(),Sys.Extended.UI.HTMLEditor.isIE&&n.type=="keydown"){if(e=t._getSelection(),e.type.toLowerCase()=="control")break;if(c=t._createRange(e),n.shiftKey)break;else{if(f=c.parentElement(),f.tagName.toUpperCase()=="TEXTAREA")break;while(f&&f.tagName&&f.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName))f=f.parentNode;if(f&&f.tagName&&(a=f.tagName.toUpperCase(),a=="P"||a=="LI")){if(a=="LI"){function tr(){var n;for(c=t._createRange(t._getSelection()),n=c.parentElement();n&&n.tagName&&n.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(n.tagName);)n=n.parentNode;if(n&&n.nodeType==1&&n.tagName.toUpperCase()=="P"){for(var r=t._doc.createElement("span"),u=t._doc.createTextNode(" "),i=n;i.firstChild!=null&&i.firstChild.nodeType==1;)i=i.firstChild;if(i.nodeType==1)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);c.moveToElementText(r);c.select();r.parentNode.removeChild(r);t.onContentChanged()}}setTimeout(tr,0)}break}try{var ri=Sys.Extended.UI.HTMLEditor.smartClassName+"_middle_add",h=null,it="<span id="+ri+"><\/span>";function ir(){var i=t._getSelection(),n=t._createRange(i);h!=null&&(h.innerHTML=" ",n.moveToElementText(h),n.select(),h.parentNode.insertBefore(h.firstChild,h),h.parentNode.removeChild(h),t.onContentChanged())}if(c.pasteHTML(it),ft=!1,h=t._doc.getElementById(ri),h!=null){for(b=h.nextSibling,tt=h.parentNode;b==null&&tt!=null&&Sys.Extended.UI.HTMLEditor.isStyleTag(tt.tagName);)b=tt.nextSibling,tt=tt.parentNode;b==null||Sys.Extended.UI.HTMLEditor.isInlineElement(b)||b.tagName==null||typeof b.tagName=="undefined"||(et=b.tagName.toUpperCase(),et!="BR"&&et!="UL"&&et!="OL"&&et!="P"&&(ft=!0));h.parentNode.removeChild(h)}if(c.pasteHTML("<br/>"+(ft?it:"")),ft&&(h=t._doc.getElementById(ri)),c.select(),ft)return setTimeout(ir,0),Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}catch(fr){}}Sys.Extended.UI.HTMLEditor._stopEvent(n)}else if(!n.shiftKey&&(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)){for(f=Sys.Extended.UI.HTMLEditor.getSelParent(this),f.nodeType==3&&(f=f.parentNode);f&&f.tagName&&f.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName);)f=f.parentNode;if(f&&f.tagName&&(f.tagName.toUpperCase()=="P"||f.tagName.toUpperCase()=="LI"))break;it="<br />";Sys.Extended.UI.HTMLEditor.isOpera&&(e=t._getSelection(),i=t._createRange(e),i.startContainer==i.endContainer&&(i.startContainer.nodeType==1?(kt=i.startContainer.childNodes.item(i.startOffset),kt.nodeType==1&&kt.tagName.toUpperCase()=="BR"&&(it+="<br />")):i.startContainer.nodeType!=3||i.startOffset!=i.endOffset||i.startContainer.data.length!=i.endOffset||i.startContainer.nextSibling&&i.startContainer.nextSibling.nodeType==3||(it+=" ")));this.insertHTML(it);Sys.Extended.UI.HTMLEditor._stopEvent(n);Sys.Extended.UI.HTMLEditor.isOpera&&(e=t._getSelection(),i=t._createRange(e),i.startContainer==i.endContainer&&i.startContainer.nodeType==3&&i.startOffset==i.endOffset&&i.startContainer.data.length==0&&(dt=i.startContainer.previousSibling,i.startContainer.parentNode.removeChild(i.startContainer),t._removeAllRanges(e),i=t._createRange(),i.setStart(dt,0),i.setEnd(dt,1),t._selectRange(e,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&&n.type=="keypress"&&!n.ctrlKey){var o=n.keyCode,ni=t._getSelection(),ot=t._createRange(ni);if(ot.text.length>0){var ht=String.fromCharCode(o),pi=Sys.Extended.UI.HTMLEditor.capLock(n),rr=n.shiftKey&&!pi||pi;return rr||(ht=ht.toLowerCase()),l=Sys.Extended.UI.HTMLEditor.smartClassName+"StyleForTyping",s=t._doc.getElementById(l),s!=null&&(ht="<span id='"+l+"'><\/span>"+ht+"<span id='"+l+l+"'><\/span>",s.parentNode.removeChild(s)),ot.pasteHTML(ht),s!=null&&(t.trickWithStyles(l),s=t._doc.getElementById(l+l),s.parentNode.removeChild(s)),Sys.Extended.UI.HTMLEditor._stopEvent(n),t.onContentChanged(),!1}}if(n.type=="mouseup"||n.type=="mousedown"||n.type=="keydown"){if(ci=!0,n.type=="keydown"&&!n.ctrlKey&&(o=n.keyCode,(o>=48&&o<=90||o==32||o==13||o>=186&&o<=222||o>=96&&o<=111)&&t._StyleForTyping!=null)){for(t.n_arr=[],lt=0;lt<t._StyleForTyping.length;lt++)t.n_arr.push(t._StyleForTyping[lt]);l=Sys.Extended.UI.HTMLEditor.smartClassName+"StyleForTyping";gt=!0;Sys.Extended.UI.HTMLEditor.isIE?(t.insertHTML("<span id='"+l+"'> <\/span>"),s=t._doc.getElementById(l),s&&s.nextSibling&&s.nextSibling.nodeType==3?(gt=!1,ni=t._getSelection(),ot=t._createRange(ni),ot.moveToElementText(t._doc.getElementById(l)),ot.select()):s&&s.removeChild(s.firstChild)):t.insertHTML("<span id='"+l+"'><\/span>");gt&&setTimeout(function(){t.trickWithStyles(l);t.onContentChanged()},0)}if((ci||!Sys.Extended.UI.HTMLEditor.isIE)&&!t._updated_now){t._updateTimer&&(clearTimeout(t._updateTimer),t._updateTimer=null);t._updateTimerLimit=3;function wi(){if(t._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{if(Sys.Extended.UI.HTMLEditor.isIE){try{var n=t._doc.selection}catch(i){return!1}if(t._getSelection().type=="None"&&t._doc.queryCommandValue("backcolor")==0&&t._doc.queryCommandValue("forecolor")==0&&(t._updateTimerLimit--,t._updateTimerLimit>0)){t._updateTimer=setTimeout(wi,100);return}}t._updated_now=!0;t._editPanel.updateToolbar();t._updated_now=!1;t._updateTimer=null;Sys.Extended.UI.HTMLEditor.isIE||t.focusEditor()}catch(i){}}t._updateTimer=setTimeout(wi,300)}}return!Sys.Extended.UI.HTMLEditor.isIE&&(n.type=="keydown"||n.type=="keyup")||Sys.Extended.UI.HTMLEditor.isIE&&(n.type=="keydown"||n.type=="keyup")&&(n.keyCode==16||n.keyCode==20)||(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),n.startContainer.nodeType!=3&&n.startContainer==n.endContainer&&n.startOffset==n.endOffset&&n.startContainer.childNodes.item(n.startOffset)&&n.startContainer.childNodes.item(n.startOffset).nodeType==3&&(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||(e=t._getSelection(),i=t._createRange(e),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),n.type=="keydown"&&(t._AfterOnContentChanged!=null&&typeof t._AfterOnContentChanged!="undefined"&&t._AfterOnContentChanged||(t._AfterOnContentChanged=!0,setTimeout(function(){t._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&(t.onContentChanged(),t._AfterOnContentChanged=!1)},0))),!0}catch(fr){return Sys.Extended.UI.HTMLEditor._stopEvent(n),!1}};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(){var t,n;for(this._editPanel.__blured=!1,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(i){}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||this._design_timer1==null||(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;this._design_timer1==null&&(this._design_timer1=setTimeout(function(){n._really_focused();n._design_timer1=null},0))}return!0},_getAbsAndFixedParents:function(){for(var n=this.get_element(),t="";n!=null&&n.tagName&&n.tagName.toLowerCase()!="body";)t+=n.tagName,(n.style.position=="absolute"||n.style.position=="fixed")&&(t+=": "+n.style.position),t+="\n",n=n.parentNode;return t},_onDocumentLoaded:function(){var n=this,t,i;if(!Sys.Extended.UI.HTMLEditor.isIE&&(t=this._getAbsAndFixedParents(),t!=this._absAndFixedParents)){this._initIframe(this._savedValue);setTimeout(function(){n._onDocumentLoaded()},10);return}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()))){setTimeout(function(){n._onDocumentLoaded()},10);return}i=n._doc.body.innerHTML}catch(r){setTimeout(function(){n._onDocumentLoaded()},10);return}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,n.childNodes.length==1&&n.firstChild.tagName&&n.firstChild.tagName.toUpperCase()=="DIV"&&n.firstChild.style.cssText.length>0&&n.firstChild.style.direction.length>0&&Sys.Extended.UI.HTMLEditor.getStyle(n.firstChild,"position")!="absolute"){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 p,n,w,u,a,v,s,h,t,c,f,l,i,e;if(this._popup!=null&&typeof this._popup._forceImClose=="function"&&(p=this._popup._forceImClose,p(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[^>]*?>)/ig,"$1 $3").replace(/(<td[^>]*?>)\s*( )\s*(<\/td[^>]*?>)/ig,"$1<br/>$3").replace(/(<p[^>]*?>)\s*( )\s*(<\/p[^>]*?>)/ig,"$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/ig.test(n)&&(n=n.replace(/(<embed(?:.*?))(\sloop=\"true\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(\splay=\"true\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(\sbgcolor=\"\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(\sscale=\"\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(\shspace=\"0\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(\svspace=\"0\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(\swmode=\"[^\"]+\")((?:.*?)>)/ig,"$1$3").replace(/(<embed(?:.*?))(pseudomode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1wmode=$3$4").replace(/(<embed(?:.*?))(\swmode=\"\")((?:.*?)>)/ig,"$1$3")),w=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":)","ig"),n=n.replace(w,"$1");else{for(u=this._doc.createElement("DIV"),a=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 a.regReplScript1(n,t)}),u.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(this._doc.body.innerHTML),v=u.getElementsByTagName("IMG"),s=[],f=0;f<v.length;f++)s.push(v[f]);for(h=0;h<s.length;h++)if(t=s[h],c=t.getAttribute("dummytag"),c&&c.length>0&&c.toLowerCase()=="embed"){var k=t.getAttribute("dummysrc"),o=t.getAttribute("dummybgcolor"),y=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)),y&&y.length>0&&r.setAttribute("wmode",y),f=0;f<b.length;++f)(l=b.item(f),l.specified)&&(i=l.name.toLowerCase(),e=l.value,i!="dummytag"&&i!="dummysrc"&&i!="dummybgcolor"&&i!="style"&&i!="wmode"&&i!="pseudomode"&&i!="src")&&(i!="loop"||e!="true")&&(i!="play"||e!="true")&&(i!="hspace"||e!="0")&&(i!="vspace"||e!="0")&&(i!="scale"||e.length!=0)&&(i!="align"||e.length!=0)&&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:!1,!0);n=this._editPanel.get_noScript()?n.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,""):n.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(n,t,i,r){return a.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)+";"})),Sys.Extended.UI.HTMLEditor.Trim(n)=="<br />"&&(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,l,s,h,r,c,u,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(/(&)/g,"&amp;").replace(/<br\s*[\/]*>\s*<\/td>/ig,"<\/td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,"$1 $3").replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/ig,"$1 $3"),/<embed/ig.test(t)&&(t=t.replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/ig,'$1 wmode="transparent"$2')),t.replace(/&/ig,"&");for(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")),l=e.getElementsByTagName("EMBED"),s=[],r=0;r<l.length;r++)s.push(l[r]);for(h=0;h<s.length;h++){var i=s[h],f=document.createElement("IMG"),a=i.attributes;for(f.src=this._editPanel.get_imagePath_1x1(),f.setAttribute("dummytag","embed"),r=0;r<a.length;++r)(c=a.item(r),c.specified)&&(u=c.name.toLowerCase(),n=c.value,u=="src"?u="dummysrc":u=="bgcolor"?u="dummybgcolor":u=="wmode"&&(u="pseudomode"),f.setAttribute(u,n));f.style.cssText="border: 1px dotted #000000; background-image: url('"+(f.getAttribute("type").toLowerCase()=="application/x-mplayer2"?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&&(f.style.width=i.style.width);i.style.height&&i.style.height.length>0&&(f.style.height=i.style.height);i.parentNode.insertBefore(f,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),t.length==0&&(t="<br/>"),t},_clearP:function(){var n,i,t,r,u;try{if(n=this._doc.body,n.firstChild&&n.firstChild.nodeType==3&&(i=Sys.Extended.UI.HTMLEditor.Trim(""+n.firstChild.data+""),i.length==0?n.removeChild(n.firstChild):i!=""+n.firstChild.data+""&&(n.firstChild.data=i)),Sys.Extended.UI.HTMLEditor.isIE&&n.childNodes.length==1&&(n=n.firstChild,n.nodeType==1&&(t=n.tagName.toLowerCase(),t=="p"||t=="ul"||t=="ol"))){r=!1;u=t=="ul"||t=="ol";function f(n){var i=!1,t;if(n.nodeType==1){if((t=n.tagName.toUpperCase(),!(u&&t=="LI")&&(Sys.Extended.UI.HTMLEditor.isRestricted(n)||t=="IMG"||t=="IFRAME"||t=="EMBED"||t=="SCRIPT"))||n.childNodes.length>1)return!0;if(n.childNodes.length==0)return!1;i|=f(n.firstChild)}else n.nodeType==3&&(i|=!0);return i}n.childNodes.length==1&&(f(n.firstChild)||(n.removeChild(n.firstChild),r=!0));(r||n.parentNode.innerHTML.toLowerCase()=="<p> <\/p>")&&this._doc.body.removeChild(n)}}catch(e){}},isControl:function(){var i,n,t;try{return i=this._getSelection(),Sys.Extended.UI.HTMLEditor.isIE?i.type.toLowerCase()=="control"?!0:!1:(n=this._createRange(i),t=this._getParent(n),t.nodeType!=3&&n.startContainer==n.endContainer?t.tagName?n.startContainer.childNodes.item(n.startOffset)==null?!1:n.startOffset==n.endOffset&&n.startContainer.childNodes.item(n.startOffset).tagName&&(n.startContainer.childNodes.item(n.startOffset).tagName.toUpperCase()=="BR"||Sys.Extended.UI.HTMLEditor.isStyleTag(n.startContainer.childNodes.item(n.startOffset).tagName))?!1:t.tagName.toUpperCase()=="BODY"&&n.startOffset==0&&n.endOffset>0&&n.endOffset==t.childNodes.length?!1:n.startOffset==n.endOffset&&n.startContainer.childNodes.item(n.startOffset).nodeType==3?!1:!0:!1:!1)}catch(r){return!0}},isPopup:function(){return this._popup!=null},_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{while(i&&i.nodeType)i=i.parentNode}catch(u){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 typeof n=="undefined"?this._doc.body.createTextRange():n.createRange();if(this.focusEditor(),typeof n=="undefined")return this._doc.createRange();try{return n.getRangeAt(0)}catch(t){return this._doc.createRange()}},toEndOfProtected:function(){var i=this,f=this._getSelection(),n,u,r,t;try{t=this._createRange(f)}catch(e){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),n==null&&(n=Sys.Extended.UI.HTMLEditor.contentEditable(t.endContainer))),Sys.Extended.UI.HTMLEditor.isIE&&n!=null){try{t.remove(n)}catch(o){}t=i._doc.body.createControlRange();t.add(n);t.select()}else Sys.Extended.UI.HTMLEditor.isIE||n==null||(u=i._getSelection(),n.nextSibling!=null&&n.nextSibling.nodeType==3?r=n.nextSibling:(r=i._doc.createTextNode(""),n.nextSibling!=null?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(),r!=null?(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,"<").replace(/>/g,">").replace(/\r/g,"").replace(/\n/g,"<br/>").replace(/\t/g," "),delete f);i.firstChild;)h.insertBefore(i.firstChild,i);r=null;n=null;i.nextSibling&&i.nextSibling.nodeType==3&&i.previousSibling&&i.previousSibling.nodeType==3&&(r=i.nextSibling,n=i.previousSibling);h.removeChild(i);u=null;r!=null&&n!=null&&(u=n.data.length,n.data=""+n.data+""+r.data+"",r.parentNode.removeChild(r));t.isWord=!1;t.isPlainText=!1;t.closeWait();u!=null&&(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(),r,u;if(Sys.Extended.UI.HTMLEditor.isIE){var t=this._createRange(i),f=this._createRange(i),o=this._doc.createElement("span"),e=this._doc.createElement("span");n[0].parentNode.insertBefore(o,n[0]);n[n.length-1].nextSibling?n[n.length-1].parentNode.insertBefore(e,n[n.length-1].nextSibling):n[n.length-1].parentNode.appendChild(e);try{t.moveToElementText(o);u=t.moveStart("character",1);t.moveStart("character",-u);f.moveToElementText(e);u=f.moveEnd("character",-1);f.moveEnd("character",-u);t.setEndPoint("EndToEnd",f);t.select()}catch(s){}n[0].parentNode.removeChild(o);n[n.length-1].parentNode.removeChild(e)}else r=this._doc.createRange(),r.setStart(n[0],0),r.setEnd(n[n.length-1],(""+n[n.length-1].data+"").length),this._removeAllRanges(i),this._selectRange(i,r)},_removeAllRanges:function(n){n.removeAllRanges()},_setToEnd:function(){var n=this;setTimeout(function(){n._setToEnd_();n._editPanel.updateToolbar()},0)},_setToEnd_:function(){var n=this,f,u,r,i;if(Sys.Extended.UI.HTMLEditor.isIE){u=n._getSelection();r=n._createRange(u);u.type.toLowerCase()!="control"&&(r.moveEnd("textedit",1),r.collapse(!1));r.select();n.focusEditor();return}var e=0,t=n._doc.body,i=null;if(t.lastChild&&t.lastChild.nodeType==3?(t=t.lastChild,e=(""+t.data+"").length):(f=n._doc.createTextNode(""),t.lastChild&&t.lastChild.nodeType==1&&t.lastChild.tagName.toUpperCase()=="BR"?t.insertBefore(f,t.lastChild):t.appendChild(f),t=f,e=0),u=n._getSelection(),n._removeAllRanges(u),r=n._createRange(),r.setStart(t,e),r.setEnd(t,e),n._selectRange(u,r),i!=null&&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(o){}},isShadowed:function(){var t,n,i,r,u;if(!this.isControl())return!1;if(t=this._getSelection(),n=this._createRange(t),i=Sys.Extended.UI.HTMLEditor.isIE?n.item(0):n.startContainer.childNodes.item(n.startOffset),i.tagName&&i.tagName.toUpperCase()=="IMG"&&i.getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&i.getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0){if(r=this.getAttachedElement(i),r!=null){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);t.collapseToEnd();this._removeAllRanges(t);n=this._createRange(t);n.setStart(r.parentNode,u);n.setEnd(r.parentNode,u+1);this._selectRange(t,n)}catch(f){return!0}return!1}return!0}return!1},_ifShadow:function(){var e,f,u,t;if(Sys.Extended.UI.HTMLEditor.isIE)try{e=this._doc.selection}catch(o){return!1}for(var i=this,r=null,n=Sys.Extended.UI.HTMLEditor.getSelParent(i);n&&(n.nodeType==3||n.tagName&&n.tagName.toUpperCase()!="BODY");){if(n.nodeType==3||!n.tagName){n=n.parentNode;continue}if(f=n.tagName.toUpperCase(),f=="TABLE"&&n.getAttribute(Sys.Extended.UI.HTMLEditor.noContextMenuAttribute)&&n.getAttribute(Sys.Extended.UI.HTMLEditor.noContextMenuAttribute)=="yes"){r=n.rows.item(0).cells.item(0).firstChild;Sys.Extended.UI.HTMLEditor.isIE&&f=="P"&&(r=r.firstChild);break}n=n.parentNode}if(r!=null)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(o){}},_saveContent:function(){var n,t,i;try{try{n=this._getSelection();t=this._createRange(n)}catch(r){}i=new Sys.Extended.UI.HTMLEditor._Marker(this,t,n)}catch(r){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(){var t,u,r,c,e,o,f,s,l,h,v,i,n,a;if(this.__stack&&this.__stackPos>=0&&this.__stackPos<this.__stack.length){if(t=this.__stack[this.__stackPos],Sys.Extended.UI.HTMLEditor.isIE){function y(n,t,i,r,u){return t.replace(/\salign=[^\s>]*/ig,"")+(r=='"X"'?"":"align="+r)+u.replace(/\salign=[^\s>]*/ig,"")}for(c=this._doc.body.getElementsByTagName("EMBED"),e=[],n=0;n<c.length;n++)e.push(c[n]);for(o=0;o<e.length;o++)e[o].parentNode.removeChild(e[o]);if(f=t._save.replace(/&/ig,"&"),f=f.replace(/(<embed(?:.*?))(teoalign=)(\"[^\"]*\")((?:.*?)>)/ig,y),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()),t._tree!=null){i=this._doc.body;try{for(n=t._tree.length-1;n>=0;n--)i=i.childNodes.item(t._tree[n])}catch(p){this.__stackPos>0&&(this.__stackPos--,this._restoreContent(),this.__stackPos++);return}try{l=this._doc.body.createControlRange();l.add(i);l.select()}catch(p){}}else h=this,setTimeout(function(){try{if(h._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){if(u=h._getSelection(),r=h._createRange(u),u.type.toLowerCase()!="control")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(p){}for(v="",i=this._doc.body,n=t._tree.length-1;n>=0;n--)v+=" "+t._tree[n],i=i.childNodes.item(t._tree[n]);a=t._offset;try{r.setStart(i,a);r.setEnd(i,a)}catch(p){Sys.Extended.UI.HTMLEditor.inspectForShadows(this._doc.body);return}try{this._selectRange(u,r)}catch(p){}}try{Sys.Extended.UI.HTMLEditor.inspectForShadows(this._doc.body)}catch(p){}}},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(i){}if(t._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{t._editPanel.updateToolbar()}catch(i){}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,s,y,r,i;if(Sys.Extended.UI.HTMLEditor.isIE){var r=this._getSelection(),i=this._createRange(r),h=!1,o="";if(n=="x"&&this._saveContent(),r.type.toLowerCase()=="control")h=!0,o=Sys.Extended.UI.HTMLEditor.getHTML(i.item(0),!0);else if(i.text!=""){if(h=!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]),l!=null&&f[0].previousSibling&&f[0].previousSibling.nodeType==3)for(e=l.parent;e&&e.tagName.toUpperCase()!="BODY"&&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!=""&&(h=!0,o=i.htmlText);h?(u=this._doc.createElement("DIV"),u.innerHTML="!!!<span><\/span>"+o,u.removeChild(u.firstChild),u.removeChild(u.firstChild),s=Sys.Extended.UI.HTMLEditor.getHTML(u,!1,!0),y=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":)","ig"),s=s.replace(y,"$1"),delete u,this._contentCopy(s,!0),i.select(),n=="x"&&(r.clear(),this._clearP())):n=="x"&&(r.clear(),this._clearP());t&&setTimeout(function(){v._editPanel.updateToolbar()},0)}else n=="x"?(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 f=this,v=this._getSelection(),o=this._createRange(v),l,a,r,i,s,h,e,c,u;if(!n){l=o.offsetLeft;a=o.offsetTop;this.insertHTML(this._getPlain());f.onContentChanged();return}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"),e!="no"){if(e.indexOf("left")>=0&&r.firstChild&&r.firstChild.tagName&&r.firstChild.tagName.toUpperCase()=="P"){while(r.firstChild.firstChild)i.previousSibling.appendChild(r.firstChild.firstChild);r.removeChild(r.firstChild)}if(e.indexOf("right")>=0&&r.lastChild&&r.lastChild.tagName&&r.lastChild.tagName.toUpperCase()=="P"){while(r.lastChild.lastChild)i.nextSibling.insertBefore(r.lastChild.lastChild,i.nextSibling.firstChild);r.removeChild(r.lastChild)}}if(c=i,u=null,r.childNodes.length==0&&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 while(r.firstChild)h.insertBefore(r.firstChild,i);setTimeout(function(){var t=f._getSelection(),n=f._createRange(t);if(t.type.toLowerCase()=="control")while(n.length>0)n.remove(0);try{n.collapse(!1)}catch(r){}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,h,u,l,s,f,e,y;if(n!=""&&(n=n.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,"$1 $3").replace(/(<td[^>]*?>)\s*( )\s*(<\/td[^>]*?>)/ig,"$1<br/>$3").replace(/(<p[^>]*?>)\s*( )\s*(<\/p[^>]*?>)/ig,"$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),h.nodeType==8&&(u=""+h.data+"",u.search(/StartFragment/i)>=0&&h.nextSibling&&h.nextSibling.nodeType==3&&(u=""+h.nextSibling.data+"",u.length&&u.charCodeAt(0)==160))){u=u.substr(1);h.nextSibling.data=u;a=!0;break}if(typeof i!="undefined"&&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){for(Sys.Extended.UI.HTMLEditor.operateAnchors(this,r,!this.showAnchors),Sys.Extended.UI.HTMLEditor.operatePlaceHolders(this,r,!this.showPlaceHolders),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"));var p=Sys.Extended.UI.HTMLEditor.Trim(r.body.innerHTML).replace(/<br\s*[\/]*>\s*<\/td>/ig,"<\/td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,"$1 $3").replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/ig,"$1 $3").replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/ig,'$1 wmode="transparent"$2'),l=r.body.getElementsByTagName("EMBED"),s=[];for(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){var v,w,i,r,a,h,c,u,l,f,y;if(this.focusEditor(),v=this._getSelection(),typeof t=="undefined"&&(t=this._createRange(v)),Sys.Extended.UI.HTMLEditor.isIE){function b(n,t){return'<span class="'+Sys.Extended.UI.HTMLEditor.smartClassName+"_script\" style='display:none;visibility:hidden;'>"+t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")+"<\/span>"}function k(n,t){return t.replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")}var e='<span id="'+Sys.Extended.UI.HTMLEditor.smartClassName+'">111<span><\/span>'+n+"<\/span>",d=Sys.Extended.UI.HTMLEditor.getHrefsText(e),g=Sys.Extended.UI.HTMLEditor.getImagesText(e);e=this._editPanel.get_noScript()?e.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,""):e.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,b);w=this;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(nt){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"),k)+"<span>qqq<\/span>",i.removeChild(i.firstChild),i.removeChild(i.lastChild),Sys.Extended.UI.HTMLEditor.setHrefsText(i,d),Sys.Extended.UI.HTMLEditor.setImagesText(i,g),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}for(r=this._doc.createElement("div"),r.innerHTML=n,a=r.getElementsByTagName("EMBED"),h=[],u=0;u<a.length;u++)h.push(a[u]);for(c=0;c<h.length;c++){var s=h[c],o=document.createElement("IMG"),p=s.attributes;for(o.src=this._images_list[1],o.setAttribute("dummytag","embed"),u=0;u<p.length;++u)(l=p.item(u),l.specified)&&(f=l.name.toLowerCase(),y=l.value,f=="src"?f="dummysrc":f=="bgcolor"?f="dummybgcolor":f=="wmode"&&(f="pseudomode"),o.setAttribute(f,y));o.getAttribute("type");o.style.cssText="border: 1px dotted #000000; background-image: url('"+(o.getAttribute("type").toLowerCase()=="application/x-mplayer2"?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,f,u;if(Sys.Extended.UI.HTMLEditor.isIE)return!1;if(r=this._getSelection(),typeof t=="undefined")try{t=this._createRange(r)}catch(s){return this._removeAllRanges(r),!1}if((i=t.startContainer,f=t.startOffset,i.ownerDocument.id!="EditorDocument")||t.startContainer.nodeType==1&&t.startContainer.tagName.toUpperCase()=="TR"||t.endContainer.nodeType==1&&t.endContainer.tagName.toUpperCase()=="TR")return!1;this._removeAllRanges(r);t.deleteContents();try{t=this._createRange()}catch(s){return this._removeAllRanges(r),!1}switch(i.nodeType){case 3:for(f>0&&(i=i.splitText(f));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>=f+1){for(i=i.childNodes.item(f);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)){while(n.firstChild)i.appendChild(n.firstChild);i.appendChild(u)}else{while(n.firstChild)i.parentNode.insertBefore(n.firstChild,i);i.parentNode.insertBefore(u,i)}i=u}if(i.nodeType==1){for(var e=i.parentNode,h=e,o=0;o<e.childNodes.length;o++)if(i==e.childNodes.item(o))break;t.setStart(e,o);t.setEnd(e,o)}else t.setStart(i,0),t.setEnd(i,0)}catch(s){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,s,h,u;if(r!=null)if(r.nextSibling&&r.nextSibling.nodeType==3){if(t=r.nextSibling,r.parentNode.removeChild(r),f=(""+t.data+"").indexOf(" "),f>0?t.splitText(f):f==0&&t.splitText(1),i.n_arr!=null)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(c){}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){var t=this._doc.createElement("SPAN"),e=this,i,r;if(t.id=Sys.Extended.UI.HTMLEditor.smartClassName,typeof n=="undefined"){if(!this.insertHTML(Sys.Extended.UI.HTMLEditor.getHTML(t,!0)))return null}else n.nextSibling==null?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();r!="BODY"&&r!="TD"&&r!="P"&&r!="DIV";)if(Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName))i=i.parentNode,r=i.tagName.toUpperCase();else break;if(r=="P"){t.setAttribute("para","");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;)(t.nodeType==1||t.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+t.data+"").length>0)&&(s=null,t.tagName&&t.tagName.toUpperCase()=="SCRIPT"&&(s=t.text),h=Sys.Extended.UI.HTMLEditor.myClone(t,e._doc,!0),o.childNodes.length!=0&&u?o.insertBefore(h,o.firstChild):o.appendChild(h),s!=null&&(h.text=s)),t=u?t.previousSibling:t.nextSibling;return o.childNodes.length==0&&(delete o,o=null),r==i?o:f(o,u?r.previousSibling:r.nextSibling,r.parentNode,u)}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(var i,u;n;){if(n.id&&n.id==c){p=!0;return}if(n.nodeType==3){while(n.nextSibling&&(n.nextSibling.nodeType==3||!Sys.Extended.UI.HTMLEditor.isIE&&typeof s.__saveBM__!="undefined"&&s.__saveBM__!=null&&s.__saveBM__[0]==n.nextSibling))n.nextSibling.nodeType==3?n.data=""+n.data+""+n.nextSibling.data+"":(s.__saveBM__[0]=n,s.__saveBM__[1]=(""+n.data+"").length),n.parentNode.removeChild(n.nextSibling);Sys.Extended.UI.HTMLEditor.Trim(""+n.data+"").length>0&&r.push(n)}else i=n.tagName,n.tagName&&(i=i.toUpperCase(),i=="MAP"||i=="AREA"||i=="SCRIPT"||i=="NOSCRIPT"||n.style&&(Sys.Extended.UI.HTMLEditor.getStyle(n,"display")=="none"||Sys.Extended.UI.HTMLEditor.getStyle(n,"visibility")=="hidden")||k(n.firstChild,!1));if(p)return;if(u=n.parentNode,t)while(n.nextSibling==null)n=n.parentNode;n=n.nextSibling}}var r=[],l,a,o,t,i,p,s,u,v;if(this.isControl())return r;var y=this._getSelection(),h=this._createRange(y),c=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",w=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",f=null,e=null,b;if(typeof n=="undefined")if(Sys.Extended.UI.HTMLEditor.isIE?(f=h.duplicate(),e=h.duplicate(),f.setEndPoint("EndToStart",h),e.setEndPoint("StartToEnd",h)):(f=h.cloneRange(),e=h.cloneRange(),f.setEnd(f.startContainer,f.startOffset),e.setStart(e.endContainer,e.endOffset),b=f.endOffset),this.insertHTML("<span id='"+c+"'/>",e)){if(Sys.Extended.UI.HTMLEditor.isOpera&&(f.setEnd(f.startContainer,b),f.setStart(f.startContainer,b)),!this.insertHTML("<span id='"+w+"'/>",f))return l=this._doc.getElementById(c),l!=null&&(u=l.parentNode,u.removeChild(l)),a=this._doc.getElementById(rl),a!=null&&(u=a.parentNode,u.removeChild(a)),r}else return r;else o=this._doc.createElement("SPAN"),o.id=c,this._doc.body.appendChild(o),o=this._doc.createElement("SPAN"),o.id=w,this._doc.body.insertBefore(o,this._doc.body.firstChild);if(t=this._doc.getElementById(w),i=this._doc.getElementById(c),t==null||i==null)return t!=null&&(u=t.parentNode,u.removeChild(t)),i!=null&&(u=i.parentNode,u.removeChild(i)),[];while(t.firstChild)t.removeChild(t.firstChild);while(i.firstChild)i.removeChild(i.firstChild);while(t.previousSibling&&t.previousSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+t.previousSibling.data+"").length==0)t.parentNode.removeChild(t.previousSibling);while(t.nextSibling&&t.nextSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+t.nextSibling.data+"").length==0)t.parentNode.removeChild(t.nextSibling);while(i.previousSibling&&i.previousSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+i.previousSibling.data+"").length==0)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling&&i.nextSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+i.nextSibling.data+"").length==0)i.parentNode.removeChild(i.nextSibling);return p=!1,s=this,k(t,!0),u=t.parentNode,u.removeChild(t),u=i.parentNode,u.removeChild(i),typeof n=="undefined"&&(Sys.Extended.UI.HTMLEditor.isIE?(y.empty(),e.select()):r.length>0&&(this._removeAllRanges(y),v=this._createRange(),v.setEnd(r[r.length-1],r[r.length-1].length),v.setStart(r[r.length-1],r[r.length-1].length),this._selectRange(y,v))),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,"<").replace(/>/g,">").replace(/\r/g,"").replace(/\n/g,"<br/>"),this._doc.removeChild(n),t},_execCommand:function(n,t,i){var f=this,r,u,e,i;if(!Sys.Extended.UI.HTMLEditor.isIE||this.isControl()||(r=this._getSelection(),u=this._createRange(r),e=u.parentElement(),e.tagName.toUpperCase()!="TEXTAREA")){n.toLowerCase()!="createlink"&&this._saveContent();switch(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(i!=null&&typeof i=="string"&&i.length==2&&i.substr(0,1).toUpperCase()=="H"&&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),s=Sys.Extended.UI.HTMLEditor.isIE?[r.boundingLeft,r.boundingTop]:[r.startContainer,r.startOffset],o=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&&this.__saveBM__!=null?(u=this._getSelection(),r=this._createRange(u),r.moveToBookmark(this.__saveBM__),r.select(),this.__saveBM__=null):this.__saveBM__!=null&&(this.__saveBM__[0].nodeType==3?(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()}),f=n.value,lt=n.repl,ft=!1,et=!1,h,a,c,r,b,y,e,o,k,l,nt,tt,ht,ot,p,it,rt;this._saveContent();var at=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",vt=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",w=this._doc.createElement("SPAN");for(w.id=vt,h=this._doc.createElement("SPAN"),h.id=at,t[0].parentNode.insertBefore(w,t[0]),t[t.length-1].nextSibling!=null?t[t.length-1].parentNode.insertBefore(h,t[t.length-1].nextSibling):t[t.length-1].parentNode.appendChild(h),Sys.Extended.UI.HTMLEditor.unStyle(w),Sys.Extended.UI.HTMLEditor.unStyle(h),a=[],e=0;e<t.length;e++){for(c=t[e],r=c.parentNode,b=0;b<a.length;b++)if(y=a[b],y.parent==r){y.textNodes.push(c);break}b==a.length&&a.push({parent:r,textNodes:[c]})}for(e=0;e<a.length;e++)if(y=a[e],y.textNodes.length>1){var s=y.textNodes,ut=this._doc.createElement("SPAN"),d=this._doc.createElement("SPAN");s[0].parentNode.insertBefore(ut,s[0]);s[s.length-1].nextSibling!=null?s[s.length-1].parentNode.insertBefore(d,s[s.length-1].nextSibling):s[s.length-1].parentNode.appendChild(d);Sys.Extended.UI.HTMLEditor._moveTagsUp(ut,d);ut.parentNode.removeChild(ut);d.parentNode.removeChild(d)}for(e=0;e<t.length;e++){for(var c=t[e],r=c.parentNode,st=!1;r&&r.tagName&&r.childNodes.length==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(r.tagName);){if(o=r.tagName.toUpperCase(),(o=="I"||o=="EM")&&n.name=="font-style"||(o=="B"||o=="STRONG")&&n.name=="font-weight"||(o=="S"||o=="STRIKE")&&n.name=="text-decoration"||o=="U"&&n.name=="text-decoration"||(o=="SUB"||o=="SUP")&&n.name=="vertical-align"){for(k=r,r=r.parentNode;k.firstChild;)r.insertBefore(k.firstChild,k);r.removeChild(k);st=!0;continue}else if(r.style&&r.style[u]&&r.style[u].length>0){if(l=r.style[u],u.toLowerCase().indexOf("color")>=0||u=="fontFamily"||u=="fontSize")r.style[u]=f;else if(lt)try{r.style[u]=r.style[u]+" "+f;l==r.style[u]&&(r.style[u]=f)}catch(yt){r.style[u]=f}else if(ft)if(et)r.style[u]=l.replace(f,"").replace(/,/,"");else try{r.style[u]=r.style[u]+" "+f;l==r.style[u]&&(r.style[u]=f)}catch(yt){r.style[u]=f}else{if(nt=l.replace(f,""),u=="fontWeight"&&l.toString()=="700"&&(nt=""),nt==l)try{r.style[u]=r.style[u]+" "+f;l==r.style[u]&&(r.style[u]=f)}catch(yt){r.style[u]=f}else r.style[u]=nt.replace(/,/,""),et=!0;ft=!0}st=!0}r=r.parentNode}st||et||(tt=this._doc.createElement("SPAN"),tt.style[u]=f,ht=c.parentNode,ht.insertBefore(tt,c),tt.appendChild(c),ft=!0)}var v=Sys.Extended.UI.HTMLEditor._commonTotalParent(w,h),ct=v.parent.childNodes.item(v.indexFirst).previousSibling,g=v.parent.childNodes.item(v.indexLast).nextSibling;w.parentNode.removeChild(w);h.parentNode.removeChild(h);ot=0;p=v.parent.childNodes.length;ct!=null&&(ot=Sys.Extended.UI.HTMLEditor.__getIndex(ct));g!=null&&(p=Sys.Extended.UI.HTMLEditor.__getIndex(g)+1,p<v.parent.childNodes.length&&(g.nodeType==3?p++:g.nodeType==1&&(it=g.tagName.toUpperCase(),it!="TR"&&it!="TD"&&it!="LI"&&p++)));Sys.Extended.UI.HTMLEditor.spanJoiner(v.parent,this._doc,ot,p);rt=this;i&&rt._selectRng(t);setTimeout(function(){Sys.Extended.UI.HTMLEditor.isIE||rt.focusEditor();rt._editPanel.updateToolbar()},0)},_tryExpand:function(n){function p(n){var t=/[\d\w]/;return t.test(n)?!1:(t=/[\u0080-\u024F]/,t.test(n))?!1:(t=/[\u0370-\u2000]/,t.test(n))?!1:!0}var b=[],o,s,l=this._getSelection(),t=this._createRange(l),h,c,k=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_add",d=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_add",a=Sys.Extended.UI.HTMLEditor.smartClassName+"_middle_add",v,f;if(Sys.Extended.UI.HTMLEditor.isIE&&typeof n=="undefined"&&(t.execCommand("bold"),this.__saveBM__=t.getBookmark(),t.execCommand("bold")),Sys.Extended.UI.HTMLEditor.isIE){var r=null,w="<span id="+a+"><\/span>",y=t.duplicate();try{t.pasteHTML(w)}catch(g){}if(r=this._doc.getElementById(a),r==null)return[];if(typeof n!="undefined"&&(this.__saveBM__=r),r.nextSibling!=null&&!Sys.Extended.UI.HTMLEditor.isInlineElement(r.nextSibling))return r.parentNode.removeChild(r),[];if(t.expand("word"),t.select(),t.text.length==0)return r.parentNode.removeChild(r),y.select(),[];if(v=new RegExp(w,"ig"),!v.test(t.htmlText.replace(/[\n\r]/g,"")))return r.parentNode.removeChild(r),y.select(),[];if(v=new RegExp(w+"(<\/span>| |[\\s])*$","ig"),v.test(t.htmlText.replace(/[\n\r]/g,"")))return r.parentNode.removeChild(r),y.select(),[];while(t.text.length>0&&t.text.substr(t.text.length-1,1)==" ")if(t.moveEnd("character",-1),t.select(),t.text.length==0)return r.parentNode.removeChild(r),y.select(),[];return typeof n=="undefined"&&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(g){}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||this._getTextNodeCollection().length==0)?(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||this._getTextNodeCollection().length==0)?(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?typeof n!="undefined"?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,i,r,t,u,f;for(this._StyleForTyping==null&&(this._StyleForTyping=[]),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)?r=!1:i.push(this._StyleForTyping[t]);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{n!=null&&r.moveToElementText(n);t!=null&&u.moveToElementText(t);n!=null&&t!=null?(r.setEndPoint("EndToEnd",u),r.select()):n!=null?r.select():t!=null&&u.select()}catch(s){}}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(s){}},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&&(t.type=="Caret"||t.type=="None"))n="";else{if(Sys.Extended.UI.HTMLEditor.isSafari&&i.cloneContents()==null)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(h==null)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(t.name=="font-weight"&&u=="700"&&(u="bold"),t.name=="font-weight"&&f=="700"&&(f="bold"),/MSIE (5|6)/.test(navigator.userAgent)&&n.toLowerCase()=="strikethrough"&&(u=="underline"||f=="underline")){while(i&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName)){if(i.style.textDecoration.indexOf("line-through")>=0){u=i.style.textDecoration;break}i=i.parentNode}while(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&&(n.toLowerCase()=="strikethrough"||n.toLowerCase()=="underline")){for(e=n.toLowerCase(),e=="strikethrough"&&(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}while(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,this._StyleForTyping!=null&&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(l){return!1}},_textAlignState:function(n){var t=this._rangeStartEnd(),i,r;if(t==null)return!1;try{return i=this._textAlignStateSingle(t.start),r=this._textAlignStateSingle(t.end),i==n&&r==n}catch(u){return!1}},_textAlignStateSingle:function(n){while(n&&Sys.Extended.UI.HTMLEditor.isStyleTag(n.tagName))n=n.parentNode;if(n!=null){var t=n.tagName.toUpperCase();if(t=="P"||t=="DIV")return n.style.textAlign.toLowerCase()}return null},_rangeStartEnd:function(){var e,u,f;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(n.text.length==0)t=i=this._getParent(n);else{var o=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_marker",s=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_marker",h=n.duplicate(),c=n.duplicate();h.setEndPoint("EndToStart",n);c.setEndPoint("StartToEnd",n);c.pasteHTML("<span id='"+o+"'/>");h.pasteHTML("<span id='"+s+"'/>");u=this._doc.getElementById(s);f=this._doc.getElementById(o);t=u.parentNode;i=f.parentNode;u.parentNode.removeChild(u);f.parentNode.removeChild(f)}else{function r(t,i){for(var u=null;u==null;)if(u=t.nodeType==3?i&&n.startContainer!=n.endContainer&&n.startOffset==t.length&&t.nextSibling?r(t.nextSibling,i):!i&&n.startContainer!=n.endContainer&&n.endOffset==0&&t.previousSibling?r(t.previousSibling,i):t:(i?t.firstChild:t.lastChild)==null?null:r(i?t.firstChild:t.lastChild,i),u==null){if(t=i?t.nextSibling:t.previousSibling,t==null)return null}else return u}if(e=this._getParent(n),e.nodeType!=3&&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);t!=null&&t.parentNode!=null&&(t=t.parentNode);t==null&&(t=n.startContainer);i=r(n.endContainer,!1);i!=null&&i.parentNode!=null&&(i=i.parentNode);i==null&&(i=n.endContainer)}return{start:t,end:i}}catch(a){return null}},rtlState:function(){return this._doc.body.style.direction&&this._doc.body.style.direction=="rtl"?!0:!1},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(/>/g,">").replace(/</g,"<").replace(/&/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(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/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&&document.compatMode!="BackCompat"&&(this._onresize$delegate=Function.createDelegate(this,this._onresize))};Sys.Extended.UI.HTMLEditor.HtmlPanel.prototype={_activate:function(n){var t,i;this._shouldResize=!1;t=this.get_element();Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version>6&&document.compatMode!="BackCompat"&&t.parentNode.clientHeight>0&&(this._shouldResize=!0);Sys.Extended.UI.HTMLEditor.HtmlPanel.callBaseMethod(this,"_activate");Sys.Extended.UI.HTMLEditor.isIE?(t.value="",i=this,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(i){}},_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(t){}},0)}catch(i){}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.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 this._activeMode==null?this.get_contentElement()!=null?this._getContentForPostback():"":this.getContent()},set_content:function(n){if(!this.get_isInitialized()||!this._loaded){this.get_contentElement()!=null&&(this.get_contentElement().value=n.replace(/\"/g,"""));return}this.setContent(n);this._contentPrepared=!1;this._loaded&&this.raisePropertyChanged("content")},get_activeMode:function(){return this._activeMode==null?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&&t!=null&&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 this._toolbars==null&&(this._toolbars=[]),this._toolbars},set_toolbars:function(n){this.get_toolbars().push(n)},get_toolbarIds:function(){},set_toolbarIds:function(n){var i,t;if(!this.get_isInitialized()){this._cachedToolbarIds=n;return}for(i=n.split(";"),t=0;t<i.length;t++)i[t].length>0&&this.set_toolbars($find(i[t]))},get_modePanels:function(){return this._modePanels==null&&(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(n==null||typeof n=="undefined")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 s,i,t,u,n,r,f,e,o;this.__appLoaded__||(this.__appLoaded__=!0,this._disposed)||(s=this,this._loaded=!0,this.set_activeMode(parseInt(this.get_activeModeElement().value)),this._cachedToolbarIds!=null&&(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&&document.compatMode!="BackCompat"&&(this._shouldResize=!0),this._shouldResize&&(i=this.get_modePanels(),t=i[Sys.Extended.UI.HTMLEditor.ActiveModeType.Design],t==null&&(t=i[Sys.Extended.UI.HTMLEditor.ActiveModeType.Preview]),u=i[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html],t!=null&&u!=null&&(n=t.get_element(),n.style.display="",r=n.offsetHeight,f=!1,r==0&&(f=!0,e=Sys.Extended.UI.HTMLEditor.setElementVisibility(n.parentNode),r=n.offsetHeight),u.get_element().style.height=r+"px",f&&(Sys.Extended.UI.HTMLEditor.restoreElementVisibility(e),delete e),n.style.display="none")),o=this.get_contentElement().value.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/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);this._eAfter!=null&&(this.raisePropertyChanged("activeMode"),this.raiseActiveModeChanged(this._eAfter),this._eAfter=null)},_focused:function(n){if(!(typeof n!="undefined"&&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(?:[^>]*?)>)/ig,""));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(i!=null&&typeof i!="undefined"){this._contentForValidation=t;try{for(r=0;r<i.length;r++)window.ValidatorValidate(i[r],null,n);window.ValidatorUpdateIsValid()}catch(u){}this._contentForValidation=null}},_prepareContentForPostback:function(n){this.get_contentElement().value=n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,""")},_getContentForPostback:function(){return this.get_contentElement().value.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/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/ig,"")),this._shouldResize&&n==Sys.Extended.UI.HTMLEditor.ActiveModeType.Html&&(i=this.get_activePanel(),r=this.get_modePanels()[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html],i!=null&&r!=null)){var u=i.get_element(),f=u.offsetHeight,h=!1,e;f==0&&(h=!0,e=Sys.Extended.UI.HTMLEditor.setElementVisibility(u.parentNode),f=u.offsetHeight);r.get_element().style.height=f+"px";h&&(Sys.Extended.UI.HTMLEditor.restoreElementVisibility(e),delete e)}return this.disableToolbars(n),o._deactivate(),this._activeMode=n,this.setContent(t),!0},disableToolbars:function(n){for(var t,i=0;i<this.get_toolbars().length;i++)t=this.get_toolbars()[i],t._loaded&&t.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){this._cachedEditPanel=n;return}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 this._buttons==null&&(this._buttons=[]),this._buttons},set_buttons:function(n){this.get_buttons().push(n)},get_buttonIds:function(){},set_buttonIds:function(n){var i,t;if(!this.get_isInitialized()){this._cachedButtonIds=n;return}for(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(){this._cachedButtonIds!=null&&(this.set_buttonIds(this._cachedButtonIds),this._cachedButtonIds=null);this._loaded=!0;this._cachedEditPanel!=null&&(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.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.CommonButton.prototype={get_preservePlace:function(){return this._preservePlace},set_preservePlace:function(n){this._preservePlace=n},set_activeEditPanel:function(n){this._editPanel=n;this._editPanel==null?this.hideButton():this.isAllowedActiveMode(this._editPanel.get_activeMode())&&this.canBeShown()?(this.showButton(),this.onEditPanelActivity()):this.hideButton()},isImage:function(){return!0},checkRangeInDesign:function(){if(typeof this._designPanel=="undefined"||this._designPanel==null||this._designPanel.isPopup())return!1;var n=Sys.Extended.UI.HTMLEditor.getSelParent(this._designPanel);return n.nodeType==3&&(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(n){var t="Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_"+this.get_buttonName()+"_message_"+n;return eval(t)},isDisplayed:function(){var t=this.get_element(),n;return t?(n=t.style,n.display!="none"&&n.visibility!="hidden"):!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&&(n.style.display=="none"&&(n.style.display=""),this._preservePlace&&(n.style.visibility="visible"))},canBeShown:function(){return!0},onEditPanelActivity:function(){},get_activeModes:function(){return this._activeModes==null&&(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(){Sys.Extended.UI.HTMLEditor.ToolbarButton.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){function t(n){var i,r;if(n.nodeType==1&&n.tagName)for(i=n.tagName.toUpperCase(),i!="INPUT"&&i!="TEXTAREA"&&i!="IFRAME"&&(n.unselectable="on"),r=0;r<n.childNodes.length;r++)t(n.childNodes.item(r))}t(n)}else try{n.style.MozUserSelect="none";n.parentNode.style.MozUserSelect="none"}catch(i){}},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.ToolbarButton.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):!1},_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):!1},_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):!1},_onclick:function(){return this.isEnable()?!0:!1},isEnable:function(){return this._loaded?this._editPanel==null?!1:!0:!1},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.ToolbarButton.CommonButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.initializeBase(this,[n]);this._normalSrc="";this._hoverSrc="";this._downSrc="";this._activeSrc="";this._downTimer=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.ImageButton.callBaseMethod(this,"_onmouseover")?(this._hoverSrc.length>0&&(this.get_element().src=this._hoverSrc),!0):!1},_onmouseout:function(){var n=this.get_element();return Sys.Extended.UI.HTMLEditor.ToolbarButton.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):!1},_onmousedown:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(this,"_onmousedown")===null?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.ToolbarButton.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,this._downTimer!=null&&(clearTimeout(this._downTimer),this._downTimer=null)),!0):!1},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.ToolbarButton.ImageButton.callBaseMethod(this,"setActivity",[n])}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.prototype={_onmousedown:function(n){return this._designPanel==null?!1:this._designPanel.isPopup()?!1:Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.callBaseMethod(this,"_onmousedown",[n])===null?!1:(this.callMethod(),!1)},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){return this._designPanel==null?!1:this._designPanel.isPopup()?!1:!0}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.prototype={onEditPanelActivity:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.callBaseMethod(this,"onEditPanelActivity");this.setActivity(this.checkState())},checkState:function(){return this.checkRangeInDesign()?!0:!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("strikeThrough",!1,null)},checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.callBaseMethod(this,"checkState")?this._designPanel._queryCommandState("strikeThrough"):!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.callBaseMethod(this,"callMethod"))return!1;this._designPanel.redo()}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton.initializeBase(this,[n]);this._activeMode=Sys.Extended.UI.HTMLEditor.ActiveModeType.Design};Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton.prototype={get_activeMode:function(){return this._activeMode},set_activeMode:function(n){this._activeMode=n},_onclick:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.ModeButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode",Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord.prototype={callMethod:function(){var n;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.PasteWord.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText.prototype={callMethod:function(){var n;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.PasteText.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste.prototype={canBeShown:function(){return Sys.Extended.UI.HTMLEditor.isIE},callMethod:function(){var n,t,i;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.Paste.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.prototype={checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.callBaseMethod(this,"checkState")?this._designPanel._textAlignState(""):!1},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("Paragraph")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.prototype={checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.callBaseMethod(this,"checkState")?this._designPanel._textAlignState(null):!1},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.RemoveAlignment.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("InsertOrderedList")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList",Sys.Extended.UI.HTMLEditor.ToolbarButton.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(n){this._registeredFields=eval(n)},get_registeredHandlers:function(){return this._registeredHandlers},set_registeredHandlers:function(n){this._registeredHandlers=eval(n)},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&&(t._iframe.style.height=="0px"||t._iframe.style.width=="0px")&&(this.isLoaded=!1),!this.isLoaded)?(this.isLoading||this.reload(),typeof n!="undefined"&&setTimeout(n,10),!1):!0},_baseOpen:function(n,t,i){var r=this,u;this.checkCorrectLoaded(function(){r._baseOpen(n,t,i)})&&(u=this.get_element(),typeof i!="undefined"&&(this._left=parseInt(i)),typeof t!="undefined"&&(this._top=parseInt(t)),u.style.top=this._top+"px",u.style.left=this._left+"px",setTimeout(function(){typeof n=="function"&&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";typeof n=="function"&&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){setTimeout(function(){n._afterReload()},10);return}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=t.popupMediator.registeredHandlers,i,r=0;r<u.length;r++)if(i=u[r],i.name==n)return i.callMethod;return null},t.popupMediator.set_callMethodByName=function(n,i){for(var f=t.popupMediator.registeredHandlers,r,u=0;u<f.length;u++)r=f[u],r.name==n&&(r.callMethod=i)},t.popupMediator.getField=function(n){for(var u=t.popupMediator.registeredFields,i,r=0;r<u.length;r++)if(i=u[r],i.name==n)return t.document.getElementById(i.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 t=="INPUT"||t=="TEXTAREA"?!0:!1};else for(n._doc.onmousedown=function(n){var t=n.target.tagName.toUpperCase();return t=="INPUT"||t=="TEXTAREA"||t=="SELECT"?!0:Sys.Extended.UI.HTMLEditor.isSafari&&(t=="TABLE"||t=="TR"||t=="TD"||t=="DIV")?!0:!1},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;if(!this.isLoaded){setTimeout(function(){t._onDocumentLoaded(n)},10);return}this.isLoaded=!0;n(this._iframe.contentWindow)},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(this._relatedElement!=null){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&&t.tagName.toUpperCase()!="BODY";){if(f=Sys.Extended.UI.HTMLEditor.getStyle(t,"position"),f=="absolute"||f=="fixed"){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}else f=="relative"&&(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.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.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.prototype={callMethod:function(){var n,t,i;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.Ltr.callBaseMethod(this,"checkState")?this._designPanel._doc.body.style.direction&&this._designPanel._doc.body.style.direction=="rtl"?!1:!0:!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.prototype={checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.callBaseMethod(this,"checkState")?this._designPanel._textAlignState("right"):!1},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("JustifyRight")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.prototype={checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.callBaseMethod(this,"checkState")?this._designPanel._textAlignState("left"):!1},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("JustifyLeft")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.prototype={checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.callBaseMethod(this,"checkState")?this._designPanel._textAlignState("justify"):!1},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("JustifyFull")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.initializeBase(this,[n]);this._relatedPopup=null;this._autoClose=!0;this._forclose_onmousedown$delegate=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.prototype={set_activeEditPanel:function(n){this._editPanel!=n&&this._editPanel!=null&&this.closePopup();Sys.Extended.UI.HTMLEditor.ToolbarButton.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||this._forclose_onmousedown$delegate==null)&&this._relatedPopup!=null){if(this._bookmark=null,Sys.Extended.UI.HTMLEditor.isIE)if(u=this._designPanel._getSelection(),this._selType=u.type.toLowerCase(),f=this._designPanel._createRange(u),this._selType=="text"||this._selType=="none")try{this._bookmark=f.duplicate()}catch(s){}else this._selType=="control"&&(this._bookmark=f.item(0),f.remove(0),u.empty());if(typeof this._relatedPopup.set_relatedElement=="function"){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(){r._forclose_onmousedown$delegate!=null&&(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(this._forclose_onmousedown$delegate==null)return!0;if(this._relatedPopup.isOpened)this._relatedPopup.close();else return!0;if(this._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{this._bookmark&&(Sys.Extended.UI.HTMLEditor.isIE&&(this._selType=="control"?(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(e){}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(e){}return(this._forclose_onmousedown$delegate=null,n&&n.type&&n.type=="keydown")?(Sys.Extended.UI.HTMLEditor._stopEvent(n),!1):!0},closePopup:function(){this._forclose_onmousedown$delegate!=null&&this._forclose_onmousedown$delegate(null)},dispose:function(){this._forclose_onmousedown$delegate!=null&&this._forclose_onmousedown$delegate(null);Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.prototype={set_activeEditPanel:function(n){var t,i;this._editPanel!=n&&this._editPanel!=null&&(t=this.get_relatedPopup(),typeof t._forceImClose=="function"&&(i=t._forceImClose,i(t._iframe.contentWindow)));Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.callBaseMethod(this,"set_activeEditPanel",[n])},callMethod:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.callBaseMethod(this,"callMethod")?(this.openPopup(Function.createDelegate(this,this._onopened)),!0):!1},_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.ToolbarButton.OkCancelPopupButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.prototype={checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.callBaseMethod(this,"checkState")?this._designPanel._textAlignState("center"):!1},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("JustifyCenter")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.prototype={callMethod:function(){var i;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.callBaseMethod(this,"callMethod"))return!1;var t=this._designPanel,r=t._getSelection(),u=t._createRange(r),n=Sys.Extended.UI.HTMLEditor.getSelParent(t);for(n.nodeType==3&&(n=n.parentNode);n&&Sys.Extended.UI.HTMLEditor.isStyleTag(n.tagName)&&n.tagName.toUpperCase()!="A";)n=n.parentNode;if(n&&n.tagName.toUpperCase()=="A"){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.ToolbarButton.RemoveLink.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.prototype={callMethod:function(){var n,t,i;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.Rtl.callBaseMethod(this,"checkState")?this._designPanel._doc.body.style.direction&&this._designPanel._doc.body.style.direction=="rtl"?!0:!1:!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);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(){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){function t(n){var i,r;if(n.nodeType==1&&n.tagName)for(i=n.tagName.toUpperCase(),i!="INPUT"&&i!="TEXTAREA"&&i!="IFRAME"&&(n.unselectable="on"),r=0;r<n.childNodes.length;r++)t(n.childNodes.item(r))}t(n)}else try{n.style.MozUserSelect="none";n.parentNode.style.MozUserSelect="none"}catch(i){}},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()&&this._activated!=null&&(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):!1},_onmouseout:function(n){if(!this.isEnable())return!1;var t=n.toElement||n.relatedTarget;try{while(t&&typeof t!="undefined")if(t==this._activated)break;else t=t.parentNode}catch(n){t=null}return t!=null?!0:(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):!1},_onclick:function(n){return this.isEnable()?(this.callMethod(n),!0):!1},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?!0:!1}};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.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.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.callBaseMethod(this,"callMethod"))return!1;var n=this._designPanel;setTimeout(function(){var ct=Sys.Extended.UI.HTMLEditor.isIE?"":Sys.Extended.UI.HTMLEditor.Trim(n.getSelectedHTML()),h=n._getSelection(),s=n._createRange(h),i=null,et=!1,e,f,ot,it,r,v,k,st,y,g,d,o,l,u,c,a,nt,rt,t,ut,p;if(!n.isControl()&&(Sys.Extended.UI.HTMLEditor.isIE&&s.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&ct.length>0)?i=n._getTextNodeCollection():(i=n._tryExpand(),et=!0),i!=null&&i.length>0){for(ut=!1,p=!0,n._saveContent(),e=n._doc.createElement("span"),e.id="_left_",f=n._doc.createElement("span"),f.id="_right_",ot=i[0].parentNode,it=i[i.length-1].parentNode,ot.insertBefore(e,i[0]),i[i.length-1].nextSibling?it.insertBefore(f,i[i.length-1].nextSibling):it.appendChild(f);p;)for(p=!1,o=0;o<i.length;o++)if(r=i[o].parentNode,r&&i[o].previousSibling==null&&i[o].nextSibling==null&&(v=r.tagName.toUpperCase(),Sys.Extended.UI.HTMLEditor.isStyleTag(v)&&v!="A"&&(r.className!=Sys.Extended.UI.HTMLEditor.smartClassName||v.substr(0,1)=="H")))if(k=Sys.Extended.UI.HTMLEditor.differAttr(r,["class","color","face","size"]),ut=!0,k.length==0){var y=r.parentNode,l=r.firstChild?r.firstChild:null,tt=null;if(v.toUpperCase().substr(0,1)=="H"&&Sys.Extended.UI.HTMLEditor.isIE)for(tt=n._doc.createElement("p"),tt.className=Sys.Extended.UI.HTMLEditor.smartClassName,y.insertBefore(tt,r);r.firstChild;)tt.appendChild(r.firstChild);else{while(r.firstChild)y.insertBefore(r.firstChild,r);v.toUpperCase().substr(0,1)=="H"&&(st=n._doc.createElement("br"),y.insertBefore(st,r))}y.removeChild(r);p=!0}else{for(y=r.parentNode,g=n._doc.createElement(v),d=0;d<k.length;d++)g.setAttribute(k[d][0],k[d][1]);for(y.insertBefore(g,r);r.firstChild;)g.appendChild(r.firstChild);y.removeChild(r)}for(o=0;o<i.length;o++)if(l=i[o],u=i[o].parentNode!=null&&typeof i[o].parentNode!="undefined"?i[o].parentNode:null,u){for(c=null;u&&u.tagName&&u.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(u.tagName)&&u.tagName.toUpperCase()!="A"&&Sys.Extended.UI.HTMLEditor.differAttr(u,["class","color","face","size"]).length==0;)c=u,u=u.parentNode;if(c){ut=!0;function ft(n,t,i,r){var u=i.cloneNode(!1),e,l,s,o,h,f;if(n)if(n.push&&typeof n.push=="function")for(e=0;e<n.length;e++)u.appendChild(n[e]);else u.appendChild(n);while(t)l=r?t.previousSibling:t.nextSibling,(t.nodeType==1||t.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+t.data+"").length>0)&&(t.nodeType==1&&(Sys.Extended.UI.HTMLEditor.isStyleTag(t.tagName)&&t.tagName.toUpperCase()!="A"&&(!t.id||t.id!="_left_"&&t.id!="_right_")&&Sys.Extended.UI.HTMLEditor.spanJoiner(t),Sys.Extended.UI.HTMLEditor.isStyleTag(t.tagName)&&t.childNodes.length==0&&(!t.id||t.id!="_left_"&&t.id!="_right_")&&(t=null)),t&&(u.childNodes.length!=0&&r?u.insertBefore(t,u.firstChild):u.appendChild(t))),t=l;if(u.childNodes.length==0)delete u,u=null;else if(u.childNodes.length==1&&u.firstChild.nodeType==3&&(""+u.firstChild.data+"").length==0)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),f.nodeType!=1||Sys.Extended.UI.HTMLEditor.isStyleTag(f.tagName)||s--;if(s==0){for(h=[];u.firstChild;)f=u.removeChild(u.firstChild),h.push(f);u=h}}return i==c?u:ft(u,r?i.previousSibling:i.nextSibling,i.parentNode,r)}u=l.parentNode;l.previousSibling==null&&l.nextSibling==null&&u&&u.tagName&&u.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(u.tagName)&&Sys.Extended.UI.HTMLEditor.differAttr(u,["class","color","face","size"]).length>0&&(l=u);var w=ft(null,l.previousSibling,l.parentNode,!0),b=ft(null,l.nextSibling,l.parentNode,!1),r=c.parentNode;if(w){if(w.push&&typeof w.push=="function")for(a=0;a<w.length;a++)r.insertBefore(w[a],c);else r.insertBefore(w,c);Sys.Extended.UI.HTMLEditor.isIE&&(e=n._doc.getElementById("_left_"),f=n._doc.getElementById("_right_"))}if(r.insertBefore(l,c),b){if(b.push&&typeof b.push=="function")for(a=0;a<b.length;a++)r.insertBefore(b[a],c);else r.insertBefore(b,c);Sys.Extended.UI.HTMLEditor.isIE&&(e=n._doc.getElementById("_left_"),f=n._doc.getElementById("_right_"))}r.removeChild(c)}}if(et)if(Sys.Extended.UI.HTMLEditor.isIE&&n.__saveBM__!=null){try{for(t=e.parentNode,t.removeChild(e);t&&t.childNodes.length==0;)t.parentNode.removeChild(t),t=t.parentNode;for(t=f.parentNode,t.removeChild(f);t&&t.childNodes.length==0;)t.parentNode.removeChild(t),t=t.parentNode;e=null;f=null}catch(lt){}h=n._getSelection();s=n._createRange(h);s.moveToBookmark(n.__saveBM__);s.select();n.__saveBM__=null}else n.__saveBM__!=null&&(n.__saveBM__[0].nodeType==3?(h=n._getSelection(),s=n._doc.createRange(),s.setStart(n.__saveBM__[0],n.__saveBM__[1]),s.setEnd(n.__saveBM__[0],n.__saveBM__[1]),n._removeAllRanges(h),n._selectRange(h,s)):(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{h=n._getSelection();nt=n._createRange(h);rt=n._createRange(h);nt.moveToElementText(e);rt.moveToElementText(f);nt.setEndPoint("EndToEnd",rt);nt.select()}catch(lt){}else{i=[];p=!1;function ht(n,t){while(n){if(n==f){p=!0;return}if(n.nodeType==3){while(n.nextSibling&&n.nextSibling.nodeType==3)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 ht(n.firstChild,!1);if(p)return;var r=n.parentNode;if(t)while(n&&n.nextSibling==null)n=n.parentNode;n=n.nextSibling}}ht(e,!0);s=n._doc.createRange();s.setStart(i[0],0);s.setEnd(i[i.length-1],(""+i[i.length-1].data+"").length);n._removeAllRanges(h);n._selectRange(h,s)}try{if(e!=null)for(t=e.parentNode,t.removeChild(e);t&&t.childNodes.length==0;)t.parentNode.removeChild(t),t=t.parentNode;if(f!=null)for(t=f.parentNode,t.removeChild(f);t&&t.childNodes.length==0;)t.parentNode.removeChild(t),t=t.parentNode}catch(lt){}n.onContentChanged();n._editPanel.updateToolbar()}},0)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("underline",!1,null)},checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.callBaseMethod(this,"checkState")?this._designPanel._queryCommandState("underline"):!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("superScript",!1,null)},checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.callBaseMethod(this,"checkState")?this._designPanel._queryCommandState("superScript"):!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("subScript",!1,null)},checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.callBaseMethod(this,"checkState")?this._designPanel._queryCommandState("subScript"):!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.SelectButton.prototype={initialize:function(){var i=this.get_element().id,n,t;for(Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.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)?!1:(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.ToolbarButton.SelectButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.callBaseMethod(this,"callMethod"))return!1;this._designPanel.undo()}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("italic",!1,null)},checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.callBaseMethod(this,"checkState")?this._designPanel._queryCommandState("italic"):!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.prototype={callMethod:function(){var n,r,t,i,u;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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(f){}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("Outdent")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.Cut.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy.prototype={canBeShown:function(){return Sys.Extended.UI.HTMLEditor.isIE},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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.ToolbarButton.Copy.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.initializeBase(this,[n]);this._fixedColorButton=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.prototype={get_fixedColorButton:function(){return this._fixedColorButton},set_fixedColorButton:function(n){this._fixedColorButton=n},callMethod:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.callBaseMethod(this,"callMethod")?(this.openPopup(Function.createDelegate(this,this._onopened)),!0):!1},_onopened:function(n){n.setColor=Function.createDelegate(this,this.setColor)},setColor:function(n){this.closePopup();this._fixedColorButton!=null&&this._fixedColorButton.set_defaultColor(n)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton.prototype={callMethod:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton.callBaseMethod(this,"callMethod")?(this.openPopup(Function.createDelegate(this,this._onopened)),!0):!1},_onopened:function(n){n.setColor=Function.createDelegate(this,this.setColor)},setColor:function(){this.closePopup()}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode",Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("InsertUnorderedList")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("bold",!1,null)},checkState:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.callBaseMethod(this,"checkState")?this._designPanel._queryCommandState("bold"):!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.callBaseMethod(this,"callMethod"))return!1},setColor:function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.callBaseMethod(this,"setColor",[n]);this._designPanel._execCommand("backcolor",!1,n)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("backcolor",!1,"")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.callBaseMethod(this,"initialize")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.initializeBase(this,[n]);this._emptySrc=window.location.href.replace(/(http[s]*\:\/\/)[^\u0000]*/i,"$1")};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.prototype={callMethod:function(){var t=this._designPanel,i=t._getSelection(),r=t._createRange(i),n=Sys.Extended.UI.HTMLEditor.getSelParent(t);for(n.nodeType==3&&(n=n.parentNode);n&&Sys.Extended.UI.HTMLEditor.isStyleTag(n.tagName)&&n.tagName.toUpperCase()!="A";)n=n.parentNode;if(n&&n.tagName.toUpperCase()=="A")this._edit=!0,this._editLink(n);else if(this._edit=!1,!this._createLink())return!1;return Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.callBaseMethod(this,"callMethod")?!0:!1},opened:function(n){this._preparePopup(n)},ok:function(n){var t=n.popupMediator.getField("target"),i;if(t!=null&&(this._obj.target=t.value),i=n.popupMediator.getField("url"),i!=null&&(this._obj.href=i.value),/^javascript:/.test(this._obj.href)){this._obj.target=null;try{this._obj.removeAttribute("target")}catch(r){}}else t=n.popupMediator.getField("target"),t!=null&&(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,h=Sys.Extended.UI.HTMLEditor.isIE?"":Sys.Extended.UI.HTMLEditor.Trim(n.getSelectedHTML()),f=n._getSelection(),i=n._createRange(f),e,c,r,l,a,u,s,o,t,v,y;if(this._txt=null,n.isControl()&&Sys.Extended.UI.HTMLEditor.getSelParent(n).tagName&&(Sys.Extended.UI.HTMLEditor.getSelParent(n).tagName.toUpperCase()=="EMBED"||Sys.Extended.UI.HTMLEditor.getSelParent(n).tagName.toUpperCase()=="IMG")||!n.isControl()&&(Sys.Extended.UI.HTMLEditor.isIE&&i.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&h.length>0)||(n._saveContent(),e=n._doc.createElement("span"),e.innerHTML="new link",e.id=Sys.Extended.UI.HTMLEditor.smartClassName,c=!0,Sys.Extended.UI.HTMLEditor.isIE&&n.isControl()?(r=i.item(0),l=n._doc.createElement("span"),r.parentNode.insertBefore(l,r),this._txt=e.firstChild,r.parentNode.insertBefore(this._txt,r),a=n._doc.createElement("span"),r.parentNode.insertBefore(a,r),r.parentNode.removeChild(r),n.setSelectionAfterOperation([l,a],!1),c=!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?c&&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)),h=Sys.Extended.UI.HTMLEditor.isIE?"":Sys.Extended.UI.HTMLEditor.Trim(n.getSelectedHTML()),f=n._getSelection(),i=n._createRange(f)),n.isControl()&&Sys.Extended.UI.HTMLEditor.getSelParent(n).tagName.toUpperCase()=="IMG"||!n.isControl()&&(Sys.Extended.UI.HTMLEditor.isIE&&i.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&h.length>0)){for(n._saveContent(),this._obj={target:"default",href:this._emptySrc,title:""},s=n._doc.getElementsByTagName("A"),o=[],t=0;t<s.length;t++)o.push([s[t],""+s[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)}else return this._txt&&(n._undo(!1),n.__stack.pop()),!1;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&&this._obj.target=="default"&&(this._obj.target=this.get_relatedPopup().get_defaultTarget());i=n.popupMediator.getField("target");i!=null&&(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");t!=null&&(t.value=this._edit?Sys.Extended.UI.HTMLEditor.getRealAttribute(this._obj,"href"):this._obj.href,t.value.length==0&&(t.value=this._emptySrc),t.value=t.value.replace(/\"/g,'"'),setTimeout(function(){Sys.Extended.UI.HTMLEditor.setSelectionRange(t,0,t.value.length)},0))},_edit_callback:function(n){var t=this._designPanel;try{n?(this._obj.title.length==0&&(this._obj.title=null,this._obj.removeAttribute("title")),t.onContentChanged()):t._undo(!1)}catch(i){}return!0},okCheck:function(n){var i=n.popupMediator.getField("url"),t;return i!=null?(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):!0:!1},_create_callback:function(n){var t=this._designPanel,u,s,f,h,e,o,i,r;try{if(n){for(u=t._doc.getElementsByTagName("A"),s=0,f=0;f<u.length;f++){for(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=" ",i.nextSibling!=null?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(c){}return!0}};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink",Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.prototype={_onmousedown:function(n){return this._designPanel==null?!1:this._designPanel.isPopup()?!1:Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.callBaseMethod(this,"_onmousedown",[n])===null?!1:(this.callMethod(),!1)},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){return this._designPanel==null?!1:this._designPanel.isPopup()?!1:!0}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("Indent")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode",Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.prototype={isImage:function(){return!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.callBaseMethod(this,"callMethod"))return!1},setColor:function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.callBaseMethod(this,"setColor",[n]);this._designPanel._execCommand("forecolor",!1,n)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.callBaseMethod(this,"callMethod"))return!1;this._designPanel._execCommand("forecolor",!1,"")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor.callBaseMethod(this,"callMethod"))return!1},setColor:function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor.callBaseMethod(this,"setColor",[n]);this._designPanel._execCommand("forecolor",!1,n)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColor",Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.initializeBase(this,[n]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.prototype={onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel();this.checkState()},checkState:function(){return this.checkRangeInDesign()?!0:!1},callMethod:function(){return Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.callBaseMethod(this,"callMethod")?this._designPanel==null?!1:this._designPanel.isPopup()?!1:!0:!1}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"initialize")},callMethod:function(n){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"callMethod"))return!1;try{var t=this._designPanel;t._execCommand("fontname",!1,n.options.item(n.selectedIndex).value)}catch(i){}},checkState:function(){var u,n,i,t,f,e,r;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"checkState"))return!1;u=this._designPanel;n=null;try{n=Function.createDelegate(u,Sys.Extended.UI.HTMLEditor._queryCommandValue)("fontname")}catch(o){}if(u._FontNotSet||n&&n.length!=0||(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(o){t=0}}i.selectedIndex=t}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.initializeBase(this,[n]);this._defaultColor="#000000";this._colorDiv=null;this._methodButton=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.prototype={get_defaultColor:function(){return this._defaultColor},set_defaultColor:function(n){this._defaultColor=n;this._colorDiv!=null&&(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(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.callBaseMethod(this,"callMethod"))return!1;this.setColor(this.get_defaultColor())},setColor:function(){},initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.callBaseMethod(this,"initialize");this._methodButton!=null&&(this._methodButton.callMethod=Function.createDelegate(this,this.callMethod));this._colorDiv!=null&&(this._colorDiv.callMethod=Function.createDelegate(this,this.callMethod))}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.prototype={setColor:function(n){this._designPanel._execCommand("forecolor",!1,n)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor",Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor.prototype={setColor:function(n){this._designPanel._execCommand("backcolor",!1,n)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor",Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton);Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize=function(n){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.initializeBase(this,[n])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(this,"initialize")},callMethod:function(n){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.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(i){}},checkState:function(){var i,t,f,e,r;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(this,"checkState"))return!1;var u=this._designPanel,n=null,o=this._select.id;try{n=Function.createDelegate(u,Sys.Extended.UI.HTMLEditor._queryCommandValue)("fontsize",o)}catch(s){}n&&(n=n.toString());u._FontNotSet||n&&n.length!=0||(n=Sys.Extended.UI.HTMLEditor.getStyle(u._doc.body,"font-size"),n=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(n,this,o));try{if(i=this._select,t=0,n&&n.length>0){for(f=n.toLowerCase().split(",")[0],t=0;t<i.options.length;t++)if(e=Sys.Extended.UI.HTMLEditor.fontSizeSeek(i.options.item(t).value.toLowerCase().split(",")[0]),e==f)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(s){t=0}}i.selectedIndex=t}catch(s){}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton);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&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||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||document.compatMode=="BackCompat"||(this.get_element().style.height="100%");(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||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 t=!1,n;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&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||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;(typeof n=="undefined"||n==null)&&(t.style.height="");i=Sys.Extended.UI.HTMLEditor.Editor.MidleCellHeightForIE(t.parentNode.parentNode.parentNode,t.parentNode);t.style.height=i;typeof this.get_editPanel().get_activePanel()._onresize!="undefined"&&this.get_editPanel().get_activePanel()._onresize()}catch(r){}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&&document.compatMode!="BackCompat"||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;(Sys.Browser.version==8||Sys.Extended.UI.HTMLEditor.isOpera)&&(u=n.style.height,o=n.parentNode.style.height,u.indexOf("px")>0?r=parseInt(u):u=="100%"&&o.indexOf("px")>0&&(r=parseInt(o)));f=(r-e)*100/(r*1)+"%"}catch(s){f=""}return f},function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.HtmlEditorExtenderBehavior=function(n){Sys.Extended.UI.HtmlEditorExtenderBehavior.initializeBase(this,[n]);this._textbox=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n);var t=this.get_id();this._backColor=null;this._foreColor=null;this._commandName=null;this._savedRange=null;this._isInFocus=null;this._oldContents=null;this._newContents=null;this._isDirty=!1;this._viewMode="content";this._displaySourceTab=!1;this._ButtonWidth=23;this._ButtonHeight=21;this._containerTemplate={nodeName:"div",properties:{id:t+"_ExtenderContainer"},cssClasses:["unselectable","ajax__html_editor_extender_container"]};this._editableTemplate={nodeName:"div",properties:{id:t+"_ExtenderContentEditable",style:{overflow:"auto",clear:"both"},contentEditable:!0},cssClasses:["ajax__html_editor_extender_texteditor"]};this._sourceViewTemplate={nodeName:"div",properties:{id:t+"_ExtenderSourceView",style:{height:"90%",overflow:"auto",clear:"both"},contentEditable:!0},cssClasses:["ajax__html_editor_extender_texteditor"]};this._buttonTemplate={nodeName:"input",properties:{type:"button",style:{width:this._ButtonWidth+"px",height:this._ButtonHeight+"px"}},cssClasses:["ajax__html_editor_extender_button"]};this._buttonContentTemplate={nodeName:"input",properties:{type:"button",style:{width:this._ButtonWidth+"px",height:this._ButtonHeight+"px"}},cssClasses:["ajax__html_editor_extender_button ajax__html_editor_extender_content"]};this._buttonSourceTemplate={nodeName:"input",properties:{type:"button",style:{width:this._ButtonWidth+"px",height:this._ButtonHeight+"px"}},cssClasses:["ajax__html_editor_extender_button ajax__html_editor_extender_source"]};this._textboxTemplate={nodeName:"input",properties:{type:"text"}};this._dropDownTemplate={nodeName:"select",properties:{style:{width:this._ButtonWidth+"px",height:this._ButtonHeight+"px"}},cssClasses:["ajax__html_editor_extender_button"]};this._topButtonContainerTemplate={nodeName:"div",properties:{id:t+"_ExtenderButtonContainer"},cssClasses:["ajax__html_editor_extender_buttoncontainer"]};this._topButtonContainerTemplate2={nodeName:"div",properties:{id:t+"_ExtenderButtonContainer2",style:{clear:"both"}},cssClasses:["ajax__html_editor_extender_buttoncontainer2"]};this._container=null;this._toolbarButtons=null;this._editableDiv=null;this._sourceViewDiv=null;this._topButtonContainer=null;this._topButtonContainer2=null;this._buttons=[];this._btnClickHandler=null;this._requested_buttons=[];this._colorPicker=null;this._txtBoxForColor=null;this._contentViewButton=null;this._sourceViewButton=null;this._popupDiv=null;this._btnDone=null;this._btnCancel=null;this._isFocusInEditableDiv=!1;this._textBoxOnBlurDelegate=null;this._editableDivOnBlurDelegate=null;this._editableDivOnFocusDelegate=null;this._btnClickDelegate=null;this._contentViewClickDelegate=null;this._sourceViewClickDelegate=null;this._sourceViewDivOnBlurDelegate=null;this._imageCancelClickDelegate=null;typeof WebForm_OnSubmit!="function"||Sys.Extended.UI.HtmlEditorExtenderBehavior._originalWebForm_OnSubmit||(Sys.Extended.UI.HtmlEditorExtenderBehavior._originalWebForm_OnSubmit=WebForm_OnSubmit,WebForm_OnSubmit=Sys.Extended.UI.HtmlEditorExtenderBehavior.WebForm_OnSubmit)};Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype={initialize:function(){var i,t;for(Sys.Extended.UI.HtmlEditorExtenderBehavior.callBaseMethod(this,"initialize"),n[n.length]=this,this._button_list=[],this._createContainer(),this._createTopButtonContainer(),this._createButton(),this._createEditableDiv(),this.get_displaySourceTab()&&(this._createSourceViewDiv(),this._createTopButtonContainer2()),i=this._textbox._element.parentNode;i!=null&&i.nodeName!="FORM";)i=i.parentNode;if(i==null)throw"Missing Form tag";t=this.get_id();this._popupDiv=$get(t+"_popupDiv");this._popupDiv==null&&(t=t.indexOf("_")!=-1?t.substring(t.lastIndexOf("_")+1):"",this._popupDiv=$get(t+"_popupDiv"));this._popupDiv!=null&&(this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:t+"_ImagePopupBehavior",parentElement:this.get_element(),unselectable:"on"},null,null,this._popupDiv),this._btnCancel=$get(t+"_btnCancel"),this._imageCancelClickDelegate=Function.createDelegate(this,this._btnCancel_click),$addHandler(this._btnCancel,"click",this._imageCancelClickDelegate,!0),this._elementVisible(this._popupDiv,!1));this._textBoxOnBlurDelegate=Function.createDelegate(this,this._textBox_onblur);this._editableDivOnBlurDelegate=Function.createDelegate(this,this._editableDiv_onblur);this._editableDivOnFocusDelegate=Function.createDelegate(this,this._editableDiv_onfocus);this._btnClickDelegate=Function.createDelegate(this,this._executeCommand);this.get_displaySourceTab()&&(this._contentViewClickDelegate=Function.createDelegate(this,this._contentView_click),this._sourceViewClickDelegate=Function.createDelegate(this,this._sourceView_click),this._sourceViewDivOnBlurDelegate=Function.createDelegate(this,this._sourceViewDiv_onblur));$addHandler(this._textbox._element,"blur",this._textBoxOnBlurDelegate,!0);$addHandler(this._editableDiv,"blur",this._editableDivOnBlurDelegate,!0);$addHandler(this._editableDiv,"focus",this._editableDivOnFocusDelegate,!0);$addHandler(this._topButtonContainer,"click",this._btnClickDelegate,!0);this.get_displaySourceTab()&&($addHandler(this._contentViewButton,"click",this._contentViewClickDelegate,!0),$addHandler(this._sourceViewButton,"click",this._sourceViewClickDelegate,!0),$addHandler(this._sourceViewDiv,"blur",this._sourceViewDivOnBlurDelegate,!0))},_dispose:function(){$removeHandler(this._textbox._element,"blur",this._textBoxOnBlurDelegate);$removeHandler(this._editableDiv,"blur",this._editableDivOnBlurDelegate);$removeHandler(this._editableDiv,"focus",this._editableDivOnFocusDelegate);$removeHandler(this._topButtonContainer,"click",this._btnClickDelegate);this.get_displaySourceTab()&&($removeHandler(this._contentViewButton,"click",this._contentViewClickDelegate),$removeHandler(this._sourceViewButton,"click",this._sourceViewClickDelegate),$removeHandler(this._sourceViewDiv,"blur",this._sourceViewDivOnBlurDelegate));this._popupDiv!=null&&$removeHandler(this._btnCancel,"click",this._imageCancelClickDelegate);Sys.Extended.UI.HtmlEditorExtenderBehavior.callBaseMethod(this,"dispose")},_createContainer:function(){var t=this.get_element(),n;this._container=$common.createElementFromTemplate(this._containerTemplate,t.parentNode);this._elementVisible(this._textbox._element,!0);n=$common.getBounds(this._textbox._element);$common.setSize(this._container,{width:n.width,height:n.height});this._elementVisible(this._textbox._element,!1);$common.wrapElement(this._textbox._element,this._container,this._container)},_createTopButtonContainer:function(){this._topButtonContainer=$common.createElementFromTemplate(this._topButtonContainerTemplate,this._container)},_createButton:function(){var f=Sys.Browser.agent==Sys.Browser.InternetExplorer,n,r,t,u;for(i=0;i<this._toolbarButtons.length;i++)if(this._toolbarButtons[i].CommandName=="HorizontalSeparator")n=$common.createElementFromTemplate({nodeName:"span",cssClasses:["ajax__html_editor_extender_separator"]},this._topButtonContainer);else if(this._toolbarButtons[i].CommandName=="FontName"){n=$common.createElementFromTemplate({nodeName:"nobr",properties:{style:{float:"left",cssFloat:"left",fontSize:"11px"}},cssClasses:["fontnameclass"],children:[{nodeName:"span",properties:{textContent:"Font ",innerText:"Font ",style:{paddingLeft:"5px",fontWeight:"bold"}}}]},this._topButtonContainer);_select=$common.createElementFromTemplate({nodeName:"select",properties:{style:{fontSize:"9px",fontFamily:"Arial",height:"20px",width:"90px"}},events:{change:function(){var n=this.options[this.selectedIndex].value;setTimeout(function(){document.execCommand("fontname",!1,n)},200)}}},n);r=[{Text:"Arial",Value:"arial,helvetica,sans-serif"},{Text:"Courier New",Value:"courier new,courier,monospace"},{Text:"Georgia",Value:"georgia,times new roman,times,serif"},{Text:"Tahoma",Value:"tahoma,arial,helvetica,sans-serif"},{Text:"Times New Roman",Value:"times new roman,times,serif"},{Text:"Verdana",Value:"verdana,arial,helvetica,sans-serif"},{Text:"Impact",Value:"impact"},{Text:"WingDings",Value:"wingdings"}];for(x in r){t=document.createElement("option");t.text=r[x].Text;t.value=r[x].Value;try{_select.add(t,null)}catch(e){_select.add(t)}}_select.setAttribute("id",this._id+this._toolbarButtons[i].CommandName);_select.setAttribute("name",this._toolbarButtons[i].CommandName);_select.setAttribute("title",this._toolbarButtons[i].Tooltip);_select.setAttribute("unselectable","on")}else if(this._toolbarButtons[i].CommandName=="FontSize"){n=$common.createElementFromTemplate({nodeName:"nobr",properties:{style:{float:"left",cssFloat:"left",fontSize:"11px"}},cssClasses:["fontsizeclass"],children:[{nodeName:"span",properties:{textContent:"Size ",innerText:"Size ",style:{paddingLeft:"5px",fontWeight:"bold"}}}]},this._topButtonContainer);_select=$common.createElementFromTemplate({nodeName:"select",properties:{style:{fontSize:"11px",fontFamily:"Arial",height:"20px",width:f?"30px":"50px"}},events:{change:function(){var n=this.options[this.selectedIndex].value;setTimeout(function(){document.execCommand("fontsize",!1,n)},200)}}},n);r=[{Text:"1",Value:"1"},{Text:"2",Value:"2"},{Text:"3",Value:"3"},{Text:"4",Value:"4"},{Text:"5",Value:"5"},{Text:"6",Value:"6"},{Text:"7",Value:"7"}];for(x in r){t=document.createElement("option");t.text=r[x].Text;t.value=r[x].Value;try{_select.add(t,null)}catch(e){_select.add(t)}}_select.setAttribute("id",this._id+this._toolbarButtons[i].CommandName);_select.setAttribute("name",this._toolbarButtons[i].CommandName);_select.setAttribute("title",this._toolbarButtons[i].Tooltip);_select.setAttribute("unselectable","on")}else this._toolbarButtons[i].CommandName=="ForeColor"?(n=$common.createElementFromTemplate({nodeName:"span",properties:{style:{backgroundColor:"#ff0000",border:"solid 1px #c2c2c2",display:"block",float:"left",cssFloat:"left"}},cssClasses:["forecolorclass"]},this._topButtonContainer),n.setAttribute("unselectable","on"),this._foreColor=$common.createElementFromTemplate({nodeName:"input",properties:{type:"button",id:this._id+this._toolbarButtons[i].CommandName,name:this._toolbarButtons[i].CommandName,title:this._toolbarButtons[i].Tooltip,style:{backgroundColor:"transparent",width:"21px",height:"19px",color:"transparent"}},cssClasses:["ajax__html_editor_extender_button ajax__html_editor_extender_"+this._toolbarButtons[i].CommandName]},n),this._foreColor.setAttribute("unselectable","on")):this._toolbarButtons[i].CommandName=="BackColor"?(n=$common.createElementFromTemplate({nodeName:"span",properties:{style:{backgroundColor:"#ff0000",border:"solid 1px #c2c2c2",display:"block",float:"left",cssFloat:"left"}},cssClasses:["backcolorclass"]},this._topButtonContainer),n.setAttribute("unselectable","on"),this._backColor=$common.createElementFromTemplate({nodeName:"input",properties:{type:"button",id:this._id+this._toolbarButtons[i].CommandName,name:this._toolbarButtons[i].CommandName,title:this._toolbarButtons[i].Tooltip,style:{backgroundColor:"transparent",width:"21px",height:"19px",color:"transparent"}},cssClasses:["ajax__html_editor_extender_button ajax__html_editor_extender_"+this._toolbarButtons[i].CommandName]},n),this._backColor.setAttribute("unselectable","on")):(u={Copy:1,Cut:1,Paste:1},Sys.Browser.agent!=Sys.Browser.InternetExplorer&&u[this._toolbarButtons[i].CommandName]||(n=$common.createElementFromTemplate({nodeName:"input",properties:{type:"button",id:this._id+this._toolbarButtons[i].CommandName,name:this._toolbarButtons[i].CommandName,title:this._toolbarButtons[i].Tooltip,style:{width:"23px",height:"21px"}},cssClasses:["ajax__html_editor_extender_button ajax__html_editor_extender_"+this._toolbarButtons[i].CommandName]},this._topButtonContainer),n.setAttribute("unselectable","on")),Array.add(this._buttons,n))},_createEditableDiv:function(){var t=this.get_id(),n;this._elementVisible(this._container,!0);n=this.get_displaySourceTab()?this._container.clientHeight-(this._topButtonContainer.clientHeight+25):this._container.clientHeight-this._topButtonContainer.clientHeight;this._elementVisible(this._container,!1);this._editableDiv=$common.createElementFromTemplate({nodeName:"div",properties:{id:t+"_ExtenderContentEditable",style:{height:n+"px",overflow:"auto",clear:"both"},contentEditable:!0},cssClasses:["ajax__html_editor_extender_texteditor"]},this._container);this._textbox._element.value=this._textbox._element.value.replace("&amp;","&");this._editableDiv.innerHTML=this._textbox._element.value;this._oldContents=this._editableDiv.innerHTML;$common.setVisible(this._textbox._element,!1)},_createTopButtonContainer2:function(){this._topButtonContainer2=$common.createElementFromTemplate(this._topButtonContainerTemplate2,this._container);this._contentViewButton=$common.createElementFromTemplate(this._buttonContentTemplate,this._topButtonContainer2);this._sourceViewButton=$common.createElementFromTemplate(this._buttonSourceTemplate,this._topButtonContainer2)},_createSourceViewDiv:function(){var n=this.get_id(),t=this._container.clientHeight-25;this._sourceViewDiv=$common.createElementFromTemplate({nodeName:"div",properties:{id:n+"_ExtenderSourceView",style:{height:t+"px",overflow:"auto",clear:"both"},contentEditable:!0},cssClasses:["ajax__html_editor_extender_texteditor"]},this._container);$common.setVisible(this._sourceViewDiv,!1)},_editableDiv_onblur:function(){this._textbox._element.value=this._encodeHtml();this._isFocusInEditableDiv=!1;this._oldContents!=this._editableDiv.innerHTML&&(this._isDirty=!0,this._oldContents=this._editableDiv.innerHTML,this._raiseEvent("change"))},_editableDiv_onfocus:function(){this._isFocusInEditableDiv=!1},_sourceViewDiv_onblur:function(){this._oldContents!=(this._sourceViewDiv.innerText||this._sourceViewDiv.textContent)&&(this._isDirty=!0,this._editableDiv.innerHTML=this._sourceViewDiv.textContent!=undefined?this._sourceViewDiv.textContent:this._sourceViewDiv.innerText,this._oldContents=this._editableDiv.innerHTML,this._raiseEvent("change"))},_textBox_onblur:function(){this._editableDiv.innerHTML=this._textbox._element.value},_contentView_click:function(){this._viewMode!="content"&&($common.setVisible(this._topButtonContainer,!0),$common.setVisible(this._editableDiv,!0),this._editableDiv.innerHTML=this._sourceViewDiv.textContent!=undefined?this._sourceViewDiv.textContent:this._sourceViewDiv.innerText,this._oldContents=this._editableDiv.innerHTML,$common.setVisible(this._sourceViewDiv,!1),this._viewMode="content")},_sourceView_click:function(){this._viewMode!="source"&&($common.setVisible(this._sourceViewDiv,!0),this._sourceViewDiv.textContent!=undefined?this._sourceViewDiv.textContent=this._editableDiv.innerHTML:this._sourceViewDiv.innerText=this._editableDiv.innerHTML,this._oldContents=this._editableDiv.innerHTML,$common.setVisible(this._editableDiv,!1),$common.setVisible(this._topButtonContainer,!1),this._viewMode="source")},_btnCancel_click:function(){this._popupBehavior.hide()},_attributes:{style:"st_yle_",size:"si_ze_",color:"co_lor_",face:"fa_ce_",align:"al_ign_"},_rgbToHex:function(n){var t=/rgb\s?\(\s?(\d+)\s?,\s?(\d+)\s?,\s?(\d+)\s?\)/.exec(n);return"#"+(parseInt(t[3],10)|parseInt(t[2],10)<<8|parseInt(t[1],10)<<16).toString(16)},_encodeHtml:function(){for(var r=Sys.Browser.agent==Sys.Browser.InternetExplorer,o=this._editableDiv.getElementsByTagName("*"),t,n,u,f,i,e=0;t=o[e];e++){try{t.className="";t.removeAttribute("class")}catch(s){}try{t.id="";t.removeAttribute("id")}catch(s){}try{t.removeAttribute("width")}catch(s){}r}return n=this._editableDiv.innerHTML,r&&(u=/\<[^\>]+\>/g,n=n.replace(u,function(n){var t="",i="";return n.toLowerCase().substring(0,2)!="<a"?(t=/\=\'([^\'])*\'/g,i=/\=([^\"][^\s\/\>]*)/g,n.replace(t,'="$1"').replace(i,"=$1")):n})),f=this._rgbToHex,i=function(){n=n.replace(/(\<[^\>]+)(rgb\s?\(\d{1,3}\s?\,\s?\d{1,3}\s?\,\s?\d{1,3}\s?\))([^\>]*\>)/gi,function(n,t,i,r){return(t||"")+(i&&f(i)||"")+(r||"")})},i(),i(),n=n.replace(/\sclass\=\"\"/gi,"").replace(/\sid\=\"\"/gi,""),n=n.replace(/\<(\/?)strong\>/gi,"<$1b>").replace(/\<(\/?)em\>/gi,"<$1i>"),n=n.replace(/&/ig,"&").replace(/\xA0/ig," "),n=n.replace(/</ig,"<").replace(/>/ig,">").replace(/\'/ig,"'").replace(/\"/ig,""")},_editableDiv_submit:function(){var t=3,n=null;setTimeout(function(){this._editableDiv!=null&&this._editableDiv.focus()},0);Sys.Browser.agent!=Sys.Browser.Firefox&&(document.selection?(n=document.selection.createRange(),n.moveStart("character",t),n.select()):(n=window.getSelection(),n.collapse(this._editableDiv.firstChild,t)));this._textbox._element.value=this._encodeHtml()},_executeCommand:function(n){var u,f,c,t,e,l,o,i,s;if(n.target.name!=undefined)if(u=Sys.Browser.agent==Sys.Browser.Firefox,f=Function.createDelegate(this,this._colorPicker_onchange),u&&document.execCommand("styleWithCSS",!1,!1),c={JustifyRight:1,JustifyLeft:1,JustifyCenter:1,JustifyFull:1,Indent:1,Outdent:1},c[n.target.name])try{document.execCommand(n.target.name,!1,null)}catch(h){if(h&&h.result==2147500037){var a=window.getSelection().getRangeAt(0),r=document.createElement("div"),v=!1;for(r.style.height="1px;",a.startContainer.contentEditable=="true"&&(window.getSelection().collapseToEnd(),v=!0),t=window.getSelection().getRangeAt(0).startContainer;t&&t.contentEditable!="true";)t=t.parentNode;if(!t)throw"Selected node is not editable!";t.insertBefore(r,t.childNodes[0]);document.execCommand(n.target.name,!1,null);r.parentNode.removeChild(r);v&&window.getSelection().addRange(a)}else window.console&&window.console.log&&window.console.log(h)}else if(n.target.name=="createLink")e=prompt("Please insert URL",""),e&&document.execCommand("createLink",!1,e);else if(n.target.name=="ForeColor")this._commandName=n.target.name,this.saveSelection(),this._foreColorPicker||(this._foreColorPicker=$create(Sys.Extended.UI.ColorPickerBehavior,{unselectable:"on"},{},{},this._foreColor),this._foreColorPicker.set_sample(this._foreColor.parentNode),this._foreColorPicker.add_colorSelectionChanged(f)),this._foreColorPicker.show();else if(n.target.name=="BackColor")this._commandName=n.target.name,this.saveSelection(),this._backColorPicker||(this._backColorPicker=$create(Sys.Extended.UI.ColorPickerBehavior,{unselectable:"on"},{},{},this._backColor),this._backColorPicker.set_sample(this._backColor.parentNode),this._backColorPicker.add_colorSelectionChanged(f)),this._backColorPicker.show();else if(n.target.name=="UnSelect")u?(this._editableDiv.focus(),l=window.getSelection(),l.collapse(this._editableDiv.firstChild,0)):document.execCommand(n.target.name,!1,null);else if(n.target.name=="InsertImage"){for(this._isFocusInEditableDiv||this._editableDiv.focus(),this.saveSelection(),o=Sys.Application.getComponents(),i=0;i<o.length;i++)if(s=o[i],Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(s)&&s._popupBehavior._visible)return;this._elementVisible(this._popupDiv,!0);this._popupBehavior.show();$common.setStyle(this._popupDiv,{position:"fixed",top:"",left:"",opacity:"1"})}else document.execCommand(n.target.name,!1,null)},_colorPicker_onchange:function(n){if(this.restoreSelection(),/backcolor/i.test(this._commandName)){var t=Sys.Browser.agent==Sys.Browser.Firefox;t?(document.execCommand("stylewithcss",!1,!0),document.execCommand("hilitecolor",!1,"#"+n._selectedColor),document.execCommand("stylewithcss",!1,!1)):document.execCommand("backcolor",!1,"#"+n._selectedColor)}else document.execCommand(this._commandName,!1,"#"+n._selectedColor)},saveSelection:function(){window.getSelection?this._savedRange=window.getSelection().getRangeAt(0):document.selection&&(this._savedRange=document.selection.createRange())},restoreSelection:function(){if(this._isInFocus=!0,this._savedRange!=null)if(window.getSelection){var n=window.getSelection();n.rangeCount>0&&n.removeAllRanges();n.addRange(this._savedRange)}else document.createRange?window.getSelection().addRange(this._savedRange):document.selection&&this._savedRange.select()},_elementVisible:function(n,t){n.tagName!="FORM"&&(t?(n.style.display=="none"&&(n.style.display="block",n.setAttribute("displayChanged",!0)),n.style.visibility=="hidden"&&(n.style.visibility="visible",n.setAttribute("visibleChanged",!0)),this._elementVisible(n.parentNode,!0)):(n.getAttribute("displayChanged")&&(n.style.display="none",n.removeAttribute("displayChanged")),n.getAttribute("visibleChanged")&&n.removeAttribute("visibleChanged"),this._elementVisible(n.parentNode,!1)))},_raiseEvent:function(n,t){var i=this.get_events().getHandler(n);i&&(t||(t=Sys.EventArgs.Empty),i(this,t))},get_ButtonWidth:function(){return this._ButtonWidth},set_ButtonWidth:function(n){this._ButtonWidth!=n&&(this._ButtonWidth=n,this.raisePropertyChanged("ButtonWidth"))},get_ButtonHeight:function(){return this._ButtonHeight},set_ButtonHeight:function(n){this._ButtonHeight!=n&&(this._ButtonHeight=n,this.raisePropertyChanged("ButtonHeight"))},get_ToolbarButtons:function(){return this._toolbarButtons},set_ToolbarButtons:function(n){this._toolbarButtons!=n&&(this._toolbarButtons=n,this.raisePropertyChanged("ToolbarButtons"))},get_displaySourceTab:function(){return this._displaySourceTab},set_displaySourceTab:function(n){this._displaySourceTab!=n&&(this._displaySourceTab=n,this.raisePropertyChanged("DisplaySourceTab"))},add_change:function(n){this.get_events().addHandler("change",n)},remove_change:function(n){this.get_events().removeHandler("change",n)},get_isDirty:function(){return this._isDirty}};Sys.Extended.UI.HtmlEditorExtenderBehavior.registerClass("Sys.Extended.UI.HtmlEditorExtenderBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.HtmlEditorExtenderBehavior,{name:"HtmlEditorExtender",parameters:[{name:"ToolbarButtons",type:"HtmlEditorExtenderButton[]"}]});var n=[];Sys.Extended.UI.HtmlEditorExtenderBehavior.WebForm_OnSubmit=function(){var r=Sys.Extended.UI.HtmlEditorExtenderBehavior._originalWebForm_OnSubmit(),t,n,i;if(r)for(t=Sys.Application.getComponents(),n=0;n<t.length;n++)i=t[n],Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(i)&&i._editableDiv_submit();return r};Sys.Extended.UI.HtmlEditorExtenderBehavior.IsDirty=function(){for(var i=Sys.Application.getComponents(),n,t=0;t<i.length;t++)if(n=i[t],Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(n)&&n._isDirty)return!0;return!1};ajaxClientUploadComplete=function(n,t){for(var i=null,o=Sys.Application.getComponents(),u,f,r,e=0;e<o.length;e++)u=o[e],Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(u)&&u._popupBehavior._visible&&(i=u,e=u.length);if(f=t.get_postedUrl().replace("&","&"),i!=null){if(i.restoreSelection(),document.selection&&document.selection.createRange)try{i._savedRange.pasteHTML("<img src='"+f+"' />")}catch(s){r=document.createElement("img");r.src=f;i._savedRange.insertNode(r)}else r=document.createElement("img"),r.src=f,i._savedRange.insertNode(r);if(n._filesInQueue.length==n._currentQueueIndex+1){while(n._filesInQueue.length>=1)n._filesInQueue[0].removeNodeFrom(n._queueContainer),Array.removeAt(n._filesInQueue,0);n._showFilesCount();n._reset();i._popupBehavior.hide()}}}}window.Sys&&Sys.loader?Sys.loader.registerScript("HtmlEditorExtenderBehavior",["ExtendedBase","ExtendedCommon"],n):n()}();Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.LineChart=function(n){Sys.Extended.UI.LineChart.initializeBase(this,[n]);var t=this.get_id();t=t.replace("_ctl00","");this._parentDiv=document.getElementById(t+"__ParentDiv");this._chartWidth="300";this._chartHeight="300";this._chartTitle="";this._categoriesAxis="";this._series=null;this._chartType=Sys.Extended.UI.LineChartType.Basic;this._theme="LineChart";this._valueAxisLines=9;this._chartTitleColor="";this._valueAxisLineColor="";this._categoryAxisLineColor="";this._baseLineColor="";this._tooltipBackgroundColor="#ffffff";this._tooltipFontColor="#0E426C";this._tooltipBorderColor="#B85B3E";this._areaDataLabel="";this.yMax=0;this.yMin=0;this.roundedTickRange=0;this.startX=0;this.startY=0;this.endX=0;this.endY=0;this.xInterval=0;this.yInterval=0;this.arrXAxis;this.arrXAxisLength=0;this.charLength=3.5;this.arrCombinedData=null;this._toolTipDiv};Sys.Extended.UI.LineChart.prototype={initialize:function(){if(Sys.Extended.UI.LineChart.callBaseMethod(this,"initialize"),!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"))throw"Browser does not support SVG.";this._valueAxisLines==0&&(this._valueAxisLines=9);this.generateTooltipDiv();this.generateLineChart()},dispose:function(){Sys.Extended.UI.LineChart.callBaseMethod(this,"dispose")},generateTooltipDiv:function(){this._divTooltip=$common.createElementFromTemplate({nodeName:"div",properties:{id:this.get_id()+"_tooltipDiv",style:{position:"absolute",backgroundColor:this._tooltipBackgroundColor,borderStyle:"solid",borderWidth:"5px",borderColor:this._tooltipBorderColor,left:"0px",top:"0px",color:this._tooltipFontColor,visibility:"hidden",zIndex:"10000",padding:"10px"}}},this._parentDiv)},generateLineChart:function(){this.arrXAxis=this._categoriesAxis.split(",");this.arrXAxisLength=this.arrXAxis.length;this.calculateMinMaxValues();this.calculateInterval();this.calculateValueAxis();var n=this.initializeSVG();n=n+String.format('<text x="{0}" y="{1}" id="ChartTitle" style="fill:{3}">{2}<\/text>',parseInt(this._chartWidth)/2-this._chartTitle.length*this.charLength,parseInt(this._chartHeight)/20,this._chartTitle,this._chartTitleColor);n=n+this.drawBackgroundHorizontalLines();n=n+this.drawBackgroundVerticalLines();n=n+this.drawBaseLines();n=n+this.drawLegendArea();n=n+this.drawAxisValues();this._parentDiv.innerHTML=this._parentDiv.innerHTML+n;this.drawLines()},calculateInterval:function(){this.startX=this._chartWidth/10+.5;this.endX=parseInt(this._chartWidth)-4.5;this.startY=this.yMin>=0?Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)*24/100)+.5:Math.round(parseInt(this._chartHeight)-parseInt(this._chartHeight)*12/100)/2+.5;this.yInterval=this.startY/(this._valueAxisLines+1)},calculateMinMaxValues:function(){var u,i,r,t,n;if(this._chartType==Sys.Extended.UI.LineChartType.Basic)for(n=0;n<this._series.length;n++){for(r=[],t=0;t<this._series[n].Data.length;t++)r[t]=this._series[n].Data[t];u=Math.max.apply(null,r);i=Math.min.apply(null,r);n==0?(this.yMax=u,this.yMin=i):(u>this.yMax&&(this.yMax=u),i<this.yMin&&(this.yMin=i))}else{for(this.arrCombinedData=null,n=0;n<this._series.length;n++){for(r=[],t=0;t<this._series[n].Data.length;t++)r[t]=this._series[n].Data[t];if(this.arrCombinedData==null)this.arrCombinedData=r;else for(t=0;t<this._series[n].Data.length;t++)this.arrCombinedData[t]=parseFloat(this.arrCombinedData[t])+parseFloat(r[t])}for(n=0;n<this._series.length;n++)i=Math.min.apply(null,this._series[n].Data),n==0?this.yMin=i:i<this.yMin&&(this.yMin=i);this.yMax=Math.max.apply(null,this.arrCombinedData)}this.yMin<0&&(this._valueAxisLines=Math.round(this._valueAxisLines/2))},calculateValueAxis:function(){var i,n,r,t;i=this.yMin>=0?this.yMax:this.yMax>Math.abs(this.yMin)?this.yMax:Math.abs(this.yMin);n=i/(this._valueAxisLines-1);n<1?this.roundedTickRange=n.toFixed(1):(r=Math.ceil(Math.log(n)/Math.log(10)-1),t=Math.pow(10,r),this.roundedTickRange=Math.ceil(n/t)*t);this.startX=this.startX+(this.roundedTickRange*10*this._valueAxisLines/10).toString().length*this.charLength},drawBackgroundHorizontalLines:function(){for(var t="",n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY-this.yInterval*n,this._categoryAxisLineColor);if(this.yMin<0)for(n=1;n<=this._valueAxisLines;n++)t=t+String.format('<path d="M{0} {2} {1} {2}" id="HorizontalLine" style="stroke:{3}"><\/path>',this.startX,this.endX,this.startY+this.yInterval*n,this._categoryAxisLineColor);return t},drawBackgroundVerticalLines:function(){var t="",n;for(this.xInterval=Math.round((parseInt(this._chartWidth)-this.startX)/this.arrXAxisLength),n=0;n<this.arrXAxisLength;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*n,this.startY-this.yInterval*this._valueAxisLines,this.startY,this._valueAxisLineColor);if(this.yMin<0)for(n=0;n<this.arrXAxisLength;n++)t=t+String.format('<path id="VerticalLine" d="M{0} {1} {0} {2}" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*n,this.startY+this.yInterval*this._valueAxisLines,this.startY,this._valueAxisLineColor);return t},drawBaseLines:function(){var n="",t;for(n=n+String.format('<path d="M{0} {1} {2} {1}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.endX,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY-this.yInterval*this._valueAxisLines,this.startY,this._baseLineColor),n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY,this.startY+4,this._baseLineColor),t=0;t<this.arrXAxisLength;t++)n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',parseInt(this._chartWidth)-5-this.xInterval*t,this.startY,this.startY+4,this._baseLineColor);for(t=0;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY-this.yInterval*t,this._baseLineColor);if(this.yMin<0)for(n=n+String.format('<path d="M{0} {1} {0} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX,this.startY+this.yInterval*this._valueAxisLines,this.startY,this._baseLineColor),t=1;t<=this._valueAxisLines;t++)n=n+String.format('<path d="M{0} {2} {1} {2}" id="BaseLine" style="stroke:{3}"><\/path>',this.startX-4,this.startX,this.startY+this.yInterval*t,this._baseLineColor);return n},drawLegendArea:function(){for(var t="",o=parseInt(this._chartHeight)*82/100+5,i=7.5,u=5,c=0,r,l,n=0;n<this._series.length;n++)c=c+this._series[n].Name.length;r=Math.round(c*5/2)+Math.round((i+u*2)*this._series.length);l=!1;r>parseInt(this._chartWidth)/2&&(r=r/2,l=!0);t=t+"<g>";t=t+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="LegendArea" stroke=""><\/path>',parseInt(this._chartWidth)/2-r/2,o,Math.round(parseInt(this._chartWidth)/2+c*5)+Math.round((i+u*2)*this._series.length),Math.round(parseInt(this._chartHeight)*97.5/100));var e=parseInt(this._chartWidth)/2-r/2+5+i+u,s=e,f=parseInt(this._chartWidth)/2-r/2+5,h=f;for(n=0;n<this._series.length;n++)l&&n==Math.round(this._series.length/2)&&(e=parseInt(this._chartWidth)/2-r/2+5+i+u,s=e,f=parseInt(this._chartWidth)/2-r/2+5,h=f,o=parseInt(this._chartHeight)*89/100+5,l=!1),f=h,e=s,t=t+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="Legend{4}" style="fill:{5}"><\/path>',f,o+7.5,f+i,o+15,n+1,this._series[n].LineColor),t=t+String.format('<text x="{0}" y="{1}" id="LegendText">{2}<\/text>',e,o+15,this._series[n].Name),this._series[n].Name.length>10?(h=f+this._series[n].Name.length*5+i+u*2,s=e+this._series[n].Name.length*5+i+u*2):(h=h+this._series[n].Name.length*6+i+u*2,s=s+this._series[n].Name.length*6+i+u*2);return t+"<\/g>"},drawAxisValues:function(){for(var t="",i=0,n=0;n<this.arrXAxisLength;n++)i=this.arrXAxis[n].toString().length*this.charLength,t=t+String.format('<text id="SeriesAxis" x="{0}" y="{1}" fill-opacity="1">{2}<\/text>',Math.round(this.startX+this.xInterval*n+this.xInterval/2-i),this.startY+Math.round(this.yInterval*65/100),this.arrXAxis[n]);for(n=0;n<=this._valueAxisLines;n++)t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">{2}<\/text>',this.startX-(this.roundedTickRange*10*n/10).toString().length*5.5-10,this.startY-this.yInterval*n+3.5,this.roundedTickRange*10*n/10);if(this.yMin<0)for(n=1;n<=this._valueAxisLines;n++)t=t+String.format('<text id="ValueAxis" x="{0}" y="{1}">-{2}<\/text>',this.startX-(this.roundedTickRange*10*n/10).toString().length*5.5-15,this.startY+this.yInterval*n,this.roundedTickRange*10*n/10);return t},initializeSVG:function(){var n=String.format('<?xml-stylesheet type="text/css" href="{0}.css"?>',this._theme);return n=n+String.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="{0}" height="{1}" style="position: relative; display: block;">',this._chartWidth,this._chartHeight),n=n+"<defs>",n=n+'<linearGradient gradientTransform="rotate(0)">',n=n+'<stop offset="0%" id="LinearGradient-Stop1"><\/stop>',n=n+'<stop offset="25%" id="LinearGradient-Stop2"><\/stop>',n=n+'<stop offset="100%" id="LinearGradient-Stop3"><\/stop><\/linearGradient>',n=n+"<\/defs>",n=n+String.format('<path fill="none" stroke-opacity="1" fill-opacity="1" stroke-linejoin="round" stroke-linecap="square" d="M5 {0} {1} {0} {1} {2} 5 {2} z"/>',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10),n=n+String.format('<path id="ChartBackGround" stroke="" d="M0 0 {0} 0 {0} {1} 0 {1} z"/>',this._chartWidth,this._chartHeight),n+String.format('<path fill="#fff" stroke-opacity="1" fill-opacity="0" stroke-linejoin="round" stroke-linecap="square" stroke="" d="M5 {0} {1} {0} {1} {2} 5 {2} z" />',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10)},drawLines:function(){var t,i,n;for(t=[],i=[],n=0;n<this._series.length;n++)t[n]=this.startX,i[n]=this.startY;this.animateLines(this,t,i,0,0)},animateLines:function(n,t,i,r,u){for(var f=0;f<n._series.length;f++){if(r=0,n._chartType==Sys.Extended.UI.LineChartType.Stacked)for(k=0;k<=f;k++)r=parseFloat(r)+parseFloat(n._series[k].Data[u]);else r=n._series[f].Data[u];n._parentDiv.innerHTML=n._chartType==Sys.Extended.UI.LineChartType.Stacked?n.arrCombinedData[u]>0?u>0?n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<path d="M{0} {1} {2} {3}" id="Line{4}" style="fill:{5};stroke:{5}"><\/path>',t[f],i[f],n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))-7.5,r):n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))-7.5,r):u>0?n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<path d="M{0} {1} {2} {3}" id="Line{4}" style="fill:{5};stroke:{5}"><\/path>',t[f],i[f],n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))+7.5,r):n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))+7.5,r):r>0?u>0?n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<path d="M{0} {1} {2} {3}" id="Line{4}" style="fill:{5};stroke:{5}"><\/path>',t[f],i[f],n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))-7.5,r):n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))-7.5,r):u>0?n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<path d="M{0} {1} {2} {3}" id="Line{4}" style="fill:{5};stroke:{5}"><\/path>',t[f],i[f],n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))+7.5,r):n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<circle id="Dot{2}" cx="{0}" cy="{1}" r="4" style="fill:{3};stroke:{3}" onmouseover="ShowTooltip(this, evt, {4}, \'{5}\')" onmouseout="HideTooltip(this, evt)"><\/circle>',n.startX+n.xInterval*u+n.xInterval/2,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange)),f+1,n._series[f].LineColor,r,n._areaDataLabel)+String.format('<text id="LegendText" x="{0}" y="{1}">{2}<\/text>',n.startX+n.xInterval*u+n.xInterval/5,n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))+7.5,r);t[f]=n.startX+n.xInterval*u+n.xInterval/2+3;i[f]=n.startY-Math.round(r*(n.yInterval/n.roundedTickRange))}u++;u<n.arrXAxisLength&&setTimeout(function(){n.animateLines(n,t,i,0,u)},400)},get_chartWidth:function(){return this._chartWidth},set_chartWidth:function(n){this._chartWidth=n},get_chartHeight:function(){return this._chartHeight},set_chartHeight:function(n){this._chartHeight=n},get_chartTitle:function(){return this._chartTitle},set_chartTitle:function(n){this._chartTitle=n},get_categoriesAxis:function(){return this._categoriesAxis},set_categoriesAxis:function(n){this._categoriesAxis=n},get_ClientSeries:function(){return this._series},set_ClientSeries:function(n){this._series=n},get_chartType:function(){return this._chartType},set_chartType:function(n){this._chartType=n},get_theme:function(){return this._theme},set_theme:function(n){this._theme=n},get_valueAxisLines:function(){return this._valueAxisLines},set_valueAxisLines:function(n){this._valueAxisLines=n},get_chartTitleColor:function(){return this._chartTitleColor},set_chartTitleColor:function(n){this._chartTitleColor=n},get_valueAxisLineColor:function(){return this._valueAxisLineColor},set_valueAxisLineColor:function(n){this._valueAxisLineColor=n},get_categoryAxisLineColor:function(){return this._categoryAxisLineColor},set_categoryAxisLineColor:function(n){this._categoryAxisLineColor=n},get_baseLineColor:function(){return this._baseLineColor},set_baseLineColor:function(n){this._baseLineColor=n},get_tooltipBackgroundColor:function(){return this.tooltipBackgroundColor},set_tooltipBackgroundColor:function(n){this.tooltipBackgroundColor=n},get_tooltipFontColor:function(){return this._tooltipFontColor},set_tooltipFontColor:function(n){this._tooltipFontColor=n},get_tooltipBorderColor:function(){return this._tooltipBorderColor},set_tooltipBorderColor:function(n){this._tooltipBorderColor=n},get_areaDataLabel:function(){return this._areaDataLabel},set_areaDataLabel:function(n){this._areaDataLabel=n}};Sys.Extended.UI.LineChart.registerClass("Sys.Extended.UI.LineChart",Sys.Extended.UI.ControlBase);Sys.registerComponent(Sys.Extended.UI.LineChart,{name:"LineChart",parameters:[{name:"ClientSeries",type:"LineChartSeries[]"}]});Sys.Extended.UI.LineChartType=function(){throw Error.invalidOperation();};Sys.Extended.UI.LineChartType.prototype={Basic:0,Stacked:1};Sys.Extended.UI.LineChartType.registerEnum("Sys.Extended.UI.LineChartType",!1),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.PopupControlBehavior=function(n){Sys.Extended.UI.PopupControlBehavior.initializeBase(this,[n]);this._popupControlID=null;this._commitProperty=null;this._commitScript=null;this._position=null;this._offsetX=0;this._offsetY=0;this._extenderControlID=null;this._popupElement=null;this._popupBehavior=null;this._popupVisible=!1;this._focusHandler=null;this._popupKeyDownHandler=null;this._popupClickHandler=null;this._bodyClickHandler=null;this._onShowJson=null;this._onHideJson=null};Sys.Extended.UI.PopupControlBehavior.prototype={initialize:function(){Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"initialize");var n=this.get_element();this._popupElement=$get(this._popupControlID);this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"PopupBehavior",parentElement:n},null,null,this._popupElement);this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson);this._focusHandler=Function.createDelegate(this,this._onFocus);this._popupClickHandler=Function.createDelegate(this,this._onPopupClick);this._bodyClickHandler=Function.createDelegate(this,this._onBodyClick);this._popupKeyDownHandler=Function.createDelegate(this,this._onPopupKeyDown);$addHandler(n,"focus",this._focusHandler);$addHandler(n,"click",this._focusHandler);$addHandler(document.body,"click",this._bodyClickHandler);$addHandler(this._popupElement,"click",this._popupClickHandler);$addHandler(this._popupElement,"keydown",this._popupKeyDownHandler);this.registerPartialUpdateEvents();Sys.Extended.UI.PopupControlBehavior.__VisiblePopup&&this.get_id()==Sys.Extended.UI.PopupControlBehavior.__VisiblePopup.get_id()&&this._onFocus(null)},dispose:function(){var n=this.get_element();this._onShowJson=null;this._onHideJson=null;this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),$removeHandler(n,"click",this._focusHandler),this._focusHandler=null);this._bodyClickHandler&&($removeHandler(document.body,"click",this._bodyClickHandler),this._bodyClickHandler=null);this._popupClickHandler&&($removeHandler(this._popupElement,"click",this._popupClickHandler),this._popupClickHandler=null);this._popupKeyDownHandler&&($removeHandler(this._popupElement,"keydown",this._popupKeyDownHandler),this._popupKeyDownHandler=null);Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"dispose")},showPopup:function(){var n=Sys.Extended.UI.PopupControlBehavior.__VisiblePopup;n&&n._popupBehavior&&n.hidePopup();Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"populate");this._popupBehavior.set_x(this._getLeftOffset());this._popupBehavior.set_y(this._getTopOffset());this._popupBehavior.show();this._popupVisible=!0;Sys.Extended.UI.PopupControlBehavior.__VisiblePopup=this},hidePopup:function(){this._popupBehavior.hide();this._popupVisible=!1;Sys.Extended.UI.PopupControlBehavior.__VisiblePopup=null},_onFocus:function(n){this._popupVisible||this.showPopup();n&&n.stopPropagation()},_onPopupKeyDown:function(n){this._popupVisible&&n.keyCode==27&&this.get_element().focus()},_onPopupClick:function(n){n.stopPropagation()},_onBodyClick:function(){this._popupVisible&&this.hidePopup()},_close:function(n){var t=this.get_element();null!=n&&("$$CANCEL$$"!=n&&(this._commitProperty?t[this._commitProperty]=n:"text"==t.type?t.value=n:Sys.Debug.assert(!1,String.format(Sys.Extended.UI.Resources.PopupControl_NoDefaultProperty,t.id,t.type)),this._commitScript&&eval(this._commitScript)),this.hidePopup())},_partialUpdateEndRequest:function(n,t){if(Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[n,t]),this.get_element()){var i=t.get_dataItems()[this.get_element().id];undefined===i&&Sys.Extended.UI.PopupControlBehavior.__VisiblePopup&&this.get_id()==Sys.Extended.UI.PopupControlBehavior.__VisiblePopup.get_id()&&(i=t.get_dataItems()._PopupControl_Proxy_ID_);undefined!==i&&this._close(i)}},_onPopulated:function(n,t){Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"_onPopulated",[n,t]);this._popupVisible&&this._popupBehavior.show()},_getLeftOffset:function(){return Sys.Extended.UI.PopupControlPopupPosition.Left==this._position?-1*this.get_element().offsetWidth+this._offsetX:Sys.Extended.UI.PopupControlPopupPosition.Right==this._position?this.get_element().offsetWidth+this._offsetX:this._offsetX},_getTopOffset:function(){return Sys.Extended.UI.PopupControlPopupPosition.Top==this._position?-1*this.get_element().offsetHeight+this._offsetY:Sys.Extended.UI.PopupControlPopupPosition.Bottom==this._position?this.get_element().offsetHeight+this._offsetY:this._offsetY},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_PopupControlID:function(){return this._popupControlID},set_PopupControlID:function(n){this._popupControlID!=n&&(this._popupControlID=n,this.raisePropertyChanged("PopupControlID"))},get_CommitProperty:function(){return this._commitProperty},set_CommitProperty:function(n){this._commitProperty!=n&&(this._commitProperty=n,this.raisePropertyChanged("CommitProperty"))},get_CommitScript:function(){return this._commitScript},set_CommitScript:function(n){this._commitScript!=n&&(this._commitScript=n,this.raisePropertyChanged("CommitScript"))},get_Position:function(){return this._position},set_Position:function(n){this._position!=n&&(this._position=n,this.raisePropertyChanged("Position"))},get_ExtenderControlID:function(){return this._extenderControlID},set_ExtenderControlID:function(n){this._extenderControlID!=n&&(this._extenderControlID=n,this.raisePropertyChanged("ExtenderControlID"))},get_OffsetX:function(){return this._offsetX},set_OffsetX:function(n){this._offsetX!=n&&(this._offsetX=n,this.raisePropertyChanged("OffsetX"))},get_OffsetY:function(){return this._offsetY},set_OffsetY:function(n){this._offsetY!=n&&(this._offsetY=n,this.raisePropertyChanged("OffsetY"))},get_PopupVisible:function(){return this._popupVisible},add_showing:function(n){this._popupBehavior&&this._popupBehavior.add_showing(n)},remove_showing:function(n){this._popupBehavior&&this._popupBehavior.remove_showing(n)},raiseShowing:function(n){this._popupBehavior&&this._popupBehavior.raiseShowing(n)},add_shown:function(n){this._popupBehavior&&this._popupBehavior.add_shown(n)},remove_shown:function(n){this._popupBehavior&&this._popupBehavior.remove_shown(n)},raiseShown:function(n){this._popupBehavior&&this._popupBehavior.raiseShown(n)},add_hiding:function(n){this._popupBehavior&&this._popupBehavior.add_hiding(n)},remove_hiding:function(n){this._popupBehavior&&this._popupBehavior.remove_hiding(n)},raiseHiding:function(n){this._popupBehavior&&this._popupBehavior.raiseHiding(n)},add_hidden:function(n){this._popupBehavior&&this._popupBehavior.add_hidden(n)},remove_hidden:function(n){this._popupBehavior&&this._popupBehavior.remove_hidden(n)},raiseHidden:function(n){this._popupBehavior&&this._popupBehavior.raiseHidden(n)}};Sys.Extended.UI.PopupControlBehavior.registerClass("Sys.Extended.UI.PopupControlBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.PopupControlBehavior,{name:"popupBehavior"});Sys.Extended.UI.PopupControlBehavior.__VisiblePopup=null;Sys.Extended.UI.PopupControlPopupPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.PopupControlPopupPosition.prototype={Center:0,Top:1,Left:2,Bottom:3,Right:4};Sys.Extended.UI.PopupControlPopupPosition.registerEnum("Sys.Extended.UI.PopupControlPopupPosition",!1)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedPopupBehavior",["ExtendedDynamicPopulate","ExtendedPopup","ExtendedAnimationBehavior"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ListSearchBehavior=function(n){Sys.Extended.UI.ListSearchBehavior.initializeBase(this,[n]);this._promptCssClass=null;this._promptText=Sys.Extended.UI.Resources&&Sys.Extended.UI.Resources.ListSearch_DefaultPrompt||"Type to search";this._offsetX=0;this._offsetY=0;this._promptPosition=Sys.Extended.UI.ListSearchPromptPosition.Top;this._raiseImmediateOnChange=!1;this._queryPattern=Sys.Extended.UI.ListSearchQueryPattern.StartsWith;this._isSorted=!1;this._popupBehavior=null;this._onShowJson=null;this._onHideJson=null;this._originalIndex=0;this._newIndex=-1;this._showingPromptText=!1;this._searchText="";this._ellipsis=String.fromCharCode(8230);this._binarySearch=!1;this._applicationLoadDelegate=null;this._focusIndex=0;this._queryTimeout=0;this._timer=null;this._matchFound=!1;this._focusHandler=null;this._blurHandler=null;this._keyDownHandler=null;this._keyUpHandler=null;this._keyPressHandler=null};Sys.Extended.UI.ListSearchBehavior.prototype={initialize:function(){Sys.Extended.UI.ListSearchBehavior.callBaseMethod(this,"initialize");var n=this.get_element();n&&n.tagName==="SELECT"&&(this._focusHandler=Function.createDelegate(this,this._onFocus),this._blurHandler=Function.createDelegate(this,this._onBlur),this._keyDownHandler=Function.createDelegate(this,this._onKeyDown),this._keyUpHandler=Function.createDelegate(this,this._onKeyUp),this._keyPressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"focus",this._focusHandler),$addHandler(n,"blur",this._blurHandler),$addHandler(n,"keydown",this._keyDownHandler),$addHandler(n,"keyup",this._keyUpHandler),$addHandler(n,"keypress",this._keyPressHandler),this._applicationLoadDelegate=Function.createDelegate(this,this._onApplicationLoad),Sys.Application.add_load(this._applicationLoadDelegate))},dispose:function(){var n=this.get_element();$removeHandler(n,"keypress",this._keyPressHandler);$removeHandler(n,"keyup",this._keyUpHandler);$removeHandler(n,"keydown",this._keyDownHandler);$removeHandler(n,"blur",this._blurHandler);$removeHandler(n,"focus",this._focusHandler);this._onShowJson=null;this._onHideJson=null;this._disposePopupBehavior();this._applicationLoadDelegate&&(Sys.Application.remove_load(this._applicationLoadDelegate),this._applicationLoadDelegate=null);this._timer&&this._stopTimer();Sys.Extended.UI.ListSearchBehavior.callBaseMethod(this,"dispose")},_onApplicationLoad:function(){var t=!1,n=Sys.Extended.UI.ListSearchBehavior.callBaseMethod(this,"get_ClientState");n!=null&&n!=""&&(t=n==="Focused",Sys.Extended.UI.ListSearchBehavior.callBaseMethod(this,"set_ClientState",null));t&&this._handleFocus()},_checkIfSorted:function(n){var t,u,i,r;if(this._isSorted)return!0;for(t=null,u=n.length,i=0;i<u;i++){if(r=n[i].text.toLowerCase(),t&&this._compareStrings(r,t)<0)return!1;t=r}return!0},_onFocus:function(){this._handleFocus()},_handleFocus:function(){var n=this.get_element();this._focusIndex=n.selectedIndex;this._promptDiv||(this._promptDiv=document.createElement("div"),this._promptDiv.id=n.id+"_promptDiv",this._promptDiv.innerHTML=this._promptText&&this._promptText.length>0?this._promptText:Sys.Extended.UI.Resources.ListSearch_DefaultPrompt,this._showingPromptText=!0,this._promptCssClass&&(this._promptDiv.className=this._promptCssClass),n.parentNode.insertBefore(this._promptDiv,n.nextSibling),this._promptDiv.style.overflow="hidden",this._promptDiv.style.height=this._promptDiv.offsetHeight+"px",this._promptDiv.style.width=n.offsetWidth+"px");this._popupBehavior||(this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{parentElement:n},{},{},this._promptDiv));this._promptPosition&&this._promptPosition==Sys.Extended.UI.ListSearchPromptPosition.Bottom?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomLeft):this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopLeft);this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson);this._popupBehavior.show();this._updatePromptDiv(this._promptText)},_onBlur:function(){this._disposePopupBehavior();var n=this._promptDiv,t=this.get_element();n&&(this._promptDiv=null,n.parentNode.removeChild(n));this._raiseImmediateOnChange||this._focusIndex==t.selectedIndex||this._raiseOnChange(t)},_disposePopupBehavior:function(){this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null)},_onKeyDown:function(n){var t=this.get_element(),i=this._promptDiv;t&&i&&(this._originalIndex=t.selectedIndex,this._showingPromptText&&(i.innerHTML="",this._searchText="",this._showingPromptText=!1,this._binarySearch=this._checkIfSorted(t.options)),n.keyCode==Sys.UI.Key.backspace?(n.preventDefault(),n.stopPropagation(),this._removeCharacterFromPromptDiv(),this._searchForTypedText(t),this._searchText&&this._searchText.length!=0||this._stopTimer()):n.keyCode==Sys.UI.Key.esc?(n.preventDefault(),n.stopPropagation(),i.innerHTML="",this._searchText="",this._searchForTypedText(t),this._stopTimer()):n.keyCode!=Sys.UI.Key.enter||this._raiseImmediateOnChange||this._focusIndex==t.selectedIndex||(this._focusIndex=t.selectedIndex,this._raiseOnChange(t)))},_onKeyUp:function(){var n=this.get_element(),t=this._promptDiv;if(n&&t){if(this._newIndex==-1||!n||!t||t.innerHTML==""){this._newIndex=-1;return}n.selectedIndex=this._newIndex;this._newIndex=-1}},_onKeyPress:function(n){var t=this.get_element(),i=this._promptDiv;if(t&&i){if(!this._isNormalChar(n)){n.charCode==Sys.UI.Key.backspace&&(n.preventDefault(),n.stopPropagation(),this._searchText&&this._searchText.length==0&&this._stopTimer());return}n.preventDefault();n.stopPropagation();this._addCharacterToPromptDiv(n.charCode);this._searchForTypedText(t);this._stopTimer();this._searchText&&this._searchText.length!=0&&this._startTimer()}},_isNormalChar:function(n){return Sys.Browser.agent==Sys.Browser.Firefox&&n.rawEvent.keyCode?!1:Sys.Browser.agent==Sys.Browser.Opera&&n.rawEvent.which==0?!1:n.charCode&&(n.charCode<Sys.UI.Key.space||n.charCode>6e3)?!1:!0},_updatePromptDiv:function(n){var t=this._promptDiv,i,r,u;if(t&&this.get_element()&&(i=typeof n=="undefined"?this._searchText:n,r=t.firstChild,r?r.nodeValue=i:(r=document.createTextNode(i),t.appendChild(r)),!(t.scrollWidth<=t.offsetWidth)||!(t.scrollHeight<=t.offsetHeight)))for(u=i.length-1;u>0&&(t.scrollWidth>t.offsetWidth||t.scrollHeight>t.offsetHeight);u--)r.nodeValue=this._ellipsis+i.substring(i.length-u,i.length)},_addCharacterToPromptDiv:function(n){this._searchText+=String.fromCharCode(n);this._updatePromptDiv()},_removeCharacterFromPromptDiv:function(){this._searchText&&this._searchText!=""&&(this._searchText=this._searchText.substring(0,this._searchText.length-1),this._updatePromptDiv())},_searchForTypedText:function(n){var u=this._searchText,t=n.options,r=u?u.toLowerCase():"",i;this._matchFound=!1;r.length==0?t.length>0&&(n.selectedIndex=0,this._newIndex=0):(i=-1,i=this._binarySearch&&this._queryPattern==Sys.Extended.UI.ListSearchQueryPattern.StartsWith?this._doBinarySearch(t,r,0,t.length-1):this._doLinearSearch(t,r,0,t.length-1),i==-1?this._newIndex=this._originalIndex:(n.selectedIndex=i,this._newIndex=i,this._matchFound=!0));this._raiseImmediateOnChange&&this._originalIndex!=n.selectedIndex&&this._raiseOnChange(n)},_raiseOnChange:function(n){if(document.createEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1);n.dispatchEvent(t)}else document.createEventObject&&n.fireEvent("onchange")},_compareStrings:function(n,t){return n==t?0:n<t?-1:1},_doBinarySearch:function(n,t,i,r){while(i<=r){var u=Math.floor((i+r)/2),e=n[u].text.toLowerCase().substring(0,t.length),f=this._compareStrings(t,e);if(f>0)i=u+1;else if(f<0)r=u-1;else{while(u>0&&n[u-1].text.toLowerCase().startsWith(t))u--;return u}}return-1},_doLinearSearch:function(n,t,i,r){var u;if(this._queryPattern==Sys.Extended.UI.ListSearchQueryPattern.Contains){for(u=i;u<=r;u++)if(n[u].text.toLowerCase().indexOf(t)>=0)return u}else if(this._queryPattern==Sys.Extended.UI.ListSearchQueryPattern.StartsWith)for(u=i;u<=r;u++)if(n[u].text.toLowerCase().startsWith(t))return u;return-1},_onTimerTick:function(){this._stopTimer();this._matchFound||(this._searchText="",this._updatePromptDiv())},_startTimer:function(){this._queryTimeout>0&&(this._timer=window.setTimeout(Function.createDelegate(this,this._onTimerTick),this._queryTimeout))},_stopTimer:function(){this._timer!=null&&window.clearTimeout(this._timer);this._timer=null},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_promptText:function(){return this._promptText},set_promptText:function(n){this._promptText!=n&&(this._promptText=n,this.raisePropertyChanged("promptText"))},get_promptCssClass:function(){return this._promptCssClass},set_promptCssClass:function(n){this._promptCssClass!=n&&(this._promptCssClass=n,this.raisePropertyChanged("promptCssClass"))},get_promptPosition:function(){return this._promptPosition},set_promptPosition:function(n){this._promptPosition!=n&&(this._promptPosition=n,this.raisePropertyChanged("promptPosition"))},get_raiseImmediateOnChange:function(){return this._raiseImmediateOnChange},set_raiseImmediateOnChange:function(n){this._raiseImmediateOnChange!=n&&(this._raiseImmediateOnChange=n,this.raisePropertyChanged("raiseImmediateOnChange"))},get_queryTimeout:function(){return this._queryTimeout},set_queryTimeout:function(n){this._queryTimeout!=n&&(this._queryTimeout=n,this.raisePropertyChanged("queryTimeout"))},get_isSorted:function(){return this._isSorted},set_isSorted:function(n){this._isSorted!=n&&(this._isSorted=n,this.raisePropertyChanged("isSorted"))},get_queryPattern:function(){return this._queryPattern},set_queryPattern:function(n){this._queryPattern!=n&&(this._queryPattern=n,this.raisePropertyChanged("queryPattern"))}};Sys.Extended.UI.ListSearchBehavior.registerClass("Sys.Extended.UI.ListSearchBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.ListSearchBehavior,{name:"listSearch"});Sys.Extended.UI.ListSearchPromptPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.ListSearchPromptPosition.prototype={Top:0,Bottom:1};Sys.Extended.UI.ListSearchPromptPosition.registerEnum("Sys.Extended.UI.ListSearchPromptPosition");Sys.Extended.UI.ListSearchQueryPattern=function(){throw Error.invalidOperation();};Sys.Extended.UI.ListSearchQueryPattern.prototype={StartsWith:0,Contains:1};Sys.Extended.UI.ListSearchQueryPattern.registerEnum("Sys.Extended.UI.ListSearchQueryPattern")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedListSearch",["ExtendedPopupBehavior"],n):n()}(),function(){function n(){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._PromptChar="_";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._beforeClearMaskText="";this._charLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZ";this._charNumbers="0123456789";this._charEscape="\\";this._DelimitStartDup="{";this._DelimitEndDup="}";this._focusHandler=null;this._keypressdown=null;this._keypressHandler=null;this._blurHandler=null;this._mouseOutHandler=null;this._mouseOutHandler=null;this._mouseMoveHandler=null;this._mouseEnterHandler=null;this._changeHandler=null;this._timer=null;this._timerHandler=null;this._SaveSymb="";this._SaveText="";this._SavePosi=-1;this._SaveMask="";this._SaveKeyDown=0};Sys.Extended.UI.MaskedEditBehavior.prototype={initialize:function(){var n=this.get_element(),t,i,r,u;this._InLostfocus=!0;Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(this,"initialize");this._createMask();t=!1;i=this.get_ClientState();i!=null&&i!=""&&(t=i=="Focused",this.set_ClientState(null));try{n===document.activeElement&&(t=!0)}catch(f){}this._ShowMessageErrorFloat&&(this._mouseOutHandler=Function.createDelegate(this,this._onMouseOut),$addHandler(n,"mouseout",this._mouseOutHandler),this._mouseMoveHandler=Function.createDelegate(this,this._onMouseMove),$addHandler(n,"mousemove",this._mouseMoveHandler),this._mouseEnterHandler=Function.createDelegate(this,this._onMouseover),$addHandler(n,"mouseover",this._mouseEnterHandler));n.readOnly||(this._keypressdown=Function.createDelegate(this,this._onKeyPressdown),$addHandler(n,"keydown",this._keypressdown),this._keypressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"keypress",this._keypressHandler));this._focusHandler=Function.createDelegate(this,this._onFocus);$addHandler(n,"focus",this._focusHandler);this._blurHandler=Function.createDelegate(this,this._onBlur);$addHandler(n,"blur",this._blurHandler);this._changeHandler=Function.createDelegate(this,this._onChange);$addHandler(n,"change",this._changeHandler);Sys.Browser.agent==Sys.Browser.Opera&&(this._timerHandler=Function.createDelegate(this,this._OnTimerTicket),this._timer=new Sys.Timer,this._timer.set_enabled(!1),this._timer.set_interval(100),this._timer.add_tick(this._timerHandler),this._SaveText="",this._SavePosi=-1,this._timer.set_enabled(!0));r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n);this._InitValue(r.get_Value(),!0);t?this._onFocus():(this._ClearMaskOnLostfocus&&r.set_Value(this._getClearMask(r.get_Value())),u=this._CaptureServerValidators(),u||this._OnInvalidCssClass!=""&&this.AddCssClassMaskedEdit(this._OnInvalidCssClass))},dispose:function(){var n=this.get_element();this._mouseOutHandler&&($removeHandler(n,"mouseout",this._mouseOutHandler),this._mouseOutHandler=null);this._mouseMoveHandler&&($removeHandler(n,"mousemove",this._mouseMoveHandler),this._mouseMoveHandler=null);this._mouseEnterHandler&&($removeHandler(n,"mouseover",this._mouseEnterHandler),this._mouseEnterHandler=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._blurHandler&&($removeHandler(n,"blur",this._blurHandler),this._blurHandler=null);this._changeHandler&&($removeHandler(n,"change",this._changeHandler),this._changeHandler=null);this._keypressdown&&($removeHandler(n,"keydown",this._keypressdown),this._keypressdown=null);this._keypressHandler&&($removeHandler(n,"keypress",this._keypressHandler),this._keypressHandler=null);this._timerHandler&&(this._timer.set_enabled(!1),this._timerHandler=null,this._timer.dispose(),this._timer=null);Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(this,"dispose")},_OnTimerTicket:function(){if(this._SaveSymb="",!this._InLostfocus){this._timer.set_enabled(!1);var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());this._SaveText!=""?(n.set_Value(this._SaveText),this.setSelectionRange(this._SavePosi,this._SavePosi),this._SaveText="",this._SavePosi=-1,this._SaveMask=n.get_Value()):(n.get_Value().length!=this._EmptyMask.length&&n.set_Value(this._SaveMask),this._timer.get_interval()!=100&&this._timer.set_interval(100));this._timer.set_enabled(!0)}},_onChange:function(){this._FiringOnChange||this._onFocus()},_onFocus:function(){var n=this.get_element(),i,t,r,u;n.readOnly||n.disabled||(this._keypressdown||(this._keypressdown=Function.createDelegate(this,this._onKeyPressdown),$addHandler(n,"keydown",this._keypressdown)),this._keypressHandler||(this._keypressHandler=Function.createDelegate(this,this._onKeyPress),$addHandler(n,"keypress",this._keypressHandler)),this._InLostfocus=!1,this._RemoveDivToolTip(),this._OnFocusCssClass!=""&&this.AddCssClassMaskedEdit(this._OnFocusCssClass),i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(n),this._initialvalue=i.get_Value(),this._InitValue(i.get_Value(),!1),t=this._getClearMask(),r=!1,this._MessageValidatorTip&&t==""&&(r=!0),(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.get_CultureAMPMPlaceholder()!=""&&t==""?this._AcceptAmPm&&this.InsertAMPM(this.get_CultureAMPMPlaceholder().substring(0,1)):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&t!=""&&this._LogicSymbol=="-"&&this._OnFocusCssNegative!=""&&this.AddCssClassMaskedEdit(this._OnFocusCssNegative),this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?this._LogicLastInt!=-1?this.setSelectionRange(this._LogicLastInt,this._LogicLastInt):this.setSelectionRange(this._LogicLastPos+1,this._LogicLastPos+1):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&t!=""?(u=this._getLastEmptyPosition()+1,this.setSelectionRange(u,u)):this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos),this.ShowTooltipMessage(!1),r&&this.ShowTooltipMessage(!0))},_PeforformValidLostFocus:function(n){var i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t=this._getClearMask(i.get_Value()),r;return t==""&&this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._LogicSymbol=="-"&&this.InsertSignal("+"),t!=""&&this._AutoComplete&&this._MaskType==Sys.Extended.UI.MaskedEditType.Date?this.AutoFormatDate():t!=""&&this._AutoComplete&&this._MaskType==Sys.Extended.UI.MaskedEditType.Time?this.AutoFormatTime():t!=""&&this._AutoComplete&&this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?this.AutoFormatDateTime():t!=""&&this._AutoComplete&&this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this.AutoFormatNumber(),(t!=""||n)&&(this._beforeClearMaskText=i.get_Value(),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){this._InLostfocus=!0;var i=this._PeforformValidLostFocus(!0),t=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());i&&!this.get_element().readOnly&&this._initialvalue!=t.get_Value()&&n&&this._fireChanged();this._beforeClearMaskText!=""&&t.set_Value(this._beforeClearMaskText)},_fireChanged:function(){var n,t;this._FiringOnChange=!0;n=this.get_element();document.createEventObject?n.fireEvent("onchange"):document.createEvent&&(t=document.createEvent("HTMLEvents"),t.initEvent("change",!0,!0),n.dispatchEvent(t));this._FiringOnChange=!1},_onKeyPress:function(n){var u=this._KeyCode(n),o,t,i,s,r,e,f,h,c;return u==9?!0:u==13?(o=this._PeforformValidLostFocus(!1),this._ErroOnEnter=!1,o||(this._ErroOnEnter=!0),Sys.Browser.agent==Sys.Browser.Opera&&(e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=e.get_Value(),this._SavePosi=this._getCurrentPosition(),this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)),o):(this._OnFocusCssClass!=""&&this._ErroOnEnter&&this.AddCssClassMaskedEdit(this._OnFocusCssClass),this._ErroOnEnter=!1,!this._isNormalChar(n,u))?(this._ExecuteNav(n,u),!1):(t=this._deleteTextSelection(),t==-1&&(t=this._getCurrentPosition()),i=String.fromCharCode(u),this._MaskType==Sys.Extended.UI.MaskedEditType.Date&&i==this.get_CultureDatePlaceholder()?this._AdjustElementDate():this._MaskType==Sys.Extended.UI.MaskedEditType.Time&&i==this.get_CultureTimePlaceholder()?this._AdjustElementTime():this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(i==this.get_CultureTimePlaceholder()||i==this.get_CultureDatePlaceholder())?this._AdjustElementDateTime(i):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&i==this.get_CultureDecimalPlaceholder()&&t==this._LogicLastInt?this._AdjustElementDecimalLTR():this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&i==this.get_CultureDecimalPlaceholder()&&t==this._LogicLastInt?this._AdjustElementDecimalRTL():this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&i==this.get_CultureDecimalPlaceholder()&&t!=this._LogicLastInt?this._MoveDecimalPos():this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&i==this.get_CultureThousandsPlaceholder()?this._MoveThousandLTR():this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&i==this.get_CultureThousandsPlaceholder()?this._MoveThousandRTL():(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.get_CultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=-1?this._AcceptAmPm&&(this.InsertAMPM(i),this.setSelectionRange(t,t)):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1?Sys.Browser.agent!=Sys.Browser.Opera?(this.InsertSignal(i),this.setSelectionRange(t,t)):this._SaveSymb==""?(this.InsertSignal(i),this.setSelectionRange(t,t),this._SaveSymb=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0)):this._SaveSymb="":(s=t,t=this._getNextPosition(t),r=t,this._LogicLastInt!=-1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?s==this._LogicLastInt&&(r=this._getLastEmptyPosition()):t>=this._LogicLastPos+1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(r=this._getLastEmptyPosition()),this._processKey(r,i)&&(this._MessageValidatorTip&&this.ShowTooltipMessage(!1),this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight?(this._insertContent(i,r),t=this._getNextPosition(r+1)):this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(this._LogicLastInt==-1?t<this._LogicLastPos+1?(this._insertContent(i,r),t=this._getNextPosition(r+1)):(this._insertContentRight(i),t=this._LogicLastPos+1):s!=this._LogicLastInt?(this._insertContent(i,r),t=this._getNextPosition(r+1)):(e=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f=this._getClearMask(e.get_Value()),f!=""&&(h=f.indexOf(this.get_CultureDecimalPlaceholder()),h!=-1&&(c=f.substring(0,h),(c=="0"||c=="-0")&&(this.setSelectionRange(this._LogicLastInt-1,this._LogicLastInt),this._deleteTextSelection(),t=this._LogicLastInt,this.setSelectionRange(t,t)))),f==""&&i=="0"?t=this._LogicLastInt:(this._insertContentRight(i),t=this._LogicLastInt))),this.setSelectionRange(t,t))),this._SetCancelEvent(n),!1)},_onKeyPressdown:function(n){var t,i;if((this._InLostfocus&&this._onFocus(n),t=this._KeyCode(n),t==9)||t==13)return!0;this._isNormalChar(n,t)?Sys.Browser.agent==Sys.Browser.Opera&&(!n.rawEvent.shiftKey||n.rawEvent.ctrlKey||n.rawEvent.altKey||n.rawEvent.keyCode!=45||(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=i.get_Value(),this._SavePosi=this._getCurrentPosition(),this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))):this._ExecuteNav(n,t)},_onMouseOut:function(){this._RemoveDivToolTip()},_onMouseMove:function(n){(this._InLostfocus||this._ErroOnEnter)&&this._ExternalMessageError!=""&&this._ShowDivToolTip(n)},_onMouseover:function(n){$get("DivMaskedEditTip_"+this.get_element().id)||this._CaptureServerValidators();(this._InLostfocus||this._ErroOnEnter)&&this._ExternalMessageError!=""&&this._createDivToolTip(n,this._ExternalMessageError)},_ShowDivToolTip:function(n){var t=$get("DivMaskedEditTip_"+this.get_element().id),i;t||(this._createDivToolTip(n,this._ExternalMessageError),t=$get("DivMaskedEditTip_"+this.get_element().id));i=this._GetMousePos(n);t.style.left=i.x+1+"px";t.style.top=i.y+1+"px"},_GetMousePos:function(n){var t=0,i=0,r,u;return typeof pageYOffset=="number"?(i=window.pageYOffset,t=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(i=document.body.scrollTop,t=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(i=document.documentElement.scrollTop,t=document.documentElement.scrollLeft),r=0,u=0,typeof n.pageX=="number"?(r=n.pageX,u=n.pageY):typeof n.clientX=="number"&&(r=n.clientX,u=n.clientY),{x:r+t,y:u+i}},_RemoveDivToolTip:function(){var n=$get("DivMaskedEditTip_"+this.get_element().id);n&&document.body.removeChild(n)},_createDivToolTip:function(n,t){var u=$get("DivMaskedEditTip_"+this.get_element().id),i,r;u||(r=this._GetMousePos(n),i=document.createElement("div"),i.id="DivMaskedEditTip_"+this.get_element().id,i.style.position="absolute",i.style.left=r.x+2+"px",i.style.top=r.y+2+"px",i.style.zIndex=99999,this._CssMessageErrorFloat==""?(i.style.padding="3px 3px 3px 3px",i.style.border="Solid 1px #000000",i.style.backgroundColor="#FFFFEA",i.style.fontWeight="normal",i.style.fontSize="12px",i.style.fontFamily="Arial"):i.className=this._CssMessageErrorFloat,i.innerHTML=t,i=document.body.insertBefore(i,document.body.firstChild))},_ExecuteNav:function(n,t){var i,u,e,f,r;if(n.type=="keydown"&&Sys.Browser.agent==Sys.Browser.InternetExplorer){if((t==86||t==118)&&!n.shiftKey&&n.ctrlKey&&!n.altKey){this._SetCancelEvent(n);this._PasteFromClipBoard();return}if(n.shiftKey&&!n.ctrlKey&&!n.altKey&&n.keyCode==45){this._SetCancelEvent(n);this._PasteFromClipBoard();return}}if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||n.type=="keypress"){if(n.rawEvent.shiftKey&&!n.rawEvent.ctrlKey&&!n.rawEvent.altKey&&n.rawEvent.keyCode==45){this._SetCancelEvent(n);this._PasteFromClipBoard();return}if(n.type=="keypress"&&(t==86||t==118)&&!n.shiftKey&&n.ctrlKey&&!n.altKey){this._SetCancelEvent(n);this._PasteFromClipBoard();return}}if(Sys.Browser.agent==Sys.Browser.InternetExplorer||n.type=="keypress"||Sys.Browser.agent!=Sys.Browser.Firefox&&n.type=="keydown")if(t==8)this._SetCancelEvent(n),i=this._deleteTextSelection(),i!=-1?this.setSelectionRange(i,i):(i=this._getCurrentPosition(),this._backspace(i),i=this._getPreviousPosition(i-1),this.setSelectionRange(i,i)),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._MessageValidatorTip&&r.get_Value()==this._EmptyMask&&this.ShowTooltipMessage(!0),Sys.Browser.agent==Sys.Browser.Opera&&(this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0));else if(t==46||t==127)this._SetCancelEvent(n),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=this._deleteTextSelection(),i==-1?(i=this._getCurrentPosition(),this._isValidMaskedEditPosition(i)||i!=this._LogicLastInt&&this._InputDirection!=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(i=this._getNextPosition(i)),this._deleteAtPosition(i,!1)):this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(u=this._getClearMask(r.get_Value()),u!=""&&(u=u.replace(new RegExp("(\\"+this.get_CultureThousandsPlaceholder()+")","g"),"")+"",u.substring(u.length-1,u.length)==this.get_CultureDecimalPlaceholder()?(u=u.substring(0,u.length-1),this.loadValue(u,this._LogicLastInt)):this.loadValue(u,this._LogicLastPos))),this.setSelectionRange(i,i),this._MessageValidatorTip&&r.get_Value()==this._EmptyMask&&this.ShowTooltipMessage(!0),Sys.Browser.agent==Sys.Browser.Opera&&(this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0));else if(n.ctrlKey){if(t==39||t==35||t==34){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);i=this._getCurrentPosition();this.setSelectionRange(i,this._LogicLastPos+1)}else if(t==37||t==36||t==33){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);i=this._getCurrentPosition();this.setSelectionRange(this._LogicFirstPos,i)}}else if(t==35||t==34){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(i=this._getCurrentPosition(),this.setSelectionRange(i,this._LogicLastPos+1)):this.setSelectionRange(this._LogicLastPos+1,this._LogicLastPos+1)}else if(t==36||t==33){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(i=this._getCurrentPosition(),this.setSelectionRange(this._LogicFirstPos,i)):this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos)}else if(t==37){if(this._DirectSelText="L",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(f=this._GetBoundSelection(),f?(f.left>this._LogicFirstPos&&f.left--,this.setSelectionRange(f.left,f.right)):(e=this._getCurrentPosition(),e>this._LogicFirstPos&&this.setSelectionRange(e-1,e))):(i=this._getCurrentPosition()-1,i<this._LogicFirstPos&&(i=this._LogicFirstPos),this.setSelectionRange(i,i));Sys.Browser.agent==Sys.Browser.Opera&&(r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))}else if(t==39){if(this._DirectSelText="R",Sys.Browser.agent==Sys.Browser.Opera)return;this._SetCancelEvent(n);n.shiftKey?(f=this._GetBoundSelection(),f?(f.right<this._LogicLastPos+1&&f.right++,this.setSelectionRange(f.left,f.right)):(e=this._getCurrentPosition(),e<this._LogicLastPos+1&&this.setSelectionRange(e,e+1))):(i=this._getCurrentPosition()+1,i>this._LogicLastPos+1&&(i=this._LogicLastPos+1),this.setSelectionRange(i,i));Sys.Browser.agent==Sys.Browser.Opera&&(r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._SaveText=r.get_Value(),this._SavePosi=i,this._timer.set_enabled(!1),this._timer.set_interval(1),this._timer.set_enabled(!0))}else t==27&&(this._SetCancelEvent(n),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),this._EmptyMask==this._initialvalue?r.set_Value(""):r.set_Value(this._initialvalue),this._onFocus());this._SetCancelEvent(n)},_backspace:function(n){var t=!1,i,r;return n>this._LogicFirstPos&&(i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),r=i.get_Value(),n=this._getPreviousPosition(n-1),this._deleteAtPosition(n,!0),t=!0),t},_deleteAtPosition:function(n,t){var y=!1,p=this._LogicLastPos+1,c,i,o,e,w,l,v,r,h,b;if(this._LogicLastInt!=-1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(p=this._LogicLastInt),c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),t==!1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&n==p)i=this._getClearMask(c.get_Value()),i!=""&&(y=!0,i=i.replace(new RegExp("(\\"+this.get_CultureThousandsPlaceholder()+")","g"),"")+"",i.substring(i.length-1,i.length)==this.get_CultureDecimalPlaceholder()&&(i=i.substring(0,i.length-1)),o=i.split(this.get_CultureDecimalPlaceholder()),this._LogicLastInt!=-1&&o[0]!=""?(o[0]=o[0].substring(0,o[0].length-1),i=o[0],(o.length=2)&&(i+=this.get_CultureDecimalPlaceholder()+o[1])):i=i.substring(0,i.length-1),i+=this._LogicSymbol,this.loadValue(i,p));else{var u=c.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),f=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),s=0,a=n-this._LogicFirstPos;if(this._isValidMaskedEditPosition(n)){for(y=!0,this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(e=this._SplitDateTime(u),w=n-this._LogicFirstPos,w>e[0].length?(u=e[1],s=e[0].length+1,f=f.substring(s),a-=s):(u=e[0],f=f.substring(0,e[0].length))),l=u.substring(a+1),v=f.substring(a+1),u=u.substring(0,a)+this._PromptChar,f=f.substring(0,a)+this._LogicPrompt,r=0;r<parseInt(l.length,10);r++)this._isValidMaskedEditPosition(n+1+r)?(u+=this._PromptChar,f+=this._LogicPrompt):(u+=l.substring(r,r+1),f+=v.substring(r,r+1));for(h=this._getNextPosition(n),r=0;r<parseInt(l.length,10);r++)this._isValidMaskedEditPosition(n+1+r)&&v.substring(r,r+1)!=this._LogicPrompt&&(u=u.substring(0,h-this._LogicFirstPos-s)+l.substring(r,r+1)+u.substring(h+1-this._LogicFirstPos-s),f=f.substring(0,h-this._LogicFirstPos-s)+v.substring(r,r+1)+f.substring(h+1-this._LogicFirstPos-s),h=this._getNextPosition(h+1));if(this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var d=c.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),k=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),e=this._SplitDateTime(d),w=n-this._LogicFirstPos;w>e[0].length?(u=e[0]+" "+u,f=k.substring(0,s)+f):(u=u+" "+e[1],f=f+k.substring(e[0].length))}b=c.get_Value();u=b.substring(0,this._LogicFirstPos)+u+b.substring(this._LogicLastPos+1);this._LogicTextMask=this._LogicTextMask.substring(0,this._LogicFirstPos)+f+this._LogicTextMask.substring(this._LogicLastPos+1);c.set_Value(u)}}return y},_SplitDateTime:function(n){var t=[];return n.charAt(this._LogicDateTimeSepPos)==" "?(t[0]=n.substring(this._LogicFirstPos,this._LogicDateTimeSepPos),t[1]=n.substring(this._LogicDateTimeSepPos+1)):t[0]=n,t},_ShowModalClipBoardInput:function(){return prompt(this._ClipboardText,"")},_PasteFromClipBoard:function(){var r=null,n,e,u,i,o,t;if(Sys.Browser.agent==Sys.Browser.InternetExplorer)r=window.clipboardData.getData("Text");else{var s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),h=s.get_Value(),f=this._GetBoundSelection(),n=this._getCurrentPosition(),c=this._AutoComplete,l=this._ClearTextOnInvalid,a=this._ClearMaskOnLostfocus,v=this._DirectSelText;this._AutoComplete=!1;this._ClearTextOnInvalid=!1;this._ClearMaskOnLostfocus=!1;r=this._ShowModalClipBoardInput();this._AutoComplete=c;this._ClearTextOnInvalid=l;this._ClearMaskOnLostfocus=a;s.set_Value(h);f?this.setSelectionRange(f.left,f.right):this.setSelectionRange(n,n)}if(r!=null&&r!=""){for(r.length>this._maskvalid.length&&(r=r.substring(0,this._maskvalid.length)),n=this._deleteTextSelection(),n==-1&&(n=this._getCurrentPosition(),f&&(n=f.left)),this.setSelectionRange(n,n),e=!1,this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicLastInt!=-1&&(e=!0),u=0,u=0;u<r.length;u++)i=r.substring(u,u+1),t=n,e&&(t=this._getLastEmptyPosition()),(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.get_CultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=-1?this._AcceptAmPm&&(this.InsertAMPM(i),this.setSelectionRange(n,n)):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1?(this.InsertSignal(i),this.setSelectionRange(n,n)):(o=n,n=this._getNextPosition(n),t=n,this._LogicLastInt!=-1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft?o==this._LogicLastInt&&(t=this._getLastEmptyPosition()):n>=this._LogicLastPos+1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(t=this._getLastEmptyPosition()),this._processKey(t,i)&&(this._MessageValidatorTip&&this.ShowTooltipMessage(!1),this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight?(this._insertContent(i,t),n=this._getNextPosition(t+1)):this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(this._LogicLastInt==-1?n<this._LogicLastPos+1?(this._insertContent(i,t),n=this._getNextPosition(t+1)):(this._insertContentRight(i),n=this._LogicLastPos+1):o!=this._LogicLastInt?(this._insertContent(i,t),n=this._getNextPosition(t+1)):(this._insertContentRight(i),n=this._LogicLastInt)),this.setSelectionRange(n,n)));e&&this.setSelectionRange(this._LogicLastInt,this._LogicLastInt)}},_MoveDecimalPos:function(){for(var i=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i),n=this._LogicFirstPos,u=this._LogicLastPos,t=-1;n<u;){if(r.get_Value().substring(n,n+1)==this.get_CultureDecimalPlaceholder()){t=n;break}n++}t!=-1&&this.setSelectionRange(t,t)},_MoveThousandLTR:function(){for(var f=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f),u=this._getCurrentPosition(),i=this._LogicLastPos,n=u+1,t=-1;n<i;){if(r.get_Value().substring(n,n+1)==this.get_CultureThousandsPlaceholder()){t=n;break}n++}if(t==-1){for(n=0,i=u;n<i;){if(r.get_Value().substring(n,n+1)==this.get_CultureThousandsPlaceholder()){t=n;break}n++}if(t==-1)return}this.setSelectionRange(t,t)},_MoveThousandRTL:function(){for(var f=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f),u=this._getCurrentPosition(),i=this._LogicFirstPos,n=u-1,t=-1;n>i;){if(r.get_Value().substring(n,n+1)==this.get_CultureThousandsPlaceholder()){t=n;break}n--}if(t==-1){for(n=this._LogicLastPos,i=u;n>i;){if(r.get_Value().substring(n,n+1)==this.get_CultureThousandsPlaceholder()){t=n;break}n--}if(t==-1)return}this.setSelectionRange(t,t)},_AdjustElementDecimalLTR:function(){var o=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o),s=this._getCurrentPosition(),u,t,n,i,f,e;if(r.get_Value().substring(s).indexOf(this.get_CultureDecimalPlaceholder())!=-1&&(u=r.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),t=u.indexOf(this.get_CultureDecimalPlaceholder()),t!=-1)){for(i=this._getClearMask(r.get_Value()),i!=""?(i=i.replace(new RegExp("(\\"+this.get_CultureThousandsPlaceholder()+")","g"),"")+"",n=i.split(this.get_CultureDecimalPlaceholder())):n=this.get_CultureDecimalPlaceholder().split(this.get_CultureDecimalPlaceholder()),n[0]==""&&(n[0]="0"),f=u.length-t-1;n[1].length<f;)n[1]+="0";e=this._InputDirection;this._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;this.loadValue(n[0]+this.get_CultureDecimalPlaceholder()+n[1],this._LogicLastPos);this._InputDirection=e;t+=this._LogicFirstPos+1;this.setSelectionRange(t,t)}},_AdjustElementDecimalRTL:function(){var r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),u=r.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),t=u.indexOf(this.get_CultureDecimalPlaceholder()),f,n,i,e,o;if(t!=-1){if(f=this._getCurrentPosition(),t+this._LogicFirstPos>=f){this._AdjustElementDecimalLTR();return}for(i=this._getClearMask(r.get_Value()),i!=""?(i=i.replace(new RegExp("(\\"+this.get_CultureThousandsPlaceholder()+")","g"),"")+"",n=i.split(this.get_CultureDecimalPlaceholder())):n=this.get_CultureDecimalPlaceholder().split(this.get_CultureDecimalPlaceholder()),n[0]==""&&(n[0]="0"),e=u.length-t-1;n[1].length<e;)n[1]+="0";o=this._InputDirection;this._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft;this.loadValue(n[0]+this.get_CultureDecimalPlaceholder()+n[1],this._LogicLastPos);this._InputDirection=o;t+=this._LogicFirstPos+1;this.setSelectionRange(t,t)}},_AdjustTime:function(n,t){for(var r=!0,u,i=0;i<parseInt(n.length,10);i++)n.substring(i,i+1)!=this._PromptChar&&(r=!1);if(r)return t;for(u=n.length,n=n.replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"";n.length<u;)n="0"+n;return n},_AdjustElementTime:function(){var c=this.get_element(),h=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c),n="",u=this._getCurrentPosition()-this._LogicFirstPos,f=this._maskvalid,t=u+this._LogicFirstPos,i=0,o,r,s,e;if(this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){if(i=f.split(" ")[0].length+1,u<i){t=i+this._LogicFirstPos;this.setSelectionRange(t,t);return}f=f.split(" ")[1];u-=i}(f=f.split(":"),u<=1?(n="H",t=3+this._LogicFirstPos+i):u>=2&&u<=4&&f.length==2?(n="M",t=i+this._LogicFirstPos):u>=2&&u<=4&&f.length==3?(n="M",t=6+this._LogicFirstPos+i):f.length==3&&(n="S",t=i+this._LogicFirstPos),n!="")&&(o=h.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(o=this._SplitDateTime(o)[1]),r=o.split(this.get_CultureTimePlaceholder()),s=this._GetTimeElementText(n),n=="H"?(e=s+this.get_CultureTimePlaceholder()+r[1],r.length==3&&(e+=this.get_CultureTimePlaceholder()+r[2])):n=="M"?(e=r[0]+this.get_CultureTimePlaceholder()+s,r.length==3&&(e+=this.get_CultureTimePlaceholder()+r[2])):n=="S"&&(e=r[0]+this.get_CultureTimePlaceholder()+r[1]+(this.get_CultureTimePlaceholder()+s)),this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(e=h.get_Value().substring(this._LogicFirstPos,i)+e),this.loadMaskValue(e,this._LogicFirstPos,this._LogicSymbol),this.setSelectionRange(t,t))},_GetTimeElementText:function(n){var t,r=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1),i;return(this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.substring(this._maskvalid.split(" ")[0].length+1)),i=r.split(this.get_CultureTimePlaceholder()),i[0]=i[0].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._PromptChar)+"",t=i[0].replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[0]=t),i[1]=i[1].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._PromptChar)+"",t=i[1].replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[1]=t),i.length==3&&(i[2]=i[2].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._PromptChar)+"",t=i[2].replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[2]=t)),n=="H")?i[0]:n=="M"?i[1]:i[2]},_AdjustElementDateTime:function(n){n==this.get_CultureDatePlaceholder()&&this._AdjustElementDate();n==this.get_CultureTimePlaceholder()&&this._AdjustElementTime()},_AdjustElementDate:function(){var l=this.get_element(),s=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(l),f=s.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),h,e;this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(f=this._SplitDateTime(f)[0]);var u=f.split(this.get_CultureDatePlaceholder()),t="",n=this._getCurrentPosition()-this._LogicFirstPos,i=n+this._LogicFirstPos,r=this._maskvalid.indexOf("9999")!=-1?2:0;if(this.get_CultureDateFormat()=="DMY")if(n<=1)t="D",i=3+this._LogicFirstPos;else if(n>=2&&n<=4)t="M",i=6+this._LogicFirstPos;else{if(n>8+r&&this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos);return}t="Y";i=this._LogicFirstPos}else if(this.get_CultureDateFormat()=="MDY")if(n<=1)t="M",i=3+this._LogicFirstPos;else if(n>=2&&n<=4)t="D",i=6+this._LogicFirstPos;else{if(n>8+r&&this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){this.setSelectionRange(this._LogicFirstPos,this._LogicFirstPos);return}t="Y";i=this._LogicFirstPos}else this.get_CultureDateFormat()=="DYM"?n<=1?(t="D",i=3+this._LogicFirstPos):n>=2&&n<=4+r?(t="Y",i=6+r+this._LogicFirstPos):(t="M",i=this._LogicFirstPos):this.get_CultureDateFormat()=="MYD"?n<=1?(t="M",i=3+this._LogicFirstPos):n>=2&&n<=4+r?(t="Y",i=6+r+this._LogicFirstPos):(t="D",i=this._LogicFirstPos):this.get_CultureDateFormat()=="YMD"?n<=1+r?(t="Y",i=3+r+this._LogicFirstPos):n>=2+r&&n<=4+r?(t="M",i=6+r+this._LogicFirstPos):(t="D",i=this._LogicFirstPos):this.get_CultureDateFormat()=="YDM"&&(n<=1+r?(t="Y",i=3+r+this._LogicFirstPos):n>=2+r&&n<=4+r?(t="D",i=6+r+this._LogicFirstPos):(t="M",i=this._LogicFirstPos));if(h=this._GetDateElementText(t),u[this.get_CultureDateFormat().indexOf(t)]=h,e=u[0]+this.get_CultureDatePlaceholder()+u[1]+this._CultureDatePlaceholder+u[2],this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime){var a=s.get_Value().substring(this._LogicFirstPos,this._LogicLastPos+1),c=this._SplitDateTime(a),o=c[1].split(" ");e+=o.length==2?" "+o[0]+" "+o[1]:" "+c[1]}this.loadMaskValue(e,this._LogicFirstPos,this._LogicSymbol);this.setSelectionRange(i,i)},_GetDateElementText:function(n){var t,i,r,u;return this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?(r=this._SplitDateTime(this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1))[0],i=r.split(this.get_CultureDatePlaceholder())):i=this._LogicTextMask.substring(this._LogicFirstPos,this._LogicLastPos+1).split(this.get_CultureDatePlaceholder()),i[this.get_CultureDateFormat().indexOf("D")]=i[this.get_CultureDateFormat().indexOf("D")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._PromptChar)+"",t=i[this.get_CultureDateFormat().indexOf("D")].replace(new RegExp("(\\"+this._PromptChar+")","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._PromptChar)+"",t=i[this.get_CultureDateFormat().indexOf("M")].replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"",t!=""&&t.length<2&&(t="0"+t,i[this.get_CultureDateFormat().indexOf("M")]=t),u=this._maskvalid.indexOf("9999")!=-1?!0:!1,i[this.get_CultureDateFormat().indexOf("Y")]=i[this.get_CultureDateFormat().indexOf("Y")].replace(new RegExp("(\\"+this._LogicPrompt+")","g"),this._PromptChar)+"",t=i[this.get_CultureDateFormat().indexOf("Y")].replace(new RegExp("(\\"+this._PromptChar+")","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._PromptChar+u.substring(t+i+1),this._LogicTextMask=this._LogicTextMask.substring(0,t+i)+this._LogicPrompt+this._LogicTextMask.substring(t+i+1));o.set_Value(u);this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(t+=f)}return this._DirectSelText="",t},_isNormalChar:function(n,t){var i=!0;if(Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keydown"&&(this._SaveKeyDown=t),t<32)i=!1;else if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||n.type=="keydown")switch(t){case 33:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 34:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 35:Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keypress"?this._SaveKeyDown==35&&(i=!1):i=!1;break;case 36:Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keypress"?this._SaveKeyDown==36&&(i=!1):i=!1;break;case 37:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 38:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 39:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 40:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&n.rawEvent.which==0&&(i=!1);break;case 45:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&Sys.Browser.agent!=Sys.Browser.Opera?n.rawEvent.which==0&&(i=!1):i=Sys.Browser.agent==Sys.Browser.Opera?!0:!1;break;case 86:case 118:n.rawEvent.shiftKey||!n.rawEvent.ctrlKey||n.rawEvent.altKey||(i=!1);break;case 46:typeof n.rawEvent.which!="undefined"&&n.rawEvent.which!=null&&Sys.Browser.agent!=Sys.Browser.Opera?n.rawEvent.which==0&&(i=!1):Sys.Browser.agent==Sys.Browser.Opera&&n.type=="keypress"?this._SaveKeyDown==127&&(i=!1):i=!1;break;case 127:i=!1}return i},_KeyCode:function(n){var t=0;return n.keyIdentifier&&(n.charCode==63272?t=46:n.charCode==63302?t=45:n.charCode==63233?t=40:n.charCode==63235?t=39:n.charCode==63232?t=38:n.charCode==63234?t=37:n.charCode==63273?t=36:n.charCode==63275?t=35:n.charCode==63277?t=34:n.charCode==63276?t=33:n.charCode==3&&(t=13)),t==0&&n.charCode&&(t=n.charCode),t==0&&(t=n.keyCode),t},_InitValue:function(n,t){this._LogicSymbol="";var i=this.get_element(),r=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i);r.set_Value(this._EmptyMask);n==this._EmptyMask||n==""?this.loadValue("",this._LogicFirstPos):this._MaskType==Sys.Extended.UI.MaskedEditType.Date&&n!=""?n=this.ConvFmtDate(n,t):this._MaskType==Sys.Extended.UI.MaskedEditType.Time&&n!=""?n=this.ConvFmtTime(n,t):this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&n!=""?n=this.ConvFmtDateTime(n,t):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&n!=""&&(n=this.ConvFmtNumber(n,t));this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight&&n!=""?this._MaskType==Sys.Extended.UI.MaskedEditType.Number?(this._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.RightToLeft,this.loadValue(n,this._LogicLastPos),this._InputDirection=Sys.Extended.UI.MaskedEditInputDirections.LeftToRight):this.loadValue(n,this._LogicFirstPos):this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&n!=""&&this.loadValue(n,this._LogicLastPos);this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._InLostfocus&&this._LogicSymbol=="-"&&this._OnBlurCssNegative!=""&&this.AddCssClassMaskedEdit(this._OnBlurCssNegative)},loadMaskValue:function(n,t,i){var f,r,u;for(this._createMask(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f.set_Value(this._EmptyMask),(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.get_CultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase().substring(0,1))!=-1?this._AcceptAmPm&&this.InsertAMPM(i.toUpperCase().substring(0,1)):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.InsertSignal(i),r=0,r=0;r<parseInt(n.length,10);r++)u=n.substring(r+t,r+t+1),this._processKey(t+r,u)&&this._insertContent(u,t+r)},loadValue:function(n,t){var r,f,u,i;if(this._createMask(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),f.set_Value(this._EmptyMask),this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.LeftToRight)for(r=0;r<parseInt(n.length,10);r++)i=n.substring(r,r+1),(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this.get_CultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase())!=-1?this._AcceptAmPm&&this.InsertAMPM(i):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 if(this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft)if(t==this._LogicLastInt){for(t=this._getPreviousPosition(t),u=n.split(this.get_CultureDecimalPlaceholder()),r=parseInt(u[0].length,10);r>0;r--)i=u[0].substring(r-1,r),this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.InsertSignal(i),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getPreviousPosition(t-1));if(u.length>1)for(t=this._getNextPosition(this._LogicLastInt),r=0;r<parseInt(u[1].length,10);r++)i=u[1].substring(r,r+1),this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative!=Sys.Extended.UI.MaskedEditShowSymbol.None&&"+-".indexOf(i)!=-1&&this.InsertSignal(i),this._processKey(t,i)&&(this._insertContent(i,t),t=this._getNextPosition(t+1))}else for(r=parseInt(n.length,10);r>0;r--)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},AutoFormatTime:function(){var g=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),n,d,s,p,c,w,t,b,f,k,e,l,i,r,a,o;ValueText=g.get_Value();n=this._AutoCompleteValue;n.indexOf(this.get_CultureTimePlaceholder())==-1&&(n="");this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(d=this._SplitDateTime(ValueText),s=d[1].split(" "),ValueText=s.length==2?s[0]+" "+s[1]:s[0],n!=""&&(n.indexOf(this.get_CultureDatePlaceholder())==-1&&(n=" "+n),p=this._SplitDateTime(n),c=p[1].split(" "),n=c.length==2?c[0]+" "+c[1]:p[0]));w=new Date;t=w.getHours().toString();t.length<2&&(t="0"+t);n!=""&&(t=n.substring(0,2));var v=!1,h=!1,y="",u="",f="";return this.get_CultureAMPMPlaceholder()!=""&&(b=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),y=b[0],u=b[1],n==""?(f=y,t>12&&(t=(parseInt(t,10)-12).toString(),t.length<2&&(t="0"+t),f=u)):(f=y,n.indexOf(u)!=-1&&(f=u)),v=!0,ValueText.indexOf(u)!=-1&&u!=""&&(h=!0),this._AcceptAmPm?(k=!0,(ValueText.substring(0,1)!=this._PromptChar||ValueText.substring(1,2)!=this._PromptChar)&&(k=!1),k&&f!=""&&(v=!0,h=!1,u==f&&(h=!0))):(f="",h=!1,v=!1)),e=w.getMinutes().toString(),e.length<2&&(e="0"+e),n!=""&&(e=n.substring(3,5)),l="00",this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?(i=ValueText.substring(0,2),i=this._AdjustTime(i,t),r=ValueText.substring(3,5),r=this._AdjustTime(r,e)):(i=ValueText.substring(this._LogicFirstPos,this._LogicFirstPos+2),i=this._AdjustTime(i,t),r=ValueText.substring(this._LogicFirstPos+3,this._LogicFirstPos+5),r=this._AdjustTime(r,e)),a=this._maskvalid,this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(a=a.split(" ")[1]),a=="99:99:99"?(n!=""&&(l=n.substring(6)),this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?(o=ValueText.substring(6,8),o=this._AdjustTime(o,l)):(o=ValueText.substring(this._LogicFirstPos+6,this._LogicFirstPos+8),o=this._AdjustTime(o,l)),ValueText=i+this.get_CultureTimePlaceholder()+r+this.get_CultureTimePlaceholder()+o):ValueText=i+this.get_CultureTimePlaceholder()+r,h?ValueText+=" "+u:v&&(ValueText+=" "+y),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._PromptChar+")","g"),"")+"",f=this._GetDateElementText("M").replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"",e=this._GetDateElementText("Y").replace(new RegExp("(\\"+this._PromptChar+")","g"),"")+"",c=this._maskvalid.indexOf("9999")!=-1?!0:!1,o=this._AutoCompleteValue,i,r,t,h,n,l,s;if(o.indexOf(this.get_CultureDatePlaceholder())==-1&&(o=""),o=="")h=new Date,i=h.getUTCDate().toString(),i.length<2&&(i="0"+i),r=(h.getUTCMonth()+1).toString(),r.length<2&&(r="0"+r),t=h.getUTCFullYear().toString(),c||(t=h.getUTCFullYear().toString().substring(2));else if(this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?(o.indexOf(this.get_CultureTimePlaceholder())==-1&&(o=o+" "),l=this._SplitDateTime(o)[0],n=l.split(this.get_CultureDatePlaceholder())):n=o.split(this.get_CultureDatePlaceholder()),this.get_CultureDateFormat()=="DMY"?(i=n[0],r=n[1],t=n[2]):this.get_CultureDateFormat()=="MDY"?(i=n[1],r=n[0],t=n[2]):this.get_CultureDateFormat()=="DYM"?(i=n[0],r=n[2],t=n[1]):this.get_CultureDateFormat()=="MYD"?(i=n[2],r=n[0],t=n[1]):this.get_CultureDateFormat()=="YMD"?(i=n[2],r=n[1],t=n[0]):this.get_CultureDateFormat()=="YDM"&&(i=n[1],r=n[2],t=n[0]),i.length<2&&(i="0"+i),r.length<2&&(r="0"+r),c)while(t.length<4)t="0"+t;else while(t.length<2)t="0"+t;return u==""&&(u=i),f==""&&(f=r),e==""&&(e=t),this.get_CultureDateFormat()=="DMY"?s=u+this.get_CultureDatePlaceholder()+f+this._CultureDatePlaceholder+e:this.get_CultureDateFormat()=="MDY"?s=f+this.get_CultureDatePlaceholder()+u+this._CultureDatePlaceholder+e:this.get_CultureDateFormat()=="DYM"?s=u+this.get_CultureDatePlaceholder()+e+this._CultureDatePlaceholder+f:this.get_CultureDateFormat()=="MYD"?s=f+this.get_CultureDatePlaceholder()+e+this._CultureDatePlaceholder+u:this.get_CultureDateFormat()=="YMD"?s=e+this.get_CultureDatePlaceholder()+f+this._CultureDatePlaceholder+u:this.get_CultureDateFormat()=="YDM"&&(s=e+this.get_CultureDatePlaceholder()+u+this._CultureDatePlaceholder+f),this._MaskType!=Sys.Extended.UI.MaskedEditType.DateTime&&this.loadValue(s,this._LogicFirstPos),s},ConvFmtNumber:function(n){return this._maskvalid.split(this.get_CultureDecimalPlaceholder()).length==2&&n.substring(n.length-1,n.length)==this.get_CultureDecimalPlaceholder()&&(n=n.substring(0,n.length-1)),n},ConvFmtTime:function(n,t){var a=0,v=!1,y=!1,f="",e="",l,c,i,r,u,o,s,h;if(this.get_CultureAMPMPlaceholder()!=""&&(f=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator)[0],e=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator)[1]),t&&(l="",c="",this._CultureAMPMPlaceholder!=""&&(l=this._CultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[0],c=this._CultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[1]),this.get_UserTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour&&(n=n.replace(new RegExp("(\\"+l+")","g"),""),n.indexOf(c)!=-1&&(a=12),n=n.replace(new RegExp("(\\"+c+")","g"),""))),n.indexOf(f)!=-1&&f!=""?v=!0:n.indexOf(e)!=-1&&e!=""&&(y=!0),f!=""&&(n=n.replace(new RegExp("(\\"+f+")","g"),"")),e!=""&&(n=n.replace(new RegExp("(\\"+e+")","g"),"")),n=n.replace(new RegExp("(\\ )","g"),""),i=n.split(this.get_CultureTimePlaceholder()),r=this._maskvalid,this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.split(" ")[1]),r=r.split(":"),parseInt(i.length,10)<2||parseInt(i.length,10)>3)return"";if(u=parseInt(i[0],10)+a,u=u.toString(),u.length<r[0].length)while(u.length<r[0].length)u="0"+u;if(i[0]=u,o=parseInt(i[1],10)+"",o.length<r[1].length)while(o.length<r[1].length)o="0"+o;if(i[1]=o,s="",parseInt(i.length,10)==3){if(h=parseInt(i[2],10)+"",h.length<r[2].length)while(h.length<r[2].length)h="0"+h;i[2]=h;s=i[0]+this.get_CultureTimePlaceholder()+i[1]+this.get_CultureTimePlaceholder()+i[2]}else s=i[0]+this.get_CultureTimePlaceholder()+i[1];return v?s+=" "+f:y&&(s+=" "+e),s},ConvFmtDateTime:function(n,t){var u=this._SplitDateTime(n),r=u[0],i=u[1];return i.split(" ").length==2&&(i+=" "+i.split(" ")[1]),r=this.ConvFmtDate(r,t),i=this.ConvFmtTime(i,t),r+" "+i},ConvFmtDate:function(n,t){var o,i,r,u,f,e;if(t?(o=n.split(this.get_CultureDatePlaceholder()),i=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")])):i=n.split(this.get_CultureDatePlaceholder()),r=this._maskvalid,this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime&&(r=r.split(" ")[0]),r=r.split("/"),parseInt(i.length,10)!=3)return"";if(u=parseInt(i[this.get_CultureDateFormat().indexOf("D")],10)+"",u.length<r[this.get_CultureDateFormat().indexOf("D")].length)while(u.length<r[this.get_CultureDateFormat().indexOf("D")].length)u="0"+u;if(i[this.get_CultureDateFormat().indexOf("D")]=u,f=parseInt(i[this.get_CultureDateFormat().indexOf("M")],10)+"",f.length<r[this.get_CultureDateFormat().indexOf("M")].length)while(f.length<r[this.get_CultureDateFormat().indexOf("M")].length)f="0"+f;for(i[this.get_CultureDateFormat().indexOf("M")]=f,e=parseInt(i[this.get_CultureDateFormat().indexOf("Y")],10)+"";e.length<r[this.get_CultureDateFormat().indexOf("Y")].length;)e="0"+e;return i[this.get_CultureDateFormat().indexOf("Y")]=e,i[0]+this.get_CultureDatePlaceholder()+i[1]+this._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)},_SetCancelEvent:function(n){typeof n.returnValue!="undefined"&&(n.returnValue=!1);typeof n.cancelBubble!="undefined"&&(n.cancelBubble=!0);typeof n.preventDefault!="undefined"&&n.preventDefault();typeof n.stopPropagation!="undefined"&&n.stopPropagation()},_CaptureServerValidators:function(){var u=!0,t=this._ExternalMessageError,n,r,i;if(typeof Page_Validators!="undefined")for(n=null,r=!0,i=0;i<Page_Validators.length;i++)n=Page_Validators[i],(typeof n.enabled=="undefined"||n.enabled!=!1)&&n.TargetValidator==this.get_element().id&&(n.isvalid||(r&&(r=!1,t=""),typeof n.errormessage=="string"&&(t!=""&&(t+=", "),t+=n.errormessage),u=!1));return this._ExternalMessageError=t,u},_CaptureClientsValidators:function(){var r=!0,t="",n,i,u;if(this._ExternalMessageError=t,typeof Page_Validators!="undefined")for(n=null,i=0;i<Page_Validators.length;i++)n=Page_Validators[i],(typeof n.enabled=="undefined"||n.enabled!=!1)&&n.TargetValidator==this.get_element().id&&(typeof n.evaluationfunction=="function"?(u=n.evaluationfunction(n),u||(r=!1,typeof n.errormessage=="string"&&(t!=""&&(t+=", "),t+=n.errormessage))):typeof n.evaluationfunction=="string"&&(eval("crtret = "+n.evaluationfunction+"("+n.id+")"),u||(r=!1,typeof n.errormessage=="string"&&(t!=""&&(t+=", "),t+=n.errormessage))));return this._ExternalMessageError=t,r},ShowTooltipMessage:function(n){var r,i,t;if(typeof Page_Validators!="undefined")for(r="",n||(r=this._CurrentMessageError,this._CurrentMessageError=""),i=0,t=null,i=0;i<Page_Validators.length;i++)if(t=Page_Validators[i],t.TargetValidator==this.get_element().id&&t.IsMaskedEdit=="true"){if(!n){if(t.innerHTML=r,typeof t.display=="string"){if(t.display=="None")return;if(t.display=="Dynamic"){t.style.display=t.isvalid?"none":"inline";return}}return}if(this._CurrentMessageError=t.innerHTML,t.innerHTML=t.TooltipMessage,typeof t.display=="string"){if(t.display=="None")return;if(t.display=="Dynamic"){t.style.display="inline";return}}t.style.visibility="visible";return}},_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._PromptChar,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._PromptChar,this._LogicTextMask+=this._LogicPrompt):(i+=f[0].substring(t,t+1),this._LogicTextMask+=h[0].substring(t,t+1));for((f.length=2)&&(i+=this.get_CultureDecimalPlaceholder()+f[1],this._LogicTextMask+=this.get_CultureDecimalPlaceholder()+h[1]),r=this._getNextPosition(u),t=0;t<parseInt(f[0].length,10);t++)this._isValidMaskedEditPosition(u+1+t)&&h[0].substring(t,t+1)!=this._LogicPrompt&&(i=i.substring(0,r)+f[0].substring(t,t+1)+i.substring(r+1),this._LogicTextMask=this._LogicTextMask.substring(0,r)+h[0].substring(t,t+1)+this._LogicTextMask.substring(r+1),r=this._getNextPosition(r+1))}else{for(t=0;t<parseInt(e.length,10);t++)this._isValidMaskedEditPosition(u+1+t)?(i+=this._PromptChar,this._LogicTextMask+=this._LogicPrompt):(i+=e.substring(t,t+1),this._LogicTextMask+=s.substring(t,t+1));for(r=this._getNextPosition(u),t=0;t<parseInt(e.length,10);t++)this._isValidMaskedEditPosition(u+1+t)&&s.substring(t,t+1)!=this._LogicPrompt&&(i=i.substring(0,r)+e.substring(t,t+1)+i.substring(r+1),this._LogicTextMask=this._LogicTextMask.substring(0,r)+s.substring(t,t+1)+this._LogicTextMask.substring(r+1),r=this._getNextPosition(r+1))}o=0;this._LogicLastInt!=-1&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&(o=this._LogicLastPos-this._LogicLastInt+1);i=i.substring(0,this._LogicLastPos-o)+n+i.substring(this._LogicLastPos-o+1);this._LogicTextMask=this._LogicTextMask.substring(0,this._LogicLastPos-o)+n+this._LogicTextMask.substring(this._LogicLastPos-o+1);c.set_Value(i)}},InsertAMPM:function(n){var u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()),i=u.get_Value(),r=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),t="";r.length==2&&(n.toUpperCase()==this.get_CultureFirstLetterAM().toUpperCase()?t=r[0]:n.toUpperCase()==this.get_CultureFirstLetterPM().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)},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)},setSelectionRange:function(n,t){var r=this.get_element(),i;r.setSelectionRange?r.setSelectionRange(n,t):r.createTextRange&&(i=r.createTextRange(),i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",n),i.select())},_getLastEmptyPosition:function(){var n=this._LogicLastPos,t;for(this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicLastInt!=-1&&(t=this._getCurrentPosition(),t<=this._LogicLastInt&&(n=this._LogicLastInt));n>=0&&this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt;)n--;return n},_isValidMaskedEditPosition:function(n){return this._LogicMask.substring(n,n+1)==this._LogicPrompt},_getNextPosition:function(n){while(!this._isValidMaskedEditPosition(n)&&n<this._LogicLastPos+1)n++;return n>this._LogicLastPos+1&&(n=this._LogicLastPos+1),n},_getPreviousPosition:function(n){while(!this._isValidMaskedEditPosition(n)&&n>this._LogicFirstPos)n--;return n<this._LogicFirstPos&&(n=this._LogicFirstPos),n},_getCurrentPosition:function(){var n=0,i=this.get_element(),t,r,u,f;return i.setSelectionRange?n=parseInt(i.selectionStart,10):document.selection&&(t=document.selection.createRange(),t.text!=""?(r="",this._DirectSelText=="R"?r=t.text+String.fromCharCode(3):this._DirectSelText=="L"&&(r=String.fromCharCode(3)+t.text),t.text=r,this._DirectSelText==""):(t.text=String.fromCharCode(3),this._DirectSelText==""),u=i.createTextRange(),u.findText(String.fromCharCode(3)),u.select(),f=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(i),n=f.get_Value().indexOf(String.fromCharCode(3)),document.selection.clear()),n>this._LogicLastPos+1&&(n=this._LogicLastPos+1),n<this._LogicFirstPos&&(n=this._LogicFirstPos),n},_processKey:function(n,t){var r=this._LogicMaskConv,i;if(r.substring(n,n+1)=="9")i=this._charNumbers;else if(r.substring(n,n+1).toUpperCase()=="L")i=this._charLetters+this._charLetters.toLowerCase();else if(r.substring(n,n+1)=="$")i=this._charLetters+this._charLetters.toLowerCase()+" ";else if(r.substring(n,n+1).toUpperCase()=="C")i=this._Filtered;else if(r.substring(n,n+1).toUpperCase()=="A")i=this._charLetters+this._charLetters.toLowerCase()+this._Filtered;else if(r.substring(n,n+1).toUpperCase()=="N")i=this._charNumbers+this._Filtered;else if(r.substring(n,n+1)=="?")i="";else return!1;return i==""?!0:!i||i.length==0||i.indexOf(t)!=-1},_createMask:function(){this._MaskConv==""&&this._Mask!=""&&this._convertMask();var t=this._MaskConv,n=0,i="",r="",u=!1;for(this._LogicTextMask="",this._QtdValidInput=0;n<parseInt(t.length,10);)t.substring(n,n+1)==this._charEscape&&u==!1?u=!0:this._CharsEditMask.indexOf(t.substring(n,n+1))==-1?u==!0?(u=!1,i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicEscape):this._CharsSpecialMask.indexOf(t.substring(n,n+1))!=-1?(this._QtdValidInput++,t.substring(n,n+1)=="/"?(i+=this.get_CultureDatePlaceholder(),r+="/",this._LogicTextMask+=this.get_CultureDatePlaceholder()):t.substring(n,n+1)==":"?(i+=this.get_CultureTimePlaceholder(),r+=":",this._LogicTextMask+=this.get_CultureTimePlaceholder()):t.substring(n,n+1)==","?(i+=this.get_CultureThousandsPlaceholder(),r+=".",this._LogicTextMask+=this.get_CultureThousandsPlaceholder()):t.substring(n,n+1)=="."&&(i+=this.get_CultureDecimalPlaceholder(),r+=",",this._LogicTextMask+=this.get_CultureDecimalPlaceholder())):(i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=t.substring(n,n+1)):u==!0?(u=!1,i+=t.substring(n,n+1),r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicEscape):(this._QtdValidInput++,i+=this._PromptChar,r+=t.substring(n,n+1),this._LogicTextMask+=this._LogicPrompt),n++;for(this._LogicFirstPos=-1,this._LogicLastPos=-1,this._LogicLastInt=-1,this._LogicMask=this._LogicTextMask,n=0;n<parseInt(this._LogicMask.length,10);n++){if(this._LogicFirstPos==-1&&this._LogicMask.substring(n,n+1)==this._LogicPrompt&&(this._LogicFirstPos=n),this._LogicMask.substring(n,n+this.get_CultureDatePlaceholder().length)==this.get_CultureDatePlaceholder())continue;else this._LogicMask.substring(n,n+1)==" "&&(this._LogicDateTimeSepPos=n);this._LogicMask.substring(n,n+1)==this._LogicPrompt&&(this._LogicLastPos=n);this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._InputDirection==Sys.Extended.UI.MaskedEditInputDirections.RightToLeft&&this._LogicMask.substring(n,n+1)==this.get_CultureDecimalPlaceholder()&&(this._LogicLastInt=n)}this._maskvalid=r.substring(this._LogicFirstPos,this._LogicLastPos+1);this._EmptyMask=i},_getClearMask:function(){for(var n=0,t="",r=0,i=!1;n<parseInt(this._LogicTextMask.length,10);)r<this._QtdValidInput&&(this._isValidMaskedEditPosition(n)&&this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt?(t==""&&i&&(t+="0"+this.get_CultureDecimalPlaceholder(),i=!1),t+=this._LogicTextMask.substring(n,n+1),r++):this._LogicTextMask.substring(n,n+1)!=this._LogicPrompt&&this._LogicTextMask.substring(n,n+1)!=this._LogicEscape&&(this._LogicTextMask.substring(n,n+this.get_CultureDatePlaceholder().length)==this.get_CultureDatePlaceholder()&&(this._MaskType==Sys.Extended.UI.MaskedEditType.Date||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)?(t+=t==""?"":this.get_CultureDatePlaceholder(),n+=this.get_CultureDatePlaceholder().length-1):this._LogicTextMask.substring(n,n+1)==this.get_CultureTimePlaceholder()&&(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)?t+=t==""?"":this.get_CultureTimePlaceholder():this._LogicTextMask.substring(n,n+1)==" "&&this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?t+=t==""?"":" ":this._LogicTextMask.substring(n,n+1)==this.get_CultureThousandsPlaceholder()&&this._MaskType==Sys.Extended.UI.MaskedEditType.Number?t+=t==""?"":this.get_CultureThousandsPlaceholder():this._LogicTextMask.substring(n,n+1)==this.get_CultureDecimalPlaceholder()&&this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&(t+=t==""?"":this.get_CultureDecimalPlaceholder(),t==""&&(i=!0)))),n++;return this._LogicSymbol!=""&&t!=""&&(this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime?t+=" "+this._LogicSymbol:this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&(t=this._LogicSymbol+t)),t},_convertMask:function(){var t,f,n,o,s,h,i;for(this._MaskConv="",t="",f="",n=0;n<parseInt(this._Mask.length,10);n++)if(this._CharsEditMask.indexOf(this._Mask.substring(n,n+1))!=-1)t.length==0?(this._MaskConv+=this._Mask.substring(n,n+1),t="",f=this._Mask.substring(n,n+1)):this._Mask.substring(n,n+1)=="9"?t+="9":this._Mask.substring(n,n+1)=="0"&&(t+="0");else if(this._CharsEditMask.indexOf(this._Mask.substring(n,n+1))==-1&&this._Mask.substring(n,n+1)!=this._DelimitStartDup&&this._Mask.substring(n,n+1)!=this._DelimitEndDup)t.length==0?(this._MaskConv+=this._Mask.substring(n,n+1),t="",f=""):this._charNumbers.indexOf(this._Mask.substring(n,n+1))!=-1&&(t+=this._Mask.substring(n,n+1));else if(this._Mask.substring(n,n+1)==this._DelimitStartDup&&t=="")t="0";else if(this._Mask.substring(n,n+1)==this._DelimitEndDup&&t!=""){if(o=parseInt(t,10)-1,o>0)for(s=0;s<o;s++)this._MaskConv+=f;t="";f=""}var u=-1,r=-1,e=!1;for(n=0;n<parseInt(this._MaskConv.length,10);n++)this._MaskConv.substring(n,n+1)!=this._charEscape||e?this._CharsEditMask.indexOf(this._MaskConv.substring(n,n+1))==-1||e?e&&(e=!1):(u==-1&&(u=n),r=n):e=!0;if((this._MaskType==Sys.Extended.UI.MaskedEditType.Time||this._MaskType==Sys.Extended.UI.MaskedEditType.DateTime)&&this._AcceptAmPm){if(h=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator),i="",h.length==2)for(i=this._charEscape+" ",n=0;n<parseInt(h[0].length,10);n++)i+=this._charEscape+" ";this._MaskConv=this._MaskConv.substring(0,r+1)+i+this._MaskConv.substring(r+1)}else if(this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._DisplayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Left){for(i="",n=0;n<parseInt(this.get_CultureCurrencySymbolPlaceholder().length,10);n++)i+=this._CharsEditMask.indexOf(this.get_CultureCurrencySymbolPlaceholder().substring(n,n+1))==-1?this.get_CultureCurrencySymbolPlaceholder().substring(n,n+1):this._charEscape+this.get_CultureCurrencySymbolPlaceholder().substring(n,n+1);i+=this._charEscape+" ";this._MaskConv=this._MaskConv.substring(0,u)+i+this._MaskConv.substring(u);u+=i.length;r+=i.length}else if(this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._DisplayMoney==Sys.Extended.UI.MaskedEditShowSymbol.Right){for(i=this._charEscape+" ",n=0;n<parseInt(this.get_CultureCurrencySymbolPlaceholder().length,10);n++)i+=this._CharsEditMask.indexOf(this.get_CultureCurrencySymbolPlaceholder().substring(n,n+1))==-1?this.get_CultureCurrencySymbolPlaceholder().substring(n,n+1):this._charEscape+this.get_CultureCurrencySymbolPlaceholder().substring(n,n+1);this._MaskConv=this._MaskConv.substring(0,r+1)+i+this._MaskConv.substring(r+1)}this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Right?this._MaskConv=this._MaskConv.substring(0,r+1)+this._charEscape+" "+this._MaskConv.substring(r+1):this._MaskType==Sys.Extended.UI.MaskedEditType.Number&&this._AcceptNegative==Sys.Extended.UI.MaskedEditShowSymbol.Left&&(this._MaskConv=this._MaskConv.substring(0,u)+this._charEscape+" "+this._MaskConv.substring(u));this._convertMaskNotEscape()},_convertMaskNotEscape:function(){this._LogicMaskConv="";for(var t=this._MaskConv.replace(/(\/)/g,this.get_CultureDatePlaceholder()),i=!1,n=0;n<parseInt(t.length,10);n++)t.substring(n,n+1)==this._charEscape?i=!0:i?(this._LogicMaskConv+=this._LogicEscape,i=!1):this._LogicMaskConv+=t.substring(n,n+1)},get_Mask:function(){return this._MaskConv==""&&this._Mask!=""&&this._convertMask(),this._MaskConv},set_Mask:function(n){this._Mask=n;this.raisePropertyChanged("Mask")},get_Filtered:function(){return this._Filtered},set_Filtered:function(n){this._Filtered=n;this.raisePropertyChanged("Filtered")},get_InputDirection:function(){return this._InputDirection},set_InputDirection:function(n){this._InputDirection=n;this.raisePropertyChanged("InputDirection")},get_PromptCharacter:function(){return this._PromptChar},set_PromptCharacter:function(n){this._PromptChar=n;this.raisePropertyChanged("PromptChar")},get_OnFocusCssClass:function(){return this._OnFocusCssClass},set_OnFocusCssClass:function(n){this._OnFocusCssClass=n;this.raisePropertyChanged("OnFocusCssClass")},get_OnInvalidCssClass:function(){return this._OnInvalidCssClass},set_OnInvalidCssClass:function(n){this._OnInvalidCssClass=n;this.raisePropertyChanged("OnInvalidCssClass")},get_CultureName:function(){return this._CultureName},set_CultureName:function(n){this._CultureName=n;this.raisePropertyChanged("Culture")},get_CultureDatePlaceholder:function(){return this._CultureDatePlaceholder},set_CultureDatePlaceholder:function(n){this._CultureDatePlaceholder=n;this.raisePropertyChanged("CultureDatePlaceholder")},get_CultureTimePlaceholder:function(){return this._CultureTimePlaceholder},set_CultureTimePlaceholder:function(n){this._CultureTimePlaceholder=n;this.raisePropertyChanged("CultureTimePlaceholder")},get_CultureDecimalPlaceholder:function(){return this._CultureDecimalPlaceholder},set_CultureDecimalPlaceholder:function(n){this._CultureDecimalPlaceholder=n;this.raisePropertyChanged("CultureDecimalPlaceholder")},get_CultureThousandsPlaceholder:function(){return this._CultureThousandsPlaceholder},set_CultureThousandsPlaceholder:function(n){this._CultureThousandsPlaceholder=n;this.raisePropertyChanged("CultureThousandsPlaceholder")},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_CultureCurrencySymbolPlaceholder:function(){return this._CultureCurrencySymbolPlaceholder},set_CultureCurrencySymbolPlaceholder:function(n){this._CultureCurrencySymbolPlaceholder=n;this.raisePropertyChanged("CultureCurrencySymbolPlaceholder")},get_CultureAMPMPlaceholder:function(){var n=this._CultureAMPMPlaceholder;return(n.split(this._AMPMPlaceholderSeparator).length!=2||n==this._AMPMPlaceholderSeparator)&&(n=""),this.get_UserTimeFormat()==Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour&&(n=""),n},set_CultureAMPMPlaceholder:function(n){this._CultureAMPMPlaceholder=n;this.raisePropertyChanged("CultureAMPMPlaceholder")},get_CultureFirstLettersAMPM: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_CultureFirstLetterAM:function(){if(this.get_CultureAMPMPlaceholder()!=""){var n=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[0].substring(0,1)}return""},get_CultureFirstLetterPM:function(){if(this.get_CultureAMPMPlaceholder()!=""){var n=this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator);return n[1].substring(0,1)}return""},get_ClearMaskOnLostFocus:function(){return this._ClearMaskOnLostfocus},set_ClearMaskOnLostFocus:function(n){this._ClearMaskOnLostfocus=n;this.raisePropertyChanged("ClearMaskOnLostfocus")},get_MessageValidatorTip:function(){return this._MessageValidatorTip},set_MessageValidatorTip:function(n){this._MessageValidatorTip=n;this.raisePropertyChanged("MessageValidatorTip")},get_AcceptAMPM:function(){return this._AcceptAmPm},set_AcceptAMPM:function(n){this._AcceptAmPm=n;this.raisePropertyChanged("AcceptAmPm")},get_AcceptNegative:function(){return this._AcceptNegative},set_AcceptNegative:function(n){this._AcceptNegative=n;this.raisePropertyChanged("AcceptNegative")},get_DisplayMoney:function(){return this._DisplayMoney},set_DisplayMoney:function(n){this._DisplayMoney=n;this.raisePropertyChanged("DisplayMoney")},get_OnFocusCssNegative:function(){return this._OnFocusCssNegative},set_OnFocusCssNegative:function(n){this._OnFocusCssNegative=n;this.raisePropertyChanged("OnFocusCssNegative")},get_OnBlurCssNegative:function(){return this._OnBlurCssNegative},set_OnBlurCssNegative:function(n){this._OnBlurCssNegative=n;this.raisePropertyChanged("OnBlurCssNegative")},get_Century:function(){return this._Century},set_Century:function(n){this._Century=n;this.raisePropertyChanged("Century")},get_AutoComplete:function(){return this._AutoComplete},set_AutoComplete:function(n){this._AutoComplete=n;this.raisePropertyChanged("AutoComplete")},get_AutoCompleteValue:function(){return this._AutoCompleteValue},set_AutoCompleteValue:function(n){this._AutoCompleteValue=n;this.raisePropertyChanged("AutoCompleteValue")},get_MaskType:function(){return this._MaskType},set_MaskType:function(n){this._MaskType=n;this.raisePropertyChanged("MaskType")},get_ClearTextOnInvalid:function(){return this._ClearTextOnInvalid},set_ClearTextOnInvalid:function(n){this._ClearTextOnInvalid!==n&&(this._ClearTextOnInvalid=n,this.raisePropertyChanged("ClearTextOnInvalid"))},get_ClipboardText:function(){return this._ClipboardText},set_ClipboardText:function(n){this._ClipboardText=n;this.raisePropertyChanged("ClipboardText")},get_ClipboardEnabled:function(){return this._AllowCopyPaste},set_ClipboardEnabled:function(n){this._AllowCopyPaste=n;this.raisePropertyChanged("ClipboardEnabled")},get_ErrorTooltipEnabled:function(){return this._ShowMessageErrorFloat},set_ErrorTooltipEnabled:function(n){this._ShowMessageErrorFloat=n;this.raisePropertyChanged("ErrorTooltipEnabled")},get_ErrorTooltipCssClass:function(){return this._CssMessageErrorFloat},set_ErrorTooltipCssClass:function(n){this._CssMessageErrorFloat=n;this.raisePropertyChanged("ErrorTooltipCssClass")},get_UserDateFormat:function(){return this._UserDateFormat},set_UserDateFormat:function(n){this._UserDateFormat=n;this.raisePropertyChanged("UserDateFormat")},get_UserTimeFormat:function(){return this._UserTimeFormat},set_UserTimeFormat:function(n){this._UserTimeFormat=n;this.raisePropertyChanged("UserTimeFormat")}};Sys.Extended.UI.MaskedEditBehavior.registerClass("Sys.Extended.UI.MaskedEditBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.MaskedEditBehavior,{name:"maskedEdit"});Sys.Extended.UI.MaskedEditType=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditInputDirections=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditShowSymbol=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditUserDateFormat=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditUserTimeFormat=function(){throw Error.invalidOperation();};Sys.Extended.UI.MaskedEditType.prototype={None:0,Date:1,Number:2,Time:3,DateTime:4};Sys.Extended.UI.MaskedEditInputDirections.prototype={LeftToRight:0,RightToLeft:1};Sys.Extended.UI.MaskedEditShowSymbol.prototype={None:0,Left:1,Right:2};Sys.Extended.UI.MaskedEditUserDateFormat.prototype={None:0,DayMonthYear:1,DayYearMonth:2,MonthDayYear:3,MonthYearDay:4,YearDayMonth:5,YearMonthDay:6};Sys.Extended.UI.MaskedEditUserTimeFormat.prototype={None:0,TwentyFourHour:1};Sys.Extended.UI.MaskedEditType.registerEnum("Sys.Extended.UI.MaskedEditType");Sys.Extended.UI.MaskedEditInputDirections.registerEnum("Sys.Extended.UI.MaskedEditInputDirections");Sys.Extended.UI.MaskedEditShowSymbol.registerEnum("Sys.Extended.UI.MaskedEditShowSymbol");Sys.Extended.UI.MaskedEditUserDateFormat.registerEnum("Sys.Extended.UI.MaskedEditUserDateFormat");Sys.Extended.UI.MaskedEditUserTimeFormat.registerEnum("Sys.Extended.UI.MaskedEditUserTimeFormat")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedMaskedEdit",["Globalization","ExtendedBase","ExtendedTimer","ExtendedCommon"],n):n()}();Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ModalPopupRepositionMode=function(){throw Error.invalidOperation();};Sys.Extended.UI.ModalPopupRepositionMode.prototype={None:0,RepositionOnWindowResize:1,RepositionOnWindowScroll:2,RepositionOnWindowResizeAndScroll:3};Sys.Extended.UI.ModalPopupRepositionMode.registerEnum("Sys.Extended.UI.ModalPopupRepositionMode");Sys.Extended.UI.ModalPopupBehavior=function(n){Sys.Extended.UI.ModalPopupBehavior.initializeBase(this,[n]);this._PopupControlID=null;this._PopupDragHandleControlID=null;this._BackgroundCssClass=null;this._DropShadow=!1;this._Drag=!1;this._OkControlID=null;this._CancelControlID=null;this._OnOkScript=null;this._OnCancelScript=null;this._xCoordinate=-1;this._yCoordinate=-1;this._repositionMode=Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll;this._onShown=new Sys.Extended.UI.Animation.GenericAnimationBehavior(n);this._onHidden=new Sys.Extended.UI.Animation.GenericAnimationBehavior(n);this._onShowing=new Sys.Extended.UI.Animation.GenericAnimationBehavior(n);this._onHiding=new Sys.Extended.UI.Animation.GenericAnimationBehavior(n);this._backgroundElement=null;this._foregroundElement=null;this._relativeOrAbsoluteParentElement=null;this._popupElement=null;this._dragHandleElement=null;this._showHandler=null;this._okHandler=null;this._cancelHandler=null;this._scrollHandler=null;this._resizeHandler=null;this._windowHandlersAttached=!1;this._dropShadowBehavior=null;this._dragBehavior=null;this._isIE6=!1;this._saveTabIndexes=[];this._saveDesableSelect=[];this._tagWithTabIndex=["A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME"];this._isAnimationJustEnded=!1;this._hidingAnimationEndedHandler=null;this._showingAnimationEndedHandler=null};Sys.Extended.UI.ModalPopupBehavior.prototype={initialize:function(){Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(this,"initialize");this._isIE6=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7;this._PopupDragHandleControlID&&(this._dragHandleElement=$get(this._PopupDragHandleControlID));this._popupElement=$get(this._PopupControlID);this._DropShadow?(this._foregroundElement=document.createElement("div"),this._foregroundElement.id=this.get_id()+"_foregroundElement",this._popupElement.parentNode.appendChild(this._foregroundElement),this._foregroundElement.appendChild(this._popupElement)):this._foregroundElement=this._popupElement;this._backgroundElement=document.createElement("div");this._backgroundElement.id=this.get_id()+"_backgroundElement";this._backgroundElement.style.display="none";this._backgroundElement.style.position="fixed";this._backgroundElement.style.left="0px";this._backgroundElement.style.top="0px";this._backgroundElement.style.zIndex=1e4;this._BackgroundCssClass&&(this._backgroundElement.className=this._BackgroundCssClass);this._foregroundElement.parentNode.appendChild(this._backgroundElement);this._foregroundElement.style.display="none";this._foregroundElement.style.position="fixed";this._foregroundElement.style.zIndex=$common.getCurrentStyle(this._backgroundElement,"zIndex",this._backgroundElement.style.zIndex)+1;this._showHandler=Function.createDelegate(this,this._onShow);$addHandler(this.get_element(),"click",this._showHandler);this._OkControlID&&(this._okHandler=Function.createDelegate(this,this._onOk),$addHandler($get(this._OkControlID),"click",this._okHandler));this._CancelControlID&&(this._cancelHandler=Function.createDelegate(this,this._onCancel),$addHandler($get(this._CancelControlID),"click",this._cancelHandler));this._scrollHandler=Function.createDelegate(this,this._onLayout);this._resizeHandler=Function.createDelegate(this,this._onLayout);this.registerPartialUpdateEvents();this._resetAnimationsTarget();this._onHiding.get_animation()&&(this._hidingAnimationEndedHandler=Function.createDelegate(this,function(){this._isAnimationJustEnded=!0;this.hide()}),this._onHiding.get_animation().add_ended(this._hidingAnimationEndedHandler));this._onShowing.get_animation()&&(this._showingAnimationEndedHandler=Function.createDelegate(this,function(){this._isAnimationJustEnded=!0;this.show()}),this._onShowing.get_animation().add_ended(this._showingAnimationEndedHandler))},dispose:function(){this._hideImplementation();this._foregroundElement&&this._foregroundElement.parentNode&&(this._foregroundElement.parentNode.removeChild(this._backgroundElement),this._DropShadow&&(this._foregroundElement.parentNode.appendChild(this._popupElement),this._foregroundElement.parentNode.removeChild(this._foregroundElement)));this._scrollHandler=null;this._resizeHandler=null;this._cancelHandler&&$get(this._CancelControlID)&&($removeHandler($get(this._CancelControlID),"click",this._cancelHandler),this._cancelHandler=null);this._okHandler&&$get(this._OkControlID)&&($removeHandler($get(this._OkControlID),"click",this._okHandler),this._okHandler=null);this._showHandler&&($removeHandler(this.get_element(),"click",this._showHandler),this._showHandler=null);this._hidingAnimationEndedHandler&&this._onHiding.get_animation().remove_ended(this._hidingAnimationEndedHandler);this._showingAnimationEndedHandler&&this._onShowing.get_animation().remove_ended(this._showingAnimationEndedHandler);Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(this,"dispose")},_attachPopup:function(){this._DropShadow&&!this._dropShadowBehavior&&(this._dropShadowBehavior=$create(Sys.Extended.UI.DropShadowBehavior,{},null,null,this._popupElement));this._dragHandleElement&&!this._dragBehavior&&(this._dragBehavior=$create(Sys.Extended.UI.FloatingBehavior,{handle:this._dragHandleElement},null,null,this._foregroundElement));$addHandler(window,"resize",this._resizeHandler);$addHandler(window,"scroll",this._scrollHandler);this._windowHandlersAttached=!0},_detachPopup:function(){this._windowHandlersAttached&&(this._scrollHandler&&$removeHandler(window,"scroll",this._scrollHandler),this._resizeHandler&&$removeHandler(window,"resize",this._resizeHandler),this._windowHandlersAttached=!1);this._dragBehavior&&(this._dragBehavior.dispose(),this._dragBehavior=null);this._dropShadowBehavior&&(this._dropShadowBehavior.dispose(),this._dropShadowBehavior=null)},_onShow:function(n){if(!this.get_element().disabled)return this.show(),n.preventDefault(),!1},_onOk:function(n){var t=$get(this._OkControlID);if(t&&!t.disabled)return this.hide()&&this._OnOkScript&&window.setTimeout(this._OnOkScript,0),n.preventDefault(),!1},_onCancel:function(n){var t=$get(this._CancelControlID);if(t&&!t.disabled)return this.hide()&&this._OnCancelScript&&window.setTimeout(this._OnCancelScript,0),n.preventDefault(),!1},_onLayout:function(n){var t=this.get_repositionMode();(t===Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowScroll||t===Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll)&&n.type==="scroll"?this._layout():(t===Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResize||t===Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll)&&n.type==="resize"?this._layout():this._layoutBackgroundElement()},show:function(){var t,n;if(this._isAnimationJustEnded)this._isAnimationJustEnded=!1;else{if(t=new Sys.CancelEventArgs,this.raiseShowing(t),t.get_cancel())return;if(this._onShowing.get_animation()){this._onShowing.play();return}}if(this.populate(),this._attachPopup(),this._backgroundElement.style.display="",this._foregroundElement.style.display="",this._popupElement.style.display="",this._isIE6)for(this._foregroundElement.style.position="absolute",this._backgroundElement.style.position="absolute",n=this._foregroundElement.parentNode;n&&n!=document.documentElement;)if(n.style.position!="relative"&&n.style.position!="absolute")n=n.parentNode;else{this._relativeOrAbsoluteParentElement=n;break}this.disableTab();this._layout();this._layout();this.raiseShown(Sys.EventArgs.Empty);this._onShown.play()},disableTab:function(){var i=0,t,f=[],u,r,n;for(Array.clear(this._saveTabIndexes),r=0;r<this._tagWithTabIndex.length;r++)for(t=this._foregroundElement.getElementsByTagName(this._tagWithTabIndex[r]),n=0;n<t.length;n++)f[i]=t[n],i++;for(i=0,r=0;r<this._tagWithTabIndex.length;r++)for(t=document.getElementsByTagName(this._tagWithTabIndex[r]),n=0;n<t.length;n++)Array.indexOf(f,t[n])==-1&&(this._saveTabIndexes[i]={tag:t[n],index:t[n].tabIndex},t[n].tabIndex="-1",i++);if(i=0,Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7){for(u=[],r=0;r<this._tagWithTabIndex.length;r++)for(t=this._foregroundElement.getElementsByTagName("SELECT"),n=0;n<t.length;n++)u[i]=t[n],i++;for(i=0,Array.clear(this._saveDesableSelect),t=document.getElementsByTagName("SELECT"),n=0;n<t.length;n++)Array.indexOf(u,t[n])==-1&&(this._saveDesableSelect[i]={tag:t[n],visib:$common.getCurrentStyle(t[n],"visibility")},t[n].style.visibility="hidden",i++)}},restoreTab:function(){for(var n,t=0;t<this._saveTabIndexes.length;t++)this._saveTabIndexes[t].tag.tabIndex=this._saveTabIndexes[t].index;if(Array.clear(this._saveTabIndexes),Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7){for(n=0;n<this._saveDesableSelect.length;n++)this._saveDesableSelect[n].tag.style.visibility=this._saveDesableSelect[n].visib;Array.clear(this._saveDesableSelect)}},hide:function(){if(this._isAnimationJustEnded)this._isAnimationJustEnded=!1;else{var n=new Sys.CancelEventArgs;if(this.raiseHiding(n),n.get_cancel())return!1;if(this._onHiding.get_animation())return this._onHiding.play(),!0}return this._hideImplementation(),this.raiseHidden(Sys.EventArgs.Empty),this._onHidden.play(),!0},_hideImplementation:function(){this._backgroundElement.style.display="none";this._foregroundElement.style.display="none";this.restoreTab();this._detachPopup()},_layout:function(){var i=document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,r=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,u=$common.getClientBounds(),o=u.width,s=u.height,n,t,f,e;this._layoutBackgroundElement();n=0;t=0;this._xCoordinate<0?(f=this._foregroundElement.offsetWidth?this._foregroundElement.offsetWidth:this._foregroundElement.scrollWidth,n=(o-f)/2,this._foregroundElement.style.position=="absolute"&&(n+=i),this._foregroundElement.style.left=n+"px"):this._isIE6?(this._foregroundElement.style.left=this._xCoordinate+i+"px",n=this._xCoordinate+i):(this._foregroundElement.style.left=this._xCoordinate+"px",n=this._xCoordinate);this._yCoordinate<0?(e=this._foregroundElement.offsetHeight?this._foregroundElement.offsetHeight:this._foregroundElement.scrollHeight,t=(s-e)/2,this._foregroundElement.style.position=="absolute"&&(t+=r),this._foregroundElement.style.top=t+"px"):this._isIE6?(this._foregroundElement.style.top=this._yCoordinate+r+"px",t=this._yCoordinate+r):(this._foregroundElement.style.top=this._yCoordinate+"px",t=this._yCoordinate);this._layoutForegroundElement(n,t);this._dropShadowBehavior&&(this._dropShadowBehavior.setShadow(),window.setTimeout(Function.createDelegate(this,this._fixupDropShadowBehavior),0));this._layoutBackgroundElement()},_layoutForegroundElement:function(n,t){var i;if(this._isIE6&&this._relativeOrAbsoluteParentElement){var r=$common.getLocation(this._foregroundElement),u=$common.getLocation(this._relativeOrAbsoluteParentElement),f=r.x;f!=n&&(this._foregroundElement.style.left=n-u.x+"px");i=r.y;i!=t&&(this._foregroundElement.style.top=t-u.y+"px")}},_layoutBackgroundElement:function(){var n,t,i;this._isIE6&&(n=$common.getLocation(this._backgroundElement),t=n.x,t!=0&&(this._backgroundElement.style.left=-t+"px"),i=n.y,i!=0&&(this._backgroundElement.style.top=-i+"px"));var r=$common.getClientBounds(),u=r.width,f=r.height;this._backgroundElement.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),u)+"px";this._backgroundElement.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),f)+"px"},_fixupDropShadowBehavior:function(){this._dropShadowBehavior&&this._dropShadowBehavior.setShadow()},_partialUpdateEndRequest:function(n,t){if(Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[n,t]),this.get_element()){var i=t.get_dataItems()[this.get_element().id];"show"==i?this.show():"hide"==i&&this.hide()}this._layout()},_onPopulated:function(n,t){Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(this,"_onPopulated",[n,t]);this._layout()},_replaceAnimationTarget:function(n,t){var i=this[n].get_json();this[n]=new Sys.Extended.UI.Animation.GenericAnimationBehavior(t);this[n].set_json(i);this[n].initialize()},_resetAnimationsTarget:function(){var n=$get(this.get_PopupControlID());this._replaceAnimationTarget("_onShowing",n);this._replaceAnimationTarget("_onShown",n);this._replaceAnimationTarget("_onHiding",n);this._replaceAnimationTarget("_onHidden",n)},get_PopupControlID:function(){return this._PopupControlID},set_PopupControlID:function(n){this._PopupControlID!=n&&(this._PopupControlID=n,this.raisePropertyChanged("PopupControlID"))},get_X:function(){return this._xCoordinate},set_X:function(n){this._xCoordinate!=n&&(this._xCoordinate=n,this.raisePropertyChanged("X"))},get_Y:function(){return this._yCoordinate},set_Y:function(n){this._yCoordinate!=n&&(this._yCoordinate=n,this.raisePropertyChanged("Y"))},get_PopupDragHandleControlID:function(){return this._PopupDragHandleControlID},set_PopupDragHandleControlID:function(n){this._PopupDragHandleControlID!=n&&(this._PopupDragHandleControlID=n,this.raisePropertyChanged("PopupDragHandleControlID"))},get_BackgroundCssClass:function(){return this._BackgroundCssClass},set_BackgroundCssClass:function(n){this._BackgroundCssClass!=n&&(this._BackgroundCssClass=n,this.raisePropertyChanged("BackgroundCssClass"))},get_DropShadow:function(){return this._DropShadow},set_DropShadow:function(n){this._DropShadow!=n&&(this._DropShadow=n,this.raisePropertyChanged("DropShadow"))},get_Drag:function(){return this._Drag},set_Drag:function(n){this._Drag!=n&&(this._Drag=n,this.raisePropertyChanged("Drag"))},get_OkControlID:function(){return this._OkControlID},set_OkControlID:function(n){this._OkControlID!=n&&(this._OkControlID=n,this.raisePropertyChanged("OkControlID"))},get_CancelControlID:function(){return this._CancelControlID},set_CancelControlID:function(n){this._CancelControlID!=n&&(this._CancelControlID=n,this.raisePropertyChanged("CancelControlID"))},get_OnOkScript:function(){return this._OnOkScript},set_OnOkScript:function(n){this._OnOkScript!=n&&(this._OnOkScript=n,this.raisePropertyChanged("OnOkScript"))},get_OnCancelScript:function(){return this._OnCancelScript},set_OnCancelScript:function(n){this._OnCancelScript!=n&&(this._OnCancelScript=n,this.raisePropertyChanged("OnCancelScript"))},get_repositionMode:function(){return this._repositionMode},set_repositionMode:function(n){this._repositionMode!==n&&(this._repositionMode=n,this.raisePropertyChanged("RepositionMode"))},get_OnShowing:function(){return this._onShowing.get_json()},set_OnShowing:function(n){this._onShowing.set_json(n);this.raisePropertyChanged("OnShowing")},get_OnShown:function(){return this._onShown.get_json()},set_OnShown:function(n){this._onShown.set_json(n);this.raisePropertyChanged("OnShown")},get_OnHiding:function(){return this._onHiding.get_json()},set_OnHiding:function(n){this._onHiding.set_json(n);this.raisePropertyChanged("OnHiding")},get_OnHidden:function(){return this._onHidden.get_json()},set_OnHidden:function(n){this._onHidden.set_json(n);this.raisePropertyChanged("OnHidden")},add_showing:function(n){this.get_events().addHandler("showing",n)},remove_showing:function(n){this.get_events().removeHandler("showing",n)},raiseShowing:function(n){var t=this.get_events().getHandler("showing");t&&t(this,n)},add_shown:function(n){this.get_events().addHandler("shown",n)},remove_shown:function(n){this.get_events().removeHandler("shown",n)},raiseShown:function(n){var t=this.get_events().getHandler("shown");t&&t(this,n)},add_hiding:function(n){this.get_events().addHandler("hiding",n)},remove_hiding:function(n){this.get_events().removeHandler("hiding",n)},raiseHiding:function(n){var t=this.get_events().getHandler("hiding");t&&t(this,n)},add_hidden:function(n){this.get_events().addHandler("hidden",n)},remove_hidden:function(n){this.get_events().removeHandler("hidden",n)},raiseHidden:function(n){var t=this.get_events().getHandler("hidden");t&&t(this,n)}};Sys.Extended.UI.ModalPopupBehavior.registerClass("Sys.Extended.UI.ModalPopupBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.Extended.UI.ModalPopupBehavior.invokeViaServer=function(n,t){var i=$find(n);i&&(t?i.show():i.hide())},function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI._MultiHandleSliderDragDropInternal=function(){Sys.Extended.UI._MultiHandleSliderDragDropInternal.initializeBase(this);this._instance=null};Sys.Extended.UI._MultiHandleSliderDragDropInternal.prototype={_getInstance:function(){return this._instance=new Sys.Extended.UI.GenericDragDropManager,this._instance.initialize(),this._instance.add_dragStart(Function.createDelegate(this,this._raiseDragStart)),this._instance.add_dragStop(Function.createDelegate(this,this._raiseDragStop)),this._instance}};Sys.Extended.UI._MultiHandleSliderDragDropInternal.registerClass("Sys.Extended.UI._MultiHandleSliderDragDropInternal",Sys.Extended.UI._DragDropManager);Sys.Extended.UI.DragDrop=new Sys.Extended.UI._MultiHandleSliderDragDropInternal;Sys.Extended.UI.MultiHandleInnerRailStyle=function(){};Sys.Extended.UI.MultiHandleInnerRailStyle.prototype={AsIs:0,SlidingDoors:1};Sys.Extended.UI.MultiHandleInnerRailStyle.registerEnum("Sys.Extended.UI.MultiHandleInnerRailStyle",!1);Sys.Extended.UI.MultiHandleSliderOrientation=function(){};Sys.Extended.UI.MultiHandleSliderOrientation.prototype={Horizontal:0,Vertical:1};Sys.Extended.UI.MultiHandleSliderOrientation.registerEnum("Sys.Extended.UI.MultiHandleSliderOrientation",!1);Sys.Extended.UI.MultiHandleSliderBehavior=function(n){Sys.Extended.UI.MultiHandleSliderBehavior.initializeBase(this,[n]);this._isServerControl=!1;this._minimum=null;this._maximum=null;this._orientation=Sys.Extended.UI.MultiHandleSliderOrientation.Horizontal;this._cssClass=null;this._multiHandleSliderTargets=null;this._length=150;this._steps=0;this._enableHandleAnimation=!1;this._showInnerRail=!1;this._showHoverStyle=!1;this._showDragStyle=!1;this._raiseChangeOnlyOnMouseUp=!0;this._innerRailStyle=Sys.Extended.UI.MultiHandleInnerRailStyle.AsIs;this._enableInnerRangeDrag=!1;this._enableRailClick=!0;this._isReadOnly=!1;this._increment=1;this._enableKeyboard=!0;this._enableMouseWheel=!0;this._tooltipText="";this._boundControlID=null;this._handleCssClass=null;this._handleImageUrl=null;this._handleImage=null;this._railCssClass=null;this._decimals=0;this._textBox=null;this._wrapper=null;this._outer=null;this._inner=null;this._handleData=null;this._handleAnimationDuration=.02;this._handles=0;this._innerDragFlag=!1;this._isVertical=!1;this._selectStartHandler=null;this._mouseUpHandler=null;this._mouseOutHandler=null;this._keyDownHandler=null;this._mouseWheelHandler=null;this._mouseOverHandler=null;this._animationPending=!1;this._selectStartPending=!1;this._initialized=!1;this._handleUnderDrag=null;this._innerDrag=!1;this._blockInnerClick=!1};Sys.Extended.UI.MultiHandleSliderBehavior.prototype={initialize:function(){if(Sys.Extended.UI.MultiHandleSliderBehavior.callBaseMethod(this,"initialize"),this._boundControlID&&!this._multiHandleSliderTargets&&(this._multiHandleSliderTargets=[{ControlID:this._boundControlID,HandleCssClass:this._handleCssClass,HandleImageUrl:this._handleImageUrl,Decimals:this._decimals}]),this._handles=this._multiHandleSliderTargets?this._multiHandleSliderTargets.length:0,this._handles===0){var n=document.createElement("INPUT");n.id="boundless";n.style.display="none";n.value=this.get_minimum();document.forms[0].appendChild(n);this._multiHandleSliderTargets=[{ControlID:n.id,HandleCssClass:this._handleCssClass,HandleImageUrl:this._handleImageUrl,Decimals:this._decimals}];this._boundControlID=n.id;this._handles=1}this._isVertical=this._orientation===Sys.Extended.UI.MultiHandleSliderOrientation.Vertical;this._resolveNamingContainer();this._createWrapper();this._createOuterRail();this._createHandles();this._createInnerRail();this._setRailStyles();this._length&&(this._cssClass||this._innerRailStyle===Sys.Extended.UI.MultiHandleInnerRailStyle.SlidingDoors||(this._isVertical?this._outer.style.height=this._length+"px":this._outer.style.width=this._length+"px"));this._build();this._enforceElementPositioning();this._initializeSlider()},dispose:function(){this._disposeHandlers();this._disposeMultiHandleSliderTargets();this._enableHandleAnimation&&this._handleAnimation&&this._handleAnimation.dispose();Sys.Extended.UI.MultiHandleSliderBehavior.callBaseMethod(this,"dispose")},get_SliderInitialized:function(){return this._initialized},getValue:function(n){var t=$get(this._multiHandleSliderTargets[n].ControlID);return t.value},setValue:function(n,t){var i=$get(this._multiHandleSliderTargets[n].ControlID);i&&(this.beginUpdate(),this._setMultiHandleSliderTargetValue(i,this._getNearestStepValue(t)),this.endUpdate())},get_values:function(){for(var t=[this._handles],i,n=0;n<this._handles;n++)i=this._multiHandleSliderTargets[n],t[n]=i.value;return t.join(",")},_build:function(){this._textBox=this.get_element();this._textBox.parentNode.insertBefore(this._wrapper,this._textBox);this._wrapper.appendChild(this._outer);this._inner&&this._showInnerRail&&this._outer.appendChild(this._inner);this._textBox.style.display="none"},_calculateInnerRailOffset:function(n){var t=this._isVertical?this._inner.style.top:this._inner.style.left,i=this._isVertical?n.offsetY:n.offsetX;return i+parseInt(t,10)},_calculateClick:function(n){var f=this._getOuterBounds(),i=this._handleData[0],e=this._getBoundsInternal(i),t,r,u;i=this._calculateClosestHandle(n);t=e.width/2;r=f.width-t;n=n<t?t:n>r?r:n;u=$get(i.multiHandleSliderTargetID);this._calculateMultiHandleSliderTargetValue(u,n,!0);$common.tryFireEvent(this.get_element(),"change")},_calculateClosestHandle:function(n){for(var i=this._handleData[0],r=[this._handles],s=this._getOuterBounds(),f,e,o,t=0;t<this._handles;t++){var u=this._handleData[t],l=this._getBoundsInternal(u),a=this._isVertical?u.offsetTop:l.x-s.x;r[t]=Math.abs(a-n)}for(f=r[0],t=0;t<this._handles;t++)e=r[t],e<f&&(u=this._handleData[t],f=e,i=u);if(this._innerDrag){var h=Array.indexOf(this._handleData,i),c=Sys.UI.DomElement.getLocation(i),v=this._isVertical?c.y:c.x-s.x;v>=n+r[h]&&(o=this._handleData[h-1],o&&(i=o))}return i},_calculateMultiHandleSliderTargetValue:function(n,t,i){var u,c,f=this._minimum,e=this._maximum,y,o,r,s,tt,p,w,b,k,it;if(this._handleUnderDrag&&!n&&(o=this._handleUnderDrag,n=$get(this._handleUnderDrag.multiHandleSliderTargetID),this._innerDrag&&(y=Array.indexOf(this._handleData,o),u=this._handleData[y+1],u||(u=this._handleData[y-1]),c=$get(u.multiHandleSliderTargetID))),o=n.Handle,r=n.value,r&&!i){if(typeof r!="number")try{r=parseFloat(r)}catch(lt){r=Number.NaN}isNaN(r)&&(r=this._minimum);val=Math.max(Math.min(r,e),f)}else{var l=this._getBoundsInternal(o),d=this._getOuterBounds(),g=t?t-l.width/2:l.x-d.x,st=d.width-l.width,ht=g/st;val=Math.max(Math.min(r,e),f);val=g===0?f:g===d.width-l.width?e:f+ht*(e-f)}this._steps>0&&(val=this._getNearestStepValue(val));val=Math.max(Math.min(val,e),f);var rt=[],ut=[],a=0,nt=0,v,ft=!0;for(s=0;s<this._handles;s++)tt=this._multiHandleSliderTargets[s],tt.ControlID.match(n.id)?ft=!1:ft?(rt[a]=this._multiHandleSliderTargets[s],a++):(ut[nt]=this._multiHandleSliderTargets[s],nt++);if(a>0&&(p=parseFloat($get(rt[a-1].ControlID).value),val=Math.max(val,p),v=val===p),nt>0&&(w=parseFloat($get(ut[0].ControlID).value),val=Math.min(val,w),v=val===w),u){var ct=val-parseFloat(r),et=parseFloat(c.value),h=et+ct,ot=Array.indexOf(this._handleData,u)+1;ot<this._multiHandleSliderTargets.length&&(b=this._multiHandleSliderTargets[ot].ControlID);b&&(k=$get(b));k&&(it=k.value);h>(it||e)&&(h=et,val=r,v=!0)}return v||Math.max(val,e)!==e||Math.min(val,f)!==f?(this.beginUpdate(),this._handles===1?this._setMultiHandleSliderTargetValue(n,val):(n.value=val,o.Value=val,this._setHandlePosition(o,!0)),u&&(c.value=h,u.Value=h,this._setHandlePosition(u,!0)),this.endUpdate()):(this.beginUpdate(),val=Math.max(Math.min(val,e),f),this._setMultiHandleSliderTargetValue(n,val),u&&this._setMultiHandleSliderTargetValue(c,h),this.endUpdate()),val},_cancelDrag:function(){Sys.Extended.UI.MultiHandleSliderBehavior.DropPending===this&&(Sys.Extended.UI.MultiHandleSliderBehavior.DropPending=null,this._selectStartPending&&$removeHandler(document,"selectstart",this._selectStartHandler))},_createHandles:function(){for(var o,c,t,s,h,l,f,n=0;n<this._handles;n++){var a=this.get_id()+"_handle_"+n,e=this._isVertical,i="",r="",u="";this._handles===1&&this._handleImageUrl&&(o="<img id='"+this.get_id()+"_handleImage' src='"+this._handleImageUrl+"' alt='' />");var v="<a id='"+a+"' ",y=o?o:"",p="><div>"+y+"<\/div><\/a>";this._outer.innerHTML+=v+p}for(this._handleData=[this._handles],n=0;n<this._handles;n++)c=this._cssClass?this._cssClass:"ajax__multi_slider_default",t=this._multiHandleSliderTargets[n].HandleCssClass,(t||this._cssClass)&&(i=t?t+" ":this._cssClass+" ",r=i,u=i,s=t,h=t,i=t?i+t:i+this._isVertical?"handle_vertical":"handle_horizontal",r=h?r+h:r+this._isVertical?"handle_vertical_hover":"handle_horizontal_hover",u=s?u+s:u+this._isVertical?"handle_vertical_down":"handle_horizontal_down"),this._handleCallbacks={mouseover:Function.createCallback(this._onShowHover,{vertical:e,custom:r}),mouseout:Function.createCallback(this._onHideHover,{vertical:e,custom:i}),mousedown:Function.createCallback(this._onShowDrag,{vertical:e,custom:u}),mouseup:Function.createCallback(this._onHideDrag,{vertical:e,custom:i})},this._handleData[n]=this._outer.childNodes[n],this._handleData[n].style.overflow="hidden",$addHandlers(this._handleData[n],this._handleCallbacks),t=this._multiHandleSliderTargets[n].HandleCssClass,t?(Sys.UI.DomElement.addCssClass(this._handleData[n],c),Sys.UI.DomElement.addCssClass(this._handleData[n],t)):this._handleData[n].className=this._isVertical?"handle_vertical":"handle_horizontal",this._multiHandleSliderTargets&&(l=this._multiHandleSliderTargets[n].ControlID,this._handleData[n].multiHandleSliderTargetID=l),this._handleData[n].style.left="0px",this._handleData[n].style.top="0px",this._steps<1?this._enableHandleAnimation&&(f=new Sys.Extended.UI.Animation.LengthAnimation(this._handleData[n],this._handleAnimationDuration,100,"style"),f.add_ended(Function.createDelegate(this,this._onAnimationEnded)),f.add_step(Function.createDelegate(this,this._onAnimationStep)),this._handleData[n].Animation=f):this._enableHandleAnimation=!1},_createInnerRail:function(){this._handles>1&&this._showInnerRail&&(this._inner=document.createElement("DIV"),this._inner.id=this.get_id()+"_inner",this._inner.style.outline="none",this._inner.tabIndex=-1)},_createOuterRail:function(){this._outer=document.createElement("DIV");this._outer.id=this.get_id()+"_outer";this._outer.style.outline="none";this._outer.tabIndex=-1},_createWrapper:function(){this._wrapper=document.createElement("DIV");this._wrapper.style.position="relative";this._wrapper.style.outline="none"},_disposeHandlers:function(){if(!this._isReadOnly){$removeHandler(document,"mouseup",this._mouseUpHandler);$removeHandler(document,"mouseout",this._mouseOutHandler);this._outer&&(this._outer.addEventListener?this._outer.removeEventListener("DOMMouseScroll",this._mouseWheelHandler,!1):this._outer.detachEvent("onmousewheel",this._mouseWheelHandler),$common.removeHandlers(this._outer,this._outerDelegates));for(var n=0;n<this._handles;n++)this._handleDelegates&&$common.removeHandlers(this._handleData[n],this._handleDelegates),this._handleCallbacks&&$clearHandlers(this._handleData[n]);this._handleDelegates=null;this._handleCallbacks=null;this._inner&&this._showInnerRail&&this._innerDelegates&&$common.removeHandlers(this._inner,this._innerDelegates);this._selectStartHandler=null;this._mouseUpHandler=null;this._mouseOutHandler=null;this._mouseWheelHandler=null;this._mouseOverHandler=null;this._keyDownHandler=null}},_disposeMultiHandleSliderTargets:function(){var t,n,i;if(this._multiHandleSliderTargets)for(t=0;t<this._handles;t++)n=this._multiHandleSliderTargets[t],i=n&&n.nodeName==="INPUT",i&&($removeHandler(n,"change",n.ChangeHandler),$removeHandler(n,"keypress",n.KeyPressHandler),n.ChangeHandler=null,n.KeyPressHandler=null)},_ensureBinding:function(n){var t,i;n&&(t=n.value,(t>=this._minimum||t<=this._maximum)&&(i=n&&n.nodeName==="INPUT",i?n.value=t:n&&(n.innerHTML=t)))},_enforceElementPositioning:function(){var n={position:this.get_element().style.position,top:this.get_element().style.top,right:this.get_element().style.right,bottom:this.get_element().style.bottom,left:this.get_element().style.left};n.position!==""&&(this._wrapper.style.position=n.position);n.top!==""&&(this._wrapper.style.top=n.top);n.right!==""&&(this._wrapper.style.right=n.right);n.bottom!==""&&(this._wrapper.style.bottom=n.bottom);n.left!==""&&(this._wrapper.style.left=n.left)},_getNearestStepValue:function(n){var t,i;if(this._steps===0||(t=this._maximum-this._minimum,t===0))return n;if(this._steps-1!=0)i=t/(this._steps-1);else return n;return Math.round(n/i)*i},_getStepValues:function(){var t=[this._steps],i=this._maximum-this._minimum,r=i/(this._steps-1),n;for(t[0]=this._minimum,n=1;n<this._steps;n++)t[n]=this._minimum+r*n;return t},_handleSlide:function(n){var r=n?0:this._handles-1,u=n?1:0,f=n?this._handles:this._handles-1,i=this._handleData[r].multiHandleSliderTargetID,t;if(this._slideMultiHandleSliderTarget(i,n))for(t=u;t<f;t++)i=this._handleData[t].multiHandleSliderTargetID,this._slideMultiHandleSliderTarget(i,n);this._initializeInnerRail()},_initializeDragHandle:function(n){var t=n.DragHandle=document.createElement("DIV");t.style.position="absolute";t.style.width="1px";t.style.height="1px";t.style.overflow="hidden";t.style.background="none";document.forms[0].appendChild(n.DragHandle)},_initializeHandlers:function(){if(!this._isReadOnly){this._selectStartHandler=Function.createDelegate(this,this._onSelectStart);this._mouseUpHandler=Function.createDelegate(this,this._onMouseUp);this._mouseOutHandler=Function.createDelegate(this,this._onMouseOut);this._mouseWheelHandler=Function.createDelegate(this,this._onMouseWheel);this._mouseOverHandler=Function.createDelegate(this,this._onMouseOver);this._keyDownHandler=Function.createDelegate(this,this._onKeyDown);$addHandler(document,"mouseup",this._mouseUpHandler);$addHandler(document,"mouseout",this._mouseOutHandler);this._handleDelegates={mousedown:Function.createDelegate(this,this._onMouseDown),dragstart:Function.createDelegate(this,this._IEDragDropHandler),drag:Function.createDelegate(this,this._IEDragDropHandler),dragEnd:Function.createDelegate(this,this._IEDragDropHandler)};for(var n=0;n<this._handles;n++)$addHandlers(this._handleData[n],this._handleDelegates);this._outer&&(this._enableMouseWheel&&(this._outer.addEventListener?this._outer.addEventListener("DOMMouseScroll",this._mouseWheelHandler,!1):this._outer.attachEvent("onmousewheel",this._mouseWheelHandler)),this._outerDelegates={click:Function.createDelegate(this,this._onOuterRailClick),mouseover:Function.createDelegate(this,this._mouseOverHandler),keydown:Function.createDelegate(this,this._keyDownHandler)},$addHandlers(this._outer,this._outerDelegates));this._inner&&this._showInnerRail&&(this._innerDelegates={click:Function.createDelegate(this,this._onInnerRailClick),mousedown:Function.createDelegate(this,this._onMouseDownInner),mouseup:Function.createDelegate(this,this._onMouseUpInner),mouseout:Function.createDelegate(this,this._onMouseOutInner),mousemove:Function.createDelegate(this,this._onMouseMoveInner),dragStart:Function.createDelegate(this,this._IEDragDropHandler),drag:Function.createDelegate(this,this._IEDragDropHandler),dragEnd:Function.createDelegate(this,this._IEDragDropHandler)},$addHandlers(this._inner,this._innerDelegates))}},_initializeHandles:function(){var r=this.get_ClientState(),i,t,n,u;for(r&&(i=r.split(",",this._handles)),t=0;t<this._handles;t++)n=this._handleData[t],u=this._multiHandleSliderTargets[t].Decimals,i&&(n.Value=parseFloat(i[t])),this._initializeMultiHandleSliderTarget(n.multiHandleSliderTargetID,u,n),this._initializeHandleValue(n),this._setHandlePosition(n,!0),this._initializeDragHandle(n)},_initializeHandleValue:function(n){if(!n.Value){try{var t=$get(n.multiHandleSliderTargetID),r=t&&t.nodeName==="INPUT",i=parseFloat(r?t.value:t.innerHTML)}catch(u){i=Number.NaN}isNaN(i)?(n.Value=this._minimum,r?t.value=n.Value:t.innerHTML=n.Value):n.Value=i}},_initializeInnerRail:function(){if(this._inner&&this._showInnerRail){var u=0,f=this._handles-1,t=this._handleData[u],i=this._handles>1?this._handleData[f]:null;if(i){var e=parseInt(this._getBoundsInternal(t).width,10),n=parseInt(this._isVertical?t.style.top:t.style.left,10),r=parseInt(this._isVertical?i.style.top:i.style.left,10),o=parseInt(this._multiHandleSliderTargets[u].Offset,10),s=parseInt(this._multiHandleSliderTargets[f].Offset,10);n+=o;r+=s;this._isVertical?(this._inner.style.top=n+"px",this._inner.style.height=r+e-n+"px"):(this._inner.style.left=n+"px",this._inner.style.width=r+e-n+"px");this._innerRailStyle===Sys.Extended.UI.MultiHandleInnerRailStyle.SlidingDoors&&(this._inner.style.backgroundPosition=this._isVertical?"0 -"+n+"px":"-"+n+"px 0")}}},_initializeMultiHandleSliderTarget:function(n,t,i){var r,u;n&&(r=$get(n),i.Value&&(r.value=i.Value),r.Handle=i,r.Decimals=t,r.OldValue=r.value,r.onchange="setValue(this, "+r.value+")",r.Decimals||(r.Decimals=0),u=r&&r.nodeName==="INPUT",u&&(r.KeyPressHandler=Function.createDelegate(this,this._onMultiHandleSliderTargetKeyPressed),r.ChangeHandler=Function.createDelegate(this,this._onMultiHandleSliderTargetChange),$addHandler(r,"keypress",r.KeyPressHandler),$addHandler(r,"change",r.ChangeHandler)))},_initializeSlider:function(){Sys.Extended.UI.DragDrop.registerDropTarget(this);this._initializeHandles();this._initializeHandlers();this._initializeInnerRail();this._initialized=!0;this._raiseEvent("load")},_resetDragHandle:function(n){var t=$common.getBounds(n);$common.setLocation(n.DragHandle,{x:t.x,y:t.y})},_resolveNamingContainer:function(){var t,i,n;if(this._isServerControl&&this._multiHandleSliderTargets&&!this._boundControlID)for(t=this._clientStateFieldID.lastIndexOf(this._id),i=this._clientStateFieldID.substring(0,t),n=0;n<this._handles;n++)this._multiHandleSliderTargets[n].ControlID=i+this._multiHandleSliderTargets[n].ControlID},_saveState:function(){for(var t=[this._handles],n=0;n<this._handles;n++)t[n]=$get(this._multiHandleSliderTargets[n].ControlID).value;this.set_ClientState(t.join(","))},_setHandlePosition:function(n,t){var f=this._minimum,o=this._maximum,e=n.Value,h=this._enableHandleAnimation&&this._animationPending&&t,i=this._getBoundsInternal(n),r=this._getOuterBounds();if(i.width<=0&&r.width<=0&&(i.width=parseInt($common.getCurrentStyle(n,"width"),10),r.width=parseInt($common.getCurrentStyle(this._outer,"width"),10),i.width<=0||r.width<=0))throw Error.argument("width",Sys.Extended.UI.Resources.MultiHandleSlider_CssHeightWidthRequired);var c=o-f,l=(e-f)/c,u=Math.round(l*(r.width-i.width)),s=e===f?0:e===o?r.width-i.width:u;h?(n.Animation.set_startValue(i.x-r.x),n.Animation.set_endValue(s),n.Animation.set_propertyKey(this._isVertical?"top":"left"),n.Animation.play(),this._animationPending=!1):(u=s+"px",this._isVertical?n.style.top=u:n.style.left=u)},_setRailStyles:function(){var n,t,i;if(!this._inner&&this._railCssClass){this._outer.className=this._railCssClass;return}n=this._cssClass?this._cssClass:"ajax__multi_slider_default";Sys.UI.DomElement.addCssClass(this.get_element(),n);Sys.UI.DomElement.addCssClass(this._outer,n);Sys.UI.DomElement.addCssClass(this._wrapper,n);this._inner?(Sys.UI.DomElement.addCssClass(this._inner,n),t=this._isVertical?"outer_rail_vertical":"outer_rail_horizontal",i=this._isVertical?"inner_rail_vertical":"inner_rail_horizontal",Sys.UI.DomElement.addCssClass(this._outer,t),Sys.UI.DomElement.addCssClass(this._inner,i)):(t=this._isVertical?"inner_rail_vertical":"inner_rail_horizontal",Sys.UI.DomElement.addCssClass(this._outer,t))},_setMultiHandleSliderTargetValue:function(n,t){var r=n.OldValue,i=t,u;if(r===i&&this._isReadOnly)n.value=r;else{if(this.get_isUpdating()||(i=this._calculateMultiHandleSliderTargetValue(n)),n.value=i.toFixed(n.Decimals),this._ensureBinding(n),!Number.isInstanceOfType(n.value))try{n.value=parseFloat(n.value)}catch(f){n.value=Number.NaN}this._tooltipText&&(u=n.Handle,u.alt=u.title=String.format(this._tooltipText,n.value));this._initialized&&(n.Handle.Value=i,this._setHandlePosition(n.Handle,!0),this._handles===1&&(this.get_element().value=i),n.value!==r&&(n.OldValue=n.value,this._initializeInnerRail(),this._innerDrag&&(this._blockInnerClick=!0),this._raiseEvent("valueChanged"),this.get_isUpdating()&&(this._raiseChangeOnlyOnMouseUp||$common.tryFireEvent(this.get_element(),"change"))))}this._saveState()},_setValueFromMultiHandleSliderTarget:function(n){this.beginUpdate();n&&(this._isReadOnly?this._setMultiHandleSliderTargetValue(n,n.OldValue):(this._handles===1&&this._steps>0&&this._setMultiHandleSliderTargetValue(n,n.value),this._calculateMultiHandleSliderTargetValue(n)));this.endUpdate()},_slideMultiHandleSliderTarget:function(n,t){var u=$get(n),s=u.value,r,i,f,e,o;if(this._steps>0){if(f=this._getStepValues(),e=this._getNearestStepValue(s),r=e,t){for(i=this._steps-1;i>-1;i--)if(f[i]<e){r=f[i];break}}else for(i=0;i<this._steps;i++)if(f[i]>e){r=f[i];break}}else o=parseFloat(u.value),r=t?o-parseFloat(this._increment):o+parseFloat(this._increment);return u.value=r,this._setValueFromMultiHandleSliderTarget(u),u.value==r},_startDragDrop:function(n){this._resetDragHandle(n);this._handleUnderDrag=n;Sys.Extended.UI.DragDrop.startDragDrop(this,n.DragHandle,null)},_onAnimationEnded:function(){this._initializeInnerRail()},_onAnimationStep:function(){this._initializeInnerRail()},_onHideDrag:function(n,t){this.className=t.custom&&t.custom.length>0?t.custom:t.vertical?"handle_vertical":"handle_horizontal"},_onHideHover:function(n,t){this.className=t.custom&&t.custom.length>0?t.custom:t.vertical?"ajax__multi_slider_default handle_vertical":"ajax__multi_slider_default handle_horizontal"},_onInnerRailClick:function(n){if(this._enableRailClick){var t=n.target;t!==this._inner||this._blockInnerClick?this._blockInnerClick=!1:(this._animationPending=!0,this._onInnerRailClicked(n))}},_onInnerRailClicked:function(n){var t=this._calculateInnerRailOffset(n);this._calculateClick(t)},_onKeyDown:function(n){if(this._enableKeyboard){var t=new Sys.UI.DomEvent(n),i=!1;switch(t.keyCode||t.rawEvent.keyCode){case Sys.UI.Key.up:case Sys.UI.Key.left:return i||(this._handleSlide(!0),t.preventDefault(),i=!0),!1;case Sys.UI.Key.down:case Sys.UI.Key.right:return i||(this._handleSlide(!1),t.preventDefault(),i=!0),!1;default:return!1}}},_onMouseOver:function(){this._outer.focus()},_onMouseWheel:function(n){var t=0;return n.wheelDelta?(t=n.wheelDelta/120,Sys.Browser.agent===Sys.Browser.Opera&&(t=-t)):n.detail&&(t=-n.detail/3),t&&this._handleSlide(t<=0),n.preventDefault&&n.preventDefault(),!1},_onMouseUp:function(n){window._event=n;n.preventDefault();this._cancelDrag()},_onMouseOut:function(n){window._event=n;n.preventDefault();this._outer.blur();this._handleUnderDrag&&this._cancelDrag()},_onMouseOutInner:function(n){window._event=n;n.preventDefault();this._inner.blur();this._innerDrag&&this._cancelDrag()},_onMouseDown:function(n){if(window._event=n,n.preventDefault(),!Sys.Extended.UI.MultiHandleSliderBehavior.DropPending){Sys.Extended.UI.MultiHandleSliderBehavior.DropPending=this;$addHandler(document,"selectstart",this._selectStartHandler);this._selectStartPending=!0;var t=n.target;this._startDragDrop(t)}},_onMouseDownInner:function(n){window._event=n;n.preventDefault();this._enableInnerRangeDrag&&(this._innerDragFlag||(this._innerDragFlag=!0))},_onMouseUpInner:function(){this._enableInnerRangeDrag&&(this._innerDragFlag=!1)},_onMouseMoveInner:function(n){if(window._event=n,n.preventDefault(),this._enableInnerRangeDrag&&!this._innerDrag&&this._innerDragFlag&&(this._innerDragFlag=!1,!Sys.Extended.UI.MultiHandleSliderBehavior.DropPending)){Sys.Extended.UI.MultiHandleSliderBehavior.DropPending=this;$addHandler(document,"selectstart",this._selectStartHandler);this._selectStartPending=!0;this._innerDrag=!0;var t=this._calculateInnerRailOffset(n),i=this._calculateClosestHandle(t);this._startDragDrop(i)}},_onMultiHandleSliderTargetChange:function(n){this._animationPending=!0;var t=n.target;this._setValueFromMultiHandleSliderTarget(t);this._initializeInnerRail();n.preventDefault()},_onMultiHandleSliderTargetKeyPressed:function(n){var t=new Sys.UI.DomEvent(n),i;t.charCode===13&&(this._animationPending=!0,i=t.target,this._setValueFromMultiHandleSliderTarget(i),this._initializeInnerRail(),t.preventDefault())},_onOuterRailClick:function(n){if(this._enableRailClick){var t=n.target;t===this._outer&&(this._animationPending=!0,this._onOuterRailClicked(n))}},_onOuterRailClicked:function(n){var t=this._isVertical?n.offsetY:n.offsetX;this._calculateClick(t)},_onShowDrag:function(n,t){this.className=t.custom&&t.custom.length>0?t.custom:t.vertical?"ajax__multi_slider_default handle_vertical_down":"ajax__multi_slider_default handle_horizontal_down"},_onShowHover:function(n,t){this.className=t.custom&&t.custom.length>0?t.custom:t.vertical?"ajax__multi_slider_default handle_vertical_hover":"ajax__multi_slider_default handle_horizontal_hover"},get_dragDataType:function(){return"HTML"},getDragData:function(){return this._handleUnderDrag},get_dragMode:function(){return Sys.Extended.UI.DragMode.Move},onDragStart:function(){this._resetDragHandle(this._handleUnderDrag);this._raiseEvent("dragStart")},onDrag:function(){var n=this._getBoundsInternal(this._handleUnderDrag.DragHandle),r=this._getBoundsInternal(this._handleUnderDrag),t=this._getOuterBounds(),i;i=this._isVertical?{y:n.x-t.x,x:0}:{x:n.x-t.x,y:0};$common.setLocation(this._handleUnderDrag,i);this._calculateMultiHandleSliderTargetValue(null,null,!0);this._steps>1&&this._setHandlePosition(this._handleUnderDrag,!1);this._raiseEvent("drag")},onDragEnd:function(){this._initializeInnerRail();this._raiseChangeOnlyOnMouseUp&&$common.tryFireEvent(this.get_element(),"change");this._innerDrag=!1;this._handleUnderDrag=null;this._raiseEvent("dragEnd")},get_dropTargetElement:function(){return document.forms[0]},canDrop:function(n,t){return t=="HTML"},drop:Function.emptyMethod,onDragEnterTarget:Function.emptyMethod,onDragLeaveTarget:Function.emptyMethod,onDragInTarget:Function.emptyMethod,_IEDragDropHandler:function(n){n.preventDefault()},_onSelectStart:function(n){return n.preventDefault(),!1},_getOuterBounds:function(){return this._getBoundsInternal(this._outer)},_getInnerBounds:function(){return this._getBoundsInternal(this._inner)},_getBoundsInternal:function(n){var t=$common.getBounds(n);return this._isVertical?{x:t.y,y:t.x,height:t.width,width:t.height,right:t.right,left:t.left,bottom:t.bottom,location:{x:t.y,y:t.x},size:{width:t.height,height:t.width}}:{x:t.x,y:t.y,height:t.height,width:t.width,right:t.right,left:t.left,bottom:t.bottom,location:{x:t.x,y:t.y},size:{width:t.width,height:t.height}}},_raiseEvent:function(n,t){var i=this.get_events().getHandler(n);i&&(t||(t=Sys.EventArgs.Empty),i(this,t))},get_Value:function(){var n=$get(this._boundControlID);return n.value?n.value:0},set_Value:function(n){var t=$get(this._multiHandleSliderTargets[0].ControlID);this.beginUpdate();this._setMultiHandleSliderTargetValue(t,this._getNearestStepValue(n));this.endUpdate();$common.tryFireEvent(t,"change")},get_minimum:function(){return this._minimum},set_minimum:function(n){n!==this._minimum&&(this._minimum=n,this.raisePropertyChanged("minimum"))},get_maximum:function(){return this._maximum},set_maximum:function(n){n!==this._maximum&&(this._maximum=n,this.raisePropertyChanged("maximum"))},get_length:function(){return this._length},set_length:function(n){n!==this._length&&(this._length=n,this.raisePropertyChanged("length"))},get_steps:function(){return this._steps},set_steps:function(n){var t=this._steps;this._steps=Math.abs(n);this._steps=this._steps===1?2:this._steps;t!==this._steps&&this.raisePropertyChanged("steps")},get_orientation:function(){return this._isVertical},set_orientation:function(n){n!==this._isVertical&&(this._orientation=n,this.raisePropertyChanged("orientation"))},get_enableHandleAnimation:function(){return this._enableHandleAnimation},set_enableHandleAnimation:function(n){n!==this._enableHandleAnimation&&(this._enableHandleAnimation=n,this.raisePropertyChanged("enableHandleAnimation"))},get_handleAnimationDuration:function(){return this._handleAnimationDuration},set_handleAnimationDuration:function(n){n!==this._handleAnimationDuration&&(this._handleAnimationDuration=n,this.raisePropertyChanged("handleAnimationDuration"))},get_raiseChangeOnlyOnMouseUp:function(){return this._raiseChangeOnlyOnMouseUp},set_raiseChangeOnlyOnMouseUp:function(n){n!==this._raiseChangeOnlyOnMouseUp&&(this._raiseChangeOnlyOnMouseUp=n,this.raisePropertyChanged("raiseChangeOnlyOnMouseUp"))},get_showInnerRail:function(){return this._showInnerRail},set_showInnerRail:function(n){n!==this._showInnerRail&&(this._showInnerRail=n,this.raisePropertyChanged("showInnerRail"))},get_showHandleHoverStyle:function(){return this._showHoverStyle},set_showHandleHoverStyle:function(n){n!==this._showHoverStyle&&(this._showHoverStyle=n,this.raisePropertyChanged("showHoverStyle"))},get_showHandleDragStyle:function(){return this._showDragStyle},set_showHandleDragStyle:function(n){n!==this._showDragStyle&&(this._showDragStyle=n,this.raisePropertyChanged("showDragStyle"))},get_innerRailStyle:function(){return this._innerRailStyle},set_innerRailStyle:function(n){n!==this._innerRailStyle&&(this._innerRailStyle=n,this.raisePropertyChanged("innerRailStyle"))},get_enableInnerRangeDrag:function(){return this._enableInnerRangeDrag},set_enableInnerRangeDrag:function(n){n!==this._enableInnerRangeDrag&&(this._enableInnerRangeDrag=n,this.raisePropertyChanged("allowInnerRangeDrag"))},get_enableRailClick:function(){return this._enableRailClick},set_enableRailClick:function(n){n!==this._enableRailClick&&(this._enableRailClick=n,this.raisePropertyChanged("allowRailClick"))},get_isReadOnly:function(){return this._isReadOnly},set_isReadOnly:function(n){n!==this._isReadOnly&&(this._isReadOnly=n,this.raisePropertyChanged("isReadOnly"))},get_enableKeyboard:function(){return this._enableKeyboard},set_enableKeyboard:function(n){n!==this._enableKeyboard&&(this._enableKeyboard=n,this.raisePropertyChanged("enableKeyboard"))},get_enableMouseWheel:function(){return this._enableMouseWheel},set_enableMouseWheel:function(n){n!==this._enableMouseWheel&&(this._enableMouseWheel=n,this.raisePropertyChanged("enableMouseWheel"))},get_increment:function(){return this._increment},set_increment:function(n){n!==this._increment&&(this._increment=n,this.raisePropertyChanged("increment"))},get_tooltipText:function(){return this._tooltipText},set_tooltipText:function(n){n!==this._tooltipText&&(this._tooltipText=n,this.raisePropertyChanged("tooltipText"))},get_multiHandleSliderTargets:function(){return this._multiHandleSliderTargets},set_multiHandleSliderTargets:function(n){n!==this._multiHandleSliderTargets&&(this._multiHandleSliderTargets=n,this.raisePropertyChanged("multiHandleSliderTargets"))},get_cssClass:function(){return this._cssClass},set_cssClass:function(n){n!==this._cssClass&&(this._cssClass=n,this.raisePropertyChanged("cssClass"))},get_boundControlID:function(){return this._boundControlID},set_boundControlID:function(n){this._boundControlID=n;this._boundControl=this._boundControlID?$get(this._boundControlID):null},get_handleCssClass:function(){return this._handleCssClass},set_handleCssClass:function(n){this._handleCssClass=n},get_handleImageUrl:function(){return this._handleImageUrl},set_handleImageUrl:function(n){this._handleImageUrl=n},get_railCssClass:function(){return this._railCssClass},set_railCssClass:function(n){this._railCssClass=n},get_decimals:function(){return this._decimals},set_decimals:function(n){this._decimals=n},add_load:function(n){this.get_events().addHandler("load",n)},remove_load:function(n){this.get_events().removeHandler("load",n)},add_dragStart:function(n){this.get_events().addHandler("dragStart",n)},remove_dragStart:function(n){this.get_events().removeHandler("dragStart",n)},add_drag:function(n){this.get_events().addHandler("drag",n)},remove_drag:function(n){this.get_events().removeHandler("drag",n)},add_dragEnd:function(n){this.get_events().addHandler("dragEnd",n)},remove_dragEnd:function(n){this.get_events().removeHandler("dragEnd",n)},add_valueChanged:function(n){this.get_events().addHandler("valueChanged",n)},remove_valueChanged:function(n){this.get_events().removeHandler("valueChanged",n)}};Sys.Extended.UI.MultiHandleSliderBehavior.DropPending=null;Sys.Extended.UI.MultiHandleSliderBehavior.registerClass("Sys.Extended.UI.MultiHandleSliderBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.MultiHandleSliderBehavior,{name:"multiHandleSlider"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedMultiHandleSlider",["ExtendedBase","ExtendedDragDrop","ExtendedAnimations"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior=function(n){Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.initializeBase(this,[n]);this._key="";this._clickHandler=Function.createDelegate(this,this._onclick)};Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.prototype={initialize:function(){Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.callBaseMethod(this,"initialize");$addHandler(this.get_element(),"click",this._clickHandler)},dispose:function(){if(this._key){var n=Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys,t=n[this._key];Array.remove(t,this);this._key=null}this._clickHandler&&($removeHandler(this.get_element(),"click",this._clickHandler),this._clickHandler=null);Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.callBaseMethod(this,"dispose")},get_Key:function(){return this._key},set_Key:function(n){var i=Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys,t;n!=this._key&&(this._key&&(t=i[this._key],Array.remove(t,this._key)),this._key=n,n&&(t=i[this._key],t==null&&(t=i[this._key]=[]),Array.add(t,this)))},_onclick:function(){var n=this.get_element(),r=Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys,t,i;this._key&&n.checked&&(t=r[this._key],i=this,Array.forEach(t,function(n){n!=i&&(n.get_element().checked=!1,$common.tryFireEvent(n.get_element(),"change"))}));this.raiseChecked(new Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs(n,this._key))},add_checked:function(n){this.get_events().addHandler("checked",n)},remove_checked:function(n){this.get_events().removeHandler("checked",n)},raiseChecked:function(n){var t=this.get_events().getHandler("checked");t&&t(this,n)}};Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.registerClass("Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior",Sys.Extended.UI.BehaviorBase);Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys={};Sys.registerComponent(Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior,{name:"mutuallyExclusiveCheckBox",parameters:["Key"]});Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs=function(n,t){Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs.initializeBase(this);this._key=t;this._checkbox=n};Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs.prototype={get_checkbox:function(){return this._checkbox},get_key:function(){return this._key}};Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs.registerClass("Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs",Sys.EventArgs)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedMutuallyExclusiveCheckBox",["ExtendedBase","ExtendedCommon"],n):n()}();Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.NoBotBehavior=function(n){Sys.Extended.UI.NoBotBehavior.initializeBase(this,[n]);this._ChallengeScript=""};Sys.Extended.UI.NoBotBehavior.prototype={initialize:function(){Sys.Extended.UI.NoBotBehavior.callBaseMethod(this,"initialize");var n=eval(this._ChallengeScript);Sys.Extended.UI.NoBotBehavior.callBaseMethod(this,"set_ClientState",[n])},dispose:function(){Sys.Extended.UI.NoBotBehavior.callBaseMethod(this,"dispose")},get_ChallengeScript:function(){return this._ChallengeScript},set_ChallengeScript:function(n){this._ChallengeScript!=n&&(this._ChallengeScript=n,this.raisePropertyChanged("ChallengeScript"))}};Sys.Extended.UI.NoBotBehavior.registerClass("Sys.Extended.UI.NoBotBehavior",Sys.Extended.UI.BehaviorBase),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.NumericUpDownBehavior=function(n){Sys.Extended.UI.NumericUpDownBehavior.initializeBase(this,[n]);this._currentValue=null;this._widthValue=null;this._targetButtonUpIDValue=null;this._targetButtonDownIDValue=null;this._serviceUpPathValue=location.pathname;this._serviceUpMethodValue=null;this._serviceDownPathValue=location.pathname;this._serviceDownMethodValue=null;this._refValuesValue=null;this._tagValue=null;this._elementTextBox=null;this._step=1;this._min=-Number.MAX_VALUE;this._max=Number.MAX_VALUE;this._bUp=null;this._bDown=null;this._stepPrecision=0;this._valuePrecision=0;this._clickUpHandler=null;this._clickDownHandler=null;this._changeHandler=null};Sys.Extended.UI.NumericUpDownBehavior.prototype={initialize:function(){var n,t;if(Sys.Extended.UI.NumericUpDownBehavior.callBaseMethod(this,"initialize"),$common.prepareHiddenElementForATDeviceUpdate(),n=this.get_element(),this._elementTextBox=n,this._elementTextBox.readOnly=this._refValuesValue||this._serviceUpMethodValue||this._serviceDownMethodValue?!0:!1,this.readValue(),this._changeHandler=Function.createDelegate(this,this._onChange),$addHandler(n,"blur",this._changeHandler),!this._targetButtonUpIDValue||!this._targetButtonDownIDValue){this._widthValue=Math.max(this._widthValue,24);n.style.width=this._widthValue-24+"px";n.style.textAlign="center";t=document.createElement("DIV");t.style.position="relative";t.style.width=this._widthValue+"px";t.style.fontSize=n.clientHeight+"px";t.style.height=n.clientHeight+"px";t.style.paddingRight="24px";t.style.display=Sys.Browser.agent==Sys.Browser.Firefox||Sys.Browser.agent==Sys.Browser.Safari?"inline-block":"inline";n.parentNode.insertBefore(t,n);var i=document.createElement("TABLE"),e=document.createElement("TBODY"),o=document.createElement("TR"),s=document.createElement("TR"),r=document.createElement("TD"),u=document.createElement("TD"),f=document.createElement("TD");r.rowSpan="2";r.style.verticalAlign="middle";u.style.verticalAlign="middle";f.style.verticalAlign="middle";o.appendChild(r);o.appendChild(u);s.appendChild(f);e.appendChild(o);e.appendChild(s);i.appendChild(e);t.appendChild(i);n.parentNode.removeChild(n);r.appendChild(n);i.style.borderCollapse="collapse";i.cellSpacing="0";i.cellPadding="0";i.style.display="inline";i.style.position="relative";r.style.padding="0";u.style.padding="0";f.style.padding="0";r.style.margin="0";u.style.margin="0";f.style.margin="0"}this._targetButtonUpIDValue||(this._bUp=document.createElement("input"),this._bUp.type="button",this._bUp.id=n.id+"_bUp",this._bUp.style.border="outset 1px",Sys.Browser.agent==Sys.Browser.InternetExplorer?(this._bUp.style.fontFamily="Webdings",this._bUp.style.fontSize="9pt",this._bUp.value="5"):(this._bUp.style.fontFamily="Tahoma, Arial, sans-serif",this._bUp.style.fontSize="5pt",this._bUp.value="â–²",this._bUp.style.fontWeight="bold",this._bUp.style.lineHeight="3pt"),this._bUp.style.height="12px",this._bUp.style.width="24px",this._bUp.style.overflow="hidden",this._bUp.style.lineHeight="1em",u.appendChild(this._bUp));this._targetButtonDownIDValue||(this._bDown=document.createElement("input"),this._bDown.type="button",this._bDown.id=n.id+"_bDown",this._bDown.style.border="outset 1px",Sys.Browser.agent==Sys.Browser.InternetExplorer?(this._bDown.value="6",this._bDown.style.fontFamily="Webdings",this._bDown.style.fontSize="9pt"):(this._bDown.value="â–¼",this._bDown.style.fontFamily="Tahoma, Arial, sans-serif",this._bDown.style.fontSize="5pt",this._bDown.style.fontWeight="bold"),this._bDown.style.height="12px",this._bDown.style.lineHeight="3pt",this._bDown.style.width="24px",this._bDown.style.overflow="hidden",f.appendChild(this._bDown));this._bUp==null&&(this._bUp=document.getElementById(this._targetButtonUpIDValue));this._bUp&&(this._clickUpHandler=Function.createDelegate(this,this._clickUp),$addHandler(this._bUp,"click",this._clickUpHandler));this._bDown==null&&(this._bDown=document.getElementById(this._targetButtonDownIDValue));this._bDown&&(this._clickDownHandler=Function.createDelegate(this,this._clickDown),$addHandler(this._bDown,"click",this._clickDownHandler))},dispose:function(){this._changeHandler&&($removeHandler(this.get_element(),"blur",this._changeHandler),this._changeHandler=null);this._clickUpHandler&&this._bUp&&($removeHandler(this._bUp,"click",this._clickUpHandler),this._clickUpHandler=null);this._clickDownHandler&&this._bDown&&($removeHandler(this._bDown,"click",this._clickDownHandler),this._clickDownHandler=null);Sys.Extended.UI.NumericUpDownBehavior.callBaseMethod(this,"dispose")},add_currentChanged:function(n){this.get_events().addHandler("currentChanged",n)},remove_currentChanged:function(n){this.get_events().removeHandler("currentChanged",n)},raiseCurrentChanged:function(n){var t=this.get_events().getHandler("currentChanged");t&&(n||(n=Sys.EventArgs.Empty),t(this,n))},_onChange:function(){this.readValue();this._refValuesValue?(this.setCurrentToTextBox(this._refValuesValue[this._currentValue]),this._elementTextBox&&(this._elementTextBox.readOnly=!0)):(this.setCurrentToTextBox(this._currentValue),this._elementTextBox&&(this._elementTextBox.readOnly=this._serviceUpMethodValue||this._serviceDownMethodValue))},readValue:function(){var n,i,t;if(this._elementTextBox)if(n=this._elementTextBox.value,this._refValuesValue){if(n){for(i=0,t=0;t<this._refValuesValue.length;t++)n.toLowerCase()==this._refValuesValue[t].toLowerCase()&&(i=t);this._currentValue=i}else this._currentValue=0;this.setCurrentToTextBox(this._refValuesValue[this._currentValue])}else{if(n)try{this._currentValue=parseFloat(n)}catch(r){this._currentValue=this._min}else this._currentValue=this._min;isNaN(this._currentValue)&&(this._currentValue=this._min);this.setCurrentToTextBox(this._currentValue);this._valuePrecision=this._computePrecision(this._currentValue)}},setCurrentToTextBox:function(n){if(this._elementTextBox)if(this._elementTextBox.value=n,this.raiseCurrentChanged(n),document.createEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1);this._elementTextBox.dispatchEvent(t)}else document.createEventObject&&this._elementTextBox.fireEvent("onchange")},_incrementValue:function(n){var t=parseFloat((this._currentValue+n).toFixed(Math.max(this._stepPrecision,this._valuePrecision)));this._currentValue=n>0?Math.max(Math.min(t,this._max),this._min):Math.min(Math.max(t,this._min),this._max)},_computePrecision:function(n){var i,r,t;return n==Number.Nan?this._min:(i=n.toString(),i&&(r=/\.(\d*)$/,t=i.match(r),t&&t.length==2&&t[1]))?t[1].length:this._min},get_Width:function(){return this._widthValue},set_Width:function(n){this._widthValue!=n&&(this._widthValue=n,this.raisePropertyChanged("Width"))},get_Tag:function(){return this._tagValue},set_Tag:function(n){this._tagValue!=n&&(this._tagValue=n,this.raisePropertyChanged("Tag"))},get_TargetButtonUpID:function(){return this._targetButtonUpIDValue},set_TargetButtonUpID:function(n){this._targetButtonUpIDValue!=n&&(this._targetButtonUpIDValue=n,this.raisePropertyChanged("TargetButtonUpID"))},get_TargetButtonDownID:function(){return this._targetButtonDownIDValue},set_TargetButtonDownID:function(n){this._targetButtonDownIDValue!=n&&(this._targetButtonDownIDValue=n,this.raisePropertyChanged("TargetButtonDownID"))},get_ServiceUpPath:function(){return this._serviceUpPathValue},set_ServiceUpPath:function(n){this._serviceUpPathValue!=n&&(this._serviceUpPathValue=n,this.raisePropertyChanged("ServiceUpPath"))},get_ServiceUpMethod:function(){return this._serviceUpMethodValue},set_ServiceUpMethod:function(n){this._serviceUpMethodValue!=n&&(this._serviceUpMethodValue=n,this.raisePropertyChanged("ServiceUpMethod"),this._elementTextBox&&(this._elementTextBox.readOnly=!0))},get_ServiceDownPath:function(){return this._serviceDownPathValue},set_ServiceDownPath:function(n){this._serviceDownPathValue!=n&&(this._serviceDownPathValue=n,this.raisePropertyChanged("ServiceDownPath"))},get_ServiceDownMethod:function(){return this._serviceDownMethodValue},set_ServiceDownMethod:function(n){this._serviceDownMethodValue!=n&&(this._serviceDownMethodValue=n,this.raisePropertyChanged("ServiceDownMethod"),this._elementTextBox&&(this._elementTextBox.readOnly=!0))},get_RefValues:function(){return this._refValuesValue?this._refValuesValue.join(";"):""},set_RefValues:function(n){n!=""?(this._refValuesValue=n.split(";"),this._onChange(),this._elementTextBox&&(this._elementTextBox.readOnly=!0)):(this._refValuesValue=null,this._elementTextBox&&(this._elementTextBox.readOnly=!1));this.raisePropertyChanged("RefValues")},get_Step:function(){return this._step},set_Step:function(n){n!=this._step&&(this._step=n,this._stepPrecision=this._computePrecision(n),this.raisePropertyChanged("Step"))},get_Minimum:function(){return this._min},set_Minimum:function(n){n!=this._min&&(this._min=n,this.raisePropertyChanged("Minimum"))},get_Maximum:function(){return this._max},set_Maximum:function(n){n!=this._max&&(this._max=n,this.raisePropertyChanged("Maximum"))},_clickUp:function(n){return this.readValue(),this._serviceUpPathValue&&this._serviceUpMethodValue?(Sys.Net.WebServiceProxy.invoke(this._serviceUpPathValue,this._serviceUpMethodValue,!1,{current:this._currentValue,tag:this._tagValue},Function.createDelegate(this,this._onMethodUpDownComplete)),$common.updateFormToRefreshATDeviceBuffer()):this._refValuesValue?this._currentValue+1<this._refValuesValue.length&&(this._currentValue=this._currentValue+1,this.setCurrentToTextBox(this._refValuesValue[this._currentValue])):(this._incrementValue(this._step),this.setCurrentToTextBox(this._currentValue)),n&&n.preventDefault(),!1},_clickDown:function(n){return this.readValue(),this._serviceDownPathValue&&this._serviceDownMethodValue?(Sys.Net.WebServiceProxy.invoke(this._serviceDownPathValue,this._serviceDownMethodValue,!1,{current:this._currentValue,tag:this._tagValue},Function.createDelegate(this,this._onMethodUpDownComplete)),$common.updateFormToRefreshATDeviceBuffer()):this._refValuesValue?this._currentValue-1>=0&&(this._currentValue=this._currentValue-1,this.setCurrentToTextBox(this._refValuesValue[this._currentValue])):(this._incrementValue(-this._step),this.setCurrentToTextBox(this._currentValue)),n&&n.preventDefault(),!1},_onMethodUpDownComplete:function(n){this._currentValue=n;this.setCurrentToTextBox(this._currentValue)}};Sys.Extended.UI.NumericUpDownBehavior.registerClass("Sys.Extended.UI.NumericUpDownBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.NumericUpDownBehavior,{name:"upDown",parameters:["Minimum","Maximum","Width"]})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedUpDown",["ExtendedCommon","ExtendedBase","WebServices"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.PagingBulletedListBehavior=function(n){Sys.Extended.UI.PagingBulletedListBehavior.initializeBase(this,[n]);this._indexSizeValue=1;this._separatorValue=" - ";this._heightValue=null;this._maxItemPerPage=null;this._clientSortValue=!1;this._selectIndexCssClassValue=null;this._unselectIndexCssClassValue=null;this._tabValue=[];this._tabValueObject=[];this._tabIndex=[];this._divContent=null;this._divContentIndex=null;this._divContentUl=null;this._prevIndexSelected=null;this._indexSelected=0;this._clickIndex=null};Sys.Extended.UI.PagingBulletedListBehavior.prototype={initialize:function(){var u,t,r,i,f,n;for(Sys.Extended.UI.PagingBulletedListBehavior.callBaseMethod(this,"initialize"),u=this.get_ClientState(),u&&(t=u.split(";"),t.length&&(this._indexSelected=t[0],this._indexSizeValue=t[1]=="null"?null:t[1],this._maxItemPerPage=t[2]=="null"?null:t[2],this._clientSortValue=t[3]=="true"?!0:!1)),r=this.get_element(),this._divContent=document.createElement("div"),r.parentNode.insertBefore(this._divContent,r),i=r.childNodes,this._clickIndex=Function.createDelegate(this,this._onIndexClick),this._divContentIndex=document.createElement("DIV"),this._divContentIndex.style.marginBottom="5px",this._divContent.appendChild(this._divContentIndex),n=0;n<i.length;n++)i[n].nodeName=="LI"&&(f=i[n].firstChild&&i[n].firstChild.innerHTML?i[n].firstChild.innerHTML:i[n].innerHTML,this._tabValueObject[this._tabValueObject.length]={text:f,obj:i[n],index:n});this._clientSortValue&&this._tabValueObject.sort(this.liElementSortText);this._generateIndexAndTabForView();this._removeChilds(r.childNodes);this._divContentUl=document.createElement("DIV");this._changeHeightDivContent();this._divContentUl.appendChild(r);this._divContent.appendChild(this._divContentUl);this._updateIndexAndView(this._indexSelected)},_changeHeightDivContent:function(){this._heightValue?(this._divContentUl.style.overflow="scroll",this._divContentUl.style.height=this._heightValue+"px"):(this._divContentUl.style.overflow="",this._divContentUl.style.height="")},_createAHrefIndex:function(n,t){var r,i;return i=document.createElement("a"),i.href="",this._unselectIndexCssClassValue&&Sys.UI.DomElement.addCssClass(i,this._unselectIndexCssClassValue),i.innerHTML=n,i.tag=t,$addHandler(i,"click",this._clickIndex),this._tabIndex[this._tabIndex.length]=i,this._divContentIndex.appendChild(i),r=document.createElement("SPAN"),r.innerHTML=""+this._separatorValue+"",this._divContentIndex.appendChild(r),r},liElementSortText:function(n,t){return n.text.toLowerCase()==t.text.toLowerCase()?0:n.text.toLowerCase()<t.text.toLowerCase()?-1:1},liElementSortIndex:function(n,t){return n.index-t.index},_generateIndexAndTabForView:function(){var i,r,n,t;if(this._deleteTabIndexAndTabValue(),this._tabValue=[],this._tabIndex=[],this._removeChilds(this._divContentIndex.childNodes),this._maxItemPerPage){if(this._maxItemPerPage>0)for(n=-1,t=0;t<this._tabValueObject.length;t++)t%this._maxItemPerPage==0&&(n++,index=this._tabValueObject[t].text,this._tabValue[n]=[],i=this._createAHrefIndex(index,n)),this._tabValue[n][this._tabValue[n].length]=this._tabValueObject[t].obj}else if(this._indexSizeValue>0)for(r="",n=-1,t=0;t<this._tabValueObject.length;t++)index=this._tabValueObject[t].text.substr(0,this._indexSizeValue).toUpperCase(),r!=index&&(n++,this._tabValue[n]=[],i=this._createAHrefIndex(index,n),r=index),this._tabValue[n][this._tabValue[n].length]=this._tabValueObject[t].obj;i&&this._divContentIndex.removeChild(i)},_deleteTabIndexAndTabValue:function(){var t,n;if(this._clickIndex){for(n=0;n<this._tabIndex.length;n++)t=this._tabIndex[n],t&&$removeHandler(t,"click",this._clickIndex);this._changeHandler=null}for(delete this._tabIndex,n=0;n<this._tabValue.length;n++)delete this._tabValue[n];delete this._tabValue},dispose:function(){this._deleteTabIndexAndTabValue();delete this._tabValueObject;Sys.Extended.UI.PagingBulletedListBehavior.callBaseMethod(this,"dispose")},_removeChilds:function(n){for(var t=0;n.length;t++)n[0].parentNode.removeChild(n[0])},_renderHtml:function(n){var i=this.get_element(),t;for(this._removeChilds(i.childNodes),t=0;t<this._tabValue[n].length;t++)i.appendChild(this._tabValue[n][t]);this._divContentUl.scrollTop=0},_selectIndex:function(n){this._tabIndex.length>0&&(this._unselectIndexCssClassValue&&Sys.UI.DomElement.removeCssClass(this._tabIndex[n],this._unselectIndexCssClassValue),this._selectIndexCssClassValue&&Sys.UI.DomElement.addCssClass(this._tabIndex[n],this._selectIndexCssClassValue),this._prevIndexSelected=this._tabIndex[n],this.raiseIndexChanged(this._tabIndex[n]))},_onIndexClick:function(n){var i=this.get_element(),t=n.target;this._selectIndexCssClassValue&&Sys.UI.DomElement.removeCssClass(this._prevIndexSelected,this._selectIndexCssClassValue);this._unselectIndexCssClassValue&&Sys.UI.DomElement.addCssClass(this._prevIndexSelected,this._unselectIndexCssClassValue);this._unselectIndexCssClassValue&&Sys.UI.DomElement.removeCssClass(t,this._unselectIndexCssClassValue);this._selectIndexCssClassValue&&Sys.UI.DomElement.addCssClass(t,this._selectIndexCssClassValue);this._prevIndexSelected=t;this._renderHtml(t.tag);this.raiseIndexChanged(t);n.preventDefault()},add_indexChanged:function(n){this.get_events().addHandler("indexChanged",n)},remove_indexChanged:function(n){this.get_events().removeHandler("indexChanged",n)},raiseIndexChanged:function(n){this._indexSelected=n.tag;var t=this.get_events().getHandler("indexChanged");t&&(n||(n=Sys.EventArgs.Empty),t(this,n));this.set_ClientState(n.tag+";"+this.get_IndexSize()+";"+this.get_MaxItemPerPage()+";"+this.get_ClientSort())},get_tabIndex:function(){return this._tabIndex},get_tabValue:function(){return this._tabValue},_updateIndexAndView:function(n){this._generateIndexAndTabForView();this._tabIndex.length>0&&(n<this._tabIndex.length?(this._renderHtml(this._tabIndex[n].tag),this._selectIndex(n)):(this._renderHtml(this._tabIndex[0].tag),this._selectIndex(0)))},get_Height:function(){return this._heightValue},set_Height:function(n){this._heightValue!=n&&(this._heightValue=n,this.get_isInitialized()&&this._changeHeightDivContent(),this.raisePropertyChanged("Height"))},get_IndexSize:function(){return this._indexSizeValue},set_IndexSize:function(n){this._indexSizeValue!=n&&(this.set_ClientState("0;"+n+";"+this.get_MaxItemPerPage()+";"+this.get_ClientSort()),this._indexSizeValue=n,this.get_isInitialized()&&this._updateIndexAndView(0),this.raisePropertyChanged("IndexSize"))},get_MaxItemPerPage:function(){return this._maxItemPerPage},set_MaxItemPerPage:function(n){this._maxItemPerPage!=n&&(this.set_ClientState("0;"+this.get_IndexSize()+";"+n+";"+this.get_ClientSort()),this._maxItemPerPage=n,this.get_isInitialized()&&this._updateIndexAndView(0),this.raisePropertyChanged("MaxItemPerPage"))},get_Separator:function(){return this._separatorValue},set_Separator:function(n){this._separatorValue!=n&&(this._separatorValue=n?n:"",this.get_isInitialized()&&this._updateIndexAndView(0),this.raisePropertyChanged("Separator"))},get_ClientSort:function(){return this._clientSortValue},set_ClientSort:function(n){this._clientSortValue!=n&&(this.set_ClientState("0;"+this.get_IndexSize()+";"+this.get_MaxItemPerPage()+";"+n),this._clientSortValue=n,this.get_isInitialized()&&(this._clientSortValue?this._tabValueObject.sort(this.liElementSortText):this._tabValueObject.sort(this.liElementSortIndex),this._updateIndexAndView(0)),this.raisePropertyChanged("ClientSort"))},get_SelectIndexCssClass:function(){return this._selectIndexCssClassValue},set_SelectIndexCssClass:function(n){this._selectIndexCssClassValue!=n&&(this._selectIndexCssClassValue=n,this.raisePropertyChanged("SelectIndexCssClass"))},get_UnselectIndexCssClass:function(){return this._unselectIndexCssClassValue},set_UnselectIndexCssClass:function(n){this._unselectIndexCssClassValue!=n&&(this._unselectIndexCssClassValue=n,this.raisePropertyChanged("UnselectIndexCssClass"))}};Sys.Extended.UI.PagingBulletedListBehavior.registerClass("Sys.Extended.UI.PagingBulletedListBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.PagingBulletedListBehavior,{name:"pagedList"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedPagedList",["ExtendedBase"],n):n()}(),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.PasswordStrengthExtenderBehavior=function(n){Sys.Extended.UI.PasswordStrengthExtenderBehavior.initializeBase(this,[n]);this._levelArray=[];this._styleArray=[];this._txtPwdStrengthCssClass=null;this._barBorderCssClass=null;this._barIndicatorCssClass=null;this._displayPosition=Sys.Extended.UI.DisplayPosition.RightSide;this._strengthIndicator=Sys.Extended.UI.StrengthIndicatorTypes.Text;this._preferredPasswordLength=0;this._minimumNumericCharacters=0;this._minimumSymbolCharacters=0;this._requiresUpperAndLowerCaseCharacters=!1;this._helpHandleCssClass="";this._helpHandlePosition=Sys.Extended.UI.DisplayPosition.AboveRight;this._helpText="";this._helpStatusLabelID=null;this._displayDiv=null;this._helpDiv=null;this._barOuterDiv=null;this._barInnerDiv=null;this._keyPressHandler=null;this._blurHandler=null;this._helpClickHandler=null;this._prefixText=Sys.Extended.UI.Resources.PasswordStrength_StrengthPrompt;this._txtStrengthDescriptions=Sys.Extended.UI.Resources.PasswordStrength_DefaultStrengthDescriptions;this._strengthStyles="";this._barIndicatorStyles="";this._txtseparator=";";this._MIN_TXT_LEVEL_COUNT=2;this._MAX_TXT_LEVEL_COUNT=10;this._calcWeightings="50;15;15;20";this._minLowerCaseChars=0;this._minUpperCaseChars=0};Sys.Extended.UI.PasswordStrengthExtenderBehavior.prototype={initialize:function(){Sys.Extended.UI.PasswordStrengthExtenderBehavior.callBaseMethod(this,"initialize");this._createIndicatorDisplayElement();var n=this.get_element();this._keyPressHandler=Function.createDelegate(this,this._onKeyPress);this._blurHandler=Function.createDelegate(this,this._onBlur);$addHandler(n,"keyup",this._keyPressHandler);$addHandler(n,"blur",this._blurHandler);(this._preferredPasswordLength==null||this._preferredPasswordLength==""||this._preferredPasswordLength<=0)&&(this._preferredPasswordLength=10,this.raisePropertyChanged("PreferredPasswordLength"));(this._calcWeightings==null||this._calcWeightings=="")&&(this._calcWeightings="50;15;15;20",this.raisePropertyChanged("CalculationWeightings"));this._getPasswordStrength()},_createIndicatorDisplayElement:function(){if(this._strengthIndicator==Sys.Extended.UI.StrengthIndicatorTypes.BarIndicator?this._createBarIndicatorDisplayElement():this._createTextDisplayElement(),this._createHelpDisplayElement()==!0){$common.setVisible(this._helpDiv,!0);var n=$common.getBounds(this.get_element()),i=$common.getBounds(this._helpDiv),r,u,t=3;this._helpHandlePosition=="LeftSide"?(r=n.y+(n.height/2-i.height/2),u=n.x-i.width):this._helpHandlePosition=="BelowRight"?(r=n.y+n.height-t,u=n.x+n.width-t):this._helpHandlePosition=="BelowLeft"?(r=n.y+n.height-t,u=n.x-i.width+t):this._helpHandlePosition=="RightSide"?(r=n.y+(n.height/2-i.height/2),u=n.x+n.width):this._helpHandlePosition=="AboveLeft"?(r=n.y-i.height+t,u=n.x-i.width+t):(r=n.y-i.height+t,u=n.x+n.width-t);this._helpDiv.style.top=r+"px";this._helpDiv.style.left=u+"px"}},_createTextDisplayElement:function(){var n=document.createElement("label");n.style.position="absolute";n.style.visibility="hidden";n.style.display="none";this.get_element().id&&(n.id=this.get_element().id+"_PasswordStrength");this._displayDiv=n;this._setTextDisplayLocation(n);document.body.appendChild(n);this._setTextDisplayStyle(0)},_setTextDisplayStyle:function(n){this._styleArray.length==0?this._txtPwdStrengthCssClass?this._displayDiv.className=this._txtPwdStrengthCssClass:this._displayDiv.style.backgroundColor="yellow":(this._displayDiv.style.backgroundColor="",this._txtPwdStrengthCssClass&&Sys.UI.DomElement.containsCssClass(this._displayDiv,this._txtPwdStrengthCssClass)&&Sys.UI.DomElement.removeCssClass(this._displayDiv,this._txtPwdStrengthCssClass),this._displayDiv.className=this._styleArray[n])},_setBarDisplayStyle:function(n){this._barBorderCssClass!=""?this._barOuterDiv.className=this._barBorderCssClass:(d1.style.width="200px",d1.style.borderStyle="solid",d1.style.borderWidth="1px");this._styleArray.length==0?this._barIndicatorCssClass!=""?this._barInnerDiv.className=this._barIndicatorCssClass:this._barInnerDiv.style.backgroundColor="red":(this._barIndicatorCssClass&&Sys.UI.DomElement.containsCssClass(this._barInnerDiv,this._barIndicatorCssClass)&&Sys.UI.DomElement.removeCssClass(this._barInnerDiv,this._barIndicatorCssClass),this._barInnerDiv.className=this._styleArray[n])},_createBarIndicatorDisplayElement:function(){var n=document.createElement("div"),t;n.style.position="absolute";n.style.visibility="hidden";n.style.display="none";t=document.createElement("div");t.style.position="absolute";t.style.visibility="hidden";t.style.display="none";n.style.height=this.get_element().offsetHeight+4+"px";this.get_element().id&&(n.id=this.get_element().id+"_PasswordStrengthBar1",t.id=this.get_element().id+"_PasswordStrengthBar2");this._barOuterDiv=n;this._barInnerDiv=t;this._extractStyles();this._setBarDisplayStyle(0);document.body.appendChild(n);document.body.appendChild(t);this._setBarDisplayLocation(n,t)},_createHelpDisplayElement:function(){if(this._helpHandleCssClass!=""){var n=document.createElement("a");return n.style.position="absolute",n.style.visibility="hidden",n.style.display="none",n.href="#",n.title=Sys.Extended.UI.Resources.PasswordStrength_GetHelpRequirements,this.get_element().id&&(n.id=this.get_element().id+"_PasswordStrengthReqDisplay"),this._helpClickHandler=Function.createDelegate(this,this._onHelpClick),$addHandler(n,"click",this._helpClickHandler),this._helpDiv=n,this._helpDiv.className=this._helpHandleCssClass,this.get_element().parentElement!=null&&this.get_element().parentElement.canHaveChildren?this.get_element().parentElement.appendChild(n):document.body.appendChild(n),!0}return!1},_setTextDisplayLocation:function(n){var t=$common.getLocation(this.get_element()),r=$common.getBounds(this.get_element()),i=15;this._displayPosition==Sys.Extended.UI.DisplayPosition.LeftSide?(n.style.top=t.y+"px",n.style.left=t.x-r.width-i+"px"):this._displayPosition=="BelowRight"?(n.style.top=t.y+this.get_element().offsetHeight+"px",n.style.left=t.x+this.get_element().offsetWidth-this.get_element().offsetWidth/4+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.BelowLeft?(n.style.top=t.y+this.get_element().offsetHeight+"px",n.style.left=t.x-i+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.AboveRight?(n.style.top=t.y-this.get_element().offsetHeight+"px",n.style.left=t.x+this.get_element().offsetWidth-this.get_element().offsetWidth/4+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.AboveLeft?(n.style.top=t.y-this.get_element().offsetHeight+"px",n.style.left=t.x-i+"px"):(n.style.top=t.y+"px",n.style.left=t.x+this.get_element().offsetWidth+i+"px")},_setBarDisplayLocation:function(n,t){var i,f,o,s,e;if(this.get_element().offsetHeight>0){var h=$common.getBorderBox(n),c=$common.getPaddingBox(n),r=h.left+c.left,u=h.top+c.top;t.style.height=this.get_element().offsetHeight+"px";n.style.height=this.get_element().offsetHeight+"px";i=$common.getLocation(this.get_element());f=15;this._displayPosition==Sys.Extended.UI.DisplayPosition.LeftSide?(o=$common.getVisible(this._barOuterDiv),$common.setVisible(this._barOuterDiv,!0),s=$common.getContentSize(n),$common.setVisible(this._barOuterDiv,o),e=s.width,n.style.top=i.y+"px",n.style.left=i.x-parseInt(e)-f+"px",t.style.top=i.y+u+"px",t.style.left=i.x-parseInt(e)-f+r+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.BelowRight?(n.style.top=i.y+this.get_element().offsetHeight+"px",n.style.left=i.x+this.get_element().offsetWidth+"px",t.style.top=i.y+this.get_element().offsetHeight+u+"px",t.style.left=i.x+this.get_element().offsetWidth+r+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.BelowLeft?(n.style.top=i.y+this.get_element().offsetHeight+"px",n.style.left=i.x+"px",t.style.top=i.y+this.get_element().offsetHeight+u+"px",t.style.left=i.x+r+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.AboveRight?(n.style.top=i.y-this.get_element().offsetHeight+"px",n.style.left=i.x+this.get_element().offsetWidth+"px",t.style.top=i.y-this.get_element().offsetHeight+u+"px",t.style.left=i.x+this.get_element().offsetWidth+r+"px"):this._displayPosition==Sys.Extended.UI.DisplayPosition.AboveLeft?(n.style.top=i.y-this.get_element().offsetHeight+"px",n.style.left=i.x+"px",t.style.top=i.y-this.get_element().offsetHeight+u+"px",t.style.left=i.x+r+"px"):(n.style.top=i.y+"px",n.style.left=i.x+this.get_element().offsetWidth+f+"px",t.style.top=i.y+u+"px",t.style.left=i.x+this.get_element().offsetWidth+f+r+"px")}},_showStrength:function(){var r=this.get_element(),t,n,i;r.readOnly!=!0&&(t=this._getPasswordStrength(),this._strengthIndicator==Sys.Extended.UI.StrengthIndicatorTypes.BarIndicator?($common.setVisible(this._barOuterDiv,!0),$common.setVisible(this._barInnerDiv,!0),n=0,this._styleArray!=null&&this._styleArray.length>0&&(n=parseInt(t/100*(this._styleArray.length-1))),this._setBarDisplayStyle(n),this._setBarDisplayLocation(this._barOuterDiv,this._barInnerDiv),this._showStrengthAsBarValue(t)):(this._createTextDescriptions(this._txtStrengthDescriptions),$common.setVisible(this._displayDiv,!0),n=parseInt(t/100*(this._levelArray.length-1)),i=this._levelArray[n],this._setTextDisplayStyle(n),this._setTextDisplayLocation(this._displayDiv),this._showStrengthAsText(i)))},_showStrengthAsText:function(n){this._displayDiv.innerHTML=this._prefixText+n},_showStrengthAsBarValue:function(n){var t=$common.getContentSize(this._barOuterDiv),r=$common.getPaddingBox(this._barOuterDiv),i=parseInt(t.width*(n/100));this._barInnerDiv.style.width=i+"px"},_getPasswordStrength:function(){var u=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value(),n="",t=0,f=this._calcWeightings.split(";"),s,h,c,i;f.length!=4&&Sys.Debug.assert(null,Sys.Extended.UI.Resources.PasswordStrength_InvalidWeightingRatios);var y=parseInt(f[0]),l=parseInt(f[1]),a=parseInt(f[2]),v=parseInt(f[3]),r=u.length/this._preferredPasswordLength;if(r>1&&(r=1),s=r*y,t+=s,r<1&&(n=String.format(Sys.Extended.UI.Resources.PasswordStrength_RemainingCharacters,this._preferredPasswordLength-u.length)),this._minimumNumericCharacters>0?(h=new RegExp("[0-9]","g"),i=this._getRegexCount(h,u),i>=this._minimumNumericCharacters&&(t+=l),i<this._minimumNumericCharacters&&(n!=""&&(n+=", "),n+=String.format(Sys.Extended.UI.Resources.PasswordStrength_RemainingNumbers,this._minimumNumericCharacters-i))):t+=r*l,this._requiresUpperAndLowerCaseCharacters==!0||typeof this._requiresUpperAndLowerCaseCharacters=="String"&&Boolean.parse(this._requiresUpperAndLowerCaseCharacters)==!0){var p=new RegExp("[a-z]","g"),w=new RegExp("[A-Z]","g"),e=this._getRegexCount(p,u),o=this._getRegexCount(w,u);e>0||o>0?e>=this._minLowerCaseChars&&o>=this._minUpperCaseChars?t+=a:(this._minLowerCaseChars>0&&this._minLowerCaseChars-e>0&&(n!=""&&(n+=", "),n+=String.format(Sys.Extended.UI.Resources.PasswordStrength_RemainingLowerCase,this._minLowerCaseChars-e)),this._minUpperCaseChars>0&&this._minUpperCaseChars-o>0&&(n!=""&&(n+=", "),n+=String.format(Sys.Extended.UI.Resources.PasswordStrength_RemainingUpperCase,this._minUpperCaseChars-o))):(n!=""&&(n+=", "),n+=Sys.Extended.UI.Resources.PasswordStrength_RemainingMixedCase)}else t+=r*a;return this._minimumSymbolCharacters>0?(c=new RegExp("[^a-z,A-Z,0-9, ]","g"),i=this._getRegexCount(c,u),i>=this._minimumSymbolCharacters&&(t+=v),i<this._minimumSymbolCharacters&&(n!=""&&(n+=", "),n+=String.format(Sys.Extended.UI.Resources.PasswordStrength_RemainingSymbols,this._minimumSymbolCharacters-i))):t+=r*v,this.set_HelpText(n),t},_getRegexCount:function(n,t){var r=0,i;return t!=null&&t!=""&&(i=t.match(n),i!=null&&(r=i.length)),r},_extractStyles:function(){this._strengthStyles!=null&&this._strengthStyles!=""&&(this._styleArray=this._strengthStyles.split(this._txtseparator))},_createTextDescriptions:function(){this._levelArray=this._txtStrengthDescriptions.split(this._txtseparator);this._extractStyles();this._styleArray.length>0&&this._styleArray.length!=this._levelArray.length&&Sys.Debug.assert(!1,Sys.Extended.UI.Resources.PasswordStrength_InvalidStrengthDescriptionStyles);(this._levelArray.length<this._MIN_TXT_LEVEL_COUNT||this._levelArray>this._MAX_TXT_LEVEL_COUNT)&&Sys.Debug.assert(!1,Sys.Extended.UI.Resources.PasswordStrength_InvalidStrengthDescriptions)},_onKeyPress:function(){this._showStrength()},_onBlur:function(){this._strengthIndicator==Sys.Extended.UI.StrengthIndicatorTypes.BarIndicator?($common.setVisible(this._barOuterDiv,!1),$common.setVisible(this._barInnerDiv,!1)):$common.setVisible(this._displayDiv,!1)},_onHelpClick:function(){this._helpText==""?alert(Sys.Extended.UI.Resources.PasswordStrength_Satisfied):alert(this._helpText)},dispose:function(){var n=this.get_element();this._keyPressHandler&&($removeHandler(n,"keyup",this._keyPressHandler),this._keyPressHandler=null);this._blurHandler&&($removeHandler(n,"blur",this._blurHandler),this._blurHandler=null);this._helpClickHandler&&($removeHandler(this._helpDiv,"click",this._helpClickHandler),this._helpClickHandler=null);this._displayDiv&&$common.setVisible(this._displayDiv,!1);this._barOuterDiv&&$common.setVisible(this._barOuterDiv,!1);this._barInnerDiv&&$common.setVisible(this._barInnerDiv,!1);this._helpHandleCssClass!=""&&this._helpDiv&&$common.setVisible(this._helpDiv,!1);Sys.Extended.UI.PasswordStrengthExtenderBehavior.callBaseMethod(this,"dispose")},get_PreferredPasswordLength:function(){return this._preferredPasswordLength},set_PreferredPasswordLength:function(n){this._preferredPasswordLength!=n&&(this._preferredPasswordLength=n,this.raisePropertyChanged("PreferredPasswordLength"))},get_MinimumNumericCharacters:function(){return this._minimumNumericCharacters},set_MinimumNumericCharacters:function(n){this._minimumNumericCharacters!=n&&(this._minimumNumericCharacters=n,this.raisePropertyChanged("MinimumNumericCharacters"))},get_MinimumSymbolCharacters:function(){return this._minimumSymbolCharacters},set_MinimumSymbolCharacters:function(n){this._minimumSymbolCharacters!=n&&(this._minimumSymbolCharacters=n,this.raisePropertyChanged("MinimumSymbolCharacters"))},get_RequiresUpperAndLowerCaseCharacters:function(){return this._requiresUpperAndLowerCaseCharacters},set_RequiresUpperAndLowerCaseCharacters:function(n){this._requiresUpperAndLowerCaseCharacters!=n&&(this._requiresUpperAndLowerCaseCharacters=n,this.raisePropertyChanged("RequiresUpperAndLowerCaseCharacters"))},get_TextCssClass:function(){return this._txtPwdStrengthCssClass},set_TextCssClass:function(n){this._txtPwdStrengthCssClass!=n&&(this._txtPwdStrengthCssClass=n,this.raisePropertyChanged("TextCssClass"))},get_BarBorderCssClass:function(){return this._barBorderCssClass},set_BarBorderCssClass:function(n){this._barBorderCssClass!=n&&(this._barBorderCssClass=n,this.raisePropertyChanged("BarBorderCssClass"))},get_BarIndicatorCssClass:function(){return this._barIndicatorCssClass},set_BarIndicatorCssClass:function(n){this._barIndicatorCssClass!=n&&(this._barIndicatorCssClass=n,this.raisePropertyChanged("BarIndicatorCssClass"))},get_DisplayPosition:function(){return this._displayPosition},set_DisplayPosition:function(n){this._displayPosition!=n&&(this._displayPosition=n,this.raisePropertyChanged("DisplayPosition"))},get_PrefixText:function(){return this._prefixText},set_PrefixText:function(n){this._prefixText!=n&&(this._prefixText=n,this.raisePropertyChanged("PrefixText"))},get_StrengthIndicatorType:function(){return this._strengthIndicator},set_StrengthIndicatorType:function(n){this._strengthIndicator!=n&&(this._strengthIndicator=n,this.raisePropertyChanged("StrengthIndicatorType"))},get_TextStrengthDescriptions:function(){return this._txtStrengthDescriptions},set_TextStrengthDescriptions:function(n){n!=null&&n!=""&&n!=this._txtStrengthDescriptions&&(this._txtStrengthDescriptions=n,this.raisePropertyChanged("TextStrengthDescriptions"))},get_StrengthStyles:function(){return this._strengthStyles},set_StrengthStyles:function(n){n!=null&&n!=""&&n!=this._strengthStyles&&(this._strengthStyles=n,this.raisePropertyChanged("StrengthStyles"))},get_TextStrengthDescriptionStyles:function(){return this.get_StrengthStyles()},set_TextStrengthDescriptionStyles:function(n){this.set_StrengthStyles(n)},get_HelpHandleCssClass:function(){return this._helpHandleCssClass},set_HelpHandleCssClass:function(n){this._helpHandleCssClass!=n&&(this._helpHandleCssClass=n,this.raisePropertyChanged("HelpHandleCssClass"))},get_HelpHandlePosition:function(){return this._helpHandlePosition},set_HelpHandlePosition:function(n){this._helpHandlePosition!=n&&(this._helpHandlePosition=n,this.raisePropertyChanged("HelpHandlePosition"))},get_HelpText:function(){return this._helpText},get_CalculationWeightings:function(){return this._calcWeightings},set_CalculationWeightings:function(n){this._calcWeightings!=n&&(this._calcWeightings=n,this.raisePropertyChanged("CalculationWeightings"))},set_HelpText:function(n){if(this._helpStatusLabelID){var t=$get(this._helpStatusLabelID);t&&(t.innerHTML=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value().length>0?n:"")}this._helpText!=n&&(this._helpText=n,this.raisePropertyChanged("HelpText"))},get_MinimumLowerCaseCharacters:function(){return this._minLowerCaseChars},set_MinimumLowerCaseCharacters:function(n){this._minLowerCaseChars=n},get_MinimumUpperCaseCharacters:function(){return this._minUpperCaseChars},set_MinimumUpperCaseCharacters:function(n){this._minUpperCaseChars=n},get_HelpStatusLabelID:function(){return this._helpStatusLabelID},set_HelpStatusLabelID:function(n){this._helpStatusLabelID!=n&&(this._helpStatusLabelID=n,this.raisePropertyChanged("HelpStatusLabelID"))}};Sys.Extended.UI.PasswordStrengthExtenderBehavior.registerClass("Sys.Extended.UI.PasswordStrengthExtenderBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.PasswordStrengthExtenderBehavior,{name:"passwordStrength"});Sys.Extended.UI.StrengthIndicatorTypes=function(){throw Error.invalidOperation();};Sys.Extended.UI.DisplayPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.StrengthIndicatorTypes.prototype={Text:0,BarIndicator:1};Sys.Extended.UI.DisplayPosition.prototype={RightSide:0,AboveRight:1,AboveLeft:2,LeftSide:3,BelowRight:4,BelowLeft:5};Sys.Extended.UI.DisplayPosition.registerEnum("Sys.Extended.UI.DisplayPosition");Sys.Extended.UI.StrengthIndicatorTypes.registerEnum("Sys.Extended.UI.StrengthIndicatorTypes")}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedPasswordStrength",["ExtendedBase","ExtendedCommon"],n):n()}();Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.PieChart=function(n){Sys.Extended.UI.PieChart.initializeBase(this,[n]);var t=this.get_id();t=t.replace("_ctl00","");this._parentDiv=document.getElementById(t+"__ParentDiv");this._chartWidth="300";this._chartHeight="300";this._chartTitle="";this._pieChartClientValues=null;this._theme="PieChart";this._chartTitleColor="";this.charLength=3.5};Sys.Extended.UI.PieChart.prototype={initialize:function(){if(Sys.Extended.UI.PieChart.callBaseMethod(this,"initialize"),!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"))throw"Current version of browser does not support SVG.";this.generatePieChart()},dispose:function(){Sys.Extended.UI.PieChart.callBaseMethod(this,"dispose")},generatePieChart:function(){var c=parseInt(this._chartWidth)>parseInt(this._chartHeight)?(parseInt(this._chartHeight)-10)/3:(parseInt(this._chartWidth)-10)/3,l=parseInt(this._chartWidth)/2,a=parseInt(this._chartHeight)/2.25,n=String.format('<?xml-stylesheet type="text/css" href="{0}.css"?>',this._theme),i,v,t;n=String.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="{0}" height="{1}" style="position: relative; display: block;">',this._chartWidth,this._chartHeight);n=n+"<defs>";n=n+String.format('<radialGradient gradientUnits="userSpaceOnUse" r="{0}" fy="{1}" fx="{2}" cy="{1}" cx="{2}">',c,l,a);n=n+'<stop offset="0%" id="RadialGradient1"><\/stop>';n=n+'<stop offset="25%" id="RadialGradient2"><\/stop>';n=n+'<stop offset="100%" id="RadialGradient3"><\/stop><\/RadialGradient>';n=n+"<\/defs>";n=n+String.format('<path fill="none" stroke-opacity="1" fill-opacity="1" stroke-linejoin="round" stroke-linecap="square" d="M5 {0} {1} {0} {1} {2} 5 {2} z"/>',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10);n=n+String.format('<path id="ChartBackGround" stroke="" d="M0 0 {0} 0 {0} {1} 0 {1} z"/>',this._chartWidth,this._chartHeight);n=n+String.format('<path fill="#ffffff" stroke-opacity="1" fill-opacity="0" stroke-linejoin="round" stroke-linecap="square" stroke="" d="M5 {0} {1} {0} {1} {2} 5 {2} z" />',parseInt(this._chartHeight)/10+5,parseInt(this._chartWidth)-5,parseInt(this._chartHeight)-parseInt(this._chartHeight)/10);n=n+String.format('<text x="{0}" y="{1}" id="ChartTitle" style="fill:{3}">{2}<\/text>',parseInt(this._chartWidth)/2-this._chartTitle.length*this.charLength,parseInt(this._chartHeight)/20,this._chartTitle,this._chartTitleColor);var o=parseInt(this._chartHeight)*82/100+5,r=7.5,u=5,y=0;for(t=0;t<this._pieChartClientValues.length;t++)y=y+this._pieChartClientValues[t].Category.length;i=Math.round(y*5/2)+Math.round((r+u*2)*this._pieChartClientValues.length);v=!1;i>parseInt(this._chartWidth)/2&&(i=i/2,v=!0);n=n+"<g>";n=n+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="LegendArea" stroke=""><\/path>',parseInt(this._chartWidth)*40/100-i/2,o,parseInt(this._chartWidth)*40/100+i/2,Math.round(parseInt(this._chartHeight)*97.5/100));var e=parseInt(this._chartWidth)*40/100-i/2+5+r+u,s=e,f=parseInt(this._chartWidth)*40/100-i/2+5,h=f;for(t=0;t<this._pieChartClientValues.length;t++)v&&t==Math.round(this._pieChartClientValues.length/2)&&(e=parseInt(this._chartWidth)*40/100-i/2+5+r+u,s=e,f=parseInt(this._chartWidth)*40/100-i/2+5,h=f,o=parseInt(this._chartHeight)*89/100+5,v=!1),f=h,e=s,n=n+String.format('<path d="M{0} {1} {2} {1} {2} {3} {0} {3} z" id="Legend{4}" style="stroke:{6};fill:{5}"><\/path>',f,o+7.5,f+r,o+15,t+1,this._pieChartClientValues[t].PieChartValueColor,this._pieChartClientValues[t].PieChartValueStrokeColor),n=n+String.format('<text x="{0}" y="{1}" id="LegendText">{2}<\/text>',e,o+15,this._pieChartClientValues[t].Category),this._pieChartClientValues[t].Category.length>10?(h=f+this._pieChartClientValues[t].Category.length*5.5+r+u*2,s=e+this._pieChartClientValues[t].Category.length*5.5+r+u*2):(h=h+this._pieChartClientValues[t].Category.length*6+r+u*2,s=s+this._pieChartClientValues[t].Category.length*6+r+u*2);n=n+"<\/g>";var p=0,w=l,b=a-c,k=l,d=a-c;for(t=0;t<this._pieChartClientValues.length;t++)p=p+Math.abs(parseFloat(this._pieChartClientValues[t].Data));this._parentDiv.innerHTML=n;this.drawSegments(this,0,0,p,c,0,0,0,l,0,a,0,k,d,w,b,0)},drawSegments:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){i=i+Math.abs(parseFloat(n._pieChartClientValues[t].Data));f=i/r*360;e=f*(Math.PI/180);o=(i-Math.abs(parseFloat(n._pieChartClientValues[t].Data))+Math.abs(parseFloat(n._pieChartClientValues[t].Data))/2)/r*360;o=o*(Math.PI/180);h=parseFloat(Math.sin(e)*u);l=parseFloat(Math.cos(e)*u);a=parseFloat(Math.sin(o)*(u+10));v=parseFloat(Math.cos(o)*(u+10));a=s+a>s?s+a:s+a-n._pieChartClientValues[t].Data.toString().length*this.charLength;v=c+-1*v<c?c+-1*v:c+-1*v+10;n._parentDiv.innerHTML=n._parentDiv.innerHTML.replace("<\/svg>","")+String.format('<g><path id="Segment{8}" d="M{0} {1} A {2} {2} 0 {3},1 {4} {5} L {6} {7} z" style="stroke:{10};fill:{9};"><\/path>',y,p,u,w,s+h,c+-1*l,s,c,t+1,n._pieChartClientValues[t].PieChartValueColor,n._pieChartClientValues[t].PieChartValueStrokeColor)+String.format('<text fill="#000000" style="font: 11px Arial,Helvetica,sans-serif" fill-opacity="1" y="{1}" x="{0}">{2}<\/text><\/g>',a,v,n._pieChartClientValues[t].Data)+"<\/svg>";y=s+h;p=c+-1*l;t++;t<n._pieChartClientValues.length&&setTimeout(function(){n.drawSegments(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w)},400)},get_chartWidth:function(){return this._chartWidth},set_chartWidth:function(n){this._chartWidth=n},get_chartHeight:function(){return this._chartHeight},set_chartHeight:function(n){this._chartHeight=n},get_chartTitle:function(){return this._chartTitle},set_chartTitle:function(n){this._chartTitle=n},get_PieChartClientValues:function(){return this._pieChartClientValues},set_PieChartClientValues:function(n){this._pieChartClientValues=n},get_theme:function(){return this._theme},set_theme:function(n){this._theme=n},get_chartTitleColor:function(){return this._chartTitleColor},set_chartTitleColor:function(n){this._chartTitleColor=n}};Sys.Extended.UI.PieChart.registerClass("Sys.Extended.UI.PieChart",Sys.Extended.UI.ControlBase);Sys.registerComponent(Sys.Extended.UI.PieChart,{name:"PieChart",parameters:[{name:"PieChartValues",type:"PieChartValue[]"}]}),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.RatingBehavior=function(n){Sys.Extended.UI.RatingBehavior.initializeBase(this,[n]);this._starCssClass="rating_star";this._filledStarCssClass="rating_filled";this._emptyStarCssClass="rating_empty";this._waitingStarCssClass=null;this._isServerControl=!1;this._readOnly=!1;this._ratingValue=0;this._currentRating=0;this._maxRatingValue=5;this._tag="";this._ratingDirection=0;this._stars=null;this._callbackID=null;this._mouseOutHandler=Function.createDelegate(this,this._onMouseOut);this._starClickHandler=Function.createDelegate(this,this._onStarClick);this._starMouseOverHandler=Function.createDelegate(this,this._onStarMouseOver);this._keyDownHandler=Function.createDelegate(this,this._onKeyDownBack);this._autoPostBack=!1};Sys.Extended.UI.RatingBehavior.prototype={initialize:function(){var t,n;for(Sys.Extended.UI.RatingBehavior.callBaseMethod(this,"initialize"),t=this.get_element(),this._stars=[],n=1;n<=this._maxRatingValue;n++)starElement=$get(t.id+"_Star_"+n),starElement.value=n,Array.add(this._stars,starElement),$addHandler(starElement,"click",this._starClickHandler),$addHandler(starElement,"mouseover",this._starMouseOverHandler);$addHandler(t,"mouseout",this._mouseOutHandler);$addHandler(t,"keydown",this._keyDownHandler);this._update()},dispose:function(){var i=this.get_element(),n,t;if(this._stars){for(n=0;n<this._stars.length;n++)t=this._stars[n],$removeHandler(t,"click",this._starClickHandler),$removeHandler(t,"mouseover",this._starMouseOverHandler);this._stars=null}$removeHandler(i,"mouseout",this._mouseOutHandler);$removeHandler(i,"keydown",this._keyDownHandler);Sys.Extended.UI.RatingBehavior.callBaseMethod(this,"dispose")},_onError:function(n){alert(String.format(Sys.Extended.UI.Resources.Rating_CallbackError,n))},_receiveServerData:function(n,t){t._waitingMode(!1);t.raiseEndClientCallback(n)},_onMouseOut:function(){this._readOnly||(this._currentRating=this._ratingValue,this._update(),this.raiseMouseOut(this._currentRating))},_onStarClick:function(){this._readOnly||this._ratingValue!=this._currentRating&&this.set_Rating(this._currentRating)},_onStarMouseOver:function(n){this._readOnly||(this._currentRating=this._ratingDirection==0?n.target.value:this._maxRatingValue+1-n.target.value,this._update(),this.raiseMouseOver(this._currentRating))},_onKeyDownBack:function(n){if(!this._readOnly){var t=n.keyCode?n.keyCode:n.rawEvent.keyCode;t==Sys.UI.Key.right||t==Sys.UI.Key.up?(this._currentRating=Math.min(this._currentRating+1,this._maxRatingValue),this.set_Rating(this._currentRating),n.preventDefault(),n.stopPropagation()):(t==Sys.UI.Key.left||t==Sys.UI.Key.down)&&(this._currentRating=Math.max(this._currentRating-1,1),this.set_Rating(this._currentRating),n.preventDefault(),n.stopPropagation())}},_waitingMode:function(n){for(var t,i=0;i<this._maxRatingValue;i++)t=this._ratingDirection==0?this._stars[i]:this._stars[this._maxRatingValue-i-1],this._currentRating>i?this._waitingStarCssClass&&(n?(Sys.UI.DomElement.removeCssClass(t,this._filledStarCssClass),Sys.UI.DomElement.addCssClass(t,this._waitingStarCssClass)):(Sys.UI.DomElement.removeCssClass(t,this._waitingStarCssClass),Sys.UI.DomElement.addCssClass(t,this._filledStarCssClass))):(this._waitingStarCssClass&&Sys.UI.DomElement.removeCssClass(t,this._waitingStarCssClass),Sys.UI.DomElement.removeCssClass(t,this._filledStarCssClass),Sys.UI.DomElement.addCssClass(t,this._emptyStarCssClass))},_update:function(){var i=this.get_element(),n,t;for($get(i.id+"_A").title=this._currentRating,n=0;n<this._maxRatingValue;n++)t=this._ratingDirection==0?this._stars[n]:this._stars[this._maxRatingValue-n-1],this._currentRating>n?(Sys.UI.DomElement.removeCssClass(t,this._emptyStarCssClass),Sys.UI.DomElement.addCssClass(t,this._filledStarCssClass)):(Sys.UI.DomElement.removeCssClass(t,this._filledStarCssClass),Sys.UI.DomElement.addCssClass(t,this._emptyStarCssClass))},add_Rated:function(n){this.get_events().addHandler("Rated",n)},remove_Rated:function(n){this.get_events().removeHandler("Rated",n)},raiseRated:function(n){var t=this.get_events().getHandler("Rated");t&&t(this,new Sys.Extended.UI.RatingEventArgs(n))},add_MouseOver:function(n){this.get_events().addHandler("MouseOver",n)},remove_MouseOver:function(n){this.get_events().removeHandler("MouseOver",n)},raiseMouseOver:function(n){var t=this.get_events().getHandler("MouseOver");t&&t(this,new Sys.Extended.UI.RatingEventArgs(n))},add_MouseOut:function(n){this.get_events().addHandler("MouseOut",n)},remove_MouseOut:function(n){this.get_events().removeHandler("MouseOut",n)},raiseMouseOut:function(n){var t=this.get_events().getHandler("MouseOut");t&&t(this,new Sys.Extended.UI.RatingEventArgs(n))},add_EndClientCallback:function(n){this.get_events().addHandler("EndClientCallback",n)},remove_EndClientCallback:function(n){this.get_events().removeHandler("EndClientCallback",n)},raiseEndClientCallback:function(n){var t=this.get_events().getHandler("EndClientCallback");t&&t(this,new Sys.Extended.UI.RatingCallbackResultEventArgs(n))},get_AutoPostBack:function(){return this._autoPostBack},set_AutoPostBack:function(n){this._autoPostBack=n},get_Stars:function(){return this._stars},get_Tag:function(){return this._tag},set_Tag:function(n){this._tag!=n&&(this._tag=n,this.raisePropertyChanged("Tag"))},get_CallbackID:function(){return this._callbackID},set_CallbackID:function(n){this._callbackID=n},get_RatingDirection:function(){return this._ratingDirection},set_RatingDirection:function(n){this._ratingDirection!=n&&(this._ratingDirection=n,this.get_isInitialized()&&this._update(),this.raisePropertyChanged("RatingDirection"))},get_EmptyStarCssClass:function(){return this._emptyStarCssClass},set_EmptyStarCssClass:function(n){this._emptyStarCssClass!=n&&(this._emptyStarCssClass=n,this.raisePropertyChanged("EmptyStarCssClass"))},get_FilledStarCssClass:function(){return this._filledStarCssClass},set_FilledStarCssClass:function(n){this._filledStarCssClass!=n&&(this._filledStarCssClass=n,this.raisePropertyChanged("FilledStarCssClass"))},get_WaitingStarCssClass:function(){return this._waitingStarCssClass},set_WaitingStarCssClass:function(n){this._waitingStarCssClass!=n&&(this._waitingStarCssClass=n,this.raisePropertyChanged("WaitingStarCssClass"))},get_Rating:function(){var n=Sys.Extended.UI.RatingBehavior.callBaseMethod(this,"get_ClientState");return n!==null&&n.length&&(this._ratingValue=n),this._ratingValue==""&&(this._ratingValue=null),this._ratingValue},set_Rating:function(n){if(this._ratingValue!=n&&(this._ratingValue=n,this._currentRating=n,this.get_isInitialized())){if(n<0||n>this._maxRatingValue)return;if(this._update(),Sys.Extended.UI.RatingBehavior.callBaseMethod(this,"set_ClientState",[this._ratingValue]),this.raisePropertyChanged("Rating"),this.raiseRated(this._currentRating),this._isServerControl){this._waitingMode(!0);var t=this._currentRating+";"+this._tag,i=this._callbackID;this._autoPostBack?__doPostBack(i,t):WebForm_DoCallback(i,t,this._receiveServerData,this,this._onError,!0)}}},get_MaxRating:function(){return this._maxRatingValue},set_MaxRating:function(n){this._maxRatingValue!=n&&(this._maxRatingValue=n,this.raisePropertyChanged("MaxRating"))},get_ReadOnly:function(){return this._readOnly},set_ReadOnly:function(n){this._readOnly!=n&&(this._readOnly=n,this.raisePropertyChanged("ReadOnly"))},get_StarCssClass:function(){return this._starCssClass},set_StarCssClass:function(n){this._starCssClass!=n&&(this._starCssClass=n,this.raisePropertyChanged("StarCssClass"))}};Sys.Extended.UI.RatingBehavior.registerClass("Sys.Extended.UI.RatingBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.RatingBehavior,{name:"rating"});Sys.Extended.UI.RatingEventArgs=function(n){Sys.Extended.UI.RatingEventArgs.initializeBase(this);this._rating=n};Sys.Extended.UI.RatingEventArgs.prototype={get_Rating:function(){return this._rating}};Sys.Extended.UI.RatingEventArgs.registerClass("Sys.Extended.UI.RatingEventArgs",Sys.EventArgs);Sys.Extended.UI.RatingCallbackResultEventArgs=function(n){Sys.Extended.UI.RatingCallbackResultEventArgs.initializeBase(this);this._result=n};Sys.Extended.UI.RatingCallbackResultEventArgs.prototype={get_CallbackResult:function(){return this._result}};Sys.Extended.UI.RatingCallbackResultEventArgs.registerClass("Sys.Extended.UI.RatingCallbackResultEventArgs",Sys.EventArgs)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedRating",["ExtendedBase"],n):n()}();Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.DraggableListItem=function(n){Sys.Extended.UI.DraggableListItem.initializeBase(this,[n]);this._data=null;this._handle=null;this._dragVisualTemplate=null;this._dragVisualTemplateInstance=null;this._mouseDownHandler=null};Sys.Extended.UI.DraggableListItem.prototype={dispose:function(){var n=this.get_element();this.set_handle(null);Sys.Extended.UI.DraggableListItem.callBaseMethod(this,"dispose")},get_data:function(){if(this._data==null){var n=this._findDragSource();if(n!=null&&Sys.Extended.UI.DragDropList.IsValidDataType(n.get_dragDataType()))return this.get_element()}return this._data},set_data:function(n){this._data!=n&&(this._data=n,this.raisePropertyChanged("data"))},get_handle:function(){return this._handle},set_handle:function(n){this._handle!=null&&($removeHandler(this._handle,"mousedown",this.get_mouseDownHandler()),this._handle.__draggableBehavior=null);n?(n.element&&(n=n.element),this._handle=n,this.raisePropertyChanged("handle"),this._handle.__draggableBehavior=this,$addHandler(this._handle,"mousedown",this.get_mouseDownHandler()),this._handle.__draggableBehavior=this):this._handle=null},get_mouseDownHandler:function(){return this._mouseDownHandler==null&&(this._mouseDownHandler=Function.createDelegate(this,this._onMouseDown)),this._mouseDownHandler},get_dragVisualTemplate:function(){return this._dragVisualTemplate},set_dragVisualTemplate:function(n){this._dragVisualTemplate!=n&&(this._dragVisualTemplate=n,this.raisePropertyChanged("dragVisualTemplate"))},_onMouseDown:function(n){window._event=n.rawEvent;this._handle.__draggableBehavior._mouseDownHandlerInternal(n)},_mouseDownHandlerInternal:function(n){var n=window.testEvent?window.testEvent:n,t,i;n.button<=1&&(t=this._findDragSource(),t!=null&&(i=this._createDragVisual(),t.startDragDrop(this.get_element(),this.get_data(),i),n.returnValue=!1))},_createDragVisual:function(){var t=window.testEvent?window.testEvent:window.event,n;return this._dragVisualTemplate!=null&&(this._dragVisualTemplateInstance==null?this._dragVisualTemplateInstance=this._dragVisualTemplate.cloneElement():Sys.UI.DragDropManager._getInstance().hasParent(this._dragVisualTemplateInstance)||this.get_element().appendChild(this._dragVisualTemplateInstance),n={x:t.clientX,y:t.clientY},n=Sys.UI.DragDropManager._getInstance().addPoints(n,Sys.UI.DragDropManager._getInstance().getScrollOffset(document.body,!0)),$common.setLocation(this._dragVisualTemplateInstance,n)),this._dragVisualTemplateInstance},_findDragSource:function(){for(var n=this.get_element();n!=null;){if(n.__dragDropList!=null)return n.__dragDropList;n=n.parentNode}return null}};Sys.Extended.UI.DraggableListItem.registerClass("Sys.Extended.UI.DraggableListItem",Sys.Extended.UI.BehaviorBase);Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.RepeatDirection=function(){throw Error.invalidOperation();};Sys.Extended.UI.RepeatDirection.prototype={Vertical:0,Horizontal:1};Sys.Extended.UI.RepeatDirection.registerEnum("Sys.Extended.UI.RepeatDirection");Sys.Extended.UI.DragDropList=function(n){Sys.Extended.UI.DragDropList.initializeBase(this,[n]);this._acceptedDataTypes=[];this._isDragging=null;this._dataType=null;this._dragMode=Sys.Extended.UI.DragMode.Move;this._dragVisual=null;this._direction=Sys.Extended.UI.RepeatDirection.Vertical;this._emptyTemplate=null;this._emptyTemplateInstance=null;this._dropCueTemplate=null;this._dropCueTemplateInstance=null;this._floatContainerInstance=null;this._originalParent=null;this._originalNextSibling=null;this._originalZIndex=null;this._currentContext=null;this._data=null};Sys.Extended.UI.DragDropList.IsValidDataType=function(n){return n&&typeof n=="string"&&n.length>=4?n.substring(0,4)==="HTML":!1};Sys.Extended.UI.DragDropList.prototype={get_data:function(){return this._data},set_data:function(n){this._data=n},initialize:function(){Sys.Extended.UI.DragDropList.callBaseMethod(this,"initialize");this.get_element().__dragDropList=this;Sys.Extended.UI.DragDropManager.registerDropTarget(this)},startDragDrop:function(n,t,i){this._isDragging||(this._isDragging=!0,this._currentContext=t,i?this._dragVisual=i:i=this.createDragVisual(n),Sys.Extended.UI.DragDropManager.startDragDrop(this,i,t,!(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version>7&&Sys.Browser.documentMode!=0)))},createDragVisual:function(n){var i,u,t,r,f,e;return this._dragVisual=this._dragMode===Sys.Extended.UI.DragMode.Copy?n.cloneNode(!0):n,i=Sys.Extended.UI.DragDropManager._getInstance().getScrollOffset(n,!0),this._dragVisual.preDragWidth=this._dragVisual.style.width,this._dragVisual.preDragHeight=this._dragVisual.style.height,this._dragVisual.style.width=n.offsetWidth+"px",this._dragVisual.style.height=n.offsetHeight+"px",this._dragVisual.style.opacity="0.4",this._dragVisual.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity=0.4);",this._originalZIndex=this._dragVisual.style.zIndex,this._dragVisual.style.zIndex=99999,this._originalParent=this._dragVisual.parentNode,this._originalNextSibling=Sys.Extended.UI.DragDropManager._getInstance().getNextSibling(this._dragVisual),u=$common.getLocation(n),t=this._getFloatContainer(),$common.setLocation(t,u),Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._dragVisual)&&this._dragVisual.parentNode.removeChild(this._dragVisual),t.appendChild(this._dragVisual),r=Sys.Extended.UI.DragDropManager._getInstance().getScrollOffset(n,!0),(i.x!==r.x||i.y!==r.y)&&(f=Sys.Extended.UI.DragDropManager._getInstance().subtractPoints(i,r),e=Sys.Extended.UI.DragDropManager._getInstance().subtractPoints(u,f),$common.setLocation(t,e)),t},get_emptyTemplate:function(){return this._emptyTemplate},set_emptyTemplate:function(n){this._emptyTemplate=n},get_dragDataType:function(){return this._dataType},set_dragDataType:function(n){this._dataType=n},getDragData:function(n){return n},get_dragMode:function(){return this._dragMode},set_dragMode:function(n){this._dragMode=n},dispose:function(){Sys.Extended.UI.DragDropManager.unregisterDropTarget(this);this.get_element().__dragDropList=null;Sys.Extended.UI.DragDropList.callBaseMethod(this,"dispose")},onDragStart:function(){this._validate()},onDrag:function(){},onDragEnd:function(n){if(this._floatContainerInstance?(this._dragMode===Sys.Extended.UI.DragMode.Copy?this._floatContainerInstance.removeChild(this._dragVisual):(this._dragVisual.style.opacity="0.999",this._dragVisual.style.filter="",this._dragVisual.style.zIndex=this._originalZIndex?this._originalZIndex:0,this._dragVisual.preDragWidth!=null&&(this._dragVisual.style.width=this._dragVisual.preDragWidth,this._dragVisual.preDragWidth=null),this._dragVisual.preDragHeight!=null&&(this._dragVisual.style.height=this._dragVisual.preDragHeight,this._dragVisual.preDragHeight=null),n?(this._dragVisual.parentNode.removeChild(this._dragVisual),this._originalNextSibling!=null?this._originalParent.insertBefore(this._dragVisual,this._originalNextSibling):this._originalParent.appendChild(this._dragVisual)):this._dragVisual.parentNode===this._floatContainerInstance&&this._dragVisual.parentNode.removeChild(this._dragVisual)),document.body.removeChild(this._floatContainerInstance)):this._dragVisual.parentNode.removeChild(this._dragVisual),!n&&this._data&&this._dragMode===Sys.Extended.UI.DragMode.Move){var t=this.getDragData(this._currentContext);this._data&&t&&Array.remove(this._data,t)}this._isDragging=!1;this._validate()},get_direction:function(){return this._direction},set_direction:function(n){this._direction=n},get_acceptedDataTypes:function(){return this._acceptedDataTypes},set_acceptedDataTypes:function(n){this._acceptedDataTypes=typeof n=="string"?n.split(","):n},get_dropCueTemplate:function(){return this._dropCueTemplate},set_dropCueTemplate:function(n){this._dropCueTemplate=n},get_dropTargetElement:function(){return this.get_element()},canDrop:function(n,t){for(var i=0;i<this._acceptedDataTypes.length;i++)if(this._acceptedDataTypes[i]===t)return!0;return!1},drop:function(n,t,i){if(Sys.Extended.UI.DragDropList.IsValidDataType(t)&&n===Sys.Extended.UI.DragMode.Move){dragVisual=i;var r=this._findPotentialNextSibling(dragVisual);this._setDropCueVisible(!1,dragVisual);dragVisual.parentNode.removeChild(dragVisual);r?this.get_element().insertBefore(dragVisual,r):this.get_element().appendChild(dragVisual)}else this._setDropCueVisible(!1)},onDragEnterTarget:function(n,t,i){Sys.Extended.UI.DragDropList.IsValidDataType(t)&&(this._setDropCueVisible(!0,i),this._validate())},onDragLeaveTarget:function(n,t){Sys.Extended.UI.DragDropList.IsValidDataType(t)&&(this._setDropCueVisible(!1),this._validate())},onDragInTarget:function(n,t,i){Sys.Extended.UI.DragDropList.IsValidDataType(t)&&this._setDropCueVisible(!0,i)},_setDropCueVisible:function(n,t){var r,i;this._dropCueTemplate&&(n?(this._dropCueTemplateInstance||(r=document.createDocumentFragment(),this._dropCueTemplateInstance=this._dropCueTemplate.cloneNode(!0)),i=this._findPotentialNextSibling(t),Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._dropCueTemplateInstance)?Sys.Extended.UI.DragDropManager._getInstance().getNextSibling(this._dropCueTemplateInstance)!==i&&(this.get_element().removeChild(this._dropCueTemplateInstance),i?this.get_element().insertBefore(this._dropCueTemplateInstance,i):this.get_element().appendChild(this._dropCueTemplateInstance)):(i?this.get_element().insertBefore(this._dropCueTemplateInstance,i):this.get_element().appendChild(this._dropCueTemplateInstance),this._dropCueTemplateInstance.style.width=t.offsetWidth+"px",this._dropCueTemplateInstance.style.height=t.offsetHeight+"px")):this._dropCueTemplateInstance&&Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._dropCueTemplateInstance)&&this.get_element().removeChild(this._dropCueTemplateInstance))},_findPotentialNextSibling:function(n){for(var r=$common.getBounds(n),u=this._direction===0,i,t=this.get_element().firstChild;t!==null;t=t.nextSibling)if(t.innerHTML&&t!==this._dropCueTemplateInstance&&t!==this._emptyTemplateInstance&&(i=$common.getBounds(t),!u&&r.x<=i.x||u&&r.y<=i.y))return t;return null},_validate:function(){for(var t=this._dropCueTemplateInstance==null||!Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._dropCueTemplateInstance),i=0,n=this.get_element().firstChild;n!==null;n=n.nextSibling)n.innerHTML&&n!==this._emptyTemplateInstance&&n!==this._dropCueTemplateInstance&&i++;i>0&&(t=!1);this._setEmptyTemplateVisible(t)},_setEmptyTemplateVisible:function(n){this._emptyTemplate&&(n?this._emptyTemplateInstance?Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._emptyTemplateInstance)||this.get_element().appendChild(this._emptyTemplateInstance):this._emptyTemplateInstance=this._emptyTemplate.createInstance(this.get_element()).instanceElement:this._emptyTemplateInstance&&Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._emptyTemplateInstance)&&this.get_element().removeChild(this._emptyTemplateInstance))},_getFloatContainer:function(){if(this._floatContainerInstance)Sys.Extended.UI.DragDropManager._getInstance().hasParent(this._floatContainerInstance)||document.body.appendChild(this._floatContainerInstance);else{this._floatContainerInstance=document.createElement(this.get_element().tagName);var n="0px 0px 0px 0px";this._floatContainerInstance.style.position="absolute";this._floatContainerInstance.style.padding=n;this._floatContainerInstance.style.margin=n;this._floatContainerInstance.className="dragVisualContainer";document.body.appendChild(this._floatContainerInstance)}return this._floatContainerInstance}};Sys.Extended.UI.DragDropList.registerClass("Sys.Extended.UI.DragDropList",Sys.Extended.UI.BehaviorBase,Sys.Extended.UI.IDragSource,Sys.Extended.UI.IDropTarget,Sys.IDisposable);Sys.Extended.UI.DragDropWatcher=function(n){Sys.Extended.UI.DragDropWatcher.initializeBase(this,[n]);this._childList=[];this._inProgressDrops={};this._postbackCode=null;this._callbackCssStyle=null;this._argReplaceString=null;this._argContextString=null;this._argErrorString=null;this._argSuccessString=null};Sys.Extended.UI.DragDropWatcher.prototype={dispose:function(){Sys.Extended.UI.DragDropWatcher.callBaseMethod(this,"dispose")},initialize:function(){Sys.Extended.UI.DragDropWatcher.callBaseMethod(this,"initialize");this._saveChildOrder()},add_reorderComplete:function(n){this.get_events().addHandler("reorderComplete",n)},remove_reorderComplete:function(n){this.get_events().removeHandler("reorderComplete",n)},raiseReorderComplete:function(){var n=this.get_events().getHandler("reorderComplete");n&&n(this,Sys.EventArgs.Empty)},findChild:function(n,t){for(var u=0,f=n.childNodes,i,r=0;r<f.length;r++)if(i=f[r],i!=null&&i.nodeName=="LI"){if(i.id==t)return u;u++}return-1},canDrop:function(n,t,i){var u,r;if(this._inProgressDrops&&this._inProgressDrops.length>0)return!1;if(u=Sys.Extended.UI.DragDropWatcher.callBaseMethod(this,"canDrop",[n,t,i]),u){var o=$common.getBounds(i),e,f=!1,s=this.get_element();for(r=s.firstChild;r!=null&&!f;r=r.nextSibling)if(r.id){if(e=$common.getBounds(r),o.y<=e.y)break;f=r.id.lastIndexOf("Insert",r.id.length-6)!=-1}u=!f}return u},drop:function(n,t,i){var r,u,f;(Sys.Extended.UI.DragDropWatcher.callBaseMethod(this,"drop",[n,t,i]),r=i.id,this._postbackCode&&r)&&(u=this.findChild(this.get_element(),r),Sys.Debug.assert(u!=-1,String.format(Sys.Extended.UI.Resources.ReorderList_DropWatcherBehavior_NoChild,r)),f=this._getSavedChildIndex(r),u!=-1&&u!=f&&(this._saveChildOrder(),this.doPostBack(r,u,f)))},_setupDropState:function(n,t,i){if(n){var r=$get(n);this._inProgressDrops[n]={oldCss:r.className,newIndex:t,oldIndex:i};this._callbackCssStyle&&(r.className=this._callbackCssStyle)}},_onDropCallback:function(n){var t,i;if(n)return this.set_ClientState("true"),t=this._inProgressDrops[n],t&&(i=$get(n),this._callbackCssStyle&&(i.className=t.oldCss),delete this._inProgressDrops[n]),t},doPostBack:function(n,t,i){var f=this._inProgressDrops[n],u,r;f||(u="reorder:"+n+":"+i.toString()+":"+t.toString(),r=this._postbackCode.replace(this._argReplaceString,u),this._argSuccessString&&(r=r.replace(this._argSuccessString,"callbackSuccessStub")),this._argErrorString&&(r=r.replace(this._argErrorString,"callbackErrorStub")),this._argContextString&&(r=r.replace(this._argContextString,this.get_id()+":"+n)),this._setupDropState(n,t,i),window.setTimeout(r,0))},_onCallbackSuccess:function(n,t){n&&n.length>0?this._onCallbackError(n,t):(this._onDropCallback(t),this.raiseReorderComplete())},_onCallbackError:function(n,t){var i=this._onDropCallback(t);(i.oldIndex||i.newIndex)&&(this._saveChildOrder(),this.doReorder(i.newIndex,i.oldIndex,!0));alert(String.format(Sys.Extended.UI.Resources.ReorderList_DropWatcherBehavior_CallbackError,n))},doReorder:function(n,t,i){var f=this.get_element(),u=this._childList,r,e,o,s;if(n>=0&&u.length>n&&n!=t){if(r=$get(u[n]),e=this._inProgressDrops[r.id],e)return;if(r){t>n&&t++;o=t>=u.length;try{f.removeChild(r)}catch(f){}o?f.appendChild(r):(s=$get(u[t]),f.insertBefore(r,s));i?(this._saveChildOrder(),this.raiseReorderComplete()):this.doPostBack(r.id,t,n)}}},getItem:function(n){return this._childList||this._saveChildOrder(),this._childList[n]},_getSavedChildIndex:function(n){if(this._childList&&n)for(var t=0;t<this._childList.length;t++)if(n==this._childList[t])return t;return-1},_saveChildOrder:function(){var i=this.get_element(),t,r,n;if(i)for(t=i.childNodes,this._childList=[],r=0,n=0;n<t.length;n++)t[n]&&t[n].parentNode===i&&t[n].tagName&&t[n].tagName.toLowerCase()=="li"&&(this._childList[r++]=t[n].id)},get_argReplaceString:function(){return this._argReplaceString},set_argReplaceString:function(n){this._argReplaceString!=n&&(this._argReplaceString=n,this.raisePropertyChanged("argReplaceString"))},get_argContextString:function(){return this._argContextString},set_argContextString:function(n){this._argContextString!=n&&(this._argContextString=n,this.raisePropertyChanged("argContextString"))},get_argErrorString:function(){return this._argErrorString},set_argErrorString:function(n){this._argErrorString!=n&&(this._argErrorString=n,this.raisePropertyChanged("argErrorString"))},get_argSuccessString:function(){return this._argSuccessString},set_argSuccessString:function(n){this._argSuccessString!=n&&(this._argSuccessString=n,this.raisePropertyChanged("argSuccessString"))},get_postbackCode:function(){return this._postbackCode},set_postbackCode:function(n){this._postbackCode!=n&&(this._postbackCode=n,this.raisePropertyChanged("postbackCode"))},get_callbackCssStyle:function(){return this._callbackCssStyle},set_callbackCssStyle:function(n){this._callbackCssStyle!=n&&(this._callbackCssStyle=n,this.raisePropertyChanged("callbackCssStyle"))}};Sys.Extended.UI.DragDropWatcher.registerClass("Sys.Extended.UI.DragDropWatcher",Sys.Extended.UI.DragDropList),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ResizableControlBehavior=function(n){Sys.Extended.UI.ResizableControlBehavior.initializeBase(this,[n]);this._HandleCssClass="";this._ResizableCssClass="";this._HandleOffsetX=0;this._HandleOffsetY=0;this._MinimumWidth=0;this._MinimumHeight=0;this._MaximumWidth=1e5;this._MaximumHeight=1e5;this._frame=null;this._handle=null;this._handleHolder=null;this._lining=null;this._tracking=!1;this._lastClientX=0;this._lastClientY=0;this._onmouseoverDelegate=null;this._onmouseoutDelegate=null;this._onmousedownDelegate=null;this._onmousemoveDelegate=null;this._onmouseupDelegate=null;this._onselectstartDelegate=null};Sys.Extended.UI.ResizableControlBehavior.prototype={initialize:function(){var n,t;Sys.Extended.UI.ResizableControlBehavior.callBaseMethod(this,"initialize");this._frame=this.get_element();n=Sys.Extended.UI.ResizableControlBehavior.callBaseMethod(this,"get_ClientState");n&&-1!=n.indexOf(",")&&(t=n.split(","),this._frame.style.width=t[0]+"px",this._frame.style.height=t[1]+"px");this._lining=document.createElement("DIV");this._lining.style.width=$common.getCurrentStyle(this._frame,"width");this._lining.style.height=$common.getCurrentStyle(this._frame,"height");this._lining.style.position="absolute";this._lining.style.backgroundColor="black";this._lining.style.opacity="0";this._lining.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";this._lining.style.visibility="hidden";this._frame.insertBefore(this._lining,this._frame.firstChild);this._handleHolder=document.createElement("DIV");this._handleHolder.style.width="0px";this._handleHolder.style.height="0px";this._handleHolder.style.position=Sys.Browser.agent===Sys.Browser.Opera?"relative":"absolute";this._frame.insertBefore(this._handleHolder,this._frame.firstChild);this._handle=document.createElement("DIV");this._handle.className=this._HandleCssClass;this._handle.style.position="absolute";this._handleHolder.appendChild(this._handle);this._onmouseoverDelegate=Function.createDelegate(this,this._onmouseover);$addHandler(this._handle,"mouseover",this._onmouseoverDelegate);this._onmouseoutDelegate=Function.createDelegate(this,this._onmouseout);$addHandler(this._handle,"mouseout",this._onmouseoutDelegate);this._onmousedownDelegate=Function.createDelegate(this,this._onmousedown);$addHandler(this._handle,"mousedown",this._onmousedownDelegate);this._onmousemoveDelegate=Function.createDelegate(this,this._onmousemove);this._onmouseupDelegate=Function.createDelegate(this,this._onmouseup);this._onselectstartDelegate=Function.createDelegate(this,this._onselectstart);this._resizeControl(0,0,0,0);this._rememberSize()},dispose:function(){this._onmouseoverDelegate&&($removeHandler(this._handle,"mouseover",this._onmouseoverDelegate),this._onmouseoverDelegate=null);this._onmouseoutDelegate&&($removeHandler(this._handle,"mouseout",this._onmouseoutDelegate),this._onmouseoutDelegate=null);this._onmousedownDelegate&&($removeHandler(this._handle,"mousedown",this._onmousedownDelegate),this._onmousedownDelegate=null);this._onmousemoveDelegate&&(this.tracking&&$removeHandler(document,"mousemove",this._onmousemoveDelegate),this._onmousemoveDelegate=null);this._onmouseupDelegate&&(this.tracking&&$removeHandler(document,"mouseup",this._onmouseupDelegate),this._onmouseupDelegate=null);this._onselectstartDelegate&&(this.tracking&&($removeHandler(document,"selectstart",this._onselectstartDelegate),Sys.Browser.agent===Sys.Browser.Opera&&$removeHandler(document,"mousedown",this._onselectstartDelegate)),this._onselectstartDelegate=null);Sys.Extended.UI.ResizableControlBehavior.callBaseMethod(this,"dispose")},_onmouseover:function(){Sys.UI.DomElement.addCssClass(this._frame,this._ResizableCssClass)},_onmouseout:function(){this._tracking||Sys.UI.DomElement.removeCssClass(this._frame,this._ResizableCssClass)},_onmousedown:function(n){n||(n=event);this._onmousedownImplementation(n.clientX,n.clientY)},_onmousedownImplementation:function(n,t){this._tracking=!0;this._resizeControl(n,t,0,0);this._lining.style.visibility="visible";$addHandler(document,"mousemove",this._onmousemoveDelegate);$addHandler(document,"mouseup",this._onmouseupDelegate);$addHandler(document,"selectstart",this._onselectstartDelegate);Sys.Browser.agent===Sys.Browser.Opera&&$addHandler(document,"mousedown",this._onselectstartDelegate);this.raiseResizeBegin()},_onmousemove:function(n){n||(n=event);this._onmousemoveImplementation(n.clientX,n.clientY)},_onmousemoveImplementation:function(n,t){if(this._tracking){var i=n-this._lastClientX,r=t-this._lastClientY;this._resizeControl(n,t,i,r)}},_onmouseup:function(){this._tracking=!1;this._rememberSize();this._lining.style.visibility="hidden";$removeHandler(document,"mousemove",this._onmousemoveDelegate);$removeHandler(document,"mouseup",this._onmouseupDelegate);$removeHandler(document,"selectstart",this._onselectstartDelegate);Sys.Browser.agent===Sys.Browser.Opera&&$removeHandler(document,"mousedown",this._onselectstartDelegate);Sys.UI.DomElement.removeCssClass(this._frame,this._ResizableCssClass)},_onselectstart:function(n){return n.preventDefault(),!1},_resizeControl:function(n,t,i,r){var u,f,e,o;this._lastClientX=n;this._lastClientY=t;u=Math.min(Math.max(this._lining.offsetWidth+i,Math.max(this._MinimumWidth,this._handle.offsetWidth)),this._MaximumWidth);f=Math.min(Math.max(this._lining.offsetHeight+r,Math.max(this._MinimumHeight,this._handle.offsetHeight)),this._MaximumHeight);this._lining.style.width=u+"px";this._lining.style.height=f+"px";this._frame.style.width=u+"px";this._frame.style.height=f+"px";e=this._lining.offsetWidth-this._handle.offsetWidth+this._HandleOffsetX;o=this._lining.offsetHeight-this._handle.offsetHeight+this._HandleOffsetY;this._handle.style.left=e+"px";this._handle.style.top=o+"px";this.raiseResizing()},_rememberSize:function(){var n=this.get_Size();Sys.Extended.UI.ResizableControlBehavior.callBaseMethod(this,"set_ClientState",[n.width+","+n.height]);this.raiseResize()},_measurementToNumber:function(n){return n.replace("px","")},get_HandleCssClass:function(){return this._HandleCssClass},set_HandleCssClass:function(n){if(this._HandleCssClass)throw String.format(Sys.Extended.UI.Resources.ResizableControlBehavior_CannotChangeProperty,"HandleCssClass");this._HandleCssClass=n;this.raisePropertyChanged("HandleCssClass")},get_ResizableCssClass:function(){return this._ResizableCssClass},set_ResizableCssClass:function(n){if(this._ResizableCssClass)throw String.format(Sys.Extended.UI.Resources.ResizableControlBehavior_CannotChangeProperty,"ResizableCssClass");this._ResizableCssClass=n;this.raisePropertyChanged("ResizableCssClass")},get_HandleOffsetX:function(){return this._HandleOffsetX},set_HandleOffsetX:function(n){this._HandleOffsetX!=n&&(this._HandleOffsetX=n,this.raisePropertyChanged("HandleOffsetX"))},get_HandleOffsetY:function(){return this._HandleOffsetY},set_HandleOffsetY:function(n){this._HandleOffsetY!=n&&(this._HandleOffsetY=n,this.raisePropertyChanged("HandleOffsetY"))},get_MinimumWidth:function(){return this._MinimumWidth},set_MinimumWidth:function(n){this._MinimumWidth!=n&&(this._MinimumWidth=n,this.raisePropertyChanged("MinimumWidth"))},get_MinimumHeight:function(){return this._MinimumHeight},set_MinimumHeight:function(n){this._MinimumHeight!=n&&(this._MinimumHeight=n,this.raisePropertyChanged("MinimumHeight"))},get_MaximumWidth:function(){return this._MaximumWidth},set_MaximumWidth:function(n){this._MaximumWidth!=n&&(this._MaximumWidth=n,this.raisePropertyChanged("MaximumWidth"))},get_MaximumHeight:function(){return this._MaximumHeight},set_MaximumHeight:function(n){this._MaximumHeight!=n&&(this._MaximumHeight=n,this.raisePropertyChanged("MaximumHeight"))},add_resizing:function(n){this.get_events().addHandler("resizing",n)},remove_resizing:function(n){this.get_events().removeHandler("resizing",n)},raiseResizing:function(){var n=this.get_events().getHandler("resizing");n&&n(this,Sys.EventArgs.Empty)},get_resizing:function(){return this.get_events().getHandler("resizing")},set_resizing:function(n){if(n&&0<n.length){var t=$common.resolveFunction(n);if(t)this.add_resizing(t);else throw Error.argumentType("value",typeof n,"Function",String.format(Sys.Extended.UI.Resources.ResizableControlBehavior_InvalidHandler,"resizing"));}},add_resize:function(n){this.get_events().addHandler("resize",n)},remove_resize:function(n){this.get_events().removeHandler("resize",n)},raiseResize:function(){var n=this.get_events().getHandler("resize");n&&n(this,Sys.EventArgs.Empty)},get_resize:function(){return this.get_events().getHandler("resize")},set_resize:function(n){if(n&&0<n.length){var t=$common.resolveFunction(n);if(t)this.add_resize(t);else throw Error.argumentType("value",typeof n,"Function",String.format(Sys.Extended.UI.Resources.ResizableControlBehavior_InvalidHandler,"resize"));}},add_resizebegin:function(n){this.get_events().addHandler("resizebegin",n)},remove_resizebegin:function(n){this.get_events().removeHandler("resizebegin",n)},raiseResizeBegin:function(){var n=this.get_events().getHandler("resizebegin");n&&n(this,Sys.EventArgs.Empty)},get_resizebegin:function(){return this.get_events().getHandler("resizebegin")},set_resizebegin:function(n){if(n&&0<n.length){var t=$common.resolveFunction(n);if(t)this.add_resizebegin(t);else throw Error.argumentType("value",typeof n,"Function",String.format(Sys.Extended.UI.Resources.ResizableControlBehavior_InvalidHandler,"resizebegin"));}},get_Size:function(){return{width:this._measurementToNumber($common.getCurrentStyle(this._lining,"width")),height:this._measurementToNumber($common.getCurrentStyle(this._lining,"height"))}},set_Size:function(n){var t=n.width-this._measurementToNumber($common.getCurrentStyle(this._lining,"width")),i=n.height-this._measurementToNumber($common.getCurrentStyle(this._lining,"height"));this._resizeControl(0,0,t,i);this._rememberSize();this.raisePropertyChanged("Size")}};Sys.Extended.UI.ResizableControlBehavior.registerClass("Sys.Extended.UI.ResizableControlBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.ResizableControlBehavior,{name:"resizable"})}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedResizable",["ExtendedBase","ExtendedCommon"],n):n()}();Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");Seadragon.Utils=function(){function u(n,t){return t&&n!=document.body?document.body:n.offsetParent}var t={UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5};Seadragon.Browser=t;var n=this,f=["Msxml2.XMLHTTP","Msxml3.XMLHTTP","Microsoft.XMLHTTP"],s={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},i=t.UNKNOWN,r=0,e=!1,o={};(function(){var h=navigator.appName,w=navigator.appVersion,n=navigator.userAgent,c,v,y,l,u,f,s;if(h=="Microsoft Internet Explorer"&&window.attachEvent&&window.ActiveXObject)c=n.indexOf("MSIE"),i=t.IE,r=parseFloat(n.substring(c+5,n.indexOf(";",c)));else if(h=="Netscape"&&window.addEventListener){var p=n.indexOf("Firefox"),a=n.indexOf("Safari"),b=n.indexOf("Chrome");p>=0?(i=t.FIREFOX,r=parseFloat(n.substring(p+8))):a>=0&&(v=n.substring(0,a).lastIndexOf("/"),i=b>=0?t.CHROME:t.SAFARI,r=parseFloat(n.substring(v+1,a)))}else h=="Opera"&&window.opera&&window.attachEvent&&(i=t.OPERA,r=parseFloat(w));for(y=window.location.search.substring(1),l=y.split("&"),u=0;u<l.length;u++)f=l[u],s=f.indexOf("="),s>0&&(o[f.substring(0,s)]=decodeURIComponent(f.substring(s+1)));e=i==t.IE||i==t.CHROME&&r<2})();this.getBrowser=function(){return i};this.getBrowserVersion=function(){return r};this.getElement=function(n){return typeof n=="string"&&(n=document.getElementById(n)),n};this.getElementPosition=function(t){for(var t=n.getElement(t),i=new Seadragon.Point,r=n.getElementStyle(t).position=="fixed",f=u(t,r);f;)i.x+=t.offsetLeft,i.y+=t.offsetTop,r&&(i=i.plus(n.getPageScroll())),t=f,r=n.getElementStyle(t).position=="fixed",f=u(t,r);return i};this.getElementSize=function(t){var t=n.getElement(t);return new Seadragon.Point(t.clientWidth,t.clientHeight)};this.getElementStyle=function(t){var t=n.getElement(t);if(t.currentStyle)return t.currentStyle;if(window.getComputedStyle)return window.getComputedStyle(t,"");Seadragon.Debug.fail("Unknown element style, no known technique.")};this.getEvent=function(n){return n?n:window.event};this.getMousePosition=function(t){var t=n.getEvent(t),i=new Seadragon.Point;return typeof t.pageX=="number"?(i.x=t.pageX,i.y=t.pageY):typeof t.clientX=="number"?(i.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop):Seadragon.Debug.fail("Unknown event mouse position, no known technique."),i};this.getPageScroll=function(){var n=new Seadragon.Point,t=document.documentElement||{},i=document.body||{};return typeof pageXOffset=="number"?(n.x=window.pageXOffset,n.y=window.pageYOffset):i.scrollLeft||i.scrollTop?(n.x=i.scrollLeft,n.y=i.scrollTop):(t.scrollLeft||t.scrollTop)&&(n.x=t.scrollLeft,n.y=t.scrollTop),n};this.getWindowSize=function(){var n=new Seadragon.Point,t=document.documentElement||{},i=document.body||{};return typeof innerWidth=="number"?(n.x=window.innerWidth,n.y=window.innerHeight):t.clientWidth||t.clientHeight?(n.x=t.clientWidth,n.y=t.clientHeight):i.clientWidth||i.clientHeight?(n.x=i.clientWidth,n.y=i.clientHeight):Seadragon.Debug.fail("Unknown window size, no known technique."),n};this.imageFormatSupported=function(n){var n=n?n:"";return!!s[n.toLowerCase()]};this.makeCenteredNode=function(t){var t=Seadragon.Utils.getElement(t),r=n.makeNeutralElement("div"),i=[],u,f;for(i.push('<div style="display:table; height:100%; width:100%;'),i.push("border:none; margin:0px; padding:0px;"),i.push('#position:relative; overflow:hidden; text-align:left;">'),i.push('<div style="#position:absolute; #top:50%; width:100%; '),i.push("border:none; margin:0px; padding:0px;"),i.push('display:table-cell; vertical-align:middle;">'),i.push('<div style="#position:relative; #top:-50%; width:100%; '),i.push("border:none; margin:0px; padding:0px;"),i.push('text-align:center;"><\/div><\/div><\/div>'),r.innerHTML=i.join(""),r=r.firstChild,u=r,f=r.getElementsByTagName("div");f.length>0;)u=f[0],f=u.getElementsByTagName("div");return u.appendChild(t),r};this.makeNeutralElement=function(n){var i=document.createElement(n),t=i.style;return t.background="transparent none",t.border="none",t.margin="0px",t.padding="0px",t.position="static",i};this.makeTransparentImage=function(u){var e=n.makeNeutralElement("img"),f=null;return i==t.IE&&r<7?(f=n.makeNeutralElement("span"),f.style.display="inline-block",e.onload=function(){f.style.width=f.style.width||e.width+"px";f.style.height=f.style.height||e.height+"px";e.onload=null;e=null},e.src=u,f.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+u+"', sizingMethod='scale')"):(f=e,f.src=u),f};this.setElementOpacity=function(t,i,r){var t=n.getElement(t),o,u,f;if(r&&e&&(i=Math.round(i)),t.style.opacity=i<1?i:"",i==1){o=t.style.filter||"";t.style.filter=o.replace(/alpha\(.*?\)/g,"");return}u=Math.round(100*i);f=" alpha(opacity="+u+") ";try{t.filters&&t.filters.alpha?t.filters.alpha.opacity=u:t.style.filter+=f}catch(s){t.style.filter+=f}};this.addEvent=function(t,i,r,u){var t=n.getElement(t);t.addEventListener?t.addEventListener(i,r,u):t.attachEvent?(t.attachEvent("on"+i,r),u&&t.setCapture&&t.setCapture()):Seadragon.Debug.fail("Unable to attach event handler, no known technique.")};this.removeEvent=function(t,i,r,u){var t=n.getElement(t);t.removeEventListener?t.removeEventListener(i,r,u):t.detachEvent?(t.detachEvent("on"+i,r),u&&t.releaseCapture&&t.releaseCapture()):Seadragon.Debug.fail("Unable to detach event handler, no known technique.")};this.cancelEvent=function(t){var t=n.getEvent(t);t.preventDefault&&t.preventDefault();t.cancel=!0;t.returnValue=!1};this.stopEvent=function(t){var t=n.getEvent(t);t.stopPropagation&&t.stopPropagation();t.cancelBubble=!0};this.createCallback=function(n,t){for(var r=[],i=2;i<arguments.length;i++)r.push(arguments[i]);return function(){for(var u=r.concat([]),i=0;i<arguments.length;i++)u.push(arguments[i]);return t.apply(n,u)}};this.getUrlParameter=function(n){var t=o[n];return t?t:null};this.makeAjaxRequest=function(n,t){var r=typeof t=="function",i=null,e,t,u;if(r&&(e=t,t=function(){window.setTimeout(Seadragon.Utils.createCallback(null,e,i),1)}),window.ActiveXObject)for(u=0;u<f.length;u++)try{i=new ActiveXObject(f[u]);break}catch(o){continue}else window.XMLHttpRequest&&(i=new XMLHttpRequest);i||Seadragon.Debug.fail("Browser doesn't support XMLHttpRequest.");r&&(i.onreadystatechange=function(){i.readyState==4&&(i.onreadystatechange=new Function,t())});try{i.open("GET",n,r);i.send(null)}catch(o){Seadragon.Debug.log(o.name+" while making AJAX request: "+o.message);i.onreadystatechange=null;i=null;r&&t()}return r?null:i};this.parseXml=function(n){var t=null,r;if(window.ActiveXObject)try{t=new ActiveXObject("Microsoft.XMLDOM");t.async=!1;t.loadXML(n)}catch(i){Seadragon.Debug.log(i.name+" while parsing XML (ActiveX): "+i.message)}else if(window.DOMParser)try{r=new DOMParser;t=r.parseFromString(n,"text/xml")}catch(i){Seadragon.Debug.log(i.name+" while parsing XML (DOMParser): "+i.message)}else Seadragon.Debug.fail("Browser doesn't support XML DOM.");return t}};Seadragon.Utils=new Seadragon.Utils;Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");Sys.Extended.UI.Seadragon.ButtonState=function(){throw Error.invalidOperation();};Sys.Extended.UI.Seadragon.ButtonState.prototype={REST:0,GROUP:1,HOVER:2,DOWN:3};Sys.Extended.UI.Seadragon.ButtonState.registerEnum("Sys.Extended.UI.Seadragon.ButtonState",!1);Sys.Extended.UI.Seadragon.Button=function(){Sys.Extended.UI.Seadragon.Button.initializeBase(this);this._tooltip=null;this._srcRest=null;this._srcGroup=null;this._srcHover=null;this._srcDown=null;this._button=null;this.config=null};Sys.Extended.UI.Seadragon.Button.prototype={initialize:function(){Sys.Extended.UI.Seadragon.Button.callBaseMethod(this,"initialize");this._button=Seadragon.Utils.makeNeutralElement("span");this._currentState=Sys.Extended.UI.Seadragon.ButtonState.GROUP;this._tracker=new Seadragon.MouseTracker(this._button,this.config.clickTimeThreshold,this.config.clickDistThreshold);this._imgRest=Seadragon.Utils.makeTransparentImage(this._srcRest);this._imgGroup=Seadragon.Utils.makeTransparentImage(this._srcGroup);this._imgHover=Seadragon.Utils.makeTransparentImage(this._srcHover);this._imgDown=Seadragon.Utils.makeTransparentImage(this._srcDown);this._fadeDelay=0;this._fadeLength=2e3;this._fadeBeginTime=null;this._shouldFade=!1;this._button.style.display="inline-block";this._button.style.position="relative";this._button.title=this._tooltip;this._button.appendChild(this._imgRest);this._button.appendChild(this._imgGroup);this._button.appendChild(this._imgHover);this._button.appendChild(this._imgDown);var r=this._imgRest.style,i=this._imgGroup.style,n=this._imgHover.style,t=this._imgDown.style;i.position=n.position=t.position="absolute";i.top=n.top=t.top="0px";i.left=n.left=t.left="0px";n.visibility=t.visibility="hidden";Seadragon.Utils.getBrowser()==Seadragon.Browser.FIREFOX&&Seadragon.Utils.getBrowserVersion()<3&&(i.top=n.top=t.top="");this._tracker.enterHandler=Function.createDelegate(this,this._enterHandler);this._tracker.exitHandler=Function.createDelegate(this,this._exitHandler);this._tracker.pressHandler=Function.createDelegate(this,this._pressHandler);this._tracker.releaseHandler=Function.createDelegate(this,this._releaseHandler);this._tracker.clickHandler=Function.createDelegate(this,this._clickHandler);this._tracker.setTracking(!0);this._outTo(Sys.Extended.UI.Seadragon.ButtonState.REST)},dispose:function(){},_scheduleFade:function(){window.setTimeout(Function.createDelegate(this,this._updateFade),20)},_updateFade:function(){if(this._shouldFade){var t=(new Date).getTime(),i=t-this._fadeBeginTime,n=1-i/this._fadeLength;n=Math.min(1,n);n=Math.max(0,n);Seadragon.Utils.setElementOpacity(this._imgGroup,n,!0);n>0&&this._scheduleFade()}},_beginFading:function(){this._shouldFade=!0;this._fadeBeginTime=(new Date).getTime()+this._fadeDelay;window.setTimeout(Function.createDelegate(this,this._scheduleFade),this._fadeDelay)},_stopFading:function(){this._shouldFade=!1;Seadragon.Utils.setElementOpacity(this._imgGroup,1,!0)},_inTo:function(n){n>=Sys.Extended.UI.Seadragon.ButtonState.GROUP&&this._currentState==Sys.Extended.UI.Seadragon.ButtonState.REST&&(this._stopFading(),this._currentState=Sys.Extended.UI.Seadragon.ButtonState.GROUP);n>=Sys.Extended.UI.Seadragon.ButtonState.HOVER&&this._currentState==Sys.Extended.UI.Seadragon.ButtonState.GROUP&&(this._imgHover.style.visibility="",this._currentState=Sys.Extended.UI.Seadragon.ButtonState.HOVER);n>=Sys.Extended.UI.Seadragon.ButtonState.DOWN&&this._currentState==Sys.Extended.UI.Seadragon.ButtonState.HOVER&&(this._imgDown.style.visibility="",this._currentState=Sys.Extended.UI.Seadragon.ButtonState.DOWN)},_outTo:function(n){n<=Sys.Extended.UI.Seadragon.ButtonState.HOVER&&this._currentState==Sys.Extended.UI.Seadragon.ButtonState.DOWN&&(this._imgDown.style.visibility="hidden",this._currentState=Sys.Extended.UI.Seadragon.ButtonState.HOVER);n<=Sys.Extended.UI.Seadragon.ButtonState.GROUP&&this._currentState==Sys.Extended.UI.Seadragon.ButtonState.HOVER&&(this._imgHover.style.visibility="hidden",this._currentState=Sys.Extended.UI.Seadragon.ButtonState.GROUP);this._newState<=Sys.Extended.UI.Seadragon.ButtonState.REST&&this._currentState==Sys.Extended.UI.Seadragon.ButtonState.GROUP&&(this._beginFading(),this._currentState=Sys.Extended.UI.Seadragon.ButtonState.REST)},_enterHandler:function(n,t,i,r){i?(this._inTo(Sys.Extended.UI.Seadragon.ButtonState.DOWN),this._raiseEvent("onEnter",this)):r||this._inTo(Sys.Extended.UI.Seadragon.ButtonState.HOVER)},_exitHandler:function(n,t,i){this._outTo(Sys.Extended.UI.Seadragon.ButtonState.GROUP);i&&this._raiseEvent("onExit",this)},_pressHandler:function(){this._inTo(Sys.Extended.UI.Seadragon.ButtonState.DOWN);this._raiseEvent("onPress",this)},_releaseHandler:function(n,t,i,r){i&&r?(this._outTo(Sys.Extended.UI.Seadragon.ButtonState.HOVER),this._raiseEvent("onRelease",this)):i?this._outTo(Sys.Extended.UI.Seadragon.ButtonState.GROUP):this._inTo(Sys.Extended.UI.Seadragon.ButtonState.HOVER)},_clickHandler:function(n,t,i){i&&this._raiseEvent("onClick",this)},_raiseEvent:function(n,t){var i=this.get_events().getHandler(n);i&&(t||(t=Sys.EventArgs.Empty),i(this,t))},get_element:function(){return this._button},get_tooltip:function(){return this._tooltip},set_tooltip:function(n){this._tooltip=n},get_config:function(){return this.config},set_config:function(n){this.config=n},get_srcRest:function(){return this._srcRest},set_srcRest:function(n){this._srcRest=n},get_srcGroup:function(){return this._srcGroup},set_srcGroup:function(n){this._srcGroup=n},get_srcHover:function(){return this._srcHover},set_srcHover:function(n){this._srcHover=n},get_srcDown:function(){return this._srcDown},set_srcDown:function(n){this._srcDown=n},add_onPress:function(n){this.get_events().addHandler("onPress",n)},remove_onPress:function(n){this.get_events().removeHandler("onPress",n)},add_onClick:function(n){this.get_events().addHandler("onClick",n)},remove_onClick:function(n){this.get_events().removeHandler("onClick",n)},add_onEnter:function(n){this.get_events().addHandler("onEnter",n)},remove_onEnter:function(n){this.get_events().removeHandler("onEnter",n)},add_onRelease:function(n){this.get_events().addHandler("onRelease",n)},remove_onRelease:function(n){this.get_events().removeHandler("onRelease",n)},add_onExit:function(n){this.get_events().addHandler("onExit",n)},remove_onExit:function(n){this.get_events().removeHandler("onExit",n)},notifyGroupEnter:function(){this._inTo(Sys.Extended.UI.Seadragon.ButtonState.GROUP)},notifyGroupExit:function(){this._outTo(Sys.Extended.UI.Seadragon.ButtonState.REST)}};Sys.Extended.UI.Seadragon.Button.registerClass("Sys.Extended.UI.Seadragon.Button",Sys.Component);Sys.Extended.UI.Seadragon.ButtonGroup=function(){Sys.Extended.UI.Seadragon.ButtonGroup.initializeBase(this);this._buttons=null;this._group=null;this.config=null};Sys.Extended.UI.Seadragon.ButtonGroup.prototype={initialize:function(){var i,n,t;for(Sys.Extended.UI.Seadragon.ButtonGroup.callBaseMethod(this,"initialize"),this._group=Seadragon.Utils.makeNeutralElement("span"),i=this._buttons.concat([]),n=new Seadragon.MouseTracker(this._group,this.config.clickTimeThreshold,this.config.clickDistThreshold),this._group.style.display="inline-block",t=0;t<i.length;t++)this._group.appendChild(i[t].get_element());n.enterHandler=Function.createDelegate(this,this._enterHandler);n.exitHandler=Function.createDelegate(this,this._exitHandler);n.releaseHandler=Function.createDelegate(this,this._releaseHandler);n.setTracking(!0)},dispose:function(){},get_buttons:function(){return this._buttons},set_buttons:function(n){this._buttons=n},get_element:function(){return this._group},get_config:function(){return this.config},set_config:function(n){this.config=n},_enterHandler:function(){for(var n=0;n<this._buttons.length;n++)this._buttons[n].notifyGroupEnter()},_exitHandler:function(n,t,i){if(!i)for(var r=0;r<this._buttons.length;r++)this._buttons[r].notifyGroupExit()},_releaseHandler:function(n,t,i,r){if(!r)for(var u=0;u<this._buttons.length;u++)this._buttons[u].notifyGroupExit()},emulateEnter:function(){this._enterHandler()},emulateExit:function(){this._exitHandler()}};Sys.Extended.UI.Seadragon.ButtonGroup.registerClass("Sys.Extended.UI.Seadragon.ButtonGroup",Sys.Component);window.SIGNAL||(window.SIGNAL="----seadragon----");Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");Sys.Extended.UI.Seadragon.ControlAnchor=function(){throw Error.invalidOperation();};Sys.Extended.UI.Seadragon.ControlAnchor.prototype={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4};Sys.Extended.UI.Seadragon.ControlAnchor.registerEnum("Sys.Extended.UI.Seadragon.ControlAnchor",!1);Seadragon.ControlAnchor=Sys.Extended.UI.Seadragon.ControlAnchor;Sys.Extended.UI.Seadragon.OverlayPlacement=function(){throw Error.invalidOperation();};Sys.Extended.UI.Seadragon.OverlayPlacement.prototype={CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8};Sys.Extended.UI.Seadragon.OverlayPlacement.registerEnum("Sys.Extended.UI.Seadragon.OverlayPlacement",!1);Seadragon.OverlayPlacement=Sys.Extended.UI.Seadragon.OverlayPlacement;Sys.Extended.UI.Seadragon.NavControl=function(n){this._group=null;this._zooming=!1;this._zoomFactor=null;this._lastZoomTime=null;this._viewer=n;this.config=this._viewer.config;this.elmt=null;this.initialize()};Sys.Extended.UI.Seadragon.NavControl.prototype={initialize:function(){var i=Function.createDelegate(this,this._beginZoomingIn),t=Function.createDelegate(this,this._endZooming),u=Function.createDelegate(this,this._doSingleZoomIn),r=Function.createDelegate(this,this._beginZoomingOut),f=Function.createDelegate(this,this._doSingleZoomOut),e=Function.createDelegate(this,this._onHome),o=Function.createDelegate(this,this._onFullPage),n=this._viewer.config.navImages,s=$create(Sys.Extended.UI.Seadragon.Button,{config:this._viewer.config,tooltip:Seadragon.Strings.getString("Tooltips.ZoomIn"),srcRest:this._resolveUrl(n.zoomIn.REST),srcGroup:this._resolveUrl(n.zoomIn.GROUP),srcHover:this._resolveUrl(n.zoomIn.HOVER),srcDown:this._resolveUrl(n.zoomIn.DOWN)},{onPress:i,onRelease:t,onClick:u,onEnter:i,onExit:t},null,null),h=$create(Sys.Extended.UI.Seadragon.Button,{config:this._viewer.config,tooltip:Seadragon.Strings.getString("Tooltips.ZoomOut"),srcRest:this._resolveUrl(n.zoomOut.REST),srcGroup:this._resolveUrl(n.zoomOut.GROUP),srcHover:this._resolveUrl(n.zoomOut.HOVER),srcDown:this._resolveUrl(n.zoomOut.DOWN)},{onPress:r,onRelease:t,onClick:f,onEnter:r,onExit:t},null,null),c=$create(Sys.Extended.UI.Seadragon.Button,{config:this._viewer.config,tooltip:Seadragon.Strings.getString("Tooltips.Home"),srcRest:this._resolveUrl(n.home.REST),srcGroup:this._resolveUrl(n.home.GROUP),srcHover:this._resolveUrl(n.home.HOVER),srcDown:this._resolveUrl(n.home.DOWN)},{onRelease:e},null,null),l=$create(Sys.Extended.UI.Seadragon.Button,{config:this._viewer.config,tooltip:Seadragon.Strings.getString("Tooltips.FullPage"),srcRest:this._resolveUrl(n.fullpage.REST),srcGroup:this._resolveUrl(n.fullpage.GROUP),srcHover:this._resolveUrl(n.fullpage.HOVER),srcDown:this._resolveUrl(n.fullpage.DOWN)},{onRelease:o},null,null);this._group=$create(Sys.Extended.UI.Seadragon.ButtonGroup,{config:this._viewer.config,buttons:[s,h,c,l]},null,null,null);this.elmt=this._group.get_element();this.elmt[SIGNAL]=!0;this._viewer.add_open(Function.createDelegate(this,this._lightUp))},dispose:function(){},_resolveUrl:function(n){return String.format("{1}",this._viewer.get_prefixUrl(),n)},_beginZoomingIn:function(){this._lastZoomTime=(new Date).getTime();this._zoomFactor=this.config.zoomPerSecond;this._zooming=!0;this._scheduleZoom()},_beginZoomingOut:function(){this._lastZoomTime=(new Date).getTime();this._zoomFactor=1/this.config.zoomPerSecond;this._zooming=!0;this._scheduleZoom()},_endZooming:function(){this._zooming=!1},_scheduleZoom:function(){window.setTimeout(Function.createDelegate(this,this._doZoom),10)},_doZoom:function(){if(this._zooming&&this._viewer.viewport){var n=(new Date).getTime(),t=n-this._lastZoomTime,i=Math.pow(this._zoomFactor,t/1e3);this._viewer.viewport.zoomBy(i);this._viewer.viewport.applyConstraints();this._lastZoomTime=n;this._scheduleZoom()}},_doSingleZoomIn:function(){this._viewer.viewport&&(this._zooming=!1,this._viewer.viewport.zoomBy(this.config.zoomPerClick/1),this._viewer.viewport.applyConstraints())},_doSingleZoomOut:function(){this._viewer.viewport&&(this._zooming=!1,this._viewer.viewport.zoomBy(1/this.config.zoomPerClick),this._viewer.viewport.applyConstraints())},_lightUp:function(){this._group.emulateEnter();this._group.emulateExit()},_onHome:function(){this._viewer.viewport&&this._viewer.viewport.goHome()},_onFullPage:function(){this._viewer.setFullPage(!this._viewer.isFullPage());this._group.emulateExit();this._viewer.viewport&&this._viewer.viewport.applyConstraints()}};Sys.Extended.UI.Seadragon.NavControl.registerClass("Sys.Extended.UI.Seadragon.NavControl",null,Sys.IDisposable);Sys.Extended.UI.Seadragon.Control=function(n,t,i){this.elmt=n;this.anchor=t;this.container=i;this.wrapper=Seadragon.Utils.makeNeutralElement("span");this.initialize()};Sys.Extended.UI.Seadragon.Control.prototype={initialize:function(){this.wrapper=Seadragon.Utils.makeNeutralElement("span");this.wrapper.style.display="inline-block";this.wrapper.appendChild(this.elmt);this.anchor==Seadragon.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%");this.addToAnchor()},addToAnchor:function(){this.anchor==Seadragon.ControlAnchor.TOP_RIGHT||this.anchor==Seadragon.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.elmt,this.container.firstChild):this.container.appendChild(this.elmt)},destroy:function(){this.wrapper.removeChild(this.elmt);this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!="none"},setVisible:function(n){this.wrapper.style.display=n?"inline-block":"none"},setOpacity:function(n){this.elmt[SIGNAL]&&Seadragon.Utils.getBrowser()==Seadragon.Browser.IE?Seadragon.Utils.setElementOpacity(this.elmt,n,!0):Seadragon.Utils.setElementOpacity(this.wrapper,n,!0)}};Sys.Extended.UI.Seadragon.Control.registerClass("Sys.Extended.UI.Seadragon.Control",null,Sys.IDisposable);Sys.Extended.UI.Seadragon.Viewer=function(n){Sys.Extended.UI.Seadragon.Viewer.initializeBase(this,[n]);this.config=new Sys.Extended.UI.Seadragon.Config;this._prefixUrl=null;this._controls=[];this._customControls=null;this._overlays=[];this._overlayControls=null;this._container=null;this._canvas=null;this._controlsTL=null;this._controlsTR=null;this._controlsBR=null;this._controlsBL=null;this._bodyWidth=null;this._bodyHeight=null;this._bodyOverflow=null;this._docOverflow=null;this._fsBoundsDelta=null;this._prevContainerSize=null;this._lastOpenStartTime=0;this._lastOpenEndTime=0;this._animating=!1;this._forceRedraw=!1;this._mouseInside=!1;this._xmlPath=null;this.source=null;this.drawer=null;this.viewport=null;this.profiler=null};Sys.Extended.UI.Seadragon.Viewer.prototype={initialize:function(){var i,r,u;Sys.Extended.UI.Seadragon.Viewer.callBaseMethod(this,"initialize");this._container=Seadragon.Utils.makeNeutralElement("div");this._canvas=Seadragon.Utils.makeNeutralElement("div");this._controlsTL=Seadragon.Utils.makeNeutralElement("div");this._controlsTR=Seadragon.Utils.makeNeutralElement("div");this._controlsBR=Seadragon.Utils.makeNeutralElement("div");this._controlsBL=Seadragon.Utils.makeNeutralElement("div");i=new Seadragon.MouseTracker(this._canvas,this.config.clickTimeThreshold,this.config.clickDistThreshold);r=new Seadragon.MouseTracker(this._container,this.config.clickTimeThreshold,this.config.clickDistThreshold);this._bodyWidth=document.body.style.width;this._bodyHeight=document.body.style.height;this._bodyOverflow=document.body.style.overflow;this._docOverflow=document.documentElement.style.overflow;this._fsBoundsDelta=new Sys.Extended.UI.Seadragon.Point(1,1);var n=this._canvas.style,t=this._container.style,f=this._controlsTL.style,e=this._controlsTR.style,o=this._controlsBR.style,s=this._controlsBL.style;for(t.width="100%",t.height="100%",t.position="relative",t.left="0px",t.top="0px",t.textAlign="left",n.width="100%",n.height="100%",n.overflow="hidden",n.position="absolute",n.top="0px",n.left="0px",f.position=e.position=o.position=s.position="absolute",f.top=e.top="0px",f.left=s.left="0px",e.right=o.right="0px",s.bottom=o.bottom="0px",i.clickHandler=Function.createDelegate(this,this._onCanvasClick),i.dragHandler=Function.createDelegate(this,this._onCanvasDrag),i.releaseHandler=Function.createDelegate(this,this._onCanvasRelease),i.setTracking(!0),this.get_showNavigationControl()&&(navControl=new Sys.Extended.UI.Seadragon.NavControl(this).elmt,navControl.style.marginRight="4px",navControl.style.marginBottom="4px",this.addControl(navControl,Sys.Extended.UI.Seadragon.ControlAnchor.BOTTOM_RIGHT)),u=0;u<this._customControls.length;u++)this.addControl(this._customControls[u].id,this._customControls[u].anchor);r.enterHandler=Function.createDelegate(this,this._onContainerEnter);r.exitHandler=Function.createDelegate(this,this._onContainerExit);r.releaseHandler=Function.createDelegate(this,this._onContainerRelease);r.setTracking(!0);window.setTimeout(Function.createDelegate(this,this._beginControlsAutoHide),1);this._container.appendChild(this._canvas);this._container.appendChild(this._controlsTL);this._container.appendChild(this._controlsTR);this._container.appendChild(this._controlsBR);this._container.appendChild(this._controlsBL);this.get_element().appendChild(this._container);this._xmlPath&&this.openDzi(this._xmlPath)},_raiseEvent:function(n,t){var i=this.get_events().getHandler(n);i&&(t||(t=Sys.EventArgs.Empty),i(this,t))},_beginControlsAutoHide:function(){this.config.autoHideControls&&(this._controlsShouldFade=!0,this._controlsFadeBeginTime=(new Date).getTime()+this._controlsFadeDelay,window.setTimeout(Function.createDelegate(this,this._scheduleControlsFade),this._controlsFadeDelay))},_scheduleControlsFade:function(){window.setTimeout(Function.createDelegate(this,this._updateControlsFade),20)},_updateControlsFade:function(){var t;if(this._controlsShouldFade){var i=(new Date).getTime(),r=i-this._controlsFadeBeginTime,n=1-r/this._controlsFadeLength;for(n=Math.min(1,n),n=Math.max(0,n),t=this._controls.length-1;t>=0;t--)this._controls[t].setOpacity(n);n>0&&this._scheduleControlsFade()}},_onCanvasClick:function(n,t,i,r){if(this.viewport&&i){var u=this.config.zoomPerClick,f=r?1/u:u;this.viewport.zoomBy(f,this.viewport.pointFromPixel(t,!0));this.viewport.applyConstraints()}},_onCanvasDrag:function(n,t,i){this.viewport&&this.viewport.panBy(this.viewport.deltaPointsFromPixels(i.negate()))},_onCanvasRelease:function(n,t,i){i&&this.viewport&&this.viewport.applyConstraints()},_onContainerExit:function(n,t,i){i||(this._mouseInside=!1,this._animating||this._beginControlsAutoHide())},_onContainerRelease:function(n,t,i,r){r||(this._mouseInside=!1,this._animating||this._beginControlsAutoHide())},_getControlIndex:function(n){for(var t=this._controls.length-1;t>=0;t--)if(this._controls[t].elmt==n)return t;return-1},_abortControlsAutoHide:function(){this._controlsShouldFade=!1;for(var n=this._controls.length-1;n>=0;n--)this._controls[n].setOpacity(1)},_onContainerEnter:function(){this._mouseInside=!0;this._abortControlsAutoHide()},_updateOnce:function(){var t,n;this.source&&(this.profiler.beginUpdate(),t=Seadragon.Utils.getElementSize(this._container),t.equals(this._prevContainerSize)||(this.viewport.resize(t,!0),this._prevContainerSize=t,this._raiseEvent("resize",this)),n=this.viewport.update(),!this._animating&&n&&(this._raiseEvent("animationstart",self),this._abortControlsAutoHide()),n?(this.drawer.update(),this._raiseEvent("animation",self)):this._forceRedraw||this.drawer.needsUpdate()?(this.drawer.update(),this._forceRedraw=!1):this.drawer.idle(),this._animating&&!n&&(this._raiseEvent("animationfinish",this),this._mouseInside||this._beginControlsAutoHide()),this._animating=n,this.profiler.endUpdate())},_onClose:function(){this.source=null;this.viewport=null;this.drawer=null;this.profiler=null;this._canvas.innerHTML=""},_beforeOpen:function(){return this.source&&this._onClose(),this._lastOpenStartTime=(new Date).getTime(),window.setTimeout(Function.createDelegate(this,function(){this._lastOpenStartTime>this._lastOpenEndTime&&this._setMessage(Seadragon.Strings.getString("Messages.Loading"))}),2e3),this._lastOpenStartTime},_setMessage:function(n){var i=document.createTextNode(n),t;this._canvas.innerHTML="";this._canvas.appendChild(Seadragon.Utils.makeCenteredNode(i));t=i.parentNode.style;t.color="white";t.fontFamily="verdana";t.fontSize="13px";t.fontSizeAdjust="none";t.fontStyle="normal";t.fontStretch="normal";t.fontVariant="normal";t.fontWeight="normal";t.lineHeight="1em";t.textAlign="center";t.textDecoration="none"},_onOpen:function(n,t,i){var u,r;if(this._lastOpenEndTime=(new Date).getTime(),n<this._lastOpenStartTime){Seadragon.Debug.log("Ignoring out-of-date open.");this._raiseEvent("ignore");return}if(!t){this._setMessage(i);this._raiseEvent("error");return}for(this._canvas.innerHTML="",this._prevContainerSize=Seadragon.Utils.getElementSize(this._container),this.source=t,this.viewport=new Sys.Extended.UI.Seadragon.Viewport(this._prevContainerSize,this.source.dimensions,this.config),this.drawer=new Sys.Extended.UI.Seadragon.Drawer(this.source,this.viewport,this._canvas),this.profiler=new Sys.Extended.UI.Seadragon.Profiler,this._animating=!1,this._forceRedraw=!0,this._scheduleUpdate(this._updateMulti),u=0;u<this._overlayControls.length;u++)r=this._overlayControls[u],r.point!=null?this.drawer.addOverlay(r.id,new Sys.Extended.UI.Seadragon.Point(r.point.X,r.point.Y),Sys.Extended.UI.Seadragon.OverlayPlacement.TOP_LEFT):this.drawer.addOverlay(r.id,new Sys.Extended.UI.Seadragon.Rect(r.rect.Point.X,r.rect.Point.Y,r.rect.Width,r.rect.Height),r.placement);this._raiseEvent("open")},_scheduleUpdate:function(n,t){if(this._animating)return window.setTimeout(Function.createDelegate(this,n),1);var i=(new Date).getTime(),t=t?t:i,r=t+1e3/60,u=Math.max(1,r-i);return window.setTimeout(Function.createDelegate(this,n),u)},_updateMulti:function(){if(this.source){var n=(new Date).getTime();this._updateOnce();this._scheduleUpdate(arguments.callee,n)}},_updateOnce:function(){var t,n;this.source&&(this.profiler.beginUpdate(),t=Seadragon.Utils.getElementSize(this._container),t.equals(this._prevContainerSize)||(this.viewport.resize(t,!0),this._prevContainerSize=t,this._raiseEvent("resize")),n=this.viewport.update(),!this._animating&&n&&(this._raiseEvent("animationstart"),this._abortControlsAutoHide()),n?(this.drawer.update(),this._raiseEvent("animation")):this._forceRedraw||this.drawer.needsUpdate()?(this.drawer.update(),this._forceRedraw=!1):this.drawer.idle(),this._animating&&!n&&(this._raiseEvent("animationfinish"),this._mouseInside||this._beginControlsAutoHide()),this._animating=n,this.profiler.endUpdate())},getNavControl:function(){return this._navControl},get_xmlPath:function(){return this._xmlPath},set_xmlPath:function(n){this._xmlPath=n},get_debugMode:function(){return this.config.debugMode},set_debugMode:function(n){this.config.debugMode=n},get_animationTime:function(){return this.config.animationTime},set_animationTime:function(n){this.config.animationTime=n},get_blendTime:function(){return this.config.blendTime},set_blendTime:function(n){this.config.blendTime=n},get_alwaysBlend:function(){return this.config.alwaysBlend},set_alwaysBlend:function(n){this.config.alwaysBlend=n},get_autoHideControls:function(){return this.config.autoHideControls},set_autoHideControls:function(n){this.config.autoHideControls=n},get_immediateRender:function(){return this.config.immediateRender},set_immediateRender:function(n){this.config.immediateRender=n},get_wrapHorizontal:function(){return this.config.wrapHorizontal},set_wrapHorizontal:function(n){this.config.wrapHorizontal=n},get_wrapVertical:function(){return this.config.wrapVertical},set_wrapVertical:function(n){this.config.wrapVertical=n},get_minZoomDimension:function(){return this.config.minZoomDimension},set_minZoomDimension:function(n){this.config.minZoomDimension=n},get_maxZoomPixelRatio:function(){return this.config.maxZoomPixelRatio},set_maxZoomPixelRatio:function(n){this.config.maxZoomPixelRatio=n},get_visibilityRatio:function(){return this.config.visibilityRatio},set_visibilityRatio:function(n){this.config.visibilityRatio=n},get_springStiffness:function(){return this.config.springStiffness},set_springStiffness:function(n){this.config.springStiffness=n},get_imageLoaderLimit:function(){return this.config.imageLoaderLimit},set_imageLoaderLimit:function(n){this.config.imageLoaderLimit=n},get_clickTimeThreshold:function(){return this.config.clickTimeThreshold},set_clickTimeThreshold:function(n){this.config.clickTimeThreshold=n},get_clickDistThreshold:function(){return this.config.clickDistThreshold},set_clickDistThreshold:function(n){this.config.clickDistThreshold=n},get_zoomPerClick:function(){return this.config.zoomPerClick},set_zoomPerClick:function(n){this.config.zoomPerClick=n},get_zoomPerSecond:function(){return this.config.zoomPerSecond},set_zoomPerSecond:function(n){this.config.zoomPerSecond=n},get_maxImageCacheCount:function(){return this.config.maxImageCacheCount},set_maxImageCacheCount:function(n){this.config.maxImageCacheCount=n},get_showNavigationControl:function(){return this.config.showNavigationControl},set_showNavigationControl:function(n){this.config.showNavigationControl=n},get_minPixelRatio:function(){return this.config.minPixelRatio},set_minPixelRatio:function(n){this.config.minPixelRatio=n},get_mouseNavEnabled:function(){return this.config.mouseNavEnabled},set_mouseNavEnabled:function(n){this.config.mouseNavEnabled=n},get_controls:function(){return this._customControls},set_controls:function(n){this._customControls=n},get_overlays:function(){return this._overlayControls},set_overlays:function(n){this._overlayControls=n},get_prefixUrl:function(){return this._prefixUrl},set_prefixUrl:function(n){this._prefixUrl=n},add_open:function(n){this.get_events().addHandler("open",n)},remove_open:function(n){this.get_events().removeHandler("open",n)},add_error:function(n){this.get_events().addHandler("error",n)},remove_error:function(n){this.get_events().removeHandler("error",n)},add_ignore:function(n){this.get_events().addHandler("ignore",n)},remove_ignore:function(n){this.get_events().removeHandler("ignore",n)},add_resize:function(n){this.get_events().addHandler("resize",n)},remove_resize:function(n){this.get_events().removeHandler("resize",n)},add_animationstart:function(n){this.get_events().addHandler("animationstart",n)},remove_animationstart:function(n){this.get_events().removeHandler("animationstart",n)},add_animationend:function(n){this.get_events().addHandler("animationend",n)},remove_animationend:function(n){this.get_events().removeHandler("animationend",n)},addControl:function(n,t){var n=Seadragon.Utils.getElement(n),i;if(!(this._getControlIndex(n)>=0)){i=null;switch(t){case Sys.Extended.UI.Seadragon.ControlAnchor.TOP_RIGHT:i=this._controlsTR;n.style.position="relative";break;case Sys.Extended.UI.Seadragon.ControlAnchor.BOTTOM_RIGHT:i=this._controlsBR;n.style.position="relative";break;case Sys.Extended.UI.Seadragon.ControlAnchor.BOTTOM_LEFT:i=this._controlsBL;n.style.position="relative";break;case Sys.Extended.UI.Seadragon.ControlAnchor.TOP_LEFT:i=this._controlsTL;n.style.position="relative";break;case Sys.Extended.UI.Seadragon.ControlAnchor.NONE:default:i=this._container;n.style.position="absolute"}this._controls.push(new Sys.Extended.UI.Seadragon.Control(n,t,i))}},isOpen:function(){return!!this.source},openDzi:function(n,t){var i=this._beforeOpen();Sys.Extended.UI.Seadragon.DziTileSourceHelper.createFromXml(n,t,Seadragon.Utils.createCallback(null,Function.createDelegate(this,this._onOpen),i))},openTileSource:function(n){var t=this._beforeOpen();window.setTimeout(Function.createDelegate(this,function(){this._onOpen(t,n)}),1)},close:function(){this.source&&this._onClose()},removeControl:function(n){var n=Seadragon.Utils.getElement(n),t=this._getControlIndex(n);t>=0&&(this._controls[t].destroy(),this._controls.splice(t,1))},clearControls:function(){while(this._controls.length>0)this._controls.pop().destroy()},isDashboardEnabled:function(){for(var n=this._controls.length-1;n>=0;n--)if(this._controls[n].isVisible())return!0;return!1},isFullPage:function(){return this._container.parentNode==document.body},isMouseNavEnabled:function(){return this._innerTracker.isTracking()},isVisible:function(){return this._container.style.visibility!="hidden"},setDashboardEnabled:function(n){for(var t=this._controls.length-1;t>=0;t--)this._controls[t].setVisible(n)},setFullPage:function(n){var u,f;if(n!=this.isFullPage()){var o=document.body,t=o.style,e=document.documentElement.style,i=this._container.style,r=this._canvas.style;n?(bodyOverflow=t.overflow,docOverflow=e.overflow,t.overflow="hidden",e.overflow="hidden",bodyWidth=t.width,bodyHeight=t.height,t.width="100%",t.height="100%",r.backgroundColor="black",r.color="white",i.position="fixed",i.zIndex="99999999",o.appendChild(this._container),this._prevContainerSize=Seadragon.Utils.getWindowSize(),this._onContainerEnter()):(t.overflow=bodyOverflow,e.overflow=docOverflow,t.width=bodyWidth,t.height=bodyHeight,r.backgroundColor="",r.color="",i.position="relative",i.zIndex="",this.get_element().appendChild(this._container),this._prevContainerSize=Seadragon.Utils.getElementSize(this.get_element()),this._onContainerExit());this.viewport&&(u=this.viewport.getBounds(),this.viewport.resize(this._prevContainerSize),f=this.viewport.getBounds(),n?this._fsBoundsDelta=new Sys.Extended.UI.Seadragon.Point(f.width/u.width,f.height/u.height):(this.viewport.update(),this.viewport.zoomBy(Math.max(this._fsBoundsDelta.x,this._fsBoundsDelta.y),null,!0)),this._forceRedraw=!0,this._raiseEvent("resize",this),this._updateOnce())}},setMouseNavEnabled:function(n){this._innerTracker.setTracking(n)},setVisible:function(n){this._container.style.visibility=n?"":"hidden"}};Sys.Extended.UI.Seadragon.Viewer.registerClass("Sys.Extended.UI.Seadragon.Viewer",Sys.UI.Control);Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon"),function(){function f(n){return Seadragon.Utils.getMousePosition(n)}function t(n,t){var i=Seadragon.Utils.getMousePosition(n),r=Seadragon.Utils.getElementPosition(t);return i.minus(r)}function i(n,t){for(var i=document.body;t&&n!=t&&i!=t;)try{t=t.parentNode}catch(r){return!1}return n==t}function s(){u=!0}function h(){u=!1}if(!Seadragon.MouseTracker){var n=Seadragon.Utils.getBrowser()==Seadragon.Browser.IE,u=!1,e=!1,o={},r=[];(function(){n?(Seadragon.Utils.addEvent(document,"mousedown",s,!1),Seadragon.Utils.addEvent(document,"mouseup",h,!1)):(Seadragon.Utils.addEvent(window,"mousedown",s,!0),Seadragon.Utils.addEvent(window,"mouseup",h,!0))})();Seadragon.MouseTracker=function(s,h,c){function lt(){y||(Seadragon.Utils.addEvent(s,"mouseover",g,!1),Seadragon.Utils.addEvent(s,"mouseout",nt,!1),Seadragon.Utils.addEvent(s,"mousedown",ut,!1),Seadragon.Utils.addEvent(s,"mouseup",a,!1),Seadragon.Utils.addEvent(s,"click",ot,!1),y=!0,o[it]=b)}function at(){y&&(Seadragon.Utils.removeEvent(s,"mouseover",g,!1),Seadragon.Utils.removeEvent(s,"mouseout",nt,!1),Seadragon.Utils.removeEvent(s,"mousedown",ut,!1),Seadragon.Utils.removeEvent(s,"mouseup",a,!1),Seadragon.Utils.removeEvent(s,"click",ot,!1),d(),y=!1,delete o[it])}function vt(){v||(n?(Seadragon.Utils.removeEvent(s,"mouseup",a,!1),Seadragon.Utils.addEvent(s,"mouseup",ft,!0),Seadragon.Utils.addEvent(s,"mousemove",st,!0)):(Seadragon.Utils.addEvent(window,"mouseup",et,!0),Seadragon.Utils.addEvent(window,"mousemove",tt,!0)),v=!0)}function d(){v&&(n?(Seadragon.Utils.removeEvent(s,"mousemove",st,!0),Seadragon.Utils.removeEvent(s,"mouseup",ft,!0),Seadragon.Utils.addEvent(s,"mouseup",a,!1)):(Seadragon.Utils.removeEvent(window,"mousemove",tt,!0),Seadragon.Utils.removeEvent(window,"mouseup",et,!0)),v=!1)}function rt(n,t){var i=o;for(var r in i)i.hasOwnProperty(r)&&it!=r&&i[r][n](t)}function yt(){return w}function g(r){var r=Seadragon.Utils.getEvent(r),e,o;if((n&&v&&!i(r.srcElement,s)&&rt("onMouseOver",r),e=r.target?r.target:r.srcElement,o=r.relatedTarget?r.relatedTarget:r.fromElement,i(s,e)&&!i(s,o))&&(w=!0,typeof l.enterHandler=="function"))try{l.enterHandler(l,t(r,s),p,u)}catch(f){Seadragon.Debug.error(f.name+" while executing enter handler: "+f.message,f)}}function nt(r){var r=Seadragon.Utils.getEvent(r),e,o;if((n&&v&&!i(r.srcElement,s)&&rt("onMouseOut",r),e=r.target?r.target:r.srcElement,o=r.relatedTarget?r.relatedTarget:r.toElement,i(s,e)&&!i(s,o))&&(w=!1,typeof l.exitHandler=="function"))try{l.exitHandler(l,t(r,s),p,u)}catch(f){Seadragon.Debug.error(f.name+" while executing exit handler: "+f.message,f)}}function ut(i){var i=Seadragon.Utils.getEvent(i);if(i.button!=2){if(p=!0,k=f(i),ct=k,ht=(new Date).getTime(),typeof l.pressHandler=="function")try{l.pressHandler(l,t(i,s))}catch(u){Seadragon.Debug.error(u.name+" while executing press handler: "+u.message,u)}(l.pressHandler||l.dragHandler)&&Seadragon.Utils.cancelEvent(i);n&&e?n&&r.push(b):(vt(),e=!0,r=[b])}}function a(n){var n=Seadragon.Utils.getEvent(n),r=p,u=w;if(n.button!=2){if(p=!1,typeof l.releaseHandler=="function")try{l.releaseHandler(l,t(n,s),r,u)}catch(i){Seadragon.Debug.error(i.name+" while executing release handler: "+i.message,i)}r&&u&&pt(n)}}function ft(n){var n=Seadragon.Utils.getEvent(n),t,i;if(n.button!=2){for(t=0;t<r.length;t++)if(i=r[t],!i.hasMouse())i.onMouseUp(n);d();e=!1;n.srcElement.fireEvent("on"+n.type,document.createEventObject(n));Seadragon.Utils.stopEvent(n)}}function et(n){w||a(n);d()}function ot(n){l.clickHandler&&Seadragon.Utils.cancelEvent(n)}function pt(n){var n=Seadragon.Utils.getEvent(n);if(n.button!=2){var r=(new Date).getTime()-ht,u=f(n),e=ct.distanceTo(u),o=r<=h&&e<=c;if(typeof l.clickHandler=="function")try{l.clickHandler(l,t(n,s),o,n.shiftKey)}catch(i){Seadragon.Debug.error(i.name+" while executing click handler: "+i.message,i)}}}function tt(n){var n=Seadragon.Utils.getEvent(n),r=f(n),u=r.minus(k);if(k=r,typeof l.dragHandler=="function"){try{l.dragHandler(l,t(n,s),u,n.shiftKey)}catch(i){Seadragon.Debug.error(i.name+" while executing drag handler: "+i.message,i)}Seadragon.Utils.cancelEvent(n)}}function st(n){for(var t=0;t<r.length;t++)r[t].onMouseMove(n);Seadragon.Utils.stopEvent(n)}var l=this,b=null,it=Math.random(),s=Seadragon.Utils.getElement(s),y=!1,v=!1,p=!1,w=!1,k=null,ht=null,ct=null,h=h,c=c;this.target=s;this.enterHandler=null;this.exitHandler=null;this.pressHandler=null;this.releaseHandler=null;this.clickHandler=null;this.dragHandler=null,function(){b={hasMouse:yt,onMouseOver:g,onMouseOut:nt,onMouseUp:a,onMouseMove:tt}}();this.isTracking=function(){return y};this.setTracking=function(n){n?lt():at()}}}}();Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");Seadragon.Point=Sys.Extended.UI.Seadragon.Point=function(n,t){this.x=typeof n=="number"?n:0;this.y=typeof t=="number"?t:0};Sys.Extended.UI.Seadragon.Point.prototype={plus:function(n){return new Sys.Extended.UI.Seadragon.Point(this.x+n.x,this.y+n.y)},minus:function(n){return new Sys.Extended.UI.Seadragon.Point(this.x-n.x,this.y-n.y)},times:function(n){return new Sys.Extended.UI.Seadragon.Point(this.x*n,this.y*n)},divide:function(n){return new Sys.Extended.UI.Seadragon.Point(this.x/n,this.y/n)},negate:function(){return new Sys.Extended.UI.Seadragon.Point(-this.x,-this.y)},distanceTo:function(n){return Math.sqrt(Math.pow(this.x-n.x,2)+Math.pow(this.y-n.y,2))},apply:function(n){return new Sys.Extended.UI.Seadragon.Point(n(this.x),n(this.y))},equals:function(n){return n instanceof Sys.Extended.UI.Seadragon.Point&&this.x===n.x&&this.y===n.y},toString:function(){return"("+this.x+","+this.y+")"}};Sys.Extended.UI.Seadragon.Point.registerClass("Sys.Extended.UI.Seadragon.Point",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI");Type.registerNamespace("Seadragon");Sys.Extended.UI.Seadragon.Strings={Errors:{Failure:"Sorry, but Seadragon Ajax can't run on your browser!\nPlease try using IE 7 or Firefox 3.\n",Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Empty:"You asked us to open nothing, so we did just that.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",Unknown:"Whoops, something inexplicably went wrong. Sorry!"},Messages:{Loading:"Loading..."},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out"},getString:function(n){for(var u=n.split("."),t=Sys.Extended.UI.Seadragon.Strings,i,r=0;r<u.length;r++)t=t[u[r]]||{};return typeof t!="string"&&(t=""),i=arguments,t.replace(/\{\d+\}/g,function(n){var t=parseInt(n.match(/\d+/))+1;return t<i.length?i[t]:""})},setString:function(n,t){for(var r=n.split("."),u=Seadragon.Strings,i=0;i<r.length-1;i++)u[r[i]]||(u[r[i]]={}),u=u[r[i]];u[r[i]]=t}};Seadragon.Strings=Sys.Extended.UI.Seadragon.Strings;Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");var QUOTA=100,MIN_PIXEL_RATIO=.5,browser=Seadragon.Utils.getBrowser(),browserVer=Seadragon.Utils.getBrowserVersion(),subpixelRenders=browser==Seadragon.Browser.FIREFOX||browser==Seadragon.Browser.OPERA||browser==Seadragon.Browser.SAFARI&&browserVer>=4||browser==Seadragon.Browser.CHROME&&browserVer>=2,useCanvas=typeof document.createElement("canvas").getContext=="function"&&subpixelRenders;Sys.Extended.UI.Seadragon.Tile=function(n,t,i,r,u,f){this.level=n;this.x=t;this.y=i;this.bounds=r;this.exists=u;this.loaded=!1;this.loading=!1;this.elmt=null;this.image=null;this.url=f;this.style=null;this.position=null;this.size=null;this.blendStart=null;this.opacity=null;this.distance=null;this.visibility=null;this.beingDrawn=!1;this.lastTouchTime=0};Sys.Extended.UI.Seadragon.Tile.prototype={dispose:function(){},toString:function(){return this.level+"/"+this.x+"_"+this.y},drawHTML:function(n){if(!this.loaded){Seadragon.Debug.error("Attempting to draw tile "+this.toString()+" when it's not yet loaded.");return}this.elmt||(this.elmt=Seadragon.Utils.makeNeutralElement("img"),this.elmt.src=this.url,this.style=this.elmt.style,this.style.position="absolute",this.style.msInterpolationMode="nearest-neighbor");var i=this.elmt,t=this.style,r=this.position.apply(Math.floor),u=this.size.apply(Math.ceil);i.parentNode!=n&&n.appendChild(i);t.left=r.x+"px";t.top=r.y+"px";t.width=u.x+"px";t.height=u.y+"px";Seadragon.Utils.setElementOpacity(i,this.opacity)},drawCanvas:function(n){if(!this.loaded){Seadragon.Debug.error("Attempting to draw tile "+this.toString()+" when it's not yet loaded.");return}var t=this.position,i=this.size;n.globalAlpha=this.opacity;n.drawImage(this.image,t.x,t.y,i.x,i.y)},unload:function(){this.elmt&&this.elmt.parentNode&&this.elmt.parentNode.removeChild(this.elmt);this.elmt=null;this.image=null;this.loaded=!1;this.loading=!1}};Sys.Extended.UI.Seadragon.Tile.registerClass("Sys.Extended.UI.Seadragon.Tile",null,Sys.IDisposable);Sys.Extended.UI.Seadragon.Overlay=function(n,t,i){this.elmt=n;this.scales=t instanceof Sys.Extended.UI.Seadragon.Rect;this.bounds=new Sys.Extended.UI.Seadragon.Rect(t.x,t.y,t.width,t.height);this.placement=t instanceof Sys.Extended.UI.Seadragon.Point?i:Sys.Extended.UI.Seadragon.OverlayPlacement.TOP_LEFT;this.position=new Sys.Extended.UI.Seadragon.Point(t.x,t.y);this.size=new Sys.Extended.UI.Seadragon.Point(t.width,t.height);this.style=n.style};Sys.Extended.UI.Seadragon.Overlay.prototype={adjust:function(n,t){switch(this.placement){case Sys.Extended.UI.Seadragon.OverlayPlacement.TOP_LEFT:break;case Sys.Extended.UI.Seadragon.OverlayPlacement.TOP:n.x-=t.x/2;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.TOP_RIGHT:n.x-=t.x;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.RIGHT:n.x-=t.x;n.y-=t.y/2;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.BOTTOM_RIGHT:n.x-=t.x;n.y-=t.y;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.BOTTOM:n.x-=t.x/2;n.y-=t.y;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.BOTTOM_LEFT:n.y-=t.y;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.LEFT:n.y-=t.y/2;break;case Sys.Extended.UI.Seadragon.OverlayPlacement.CENTER:default:n.x-=t.x/2;n.y-=t.y/2}},destroy:function(){var t=this.elmt,n=this.style;t.parentNode&&t.parentNode.removeChild(t);n.top="";n.left="";n.position="";this.scales&&(n.width="",n.height="")},drawHTML:function(n){var u=this.elmt,r=this.style,f=this.scales,t,i;u.parentNode!=n&&n.appendChild(u);f||(this.size=Seadragon.Utils.getElementSize(u));t=this.position;i=this.size;this.adjust(t,i);t=t.apply(Math.floor);i=i.apply(Math.ceil);r.left=t.x+"px";r.top=t.y+"px";r.position="absolute";f&&(r.width=i.x+"px",r.height=i.y+"px")},update:function(n,t){this.scales=n instanceof Sys.Extended.UI.Seadragon.Rect;this.bounds=new Sys.Extended.UI.Seadragon.Rect(n.x,n.y,n.width,n.height);this.placement=n instanceof Sys.Extended.UI.Seadragon.Point?t:Sys.Extended.UI.Seadragon.OverlayPlacement.TOP_LEFT}};Sys.Extended.UI.Seadragon.Overlay.registerClass("Sys.Extended.UI.Seadragon.Overlay",null,Sys.IDisposable);Sys.Extended.UI.Seadragon.Drawer=function(n,t,i){this._container=Seadragon.Utils.getElement(i);this._canvas=Seadragon.Utils.makeNeutralElement(useCanvas?"canvas":"div");this._context=useCanvas?this._canvas.getContext("2d"):null;this._viewport=t;this._source=n;this.config=this._viewport.config;this._imageLoader=new Sys.Extended.UI.Seadragon.ImageLoader(this.config.imageLoaderLimit);this._profiler=new Sys.Extended.UI.Seadragon.Profiler;this._minLevel=n.minLevel;this._maxLevel=n.maxLevel;this._tileSize=n.tileSize;this._tileOverlap=n.tileOverlap;this._normHeight=n.dimensions.y/n.dimensions.x;this._cacheNumTiles={};this._cachePixelRatios={};this._tilesMatrix={};this._tilesLoaded=[];this._coverage={};this._overlays=[];this._lastDrawn=[];this._lastResetTime=0;this._midUpdate=!1;this._updateAgain=!0;this.elmt=this._container;this._init()};Sys.Extended.UI.Seadragon.Drawer.prototype={dispose:function(){},_init:function(){this._canvas.style.width="100%";this._canvas.style.height="100%";this._canvas.style.position="absolute";this._container.style.textAlign="left";this._container.appendChild(this._canvas)},_compareTiles:function(n,t){return n?t.visibility>n.visibility?t:t.visibility==n.visibility&&t.distance<n.distance?t:n:t},_getNumTiles:function(n){return this._cacheNumTiles[n]||(this._cacheNumTiles[n]=this._source.getNumTiles(n)),this._cacheNumTiles[n]},_getPixelRatio:function(n){return this._cachePixelRatios[n]||(this._cachePixelRatios[n]=this._source.getPixelRatio(n)),this._cachePixelRatios[n]},_getTile:function(n,t,i,r,u,f){var s;if(this._tilesMatrix[n]||(this._tilesMatrix[n]={}),this._tilesMatrix[n][t]||(this._tilesMatrix[n][t]={}),!this._tilesMatrix[n][t][i]){var e=(u+t%u)%u,o=(f+i%f)%f,h=this._source.getTileBounds(n,e,o),c=this._source.tileExists(n,e,o),l=this._source.getTileUrl(n,e,o);h.x+=1*(t-e)/u;h.y+=this._normHeight*(i-o)/f;this._tilesMatrix[n][t][i]=new Sys.Extended.UI.Seadragon.Tile(n,t,i,h,c,l)}return s=this._tilesMatrix[n][t][i],s.lastTouchTime=r,s},_loadTile:function(n,t){n.loading=this._imageLoader.loadImage(n.url,Seadragon.Utils.createCallback(null,Function.createDelegate(this,this._onTileLoad),n,t))},_onTileLoad:function(n,t,i){var o,f,r;if(n.loading=!1,this._midUpdate){Seadragon.Debug.error("Tile load callback in middle of drawing routine.");return}if(i){if(t<this._lastResetTime){Seadragon.Debug.log("Ignoring tile "+n+" loaded before reset: "+n.url);return}}else{Seadragon.Debug.log("Tile "+n+" failed to load: "+n.url);n.exists=!1;return}if(n.loaded=!0,n.image=i,o=this._tilesLoaded.length,this._tilesLoaded.length>=QUOTA){var a=Math.ceil(Math.log(this._tileSize)/Math.log(2)),u=null,e=-1;for(f=this._tilesLoaded.length-1;f>=0;f--){if(r=this._tilesLoaded[f],r.level<=this._cutoff||r.beingDrawn)continue;else if(!u){u=r;e=f;continue}var s=r.lastTouchTime,h=u.lastTouchTime,c=r.level,l=u.level;(s<h||s==h&&c>l)&&(u=r,e=f)}u&&e>=0&&(u.unload(),o=e)}this._tilesLoaded[o]=n;this._updateAgain=!0},_clearTiles:function(){this._tilesMatrix={};this._tilesLoaded=[]},_providesCoverage:function(n,t,i){var r,f,u,e;if(!this._coverage[n])return!1;if(t===undefined||i===undefined){r=this._coverage[n];for(f in r)if(r.hasOwnProperty(f)){u=r[f];for(e in u)if(u.hasOwnProperty(e)&&!u[e])return!1}return!0}return this._coverage[n][t]===undefined||this._coverage[n][t][i]===undefined||this._coverage[n][t][i]===!0},_isCovered:function(n,t,i){return t===undefined||i===undefined?this._providesCoverage(n+1):this._providesCoverage(n+1,2*t,2*i)&&this._providesCoverage(n+1,2*t,2*i+1)&&this._providesCoverage(n+1,2*t+1,2*i)&&this._providesCoverage(n+1,2*t+1,2*i+1)},_setCoverage:function(n,t,i,r){if(!this._coverage[n]){Seadragon.Debug.error("Setting coverage for a tile before its level's coverage has been reset: "+n);return}this._coverage[n][t]||(this._coverage[n][t]={});this._coverage[n][t][i]=r},_resetCoverage:function(n){this._coverage[n]={}},_compareTiles:function(n,t){return n?t.visibility>n.visibility?t:t.visibility==n.visibility&&t.distance<n.distance?t:n:t},_getOverlayIndex:function(n){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].elmt==n)return t;return-1},_updateActual:function(){var t,d,g,i,r,l,nt,a,n,ft,u,h,tt;this._updateAgain=!1;for(var v=this._canvas,et=this._context,ri=this._container,ot=useCanvas,c=this._lastDrawn;c.length>0;)n=c.pop(),n.beingDrawn=!1;var st=this._viewport.getContainerSize(),ht=st.x,ct=st.y;v.innerHTML="";ot&&(v.width=ht,v.height=ct,et.clearRect(0,0,ht,ct));var lt=this._viewport.getBounds(!0),e=lt.getTopLeft(),o=lt.getBottomRight();if((this.config.wrapHorizontal||!(o.x<0||e.x>1))&&(this.config.wrapVertical||!(o.y<0||e.y>this._normHeight))){var ui=Math.abs,ki=Math.ceil,at=Math.floor,y=Math.log,it=Math.max,f=Math.min,fi=this.config.alwaysBlend,vt=1e3*this.config.blendTime,ei=this.config.immediateRender,rt=this.config.minZoomDimension,di=this.config.minImageRatio,yt=this.config.wrapHorizontal,pt=this.config.wrapVertical;yt||(e.x=it(e.x,0),o.x=f(o.x,1));pt||(e.y=it(e.y,0),o.y=f(o.y,this._normHeight));var p=null,w=!1,b=(new Date).getTime(),oi=this._viewport.pixelFromPoint(this._viewport.getCenter()),si=this._viewport.deltaPixelsFromPoints(this._source.getPixelRatio(0),!1).x,wt=ei?1:si;rt=rt||64;var k=it(this._minLevel,at(y(rt)/y(2))),hi=this._viewport.deltaPixelsFromPoints(this._source.getPixelRatio(0),!0).x,bt=f(this._maxLevel,at(y(hi/MIN_PIXEL_RATIO)/y(2)));for(k=f(k,bt),t=bt;t>=k;t--){if(d=!1,g=this._viewport.deltaPixelsFromPoints(this._source.getPixelRatio(t),!0).x,!w&&g>=MIN_PIXEL_RATIO||t==k)d=!0,w=!0;else if(!w)continue;this._resetCoverage(t);var ci=f(1,(g-.5)/.5),li=this._viewport.deltaPixelsFromPoints(this._source.getPixelRatio(t),!1).x,ai=wt/ui(wt-li),kt=this._source.getTileAtPoint(t,e),s=this._source.getTileAtPoint(t,o),dt=this._getNumTiles(t),gt=dt.x,ni=dt.y;for(yt||(s.x=f(s.x,gt-1)),pt||(s.y=f(s.y,ni-1)),i=kt.x;i<=s.x;i++)for(r=kt.y;r<=s.y;r++)if((n=this._getTile(t,i,r,b,gt,ni),l=d,this._setCoverage(t,i,r,!1),n.exists)&&(w&&!l&&(this._isCovered(t,i,r)?this._setCoverage(t,i,r,!0):l=!0),l)){var ti=n.bounds.getTopLeft(),ii=n.bounds.getSize(),vi=this._viewport.pixelFromPoint(ti,!0),ut=this._viewport.deltaPixelsFromPoints(ii,!0);this._tileOverlap||(ut=ut.plus(new Sys.Extended.UI.Seadragon.Point(1,1)));var yi=this._viewport.pixelFromPoint(ti,!1),pi=this._viewport.deltaPixelsFromPoints(ii,!1),wi=yi.plus(pi.divide(2)),bi=oi.distanceTo(wi);n.position=vi;n.size=ut;n.distance=bi;n.visibility=ai;n.loaded?(n.blendStart||(n.blendStart=b),nt=b-n.blendStart,a=f(1,nt/vt),fi&&(a*=ci),n.opacity=a,c.push(n),a==1?this._setCoverage(t,i,r,!0):nt<vt&&(updateAgain=!0)):n.Loading||(p=this._compareTiles(p,n))}if(this._providesCoverage(t))break}for(u=c.length-1;u>=0;u--)n=c[u],ot?n.drawCanvas(et):n.drawHTML(v),n.beingDrawn=!0;for(ft=this._overlays.length,u=0;u<ft;u++)h=this._overlays[u],tt=h.bounds,h.position=this._viewport.pixelFromPoint(tt.getTopLeft(),!0),h.size=this._viewport.deltaPixelsFromPoints(tt.getSize(),!0),h.drawHTML(ri);p&&(this._loadTile(p,b),this._updateAgain=!0)}},addOverlay:function(n,t,i){var n=Seadragon.Utils.getElement(n);this._getOverlayIndex(n)>=0||(this._overlays.push(new Sys.Extended.UI.Seadragon.Overlay(n,t,i)),this._updateAgain=!0)},updateOverlay:function(n,t,i){var n=Seadragon.Utils.getElement(n),r=this._getOverlayIndex(n);r>=0&&(this._overlays[r].update(t,i),this._updateAgain=!0)},removeOverlay:function(n){var n=Seadragon.Utils.getElement(n),t=this._getOverlayIndex(n);t>=0&&(this._overlays[t].destroy(),this._overlays.splice(t,1),this._updateAgain=!0)},clearOverlays:function(){while(this._overlays.length>0)this._overlays.pop().destroy(),this._updateAgain=!0},needsUpdate:function(){return this._updateAgain},numTilesLoaded:function(){return this._tilesLoaded.length},reset:function(){this._clearTiles();this._lastResetTime=(new Date).getTime();this._updateAgain=!0},update:function(){this._profiler.beginUpdate();this._midUpdate=!0;this._updateActual();this._midUpdate=!1;this._profiler.endUpdate()},idle:function(){}};Sys.Extended.UI.Seadragon.Drawer.registerClass("Sys.Extended.UI.Seadragon.Drawer",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.TileSource=function(n,t,i,r,u,f){this.aspectRatio=n/t;this.dimensions=new Sys.Extended.UI.Seadragon.Point(n,t);this.minLevel=u?u:0;this.maxLevel=f?f:Math.ceil(Math.log(Math.max(n,t))/Math.log(2));this.tileSize=i?i:0;this.tileOverlap=r?r:0};Sys.Extended.UI.Seadragon.TileSource.prototype={getLevelScale:function(n){return 1/(1<<this.maxLevel-n)},getNumTiles:function(n){var t=this.getLevelScale(n),i=Math.ceil(t*this.dimensions.x/this.tileSize),r=Math.ceil(t*this.dimensions.y/this.tileSize);return new Sys.Extended.UI.Seadragon.Point(i,r)},getPixelRatio:function(n){var t=this.dimensions.times(this.getLevelScale(n)),i=1/t.x,r=1/t.y;return new Sys.Extended.UI.Seadragon.Point(i,r)},getTileAtPoint:function(n,t){var i=t.times(this.dimensions.x).times(this.getLevelScale(n)),r=Math.floor(i.x/this.tileSize),u=Math.floor(i.y/this.tileSize);return new Sys.Extended.UI.Seadragon.Point(r,u)},getTileBounds:function(n,t,i){var u=this.dimensions.times(this.getLevelScale(n)),o=t===0?0:this.tileSize*t-this.tileOverlap,s=i===0?0:this.tileSize*i-this.tileOverlap,f=this.tileSize+(t===0?1:2)*this.tileOverlap,e=this.tileSize+(i===0?1:2)*this.tileOverlap,r;return f=Math.min(f,u.x-o),e=Math.min(e,u.y-s),r=1/u.x,new Sys.Extended.UI.Seadragon.Rect(o*r,s*r,f*r,e*r)},getTileUrl:function(){throw new Error("Method not implemented.");},tileExists:function(n,t,i){var r=this.getNumTiles(n);return n>=this.minLevel&&n<=this.maxLevel&&t>=0&&i>=0&&t<r.x&&i<r.y}};Sys.Extended.UI.Seadragon.TileSource.registerClass("Sys.Extended.UI.Seadragon.TileSource",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.DziError=function(n){Sys.Extended.UI.Seadragon.DziError.initializeBase(this,[n]);this.message=n};Sys.Extended.UI.Seadragon.DziError.registerClass("Sys.Extended.UI.Seadragon.DziError",Error);Sys.Extended.UI.Seadragon.DziTileSource=function(n,t,i,r,u,f,e){Sys.Extended.UI.Seadragon.DziTileSource.initializeBase(this,[n,t,i,r,null,null]);this._levelRects={};this.tilesUrl=u;this.fileFormat=f;this.displayRects=e;this._init()};Sys.Extended.UI.Seadragon.DziTileSource.prototype={_init:function(){var t,i,n;if(this.displayRects)for(t=this.displayRects.length-1;t>=0;t--)for(i=this.displayRects[t],n=i.minLevel;n<=i.maxLevel;n++)this._levelRects[n]||(this._levelRects[n]=[]),this._levelRects[n].push(i)},getTileUrl:function(n,t,i){return[this.tilesUrl,n,"/",t,"_",i,".",this.fileFormat].join("")},tileExists:function(n,t,i){var u=this._levelRects[n],f,r;if(!u||!u.length)return!0;for(f=u.length-1;f>=0;f--)if(r=u[f],!(n<r.minLevel)&&!(n>r.maxLevel)){var e=this.getLevelScale(n),o=r.x*e,s=r.y*e,h=o+r.width*e,c=s+r.height*e;if(o=Math.floor(o/this.tileSize),s=Math.floor(s/this.tileSize),h=Math.ceil(h/this.tileSize),c=Math.ceil(c/this.tileSize),o<=t&&t<h&&s<=i&&i<c)return!0}return!1}};Sys.Extended.UI.Seadragon.DziTileSource.registerClass("Sys.Extended.UI.Seadragon.DziTileSource",Sys.Extended.UI.Seadragon.TileSource);Sys.Extended.UI.Seadragon._DziTileSourceHelper=function(){};Sys.Extended.UI.Seadragon._DziTileSourceHelper.prototype={createFromXml:function(n,t,i){function f(n,t){try{return n(t,s)}catch(i){if(o)return r=this.getError(i).message,null;throw this.getError(i);}}var o=typeof i=="function",r=null,s,e;if(!n){if(this.error=Seadragon.Strings.getString("Errors.Empty"),o)return window.setTimeout(function(){i(null,r)},1),null;throw new Sys.Extended.UI.Seadragon.DziError(r);}var u=n.split("/"),h=u[u.length-1],c=h.lastIndexOf(".");return(c>-1&&(u[u.length-1]=h.slice(0,c)),s=u.join("/")+"_files/",o)?(t?(e=Function.createDelegate(this,this.processResponse),window.setTimeout(function(){var n=f(e,Seadragon.Utils.parseXml(t));i(n,r)},1)):(e=Function.createDelegate(this,this.processResponse),Seadragon.Utils.makeAjaxRequest(n,function(n){var t=f(e,n);i(t,r)})),null):t?f(Function.createDelegate(this,this.processXml),Seadragon.Utils.parseXml(t)):f(Function.createDelegate(this,this.processResponse),Seadragon.Utils.makeAjaxRequest(n))},processResponse:function(n,t){var r,u,i;if(n){if(n.status!==200&&n.status!==0){r=n.status;u=r==404?"Not Found":n.statusText;throw new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.Status",r,u));}}else throw new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.Security"));return i=null,n.responseXML&&n.responseXML.documentElement?i=n.responseXML:n.responseText&&(i=Seadragon.Utils.parseXml(n.responseText)),this.processXml(i,t)},processXml:function(n,t){var i,r,u;if(!n||!n.documentElement)throw new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.Xml"));if(i=n.documentElement,r=i.tagName,r=="Image")try{return this.processDzi(i,t)}catch(f){u=Seadragon.Strings.getString("Errors.Dzi");throw f instanceof Sys.Extended.UI.Seadragon.DziError?f:new Sys.Extended.UI.Seadragon.DziError(u);}else if(r=="Collection")throw new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.Dzc"));else if(r=="Error")return this.processError(i);throw new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.Dzi"));},processDzi:function(n,t){var u=n.getAttribute("Format"),r,f,i;if(!Seadragon.Utils.imageFormatSupported(u))throw new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.ImageFormat",u.toUpperCase()));var e=n.getElementsByTagName("Size")[0],o=n.getElementsByTagName("DisplayRect"),h=parseInt(e.getAttribute("Width"),10),c=parseInt(e.getAttribute("Height"),10),l=parseInt(n.getAttribute("TileSize")),a=parseInt(n.getAttribute("Overlap")),s=[];for(r=0;r<o.length;r++)f=o[r],i=f.getElementsByTagName("Rect")[0],s.push(new Seadragon.DisplayRect(parseInt(i.getAttribute("X"),10),parseInt(i.getAttribute("Y"),10),parseInt(i.getAttribute("Width"),10),parseInt(i.getAttribute("Height"),10),0,parseInt(f.getAttribute("MaxLevel"),10)));return new Sys.Extended.UI.Seadragon.DziTileSource(h,c,l,a,t,u,s)},processError:function(n){var t=n.getElementsByTagName("Message")[0],i=t.firstChild.nodeValue;throw new Sys.Extended.UI.Seadragon.DziError(i);},getError:function(n){n instanceof DziError||(Seadragon.Debug.error(n.name+" while creating DZI from XML: "+n.message),n=new Sys.Extended.UI.Seadragon.DziError(Seadragon.Strings.getString("Errors.Unknown")))}};Sys.Extended.UI.Seadragon.DziTileSourceHelper=new Sys.Extended.UI.Seadragon._DziTileSourceHelper;Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.Rect=function(n,t,i,r){this.x=typeof n=="number"?n:0;this.y=typeof t=="number"?t:0;this.width=typeof i=="number"?i:0;this.height=typeof r=="number"?r:0};Sys.Extended.UI.Seadragon.Rect.prototype={getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new Sys.Extended.UI.Seadragon.Point(this.x,this.y)},getBottomRight:function(){return new Sys.Extended.UI.Seadragon.Point(this.x+this.width,this.y+this.height)},getCenter:function(){return new Sys.Extended.UI.Seadragon.Point(this.x+this.width/2,this.y+this.height/2)},getSize:function(){return new Sys.Extended.UI.Seadragon.Point(this.width,this.height)},equals:function(n){return n instanceof Seadragon.Rect&&this.x===n.x&&this.y===n.y&&this.width===n.width&&this.height===n.height},toString:function(){return"["+this.x+","+this.y+","+this.width+"x"+this.height+"]"}};Sys.Extended.UI.Seadragon.Rect.registerClass("Sys.Extended.UI.Seadragon.Rect",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.Job=function(n,t){this._image=null;this._timeout=null;this._src=n;this._callback=t;this.TIMEOUT=5e3};Sys.Extended.UI.Seadragon.Job.prototype={_finish:function(n){this._image.onload=null;this._image.onabort=null;this._image.onerror=null;this._timeout&&window.clearTimeout(this._timeout);var t=this._image,i=this._callback;window.setTimeout(function(){i(this._src,n?t:null)},1)},_onloadHandler:function(){this._finish(!0)},_onerrorHandler:function(){this._finish(!1)},start:function(){this._image=new Image;this._image.onload=Function.createDelegate(this,this._onloadHandler);this._image.onabort=Function.createDelegate(this,this._onerrorHandler);this._image.onerror=Function.createDelegate(this,this._onerrorHandler);this._timeout=window.setTimeout(Function.createDelegate(this,this._onerrorHandler),this.TIMEOUT);this._image.src=this._src}};Sys.Extended.UI.Seadragon.Job.registerClass("Sys.Extended.UI.Seadragon.Job",null,Sys.IDisposable);Sys.Extended.UI.Seadragon.ImageLoader=function(n){this._downloading=0;this.imageLoaderLimit=n};Sys.Extended.UI.Seadragon.ImageLoader.prototype={_onComplete:function(n,t,i){if(this._downloading--,typeof n=="function")try{n(i)}catch(r){Seadragon.Debug.error(r.name+" while executing "+t+" callback: "+r.message,r)}},loadImage:function(n,t){if(this._downloading>=this.imageLoaderLimit)return!1;var i=Seadragon.Utils.createCallback(null,Function.createDelegate(this,this._onComplete),t),r=new Sys.Extended.UI.Seadragon.Job(n,i);return this._downloading++,r.start(),!0}};Sys.Extended.UI.Seadragon.ImageLoader.registerClass("Sys.Extended.UI.Seadragon.ImageLoader",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.Profiler=function(){this._midUpdate=!1;this._numUpdates=0;this._lastBeginTime=null;this._lastEndTime=null;this._minUpdateTime=Infinity;this._avgUpdateTime=0;this._maxUpdateTime=0;this._minIdleTime=Infinity;this._avgIdleTime=0;this._maxIdleTime=0};Sys.Extended.UI.Seadragon.Profiler.prototype={getAvgUpdateTime:function(){return this._avgUpdateTime},getMinUpdateTime:function(){return this._minUpdateTime},getMaxUpdateTime:function(){return this._maxUpdateTime},getAvgIdleTime:function(){return this._avgIdleTime},getMinIdleTime:function(){return this._minIdleTime},getMaxIdleTime:function(){return this._maxIdleTime},isMidUpdate:function(){return this._midUpdate},getNumUpdates:function(){return this._numUpdates},beginUpdate:function(){if(this._midUpdate&&this.endUpdate(),this._midUpdate=!0,this._lastBeginTime=(new Date).getTime(),!(this._numUpdates<1)){var n=this._lastBeginTime-this._lastEndTime;this._avgIdleTime=(this._avgIdleTime*(this._numUpdates-1)+n)/this._numUpdates;n<this._minIdleTime&&(this._minIdleTime=n);n>this._maxIdleTime&&(this._maxIdleTime=n)}},endUpdate:function(){if(this._midUpdate){this._lastEndTime=(new Date).getTime();this._midUpdate=!1;var n=this._lastEndTime-this._lastBeginTime;this._numUpdates++;this._avgUpdateTime=(this._avgUpdateTime*(this._numUpdates-1)+n)/this._numUpdates;n<this._minUpdateTime&&(this._minUpdateTime=n);n>this._maxUpdateTime&&(this._maxUpdateTime=n)}},clearProfile:function(){this._midUpdate=!1;this._numUpdates=0;this._lastBeginTime=null;this._lastEndTime=null;this._minUpdateTime=Infinity;this._avgUpdateTime=0;this._maxUpdateTime=0;this._minIdleTime=Infinity;this._avgIdleTime=0;this._maxIdleTime=0}};Sys.Extended.UI.Seadragon.Profiler.registerClass("Sys.Extended.UI.Seadragon.Profiler",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");Seadragon.Spring=Sys.Extended.UI.Seadragon.Spring=function(n,t){this._currentValue=typeof n=="number"?n:0;this._startValue=this._currentValue;this._targetValue=this._currentValue;this.config=t;this._currentTime=(new Date).getTime();this._startTime=this._currentTime;this._targetTime=this._currentTime};Sys.Extended.UI.Seadragon.Spring.prototype={_transform:function(n){var t=this.config.springStiffness;return(1-Math.exp(-n*t))/(1-Math.exp(-t))},getCurrent:function(){return this._currentValue},getTarget:function(){return this._targetValue},resetTo:function(n){this._targetValue=n;this._targetTime=this._currentTime;this._startValue=this._targetValue;this._startTime=this._targetTime},springTo:function(n){this._startValue=this._currentValue;this._startTime=this._currentTime;this._targetValue=n;this._targetTime=this._startTime+1e3*this.config.animationTime},shiftBy:function(n){this._startValue+=n;this._targetValue+=n},update:function(){this._currentTime=(new Date).getTime();this._currentValue=this._currentTime>=this._targetTime?this._targetValue:this._startValue+(this._targetValue-this._startValue)*this._transform((this._currentTime-this._startTime)/(this._targetTime-this._startTime))}};Sys.Extended.UI.Seadragon.Spring.registerClass("Sys.Extended.UI.Seadragon.Spring",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.Viewport=function(n,t,i){this.zoomPoint=null;this.config=i;this._containerSize=n;this._contentSize=t;this._contentAspect=t.x/t.y;this._contentHeight=t.y/t.x;this._centerSpringX=new Seadragon.Spring(0,this.config);this._centerSpringY=new Seadragon.Spring(0,this.config);this._zoomSpring=new Seadragon.Spring(1,this.config);this._homeBounds=new Sys.Extended.UI.Seadragon.Rect(0,0,1,this._contentHeight);this.goHome(!0);this.update()};Sys.Extended.UI.Seadragon.Viewport.prototype={_getHomeZoom:function(){var n=this._contentAspect/this.getAspectRatio();return n>=1?1:n},_getMinZoom:function(){var n=this._getHomeZoom(),t;return t=this.config.minZoomDimension?this._contentSize.x<=this._contentSize.y?this.config.minZoomDimension/this._containerSize.x:this.config.minZoomDimension/(this._containerSize.x*this._contentHeight):this.config.minZoomImageRatio*n,Math.min(t,n)},_getMaxZoom:function(){var n=this._contentSize.x*this.config.maxZoomPixelRatio/this._containerSize.x;return Math.max(n,this._getHomeZoom())},getAspectRatio:function(){return this._containerSize.x/this._containerSize.y},getContainerSize:function(){return new Sys.Extended.UI.Seadragon.Point(this._containerSize.x,this._containerSize.y)},getBounds:function(n){var i=this.getCenter(n),t=1/this.getZoom(n),r=t/this.getAspectRatio();return new Sys.Extended.UI.Seadragon.Rect(i.x-t/2,i.y-r/2,t,r)},getCenter:function(n){var t=new Sys.Extended.UI.Seadragon.Point(this._centerSpringX.getCurrent(),this._centerSpringY.getCurrent()),r=new Sys.Extended.UI.Seadragon.Point(this._centerSpringX.getTarget(),this._centerSpringY.getTarget());if(n)return t;if(!this.zoomPoint)return r;var o=this.pixelFromPoint(this.zoomPoint,!0),u=this.getZoom(),i=1/u,f=i/this.getAspectRatio(),e=new Sys.Extended.UI.Seadragon.Rect(t.x-i/2,t.y-f/2,i,f),s=this.zoomPoint.minus(e.getTopLeft()).times(this._containerSize.x/e.width),h=s.minus(o),c=h.divide(this._containerSize.x*u);return r.plus(c)},getZoom:function(n){return n?this._zoomSpring.getCurrent():this._zoomSpring.getTarget()},applyConstraints:function(n){var e=this.getZoom(),o=Math.max(Math.min(e,this._getMaxZoom()),this._getMinZoom()),i;e!=o&&this.zoomTo(o,this.zoomPoint,n);var t=this.getBounds(),s=this.config.visibilityRatio,r=s*t.width,u=s*t.height,h=t.x+t.width,c=1-t.x,l=t.y+t.height,a=this._contentHeight-t.y,f=0;this.config.wrapHorizontal||(h<r?f=r-h:c<r&&(f=c-r));i=0;this.config.wrapVertical||(l<u?i=u-l:a<u&&(i=a-u));(f||i)&&(t.x+=f,t.y+=i,this.fitBounds(t,n))},ensureVisible:function(n){this.applyConstraints(n)},fitBounds:function(n,t){var u=this.getAspectRatio(),f=n.getCenter(),i=new Sys.Extended.UI.Seadragon.Rect(n.x,n.y,n.width,n.height),e;i.getAspectRatio()>=u?(i.height=n.width/u,i.y=f.y-i.height/2):(i.width=n.height*u,i.x=f.x-i.width/2);this.panTo(this.getCenter(!0),!0);this.zoomTo(this.getZoom(!0),null,!0);var r=this.getBounds(),s=this.getZoom(),o=1/i.width;if(o==s||i.width==r.width){this.panTo(f,t);return}e=r.getTopLeft().times(this._containerSize.x/r.width).minus(i.getTopLeft().times(this._containerSize.x/i.width)).divide(this._containerSize.x/r.width-this._containerSize.x/i.width);this.zoomTo(o,e,t)},goHome:function(n){var t=this.getCenter();this.config.wrapHorizontal&&(t.x=(1+t.x%1)%1,this._centerSpringX.resetTo(t.x),this._centerSpringX.update());this.config.wrapVertical&&(t.y=(this._contentHeight+t.y%this._contentHeight)%this._contentHeight,this._centerSpringY.resetTo(t.y),this._centerSpringY.update());this.fitBounds(this._homeBounds,n)},panBy:function(n,t){var i=new Sys.Extended.UI.Seadragon.Point(this._centerSpringX.getTarget(),this._centerSpringY.getTarget());this.panTo(i.plus(n),t)},panTo:function(n,t){t?(this._centerSpringX.resetTo(n.x),this._centerSpringY.resetTo(n.y)):(this._centerSpringX.springTo(n.x),this._centerSpringY.springTo(n.y))},zoomBy:function(n,t,i){this.zoomTo(this._zoomSpring.getTarget()*n,t,i)},zoomTo:function(n,t,i){i?this._zoomSpring.resetTo(n):this._zoomSpring.springTo(n);this.zoomPoint=t instanceof Sys.Extended.UI.Seadragon.Point?t:null},resize:function(n,t){var r=this.getBounds(),i=r,u=n.x/this._containerSize.x;this._containerSize=new Sys.Extended.UI.Seadragon.Point(n.x,n.y);t&&(i.width=r.width*u,i.height=i.width/this.getAspectRatio());this.fitBounds(i,!0)},update:function(){var r=this._centerSpringX.getCurrent(),u=this._centerSpringY.getCurrent(),n=this._zoomSpring.getCurrent(),t;if(this.zoomPoint&&(t=this.pixelFromPoint(this.zoomPoint,!0)),this._zoomSpring.update(),this.zoomPoint&&this._zoomSpring.getCurrent()!=n){var f=this.pixelFromPoint(this.zoomPoint,!0),e=f.minus(t),i=this.deltaPointsFromPixels(e,!0);this._centerSpringX.shiftBy(i.x);this._centerSpringY.shiftBy(i.y)}else this.zoomPoint=null;return this._centerSpringX.update(),this._centerSpringY.update(),this._centerSpringX.getCurrent()!=r||this._centerSpringY.getCurrent()!=u||this._zoomSpring.getCurrent()!=n},deltaPixelsFromPoints:function(n,t){return n.times(this._containerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(n,t){return n.divide(this._containerSize.x*this.getZoom(t))},pixelFromPoint:function(n,t){var i=this.getBounds(t);return n.minus(i.getTopLeft()).times(this._containerSize.x/i.width)},pointFromPixel:function(n,t){var i=this.getBounds(t);return n.divide(this._containerSize.x/i.width).plus(i.getTopLeft())}};Sys.Extended.UI.Seadragon.Viewport.registerClass("Sys.Extended.UI.Seadragon.Viewport",null,Sys.IDisposable);Type.registerNamespace("Sys.Extended.UI.Seadragon");Sys.Extended.UI.Seadragon.DisplayRect=function(n,t,i,r,u,f){Sys.Extended.UI.Seadragon.DisplayRect.initializeBase(this,[n,t,i,r]);this.minLevel=u;this.maxLevel=f};Sys.Extended.UI.Seadragon.DisplayRect.registerClass("Sys.Extended.UI.Seadragon.DisplayRect",Sys.Extended.UI.Seadragon.Rect),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.SlideShowBehavior=function(n){Sys.Extended.UI.SlideShowBehavior.initializeBase(this,[n]);this._nextButtonID=null;this._previousButtonID=null;this._imageDescriptionLabelID=null;this._imageTitleLabelID=null;this._playButtonID=null;this._playButtonValue="||>";this._stopButtonValue="[]";this._slideShowServicePath=location.pathname;this._slideShowServiceMethod=null;this._contextKey=null;this._useContextKey=!1;this._playInterval=3e3;this._tickHandler=null;this._loop=!1;this._autoPlay=!1;this._slideShowAnimationType=Sys.Extended.UI.SlideShowAnimationType.None;this._imageHeight=300;this._imageWidth=400;this._inPlayMode=!1;this._elementImage=null;this._bNext=null;this._bPrevious=null;this._currentIndex=-1;this._currentValue=null;this._imageDescriptionLabel=null;this._imageTitleLabel=null;this._bPlay=null;this._slides=null;this._timer=null;this._currentImageElement=null;this._images=null;this._cachedImageIndex=-1;this._current=0;this._previousImage=null;this._currentImage=null;this._nextImage=null;this._isNext=!1;this._clickNextHandler=null;this._clickPreviousHandler=null;this._clickPlayHandler=null;this._tickHandler=null;this._imageLoadedHandler=null};Sys.Extended.UI.SlideShowBehavior.prototype={initialize:function(){var n,t;Sys.Extended.UI.SlideShowBehavior.callBaseMethod(this,"initialize");n=this.get_element();this._elementImage=n;this.supportsAnimation("transition")||(this._slideShowAnimationType=Sys.Extended.UI.SlideShowAnimationType.None);(this._slideShowAnimationType!=Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType!=Sys.Extended.UI.SlideShowAnimationType.SlideDown)&&(this._currentImageElement=document.createElement("IMG"),this._currentImageElement.style.display="none",document.body.appendChild(this._currentImageElement),t=document.createElement("DIV"),n.parentNode.insertBefore(t,n),n.parentNode.removeChild(n),t.appendChild(n),t.align="center",this._imageLoadedHandler=Function.createDelegate(this,this._onImageLoaded),$addHandler(this._currentImageElement,"load",this._imageLoadedHandler));this.controlsSetup();this._bNext&&(this._clickNextHandler=Function.createDelegate(this,this._onClickNext),$addHandler(this._bNext,"click",this._clickNextHandler));this._bPrevious&&(this._clickPreviousHandler=Function.createDelegate(this,this._onClickPrevious),$addHandler(this._bPrevious,"click",this._clickPreviousHandler));this._bPlay&&(this._clickPlayHandler=Function.createDelegate(this,this._onClickPlay),$addHandler(this._bPlay,"click",this._clickPlayHandler));this._slideShowInit()},dispose:function(){this._clickNextHandler&&($removeHandler(this._bNext,"click",this._clickNextHandler),this._clickNextHandler=null);this._clickPreviousHandler&&($removeHandler(this._bPrevious,"click",this._clickPreviousHandler),this._clickPreviousHandler=null);this._clickPlayHandler&&($removeHandler(this._bPlay,"click",this._clickPlayHandler),this._clickPlayHandler=null);this._imageLoadedHandler&&($removeHandler(this._currentImageElement,"load",this._imageLoadedHandler),this._imageLoadedHandler=null);this._timer&&(this._timer.dispose(),this._timer=null);Sys.Extended.UI.SlideShowBehavior.callBaseMethod(this,"dispose")},add_slideChanged:function(n){this.get_events().addHandler("slideChanged",n)},remove_slideChanged:function(n){this.get_events().removeHandler("slideChanged",n)},raiseSlideChanged:function(n){var t=this.get_events().getHandler("slideChanged");t&&(n||(n=Sys.EventArgs.Empty),t(this,n))},add_slideChanging:function(n){this.get_events().addHandler("slideChanging",n)},remove_slideChanging:function(n){this.get_events().removeHandler("slideChanging",n)},raiseSlideChanging:function(n,t){var r=this.get_events().getHandler("slideChanging"),i;return r?(i=new Sys.Extended.UI.SlideShowEventArgs(n,t,this._currentIndex),r(this,i),i.get_cancel()):!1},get_contextKey:function(){return this._contextKey},set_contextKey:function(n){this._contextKey!=n&&(this._contextKey=n,this.set_useContextKey(!0),this._elementImage&&this._slideShowInit(),this.raisePropertyChanged("contextKey"))},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(n){this._useContextKey!=n&&(this._useContextKey=n,this.raisePropertyChanged("useContextKey"))},get_imageWidth:function(){return this._imageWidth},set_imageWidth:function(n){this._imageWidth!=n&&(this._imageWidth=n,this.raisePropertyChanged("imageWidth"))},get_imageHeight:function(){return this._imageHeight},set_imageHeight:function(n){this._imageHeight!=n&&(this._imageHeight=n,this.raisePropertyChanged("imageHeight"))},controlsSetup:function(){this._previousButtonID&&(this._bPrevious=document.getElementById(this._previousButtonID));this._imageDescriptionLabelID&&(this._imageDescriptionLabel=document.getElementById(this._imageDescriptionLabelID));this._imageTitleLabelID&&(this._imageTitleLabel=document.getElementById(this._imageTitleLabelID));this._nextButtonID&&(this._bNext=document.getElementById(this._nextButtonID));this._playButtonID&&(this._bPlay=document.getElementById(this._playButtonID),this._bPlay.value=this._playButtonValue)},resetButtons:function(){this._loop?this._slides.length==0&&(this._bPrevious&&(this._bPrevious.disabled=!0),this._bNext&&(this._bNext.disabled=!0),this._bPlay&&(this._bPlay.disabled=!0)):(this._slides.length<=this._currentIndex+1?(this._bNext&&(this._bNext.disabled=!0),this._bPlay&&(this._bPlay.disabled=!0),this._bPrevious&&(this._bPrevious.disabled=!1),this._inPlayMode=!1,this._timer&&this._timer.set_enabled(!1),this._bPlay&&(this._bPlay.value=this._playButtonValue)):(this._bNext&&(this._bNext.disabled=!1),this._bPlay&&(this._bPlay.disabled=!1)),this._currentIndex<=0?this._bPrevious&&(this._bPrevious.disabled=!0):this._bPrevious&&(this._bPrevious.disabled=!1));this._inPlayMode&&(this._timer.set_enabled(!1),this._timer.set_enabled(!0))},resetSlideShowButtonState:function(){this._inPlayMode?this._bPlay&&(this._bPlay.value=this._stopButtonValue):(this.resetButtons(),this._bPlay&&(this._bPlay.value=this._playButtonValue))},setCurrentImage:function(){this._slides[this._currentIndex]?(this._currentImageElement.src=this._slides[this._currentIndex].ImagePath,this._slides[this._currentIndex].Url!=null?(this._currentImageElement.style.cursor="pointer",this._currentImageElement.onclick=function(){window.open(this._slides[this._currentIndex].Url)}):(this._currentImageElement.style.cursor="auto",this._currentImageElement.onclick=function(){})):this._currentImageElement.src="";Sys.Browser.agent==Sys.Browser.Opera&&this._onImageLoaded(!0)},updateImage:function(n){var t;if(n){if(this.raiseSlideChanging(this._currentValue,n))return;this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.FadeInOut?(this._elementImage.className="fadeIn",t=this,setTimeout(function(){t._elementImage.className="fadeOut";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.ScaleX?(this._elementImage.className="Animation scaleX",t=this,setTimeout(function(){t._elementImage.className="Animation";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.ScaleY?(this._elementImage.className="Animation scaleY",t=this,setTimeout(function(){t._elementImage.className="Animation";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.ZoomInOut?(this._elementImage.className="Animation zoomOut",t=this,setTimeout(function(){t._elementImage.className="Animation zoomIn";t.setImage(n)},1e3)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.Rotate?(this._elementImage.className="Animation rotate",t=this,setTimeout(function(){t._elementImage.className="Animation";t.setImage(n)},1e3)):this.setImage(n)}},setImage:function(n){this._currentValue=n;this._elementImage.src=n.ImagePath;this._elementImage.alt=n.Name;this._imageDescriptionLabel&&(this._imageDescriptionLabel.innerHTML=n.Description?n.Description:"");this._imageTitleLabel&&(this._imageTitleLabel.innerHTML=n.Name?n.Name:"");n.Url!=null?(this._elementImage.style.cursor="pointer",this._elementImage.onclick=function(){window.open(n.Url)}):(this._elementImage.style.cursor="auto",this._elementImage.onclick=function(){});this.raiseSlideChanged(n);this.resetButtons()},get_imageDescriptionLabelID:function(){return this._imageDescriptionLabelID},set_imageDescriptionLabelID:function(n){this._imageDescriptionLabelID!=n&&(this._imageDescriptionLabelID=n,this.raisePropertyChanged("imageDescriptionLabelID"))},get_imageTitleLabelID:function(){return this._imageTitleLabelID},set_imageTitleLabelID:function(n){this._imageTitleLabelID!=n&&(this._imageTitleLabelID=n,this.raisePropertyChanged("imageTitleLabelID"))},get_nextButtonID:function(){return this._nextButtonID},set_nextButtonID:function(n){this._nextButtonID!=n&&(this._nextButtonID=n,this.raisePropertyChanged("nextButtonID"))},get_playButtonID:function(){return this._playButtonID},set_playButtonID:function(n){this._playButtonID!=n&&(this._playButtonID=n,this.raisePropertyChanged("playButtonID"))},get_playButtonText:function(){return this._playButtonValue},set_playButtonText:function(n){this._playButtonValue!=n&&(this._playButtonValue=n,this.raisePropertyChanged("playButtonText"))},get_stopButtonText:function(){return this._stopButtonValue},set_stopButtonText:function(n){this._stopButtonValue!=n&&(this._stopButtonValue=n,this.raisePropertyChanged("stopButtonText"))},get_playInterval:function(){return this._playInterval},set_playInterval:function(n){this._playInterval!=n&&(this._playInterval=n,this.raisePropertyChanged("playInterval"))},get_previousButtonID:function(){return this._previousButtonID},set_previousButtonID:function(n){this._previousButtonID!=n&&(this._previousButtonID=n,this.raisePropertyChanged("previousButtonID"))},get_slideShowServicePath:function(){return this._slideShowServicePath},set_slideShowServicePath:function(n){this._slideShowServicePath!=n&&(this._slideShowServicePath=n,this.raisePropertyChanged("slideShowServicePath"))},get_slideShowServiceMethod:function(){return this._slideShowServiceMethod},set_slideShowServiceMethod:function(n){this._slideShowServiceMethod!=n&&(this._slideShowServiceMethod=n,this.raisePropertyChanged("slideShowServiceMethod"))},get_loop:function(){return this._loop},set_loop:function(n){this._loop!=n&&(this._loop=n,this.raisePropertyChanged("loop"))},get_autoPlay:function(){return this._autoPlay},set_autoPlay:function(n){this._autoPlay!=n&&(this._autoPlay=n,this.raisePropertyChanged("autoPlay"))},get_slideShowAnimationType:function(){return this._slideShowAnimationType},set_slideShowAnimationType:function(n){this._slideShowAnimationType!=n&&(this._slideShowAnimationType=n,this.raisePropertyChanged("slideShowAnimationType"))},_onClickNext:function(n){n.preventDefault();n.stopPropagation();this._clickNext()},_onImageLoaded:function(){this.updateImage(this._slides[this._currentIndex]);this.resetButtons();this._cacheImages()},_clickNext:function(){if(this._slides){if(this._currentIndex+1<this._slides.length)++this._currentIndex;else if(this._loop)this._currentIndex=0;else return!1;return this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown?(this._isNext=!0,this.setCurrentSlide()):this.setCurrentImage(),!0}return!1},_onClickPrevious:function(n){n.preventDefault();n.stopPropagation();this._clickPrevious()},_clickPrevious:function(){if(this._slides){if(this._currentIndex-1>=0)--this._currentIndex;else if(this._loop)this._currentIndex=this._slides.length-1;else return!1;return this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown?(this._isNext=!1,this.setCurrentSlide()):this.setCurrentImage(),!0}return!1},_onClickPlay:function(n){n.preventDefault();n.stopPropagation();this._play()},_play:function(){this._inPlayMode?(this._inPlayMode=!1,this._timer.set_enabled(!1),this.resetSlideShowButtonState(),(this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown)&&(this._bNext&&(this._bNext.disabled=!1),this._bPrevious&&(this._bPrevious.disabled=!1))):(this._inPlayMode=!0,this._timer||(this._timer=new Sys.Timer,this._timer.set_interval(this._playInterval),this._tickHandler=Function.createDelegate(this,this._onPlay),this._timer.add_tick(this._tickHandler)),(this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown)&&(this._bNext&&(this._bNext.disabled=!0),this._bPrevious&&(this._bPrevious.disabled=!0)),this.resetSlideShowButtonState(),this._timer.set_enabled(!0))},_onPlay:function(){if(this._slides){if(this._currentIndex+1<this._slides.length)return++this._currentIndex,this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown?(this._isNext=!0,this.setCurrentSlide()):this.setCurrentImage(),!0;if(this._loop)return this._currentIndex=0,this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight||this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown?(this._isNext=!0,this.setCurrentSlide()):this.setCurrentImage(),!0;this._inPlayMode=!1;this.resetSlideShowButtonState()}return!1},_slideShowInit:function(){this._currentIndex=-1;this._cachedImageIndex=-1;this._inPlayMode=!1;this._currentValue=null;this._images=null;var n=null;this._useContextKey&&(n={contextKey:this._contextKey});Sys.Net.WebServiceProxy.invoke(this._slideShowServicePath,this._slideShowServiceMethod,!1,n,Function.createDelegate(this,this._initSlides),null,null)},_initSlides:function(n){this._slides=n;this._slides&&(this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight?(this._createElementsForSlideRight(),this._setInitialState()):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown?(this._createElementsForSlideDown(),this._setInitialState()):(this._images=[],this._clickNext()),this._autoPlay&&(this._isNext=!0,this._play()))},_cacheImages:function(){var t,n;if(this._currentIndex%3==0)for(t=this._cachedImageIndex,n=this._cachedImageIndex+1;n<this._slides.length;n++)if(this._slides[n]&&(this._images[n]=new Image,this._images[n].src=this._slides[n].ImagePath,this._cachedImageIndex=n,t+4<=n))break},_createElementsForSlideRight:function(){var i=this.get_element(),r=document.createElement("DIV"),f,n,t,e,u;for(r.id=i.id+"_slider",r.className="container",r.style.width=this._imageWidth+"px",r.style.height=this._imageHeight+"px",i.parentNode.insertBefore(r,i),i.parentNode.removeChild(i),r.appendChild(i),r.align="center",f=document.createElement("DIV"),f.id=i.id+"_mask",f.style.width=this._imageWidth+"px",r.appendChild(f),this._images=[],n=0;n<this._slides.length;n++)t=document.createElement("DIV"),t.id=i.id+"_imageDiv"+n,t.style.position="absolute",t.style.top="0px",t.className="slideAnimation",f.appendChild(t),this._slides[n].Url!=null&&(e=document.createElement("A"),e.href=this._slides[n].Url,e.target="_blank",t.appendChild(e)),u=document.createElement("IMG"),u.style.width=this._imageWidth+"px",u.style.height=this._imageHeight+"px",u.src=this._slides[n].ImagePath,this._slides[n].Url!=null?e.appendChild(u):t.appendChild(u),this._images[n]=t},_createElementsForSlideDown:function(){var r=this.get_element(),t=document.createElement("DIV"),e,o,n,i,f,u;for(t.id=r.id+"_slider",t.className="container",t.style.width=this._imageWidth+"px",t.style.height=this._imageHeight+"px",r.parentNode.insertBefore(t,r),r.parentNode.removeChild(r),t.appendChild(r),t.align="center",e=document.createElement("DIV"),e.style.width=this._imageWidth+"px",t.appendChild(e),o=document.createElement("UL"),o.style.className="sliderUL",e.appendChild(o),this._images=[],n=0;n<this._slides.length;n++)i=document.createElement("LI"),i.id=r.id+"_imageDiv"+n,i.style.position="absolute",i.className="slideAnimation",o.appendChild(i),this._slides[n].Url!=null&&(f=document.createElement("A"),f.href=this._slides[n].Url,f.target="_blank",i.appendChild(f)),u=document.createElement("IMG"),u.style.width=this._imageWidth+"px",u.style.height=this._imageHeight+"px",u.src=this._slides[n].ImagePath,this._slides[n].Url!=null?f.appendChild(u):i.appendChild(u),this._images[n]=i},_setInitialState:function(){var n;if(this._currentIndex++,this._currentImage=this._images[this._currentIndex],this._nextImage=this._images.length>1?this._images[this._currentIndex+1]:this._images[this._currentIndex],this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight)for(this._currentImage.style.left="0px",n=1;n<this._images.length;n++)this._images[n].style.left="-"+(this._imageWidth+5)+"px";else for(this._currentImage.style.top="0px",n=0;n<this._images.length;n++)this._images[n].style.left="0px";this._previousImage=this._images[this._images.length-1];this._currentImage.style.width=this._imageWidth+"px";this._nextImage.style.width=this._imageWidth+"px";this._previousImage.style.width=this._imageWidth+"px";this._currentImage.style.height=this._imageHeight+"px";this._nextImage.style.height=this._imageHeight+"px";this._previousImage.style.height=this._imageHeight+"px";this._imageDescriptionLabel&&(this._imageDescriptionLabel.innerHTML=this._slides[this._currentIndex].Description?this._slides[this._currentIndex].Description:"");this._imageTitleLabel&&(this._imageTitleLabel.innerHTML=this._slides[this._currentIndex].Name?this._slides[this._currentIndex].Name:"")},setCurrentSlide:function(){var n;this._isNext?this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight?(this._nextImage=this._images[this._currentIndex],this._elementImage.alt=this._nextImage.Name,this._nextImage.className="",this._nextImage.style.left="-"+(this._imageWidth+5)+"px",n=this,setTimeout(function(){n._nextImage.className="slideAnimation";n._imageDescriptionLabel&&(n._imageDescriptionLabel.innerHTML=n._slides[n._currentIndex].Description?n._slides[n._currentIndex].Description:"");n._imageTitleLabel&&(n._imageTitleLabel.innerHTML=n._slides[n._currentIndex].Name?n._slides[n._currentIndex].Name:"");n._currentImage.style.left=n._imageWidth+"px";n._nextImage.style.left="0px"},200),setTimeout(function(){n._previousImage=n._currentImage;n._currentImage=n._nextImage;n._previousImage.className="";n._previousImage.style.left="-"+(n._imageWidth+5)+"px";setTimeout(function(){n._previousImage.className="slideAnimation";this._isNext=!1},1e3)},1200)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown&&(this._nextImage=this._images[this._currentIndex],this._nextImage.className="",this._nextImage.style.top="-"+(this._imageHeight+5)+"px",n=this,setTimeout(function(){n._nextImage.className="slideAnimation";n._imageDescriptionLabel&&(n._imageDescriptionLabel.innerHTML=n._slides[n._currentIndex].Description?n._slides[n._currentIndex].Description:"");n._imageTitleLabel&&(n._imageTitleLabel.innerHTML=n._slides[n._currentIndex].Name?n._slides[n._currentIndex].Name:"");n._currentImage.style.top=n._imageHeight+"px";n._nextImage.style.top="0px"},200),setTimeout(function(){n._previousImage=n._currentImage;n._currentImage=n._nextImage;n._previousImage.className="";n._previousImage.style.top="-"+(n._imageHeight+5)+"px";setTimeout(function(){n._previousImage.className="slideAnimation";this._isNext=!1},1e3)},1200)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideRight?(this._previousImage=this._images[this._currentIndex],this._previousImage.className="",this._previousImage.style.left=this._imageWidth+5+"px",n=this,setTimeout(function(){n._previousImage.className="slideAnimation";n._imageDescriptionLabel&&(n._imageDescriptionLabel.innerHTML=n._slides[n._currentIndex].Description?n._slides[n._currentIndex].Description:"");n._imageTitleLabel&&(n._imageTitleLabel.innerHTML=n._slides[n._currentIndex].Name?n._slides[n._currentIndex].Name:"");n._currentImage.style.left="-"+(n._imageWidth+5)+"px";n._previousImage.style.left="0px"},200),setTimeout(function(){n._nextImage=n._currentImage;n._currentImage=n._previousImage;n._nextImage.className="";n._nextImage.style.left=n._imageWidth+5+"px";setTimeout(function(){n._nextImage.className="slideAnimation";this._isNext=!1},1e3)},1200)):this._slideShowAnimationType==Sys.Extended.UI.SlideShowAnimationType.SlideDown&&(this._previousImage=this._images[this._currentIndex],this._previousImage.className="",this._previousImage.style.top=this._imageHeight+5+"px",n=this,setTimeout(function(){n._previousImage.className="slideAnimation";n._imageDescriptionLabel&&(n._imageDescriptionLabel.innerHTML=n._slides[n._currentIndex].Description?n._slides[n._currentIndex].Description:"");n._imageTitleLabel&&(n._imageTitleLabel.innerHTML=n._slides[n._currentIndex].Name?n._slides[n._currentIndex].Name:"");n._currentImage.style.top="-"+(n._imageHeight+5)+"px";n._previousImage.style.top="0px"},200),setTimeout(function(){n._nextImage=n._currentImage;n._currentImage=n._previousImage;n._nextImage.className="";n._nextImage.style.top=n._imageHeight+5+"px";setTimeout(function(){n._nextImage.className="slideAnimation";this._isNext=!1},1e3)},1200))},supportsAnimation:function(n){var t=!1,r="Webkit Moz ms O".split(" "),u=document.createElement("div"),f=null,i;if(n=n.toLowerCase(),u.style[n]&&(t=!0),t===!1)for(f=n.charAt(0).toUpperCase()+n.substr(1),i=0;i<r.length;i++)if(u.style[r[i]+f]!==undefined){t=!0;break}return t}};Sys.Extended.UI.SlideShowBehavior.registerClass("Sys.Extended.UI.SlideShowBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.SlideShowBehavior,{name:"slideShow"});Sys.Extended.UI.SlideShowEventArgs=function(n,t,i){Sys.Extended.UI.SlideShowEventArgs.initializeBase(this);this._previousSlide=n;this._nextSlide=t;this._slideIndex=i};Sys.Extended.UI.SlideShowEventArgs.prototype={get_previousSlide:function(){return this._previousSlide},get_nextSlide:function(){return this._nextSlide},get_slideIndex:function(){return this._slideIndex}};Sys.Extended.UI.SlideShowEventArgs.registerClass("Sys.Extended.UI.SlideShowEventArgs",Sys.CancelEventArgs);Sys.Extended.UI.SlideShowAnimationType=function(){throw Error.invalidOperation();};Sys.Extended.UI.SlideShowAnimationType.prototype={None:0,FadeInOut:1,ScaleX:2,ScaleY:3,ZoomInOut:4,Rotate:5,SlideRight:6,SlideDown:7};Sys.Extended.UI.SlideShowAnimationType.registerEnum("Sys.Extended.UI.SlideShowAnimationType",!1)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedSlideShow",["ExtendedBase","ExtendedCommon","ExtendedTimer","Network"],n):n()}(),function(n,t){$act.createWidget("tabContainer",{options:{activeTabIndex:0,useVerticalStripPlacement:!1,onDemand:!1,autoPostBackId:null,scrollBars:"None",tabStripPlacement:"Top"},_create:function(){var n=this,u=n.options,i=t(n.element),r=i.attr("id");n._header=t("#"+r+"_header");n._body=t("#"+r+"_body");n._tabs=[];n._cachedActiveTabIndex=u.activeTabIndex;n._created=!1;i.addClass("ajax__tab_container ajax__tab_default");n._body.children().each(function(t,i){n._tabs.push($act.common.activateWidget("tabPanel",i,{owner:n,tabIndex:t}))});n.option("activeTabIndex",n.options.activeTabIndex)},_events:["activeTabChanged"],_setOption:function(n,t){var i=this;i._created&&i.option(n)==t||(n=="activeTabIndex"&&(t=i._setActiveTabIndex(t)),i._superApply(arguments),i._saveClientState(),i._invalidate())},_saveClientState:function(){var n=this.options,t={ActiveTabIndex:n.activeTabIndex,TabEnabledState:[!0,!0,!0],TabWasLoadedOnceState:[!1,!1,!1]};this._clientStateElement.val(JSON.stringify(t))},show:function(){t(this.element).css({visibility:"visible"})},getFirstTab:function(n){for(var i=this._tabs,t=0;t<i.length;t++)if(n||i[t].options.enabled)return i[t];return null},getLastTab:function(n){for(var i=this._tabs,t=i.length-1;t>=0;t--)if(n||i[t].options.enabled)return i[t];return null},getNextTab:function(n){for(var t=this._tabs,f=this.options.activeTabIndex,u,i,r=1;r<t.length;r++)if(u=(f+r)%t.length,i=t[u],n||i.options.enabled)return i;return null},getPreviousTab:function(n){for(var t=this._tabs,f=this.options.activeTabIndex,u,i,r=1;r<t.length;r++)if(u=(t.length+(f-r))%t.length,i=t[u],n||i.options.enabled)return i;return null},getNearestTab:function(n){var t=this.getPreviousTab(n),i=this.getNextTab(n);return t&&t._tabIndex<this.options.activeTabIndex?t:i&&i._tabIndex>this.options.activeTabIndex?i:null},_invalidate:function(){var n=this,i="ajax__scroll_auto",r=n.options;switch(r.scrollBars){case"Horizontal":i="ajax__scroll_horizontal";break;case"Vertical":i="ajax__scroll_vertical";break;case"Both":i="ajax__scroll_both";break;case"None":i="ajax__scroll_none"}if(n._body.addClass(i),!n.hoop&&r.useVerticalStripPlacement){var u=n.element.attr("id"),f=n._header.outerHeight(),e=n._body.outerHeight();t("#"+u+"_headerSpannerHeight").height(e-f);n.hoop=!0}},_setActiveTabIndex:function(n){var t=this,i=t.options,r,u;if(n<-1)throw"invalid tab index";return n>=t._tabs.length&&(n=t._tabs.length-1),t._created&&n==i.activeTabIndex||(i.activeTabIndex!=-1&&t._tabs[i.activeTabIndex]._set_active(!1),i.activeTabIndex=n,r=t._tabs[i.activeTabIndex],i.activeTabIndex!=-1&&r._set_active(!0),i.onDemand&&(u=r.options.onDemandMode,u!="None"&&((u!="Once"||r.options.wasLoadedOnce)&&u!="Always"||setTimeout(function(){$act.common.doPostBack(r.options.updatePanelID);r.option("wasLoadedOnce",!0)},0))),t._created&&t.raiseActiveTabChanged(),t._created=!0),n},raiseActiveTabChanged:function(){var t=this,n=t.options;t._invokeHandler("activeTabChanged",t);n.autoPostBackId&&n.autoPostBack&&$act.common.doPostBack(n.autoPostBackId,"activeTabChanged:"+n.activeTabIndex)},set_activeTab:function(n){var i=t.inArray(n,this._tabs);if(i==-1)throw"can't find index of tab to activate";this.option("activeTabIndex",i)},get_activeTab:function(){return this._tabs[this.options.activeTabIndex]},get_tabs:function(){return this._tabs==null&&(this._tabs=[]),this._tabs}})}(window,actJQuery),function(n,t){$act.createWidget("tabPanel",t.Widget,{options:{enabled:!0,scrollBars:"None",dynamicServicePath:null,dynamicServiceMethod:null,dynamicContextKey:null,onDemandMode:"Always",updatePanelID:null,wasLoadedOnce:!1,owner:null},_events:["click","populating","populated"],_create:function(){var n=this,i=n.options,r=n.element.attr("id");n._active=!1;n._tab=t("#"+r+"_tab");n._header=t("#__tab_"+r);n._tabIndex=i.owner.get_tabs().length;i.enabled?n._addHandlersOnEnabled():n._makeEnabled(!1);i.onClientClick&&n.add_click(i.onClientClick)},_setOption:function(n,t){var i=this;switch(n){case"enabled":i._makeEnabled(t);break;case"disabled":i._makeEnabled(!t);break;case"headerText":i._header.text(t)}i._superApply(arguments)},_set_active:function(n){this._active=n;n?this._activate():this._deactivate()},_activate:function(){var n=this,u=n.options,i=u.owner,f,r;u.enabled?(f=t(n.element),f.css({visibility:"visible",display:""}),n._tab.addClass("ajax__tab_active"),n.populate(),n._header.focus()):n._active&&(r=i.getNearestTab(!1),!r||i.set_activeTab(r));i.show()},_deactivate:function(){var n=this,i=t(n.element);i.css({visibility:"hidden",display:"none"});n._tab.removeClass("ajax__tab_active")},_makeEnabled:function(n){var t=this,r=t.options.owner,i;n?(t._addHandlersOnEnabled(),t._header.removeClass("ajax__tab_disabled")):(t._removeHandlersOnEnabled(),t._active&&(i=r.getNearestTab(!1),!i||r.set_activeTab(i)),t._deactivate(),t._header.addClass("ajax__tab_disabled"))},_addHandlersOnEnabled:function(){var n=this;n._header.on("click",function(t){n._headerOnClick.call(n,t)}).on("mouseover",function(t){n._headerOnMouseOver.call(n,t)}).on("mouseout",function(t){n._headerOnMouseOut.call(n,t)}).on("keydown",function(t){n._headerOnKeyDown.call(n,t)})},_removeHandlersOnEnabled:function(){this._header.off("click").off("mouseover").off("mouseout").off("keydown").on("click",function(n){n.preventDefault()})},_headerOnClick:function(n){n.preventDefault();this.options.owner.set_activeTab(this);this.raiseClick(this);this._header.focus()},_headerOnMouseOver:function(){this._tab.addClass("ajax__tab_hover")},_headerOnMouseOut:function(){this._tab.removeClass("ajax__tab_hover")},_headerOnKeyDown:function(n){var s=this,i="which"in n?n.which:n.keyCode,t=s.options.owner,r=t.options.useVerticalStripPlacement,u,f,e,o;i=="39"&&!r||i=="40"&&r?(n.preventDefault(),u=t.getNextTab(!1),u&&t.set_activeTab(u)):i=="37"&&!r||i=="38"&&r?(n.preventDefault(),f=t.getPreviousTab(!1),f&&t.set_activeTab(f)):i=="35"?(n.preventDefault(),e=t.getLastTab(!1),e&&t.set_activeTab(e)):i=="36"&&(n.preventDefault(),o=t.getFirstTab(!1),o&&t.set_activeTab(o))},populate:function(n){var t=this,i=t.options;!t._dynamicPopulateBehavior&&i.dynamicServiceMethod&&(t._dynamicPopulateBehavior=$act.common.activateWidget("dynamicPopulateExtender",t.element,{id:t.element.attr("id")+"_DynamicPopulateBehavior",contextKey:i.dynamicContextKey,serviceMethod:i.dynamicServiceMethod,servicePath:i.dynamicServicePath}),t._dynamicPopulateBehavior.add_populating(function(){t.raisePopulating(this)}),t._dynamicPopulateBehavior.add_populated(function(){t.raisePopulated(this)}));t._dynamicPopulateBehavior&&t._dynamicPopulateBehavior.populate(n?n:i.dynamicContextKey)}},!0)}(window,actJQuery),function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.TextBoxWatermarkBehavior=function(n){Sys.Extended.UI.TextBoxWatermarkBehavior.initializeBase(this,[n]);this._watermarkText=null;this._watermarkCssClass=null;this._focusHandler=null;this._blurHandler=null;this._keyPressHandler=null;this._propertyChangedHandler=null;this._watermarkChangedHandler=null;this._oldClassName=null;this._clearedForSubmit=null;this._maxLength=null;typeof WebForm_OnSubmit!="function"||Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit||(Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit=WebForm_OnSubmit,WebForm_OnSubmit=Sys.Extended.UI.TextBoxWatermarkBehavior.WebForm_OnSubmit)};Sys.Extended.UI.TextBoxWatermarkBehavior.prototype={initialize:function(){var i,t;Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(this,"initialize");var n=this.get_element(),u=!1,r=Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(this,"get_ClientState");r!=null&&r!=""&&(u=r=="Focused",Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(this,"set_ClientState",null));this._oldClassName=n.className;this._focusHandler=Function.createDelegate(this,this._onFocus);this._blurHandler=Function.createDelegate(this,this._onBlur);this._keyPressHandler=Function.createDelegate(this,this._onKeyPress);$addHandler(n,"focus",this._focusHandler);$addHandler(n,"blur",this._blurHandler);$addHandler(n,"keypress",this._keyPressHandler);this.registerPropertyChanged();i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current();t=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());(""==i||this._watermarkText==i)&&(t.set_Watermark(this._watermarkText),t.set_IsWatermarked(!0));u?this._onFocus():(n.blur(),this._onBlur());this._clearedForSubmit=!1;this.registerPartialUpdateEvents();this._watermarkChangedHandler=Function.createDelegate(this,this._onWatermarkChanged);t.add_WatermarkChanged(this._watermarkChangedHandler)},dispose:function(){var n=this.get_element();this._watermarkChangedHandler&&(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).remove_WatermarkChanged(this._watermarkChangedHandler),this._watermarkChangedHandler=null);n.control&&this._propertyChangedHandler&&(n.control.remove_propertyChanged(this._propertyChangedHandler),this._propertyChangedHandler=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),this._focusHandler=null);this._blurHandler&&($removeHandler(n,"blur",this._blurHandler),this._blurHandler=null);this._keyPressHandler&&($removeHandler(n,"keypress",this._keyPressHandler),this._keyPressHandler=null);Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()&&this.clearText(!1);Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(this,"dispose")},_onWatermarkChanged:function(){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()?this._onBlur():this._onFocus()},clearText:function(n){var t=this.get_element(),i=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(t);i.set_Value("");i.set_IsWatermarked(!1);n&&(t.setAttribute("autocomplete","off"),t.select())},_onFocus:function(n){var t=this.get_element();Sys.Extended.UI.TextBoxWrapper.get_Wrapper(t).get_IsWatermarked()&&this.clearText(n?!0:!1);t.className=this._oldClassName;this._maxLength>0&&(this.get_element().maxLength=this._maxLength,this._maxLength=null)},_onBlur:function(){var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());(""==n.get_Current()||n.get_IsWatermarked())&&(this.get_element().maxLength>0&&this._watermarkText.length>this.get_element().maxLength&&(this._maxLength=this.get_element().maxLength,this.get_element().maxLength=this._watermarkText.length),this._applyWatermark())},_applyWatermark:function(){var n=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element());n.set_Watermark(this._watermarkText);n.set_IsWatermarked(!0);this._watermarkCssClass&&(this.get_element().className=this._watermarkCssClass)},_onKeyPress:function(){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).set_IsWatermarked(!1)},registerPropertyChanged:function(){var n=this.get_element();n.control&&!this._propertyChangedHandler&&(this._propertyChangedHandler=Function.createDelegate(this,this._onPropertyChanged),n.control.add_propertyChanged(this._propertyChangedHandler))},_onPropertyChanged:function(n,t){"text"==t.get_propertyName()&&this.set_Text(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current())},_onSubmit:function(){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()&&(this.clearText(!1),this._clearedForSubmit=!0)},_partialUpdateEndRequest:function(n,t){Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[n,t]);this.get_element()&&this._clearedForSubmit&&(this.get_element().blur(),this._onBlur(),this._clearedForSubmit=!1)},get_WatermarkText:function(){return this._watermarkText},set_WatermarkText:function(n){this._watermarkText!=n&&(this._watermarkText=n,Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()&&this._applyWatermark(),this.raisePropertyChanged("WatermarkText"))},get_WatermarkCssClass:function(){return this._watermarkCssClass},set_WatermarkCssClass:function(n){this._watermarkCssClass!=n&&(this._watermarkCssClass=n,Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()&&this._applyWatermark(),this.raisePropertyChanged("WatermarkCssClass"))},get_Text:function(){return Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value()},set_Text:function(n){""==n?(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).set_Current(""),this.get_element().blur(),this._onBlur()):(this._onFocus(),Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).set_Current(n))}};Sys.Extended.UI.TextBoxWatermarkBehavior.registerClass("Sys.Extended.UI.TextBoxWatermarkBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.TextBoxWatermarkBehavior,{name:"watermark",parameters:[{name:"WatermarkText",type:"String"},{name:"WatermarkCssClass",type:"String"}]});Sys.Extended.UI.TextBoxWatermarkBehavior.WebForm_OnSubmit=function(){var r=Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit(),t,n,i;if(r)for(t=Sys.Application.getComponents(),n=0;n<t.length;n++)i=t[n],Sys.Extended.UI.TextBoxWatermarkBehavior.isInstanceOfType(i)&&i._onSubmit();return r}}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedWatermark",["ExtendedBase","ExtendedCommon"],n):n()}(),function(n,t){$act.createWidget("toggleButtonExtender",{idDecoration:"_ToggleButton",_create:function(){var i=this,r=i.element[0],f=r.id+this.idDecoration,e=t("<div/>").insertBefore(r).css({position:"relative"}),u=i.options;i._decoyElement=t("<a/>").appendTo(e).attr({id:f,href:""}).css({position:"absolute",left:"0px",top:"0px",width:u.imageWidth+"px",height:u.imageHeight+"px","font-size":u.imageHeight+"px","background-repeat":"no-repeat"});t(r).css({visibility:"hidden"});i.onClick();t(r).change(function(){i.onClick()});t(this._decoyElement).click(function(n){n.preventDefault();t(r).click()}).hover(function(){i._onDecoyElementMouseOver()},function(){i._onDecoyElementMouseOut()});n.$act.browser.agent===n.$act.browser.InternetExplorer&&e.parent().find("label").each(function(){r.id==t(this).prop("htmlFor")&&t(this).prop("htmlFor",f)})},onClick:function(){var t=this,i=t.element[0],n=t.options;i&&(i.checked?(t._decoyElement.css("background-image","url("+(i.disabled?n.disabledCheckedImageUrl:n.checkedImageUrl)+")"),n.checkedImageAlternateText&&t._decoyElement.prop("title",n.checkedImageAlternateText)):(t._decoyElement.css("background-image","url("+(i.disabled?n.disabledUncheckedImageUrl:n.uncheckedImageUrl)+")"),n.uncheckedImageAlternateText&&t._decoyElement.prop("title",n.uncheckedImageAlternateText)))},_onDecoyElementClick:function(n){return this.element.click(),n.preventDefault(),!1},_onDecoyElementMouseOver:function(){var t=this,i=t.element[0],n=t.options;i&&!i.disabled&&(i.checked&&n.checkedImageOverUrl?(t._decoyElement.css("background-image","url("+n.checkedImageOverUrl+")"),n.checkedImageOverAlternateText&&t._decoyElement.prop("title",n.checkedImageOverAlternateText)):!i.checked&&n.uncheckedImageOverUrl&&(t._decoyElement.css("background-image","url("+n.uncheckedImageOverUrl+")"),n.uncheckedImageOverAlternateText&&t._decoyElement.prop("title",n.uncheckedImageOverAlternateText)))},_onDecoyElementMouseOut:function(){this.onClick()}})}(window,actJQuery);Type.registerNamespace("Sys.Extended.UI.Animation");Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior=function(n){Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior.initializeBase(this,[n]);this._onUpdating=new Sys.Extended.UI.Animation.GenericAnimationBehavior(n);this._onUpdated=new Sys.Extended.UI.Animation.GenericAnimationBehavior(n);this._postBackPending=null;this._pageLoadedHandler=null;this._AlwaysFinishOnUpdatingAnimation=null};Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior.prototype={initialize:function(){Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior.callBaseMethod(this,"initialize");var t=this.get_element(),n=document.createElement(t.tagName);t.parentNode.insertBefore(n,t);n.appendChild(t);Array.remove(t._behaviors,this);Array.remove(t._behaviors,this._onUpdating);Array.remove(t._behaviors,this._onUpdated);n._behaviors?(Array.add(n._behaviors,this),Array.add(n._behaviors,this._onUpdating),Array.add(n._behaviors,this._onUpdated)):n._behaviors=[this,this._onUpdating,this._onUpdated];this._element=this._onUpdating._element=this._onUpdated._element=n;this._onUpdating.initialize();this._onUpdated.initialize();this.registerPartialUpdateEvents();this._pageLoadedHandler=Function.createDelegate(this,this._pageLoaded);this._pageRequestManager.add_pageLoaded(this._pageLoadedHandler)},dispose:function(){this._pageRequestManager&&this._pageLoadedHandler&&(this._pageRequestManager.remove_pageLoaded(this._pageLoadedHandler),this._pageLoadedHandler=null);Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior.callBaseMethod(this,"dispose")},_partialUpdateBeginRequest:function(n,t){Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior.callBaseMethod(this,"_partialUpdateBeginRequest",[n,t]);this._postBackPending||(this._postBackPending=!0,this._onUpdated.quit(),this._onUpdating.play())},_pageLoaded:function(n,t){var u,r,i;if(this._postBackPending)for(this._postBackPending=!1,u=this.get_element(),r=t.get_panelsUpdated(),i=0;i<r.length;i++)if(r[i].parentNode==u){this._AlwaysFinishOnUpdatingAnimation?this._tryAndStopOnUpdating():(this._onUpdating.quit(),this._onUpdated.play());break}},_tryAndStopOnUpdating:function(){if(this._onUpdating.get_animation().get_isPlaying()){var n=this;window.setTimeout(function(){n._tryAndStopOnUpdating.apply(n)},200)}else this._onUpdating.quit(),this._onUpdated.play()},get_OnUpdating:function(){return this._onUpdating.get_json()},set_OnUpdating:function(n){this._onUpdating.set_json(n);this.raisePropertyChanged("OnUpdating")},get_OnUpdatingBehavior:function(){return this._onUpdating},get_OnUpdated:function(){return this._onUpdated.get_json()},set_OnUpdated:function(n){this._onUpdated.set_json(n);this.raisePropertyChanged("OnUpdated")},get_OnUpdatedBehavior:function(){return this._onUpdated},get_AlwaysFinishOnUpdatingAnimation:function(){return this._AlwaysFinishOnUpdatingAnimation},set_AlwaysFinishOnUpdatingAnimation:function(n){this._AlwaysFinishOnUpdatingAnimation!=n&&(this._AlwaysFinishOnUpdatingAnimation=n,this.raisePropertyChanged("AlwaysFinishOnUpdatingAnimation"))}};Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior.registerClass("Sys.Extended.UI.Animation.UpdatePanelAnimationBehavior",Sys.Extended.UI.BehaviorBase);Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ValidatorCalloutBehavior=function(n){Sys.Extended.UI.ValidatorCalloutBehavior.initializeBase(this,[n]);this._warningIconImageUrl=null;this._closeImageUrl=null;this._cssClass="ajax__validatorcallout";this._highlightCssClass=null;this._popupPosition=Sys.Extended.UI.ValidatorCalloutPosition.Right;this._width="200px";this._invalid=!1;this._originalValidationMethod=null;this._validationMethodOverride=null;this._elementToValidate=null;this._popupTable=null;this._errorMessageCell=null;this._calloutArrowCell=null;this._warningIconImage=null;this._closeImage=null;this._closeCellInnerDiv=null;this._popupBehavior=null;this._onShowJson=null;this._onHideJson=null;this._focusAttached=!1;this._isBuilt=!1;this._focusHandler=Function.createDelegate(this,this._onfocus);this._closeClickHandler=Function.createDelegate(this,this._oncloseClick)};Sys.Extended.UI.ValidatorCalloutBehavior.prototype={initialize:function(){var n,t;Sys.Extended.UI.ValidatorCalloutBehavior.callBaseMethod(this,"initialize");n=this.get_element();n.evaluationfunction&&(this._originalValidationMethod=Function.createDelegate(n,n.evaluationfunction),this._validationMethodOverride=Function.createDelegate(this,this._onvalidate),n.evaluationfunction=this._validationMethodOverride);t=this.get_ClientState();null!=t&&""!==t&&(this._ensureCallout(),this._highlightCssClass&&Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass),this.show())},_ensureCallout:function(){var c,r,u,t,i;if(!this._isBuilt){var b=this.get_element(),g=this._elementToValidate=$get(b.controltovalidate),v=document.createElement("tbody"),n=document.createElement("tr"),a=document.createElement("td"),l=document.createElement("table"),k=document.createElement("tbody"),y=document.createElement("tr"),e=document.createElement("td"),o=document.createElement("td"),p=this._closeCellInnerDiv=document.createElement("div"),f=this._popupTable=document.createElement("table"),s=this._calloutArrowCell=document.createElement("td"),w=this._warningIconImage=document.createElement("img"),d=this._closeImage=document.createElement("img"),h=this._errorMessageCell=document.createElement("td");if(f.id=this.get_id()+"_popupTable",f.cellPadding=0,f.cellSpacing=0,f.border=0,f.width=this.get_width(),f.className=this._cssClass+" ajax__validatorcallout_popup_table",n.className="ajax__validatorcallout_popup_table_row",a.className="ajax__validatorcallout_callout_cell",l.cellPadding=0,l.cellSpacing=0,l.border=0,l.className="ajax__validatorcallout_callout_table",y.className="ajax__validatorcallout_callout_table_row",s.className=this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomLeft?"ajax__validatorcallout_callout_arrow_cell_bottomleftpos":this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomRight?"ajax__validatorcallout_callout_arrow_cell_bottomrightpos":this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopLeft?"ajax__validatorcallout_callout_arrow_cell_topleftpos":this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopRight?"ajax__validatorcallout_callout_arrow_cell_toprightpos":this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.Left?"ajax__validatorcallout_callout_arrow_cell_leftpos":"ajax__validatorcallout_callout_arrow_cell",e.className="ajax__validatorcallout_icon_cell",w.border=0,w.src=this.get_warningIconImageUrl(),h.className="ajax__validatorcallout_error_message_cell",h.innerHTML=this._getErrorMessage(),o.className="ajax__validatorcallout_close_button_cell",p.className="ajax__validatorcallout_innerdiv",d.src=this.get_closeImageUrl(),b.parentNode.appendChild(f),f.appendChild(v),v.appendChild(n),n.appendChild(a),a.appendChild(l),l.appendChild(k),k.appendChild(y),y.appendChild(s),n.appendChild(e),e.appendChild(w),n.appendChild(h),n.appendChild(o),p.appendChild(d),o.appendChild(p),this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomLeft||this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomRight?(c=document.createElement("tr"),v.insertBefore(c,n),s.colSpan=2,c.appendChild(s),n.appendChild(e),n.appendChild(h),n.appendChild(o)):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopLeft||this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopRight?(c=document.createElement("tr"),v.appendChild(c),s.colSpan=2,c.appendChild(s),n.appendChild(e),n.appendChild(h),n.appendChild(o)):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.Left?(n.appendChild(e),n.appendChild(h),n.appendChild(o),n.appendChild(a)):(n.appendChild(a),n.appendChild(e),n.appendChild(h),n.appendChild(o)),r=document.createElement("div"),r.className="ajax__validatorcallout_innerdiv",s.appendChild(r),this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomLeft||this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomRight)for(u=document.createElement("div"),u.style.width="1px",u.className="arrowpixel",r.appendChild(u),t=1;t<22;t+=2)i=document.createElement("div"),i.style.width=t.toString()+"px",r.appendChild(i);else if(this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopLeft||this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopRight){for(t=23;t>0;t-=2)i=document.createElement("div"),i.style.width=t.toString()+"px",r.appendChild(i);u=document.createElement("div");u.style.width="1px";u.className="arrowpixel";r.appendChild(u)}else for(t=14;t>0;t--)i=document.createElement("div"),i.style.width=t.toString()+"px",r.appendChild(i);this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{parentElement:g},{},null,this._popupTable);this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopLeft?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopLeft):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.TopRight?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopRight):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomLeft?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomLeft):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.BottomRight?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomRight):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.Right?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Right):this._popupPosition==Sys.Extended.UI.ValidatorCalloutPosition.Left?this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Left):this._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Right);this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson);$addHandler(this._closeCellInnerDiv,"click",this._closeClickHandler);this._isBuilt=!0}},dispose:function(){this._isBuilt&&(this.hide(),this._focusAttached&&($removeHandler(this._elementToValidate,"focus",this._focusHandler),this._focusAttached=!1),$removeHandler(this._closeCellInnerDiv,"click",this._closeClickHandler),this._onShowJson=null,this._onHideJson=null,this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null),this._closeBehavior&&(this._closeBehavior.dispose(),this._closeBehavior=null),this._popupTable&&(this._popupTable.parentNode.removeChild(this._popupTable),this._popupTable=null,this._errorMessageCell=null,this._elementToValidate=null,this._calloutArrowCell=null,this._warningIconImage=null,this._closeImage=null,this._closeCellInnerDiv=null),this._isBuilt=!1);Sys.Extended.UI.ValidatorCalloutBehavior.callBaseMethod(this,"dispose")},_getErrorMessage:function(){return this.get_element().errormessage||Sys.Extended.UI.Resources.ValidatorCallout_DefaultErrorMessage},show:function(n){if(n||!this.get_isOpen()){if(n&&Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout&&Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout.hide(),Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout!=null)return;Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout=this;this._errorMessageCell.innerHTML=this._getErrorMessage();this._popupBehavior.show()}},hide:function(){Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout==this&&(Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout=null);this.get_isOpen()&&this._popupBehavior.hide()},_onfocus:function(){return this._originalValidationMethod(this.get_element())?(this.hide(),!0):(this._ensureCallout(),this._highlightCssClass&&Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass),this.show(!0),!1)},_oncloseClick:function(){this.hide()},_onvalidate:function(n){return this._originalValidationMethod(n)?(this._highlightCssClass&&this._invalid&&Sys.UI.DomElement.removeCssClass(this._elementToValidate,this._highlightCssClass),this._invalid=!1,this.hide(),!0):(this._ensureCallout(),this._highlightCssClass&&Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass),this._focusAttached||($addHandler(this._elementToValidate,"focus",this._focusHandler),this._focusAttached=!0),this.show(!1),this._invalid=!0,!1)},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_warningIconImageUrl:function(){return this._warningIconImageUrl},set_warningIconImageUrl:function(n){this._warningIconImageUrl!=n&&(this._warningIconImageUrl=n,this.get_isInitialized()&&(this._warningIconImage.src=n),this.raisePropertyChanged("warningIconImageUrl"))},get_closeImageUrl:function(){return this._closeImageUrl},set_closeImageUrl:function(n){this._closeImageUrl!=n&&(this._closeImageUrl=n,this.get_isInitialized()&&(this._closeImage.src=n),this.raisePropertyChanged("closeImageUrl"))},get_width:function(){return this._width},set_width:function(n){this._width!=n&&(this._width=n,this.get_isInitialized()&&(this._popupTable.style.width=_width),this.raisePropertyChanged("width"))},get_popupPosition:function(){return this._popupPosition},set_popupPosition:function(n){this._popupPosition!=n&&(this._popupPosition=n,this.raisePropertyChanged("popupPosition"))},get_cssClass:function(){return this._cssClass},set_cssClass:function(n){this._cssClass!=n&&(this._cssClass=n,this.raisePropertyChanged("cssClass"))},get_highlightCssClass:function(){return this._highlightCssClass},set_highlightCssClass:function(n){this._highlightCssClass!=n&&(this._highlightCssClass=n,this.raisePropertyChanged("highlightCssClass"))},get_isOpen:function(){return $common.getVisible(this._popupTable)}};Sys.Extended.UI.ValidatorCalloutBehavior.registerClass("Sys.Extended.UI.ValidatorCalloutBehavior",Sys.Extended.UI.BehaviorBase);Sys.Extended.UI.ValidatorCalloutPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.ValidatorCalloutPosition.prototype={Right:0,Left:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5};Sys.Extended.UI.ValidatorCalloutPosition.registerEnum("Sys.Extended.UI.ValidatorCalloutPosition") if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();