//START HTMLEditor.Enums.js
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(a){if(a>=0&&a<=2)return true;return false};Sys.Extended.UI.HTMLEditor.ActiveModeType.registerEnum("Sys.Extended.UI.HTMLEditor.ActiveModeType",true);
//END HTMLEditor.Enums.js
//START Common.Common.js
(function(){var scriptName="ExtendedCommon";function execute(){var u="WatermarkChanged",t="HTML",s="BODY",r="hiddenInputToUpdateATBuffer_CommonToolkitScripts",q="HTMLEvents",d="mousemove",b="MouseEvents",a="UIEvents",c="display",p="DXImageTransform.Microsoft.Alpha",j="value",o="absolute",n="hidden",e="none",k="px",i="element",m="undefined",l=null,h=false,g="Sys.Extended.UI.BoxSide",f=true,version=Sys.version;if(!version&&!Sys._versionChecked){Sys._versionChecked=f;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 AjaxScriptManager in System.Web.Ajax.dll, or use 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(g,h);Sys.Extended.UI._CommonToolkitScripts=function(){};Sys.Extended.UI._CommonToolkitScripts.prototype={_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],getCurrentStyle:function(b,c,d){var a=l;if(b){if(b.currentStyle)a=b.currentStyle[c];else if(document.defaultView&&document.defaultView.getComputedStyle){var e=document.defaultView.getComputedStyle(b,l);if(e)a=e[c]}if(!a&&b.style.getPropertyValue)a=b.style.getPropertyValue(c);else if(!a&&b.style.getAttribute)a=b.style.getAttribute(c)}if(!a||a==""||typeof a===m)if(typeof d!=m)a=d;else a=l;return a},getInheritedBackgroundColor:function(d){var c="backgroundColor",a="#FFFFFF";if(!d)return a;var b=this.getCurrentStyle(d,c);try{while(!b||b==""||b=="transparent"||b=="rgba(0, 0, 0, 0)"){d=d.parentNode;if(!d)b=a;else b=this.getCurrentStyle(d,c)}}catch(e){b=a}return b},getLocation:function(a){return Sys.UI.DomElement.getLocation(a)},setLocation:function(b,a){Sys.UI.DomElement.setLocation(b,a.x,a.y)},getContentSize:function(a){if(!a)throw Error.argumentNull(i);var d=this.getSize(a),c=this.getBorderBox(a),b=this.getPaddingBox(a);return {width:d.width-c.horizontal-b.horizontal,height:d.height-c.vertical-b.vertical}},getSize:function(a){if(!a)throw Error.argumentNull(i);return {width:a.offsetWidth,height:a.offsetHeight}},setContentSize:function(a,c){var b="border-box",d=this;if(!a)throw Error.argumentNull(i);if(!c)throw Error.argumentNull("size");if(d.getCurrentStyle(a,"MozBoxSizing")==b||d.getCurrentStyle(a,"BoxSizing")==b){var f=d.getBorderBox(a),e=d.getPaddingBox(a);c={width:c.width+f.horizontal+e.horizontal,height:c.height+f.vertical+e.vertical}}a.style.width=c.width.toString()+k;a.style.height=c.height.toString()+k},setSize:function(a,b){if(!a)throw Error.argumentNull(i);if(!b)throw Error.argumentNull("size");var d=this.getBorderBox(a),c=this.getPaddingBox(a),e={width:b.width-d.horizontal-c.horizontal,height:b.height-d.vertical-c.vertical};this.setContentSize(a,e)},getBounds:function(a){return Sys.UI.DomElement.getBounds(a)},setBounds:function(a,b){if(!a)throw Error.argumentNull(i);if(!b)throw Error.argumentNull("bounds");this.setSize(a,b);$common.setLocation(a,b)},getClientBounds:function(){var b,a;if(document.compatMode=="CSS1Compat"){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{b=document.body.clientWidth;a=document.body.clientHeight}return new Sys.UI.Bounds(0,0,b,a)},getMarginBox:function(b){var c=this;if(!b)throw Error.argumentNull(i);var a={top:c.getMargin(b,Sys.Extended.UI.BoxSide.Top),right:c.getMargin(b,Sys.Extended.UI.BoxSide.Right),bottom:c.getMargin(b,Sys.Extended.UI.BoxSide.Bottom),left:c.getMargin(b,Sys.Extended.UI.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},getBorderBox:function(b){var c=this;if(!b)throw Error.argumentNull(i);var a={top:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Top),right:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Right),bottom:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Bottom),left:c.getBorderWidth(b,Sys.Extended.UI.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},getPaddingBox:function(b){var c=this;if(!b)throw Error.argumentNull(i);var a={top:c.getPadding(b,Sys.Extended.UI.BoxSide.Top),right:c.getPadding(b,Sys.Extended.UI.BoxSide.Right),bottom:c.getPadding(b,Sys.Extended.UI.BoxSide.Bottom),left:c.getPadding(b,Sys.Extended.UI.BoxSide.Left)};a.horizontal=a.left+a.right;a.vertical=a.top+a.bottom;return a},isBorderVisible:function(b,a){if(!b)throw Error.argumentNull(i);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,g));var d=this._borderStyleNames[a],c=this.getCurrentStyle(b,d);return c!=e},getMargin:function(b,a){if(!b)throw Error.argumentNull(i);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,g));var d=this._marginWidthNames[a],c=this.getCurrentStyle(b,d);try{return this.parsePadding(c)}catch(e){return 0}},getBorderWidth:function(c,a){var b=this;if(!c)throw Error.argumentNull(i);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,g));if(!b.isBorderVisible(c,a))return 0;var e=b._borderWidthNames[a],d=b.getCurrentStyle(c,e);return b.parseBorderWidth(d)},getPadding:function(b,a){if(!b)throw Error.argumentNull(i);if(a<Sys.Extended.UI.BoxSide.Top||a>Sys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,g));var d=this._paddingWidthNames[a],c=this.getCurrentStyle(b,d);return this.parsePadding(c)},parseBorderWidth:function(g){var d="thick",c="medium",b="thin",h=this;if(!h._borderThicknesses){var f={},a=document.createElement("div");a.style.visibility=n;a.style.position=o;a.style.fontSize="1px";document.body.appendChild(a);var e=document.createElement("div");e.style.height="0px";e.style.overflow=n;a.appendChild(e);var i=a.offsetHeight;e.style.borderTop="solid black";e.style.borderTopWidth=b;f[b]=a.offsetHeight-i;e.style.borderTopWidth=c;f[c]=a.offsetHeight-i;e.style.borderTopWidth=d;f[d]=a.offsetHeight-i;a.removeChild(e);document.body.removeChild(a);h._borderThicknesses=f}if(g){switch(g){case b:case c:case d:return h._borderThicknesses[g];case "inherit":return 0}var j=h.parseUnit(g);Sys.Debug.assert(j.type==k,String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit,j.type));return j.size}return 0},parsePadding:function(a){if(a){if(a=="inherit")return 0;var b=this.parseUnit(a);b.type!==k&&Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit,b.type));return b.size}return 0},parseUnit:function(a){if(!a)throw Error.argumentNull(j);a=a.trim().toLowerCase();for(var g=a.length,c=-1,f=0;f<g;f++){var b=a.substr(f,1);if((b<"0"||b>"9")&&b!="-"&&b!="."&&b!=",")break;c=f}if(c==-1)throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits);var e,d;if(c<g-1)e=a.substring(c+1).trim();else e=k;d=parseFloat(a.substr(0,c+1));if(e==k)d=Math.floor(d);return {size:d,type:e}},getElementOpacity:function(a){if(!a)throw Error.argumentNull(i);var b=h,c;if(a.filters){var e=a.filters;if(e.length!==0){var d=e[p];if(d){c=d.opacity/100;b=f}}}else{c=this.getCurrentStyle(a,"opacity",1);b=f}if(b===h)return 1;return parseFloat(c)},setElementOpacity:function(a,b){if(!a)throw Error.argumentNull(i);if(a.filters){var e=a.filters,c=f;if(e.length!==0){var d=e[p];if(d){c=h;d.opacity=b*100}}if(c)a.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+b*100+")"}else a.style.opacity=b},getVisible:function(a){return a&&e!=$common.getCurrentStyle(a,c)&&n!=$common.getCurrentStyle(a,"visibility")},setVisible:function(a,b){if(a&&b!=$common.getVisible(a)){if(b)if(a.style.removeAttribute)a.style.removeAttribute(c);else a.style.removeProperty(c);else a.style.display=e;a.style.visibility=b?"visible":n}},resolveFunction:function(value){if(value)if(value instanceof Function)return value;else if(String.isInstanceOfType(value)&&value.length>0){var func;if((func=window[value])instanceof Function)return func;else if((func=eval(value))instanceof Function)return func}return l},addCssClasses:function(c,b){for(var a=0;a<b.length;a++)Sys.UI.DomElement.addCssClass(c,b[a])},removeCssClasses:function(c,b){for(var a=0;a<b.length;a++)Sys.UI.DomElement.removeCssClass(c,b[a])},setStyle:function(a,b){$common.applyProperties(a.style,b)},removeHandlers:function(c,a){for(var b in a)$removeHandler(c,b,a[b])},overlaps:function(a,b){return a.x<b.x+b.width&&b.x<a.x+a.width&&a.y<b.y+b.height&&b.y<a.y+a.height},containsPoint:function(a,b,c){return b>=a.x&&b<a.x+a.width&&c>=a.y&&c<a.y+a.height},isKeyDigit:function(a){return 48<=a&&a<=57},isKeyNavigation:function(a){return Sys.UI.Key.left<=a&&a<=Sys.UI.Key.down},padLeft:function(c,b,d,a){return $common._pad(c,b||2,d||" ","l",a||h)},padRight:function(c,b,d,a){return $common._pad(c,b||2,d||" ","r",a||h)},_pad:function(c,b,h,e,g){c=c.toString();var f=c.length,d=new Sys.StringBuilder;e=="r"&&d.append(c);while(f<b){d.append(h);f++}e=="l"&&d.append(c);var a=d.toString();if(g&&a.length>b)if(e=="l")a=a.substr(a.length-b,b);else a=a.substr(0,b);return a},__DOMEvents:{focusin:{eventGroup:a,init:function(a){a.initUIEvent("focusin",f,h,window,1)}},focusout:{eventGroup:a,init:function(a){a.initUIEvent("focusout",f,h,window,1)}},activate:{eventGroup:a,init:function(a){a.initUIEvent("activate",f,f,window,1)}},focus:{eventGroup:a,init:function(a){a.initUIEvent("focus",h,h,window,1)}},blur:{eventGroup:a,init:function(a){a.initUIEvent("blur",h,h,window,1)}},click:{eventGroup:b,init:function(b,a){b.initMouseEvent("click",f,f,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},dblclick:{eventGroup:b,init:function(b,a){b.initMouseEvent("click",f,f,window,2,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},mousedown:{eventGroup:b,init:function(b,a){b.initMouseEvent("mousedown",f,f,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},mouseup:{eventGroup:b,init:function(b,a){b.initMouseEvent("mouseup",f,f,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},mouseover:{eventGroup:b,init:function(b,a){b.initMouseEvent("mouseover",f,f,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},mousemove:{eventGroup:b,init:function(b,a){b.initMouseEvent(d,f,f,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},mouseout:{eventGroup:b,init:function(b,a){b.initMouseEvent(d,f,f,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||h,a.altKey||h,a.shiftKey||h,a.metaKey||h,a.button||0,a.relatedTarget||l)}},load:{eventGroup:q,init:function(a){a.initEvent("load",h,h)}},unload:{eventGroup:q,init:function(a){a.initEvent("unload",h,h)}},select:{eventGroup:q,init:function(a){a.initEvent("select",f,h)}},change:{eventGroup:q,init:function(a){a.initEvent("change",f,h)}},submit:{eventGroup:q,init:function(a){a.initEvent("submit",f,f)}},reset:{eventGroup:q,init:function(a){a.initEvent("reset",f,h)}},resize:{eventGroup:q,init:function(a){a.initEvent("resize",f,h)}},scroll:{eventGroup:q,init:function(a){a.initEvent("scroll",f,h)}}},tryFireRawEvent:function(a,b){try{if(a.fireEvent){a.fireEvent("on"+b.type,b);return f}else if(a.dispatchEvent){a.dispatchEvent(b);return f}}catch(c){}return h},tryFireEvent:function(e,d,c){try{if(document.createEventObject){var a=document.createEventObject();$common.applyProperties(a,c||{});e.fireEvent("on"+d,a);return f}else if(document.createEvent){var b=$common.__DOMEvents[d];if(b){var a=document.createEvent(b.eventGroup);b.init(a,c||{});e.dispatchEvent(a);return f}}}catch(f){}return h},wrapElement:function(a,b,c){var d=a.parentNode;d.replaceChild(b,a);(c||b).appendChild(a)},unwrapElement:function(b,a){var c=a.parentNode;if(c!=l){$common.removeElement(b);c.replaceChild(b,a)}},removeElement:function(a){var b=a.parentNode;b!=l&&b.removeChild(a)},applyProperties:function(d,c){for(var b in c){var a=c[b];if(a!=l&&Object.getType(a)===Object){var e=d[b];$common.applyProperties(e,a)}else d[b]=a}},createElementFromTemplate:function(a,h,c){if(typeof a.nameTable!=m){var e=a.nameTable;if(String.isInstanceOfType(e))e=c[e];if(e!=l)c=e}var j=l;if(typeof a.name!==m)j=a.name;var b=document.createElement(a.nodeName);if(typeof a.name!==m&&c)c[a.name]=b;if(typeof a.parent!==m&&h==l){var f=a.parent;if(String.isInstanceOfType(f))f=c[f];if(f!=l)h=f}typeof a.properties!==m&&a.properties!=l&&$common.applyProperties(b,a.properties);typeof a.cssClasses!==m&&a.cssClasses!=l&&$common.addCssClasses(b,a.cssClasses);typeof a.events!==m&&a.events!=l&&$addHandlers(b,a.events);typeof a.visible!==m&&a.visible!=l&&this.setVisible(b,a.visible);h&&h.appendChild(b);typeof a.opacity!==m&&a.opacity!=l&&$common.setElementOpacity(b,a.opacity);if(typeof a.children!==m&&a.children!=l)for(var i=0;i<a.children.length;i++){var k=a.children[i];$common.createElementFromTemplate(k,b,c)}var g=b;if(typeof a.contentPresenter!==m&&a.contentPresenter!=l)g=c[g];if(typeof a.content!==m&&a.content!=l){var d=a.content;if(String.isInstanceOfType(d))d=c[d];if(d.parentNode)$common.wrapElement(d,b,g);else g.appendChild(d)}return b},prepareHiddenElementForATDeviceUpdate:function(){var a=document.getElementById(r);if(!a){var a=document.createElement("input");a.setAttribute("type",n);a.setAttribute(j,"1");a.setAttribute("id",r);a.setAttribute("name",r);document.forms[0]&&document.forms[0].appendChild(a)}},updateFormToRefreshATDeviceBuffer:function(){var a=document.getElementById(r);if(a)if(a.getAttribute(j)=="1")a.setAttribute(j,"0");else a.setAttribute(j,"1")},appendElementToFormOrBody:function(a){if(document.forms&&document.forms[0])document.forms[0].appendChild(a);else document.body.appendChild(a)}};if(document.documentElement.getBoundingClientRect)Sys.UI.DomElement.getLocation=function(b){if(b.self||b.nodeType===9||b===document.documentElement||b.parentNode===b.ownerDocument.documentElement)return new Sys.UI.Point(0,0);var f=b.getBoundingClientRect();if(!f)return new Sys.UI.Point(0,0);var k,e=b.ownerDocument.documentElement,c=Math.round(f.left)+e.scrollLeft,d=Math.round(f.top)+e.scrollTop;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){try{var g=b.ownerDocument.parentWindow.frameElement||l;if(g){var h=g.frameBorder==="0"||g.frameBorder==="no"?2:0;c+=h;d+=h}}catch(l){}if(Sys.Browser.version===7&&!document.documentMode){var i=document.body,j=i.getBoundingClientRect(),a=(j.right-j.left)/i.clientWidth;a=Math.round(a*100);a=(a-a%5)/100;if(!isNaN(a)&&a!==1){c=Math.round(c/a);d=Math.round(d/a)}}if((document.documentMode||0)<8){c-=e.clientLeft;d-=e.clientTop}}return new Sys.UI.Point(c,d)};else if(Sys.Browser.agent===Sys.Browser.Safari)Sys.UI.DomElement.getLocation=function(c){if(c.window&&c.window===c||c.nodeType===9)return new Sys.UI.Point(0,0);for(var d=0,e=0,j=l,g=l,b,a=c;a;j=a,g=b,a=a.offsetParent){b=Sys.UI.DomElement._getCurrentStyle(a);var f=a.tagName?a.tagName.toUpperCase():l;if((a.offsetLeft||a.offsetTop)&&(f!==s||(!g||g.position!==o))){d+=a.offsetLeft;e+=a.offsetTop}if(j&&Sys.Browser.version>=3){d+=parseInt(b.borderLeftWidth);e+=parseInt(b.borderTopWidth)}}b=Sys.UI.DomElement._getCurrentStyle(c);var h=b?b.position:l;if(!h||h!==o)for(a=c.parentNode;a;a=a.parentNode){f=a.tagName?a.tagName.toUpperCase():l;if(f!==s&&f!==t&&(a.scrollLeft||a.scrollTop)){d-=a.scrollLeft||0;e-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var i=b?b.position:l;if(i&&i===o)break}return new Sys.UI.Point(d,e)};else Sys.UI.DomElement.getLocation=function(d){if(d.window&&d.window===d||d.nodeType===9)return new Sys.UI.Point(0,0);for(var e=0,f=0,i=l,g=l,b=l,a=d;a;i=a,g=b,a=a.offsetParent){var c=a.tagName?a.tagName.toUpperCase():l;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c===s&&(!g||g.position!==o))){e+=a.offsetLeft;f+=a.offsetTop}if(i!==l&&b){if(c!=="TABLE"&&c!=="TD"&&c!==t){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position===o)){e+=parseInt(b.marginLeft)||0;f+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(d);var h=b?b.position:l;if(!h||h!==o)for(a=d.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():l;if(c!==s&&c!==t&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(e,f)};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(c,b){for(var a=b.parentNode;a!=l;a=a.parentNode)if(a==c)return f;return h},isDescendantOrSelf:function(b,a){if(b===a)return f;return Sys.Extended.UI.DomUtility.isDescendant(b,a)},isAncestor:function(a,b){return Sys.Extended.UI.DomUtility.isDescendant(b,a)},isAncestorOrSelf:function(a,b){if(a===b)return f;return Sys.Extended.UI.DomUtility.isDescendant(b,a)},isSibling:function(d,c){for(var b=d.parentNode,a=0;a<b.childNodes.length;a++)if(b.childNodes[a]==c)return f;return h}};Sys.Extended.UI._DomUtility.registerClass("Sys.Extended.UI._DomUtility");Sys.Extended.UI.DomUtility=new Sys.Extended.UI._DomUtility;Sys.Extended.UI.TextBoxWrapper=function(b){var a=this;Sys.Extended.UI.TextBoxWrapper.initializeBase(a,[b]);a._current=b.value;a._watermark=l;a._isWatermarked=h};Sys.Extended.UI.TextBoxWrapper.prototype={dispose:function(){this.get_element().TextBoxWrapper=l;Sys.Extended.UI.TextBoxWrapper.callBaseMethod(this,"dispose")},get_Current:function(){this._current=this.get_element().value;return this._current},set_Current:function(a){this._current=a;this._updateElement()},get_Value:function(){if(this.get_IsWatermarked())return "";else return this.get_Current()},set_Value:function(b){var a=this;a.set_Current(b);if(!b||0==b.length)l!=a._watermark&&a.set_IsWatermarked(f);else a.set_IsWatermarked(h)},get_Watermark:function(){return this._watermark},set_Watermark:function(a){this._watermark=a;this._updateElement()},get_IsWatermarked:function(){return this._isWatermarked},set_IsWatermarked:function(b){var a=this;if(a._isWatermarked!=b){a._isWatermarked=b;a._updateElement();a._raiseWatermarkChanged()}},_updateElement:function(){var a=this,b=a.get_element();if(a._isWatermarked){if(b.value!=a._watermark)b.value=a._watermark}else if(b.value!=a._current)b.value=a._current},add_WatermarkChanged:function(a){this.get_events().addHandler(u,a)},remove_WatermarkChanged:function(a){this.get_events().removeHandler(u,a)},_raiseWatermarkChanged:function(){var a=this.get_events().getHandler(u);a&&a(this,Sys.EventArgs.Empty)}};Sys.Extended.UI.TextBoxWrapper.get_Wrapper=function(a){if(l==a.TextBoxWrapper)a.TextBoxWrapper=new Sys.Extended.UI.TextBoxWrapper(a);return a.TextBoxWrapper};Sys.Extended.UI.TextBoxWrapper.registerClass("Sys.Extended.UI.TextBoxWrapper",Sys.UI.Behavior);Sys.Extended.UI.TextBoxWrapper.validatorGetValue=function(b){var a=$get(b);if(a&&a.TextBoxWrapper)return a.TextBoxWrapper.get_Value();return Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue(b)};if(typeof ValidatorGetValue=="function"){Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue=ValidatorGetValue;ValidatorGetValue=Sys.Extended.UI.TextBoxWrapper.validatorGetValue}if(Sys.CultureInfo&&Sys.CultureInfo.prototype._getAbbrMonthIndex){Sys.CultureInfo.prototype._getAbbrMonthIndex=function(b){var a=this;if(!a._upperAbbrMonths)a._upperAbbrMonths=a._toUpperArray(a.dateTimeFormat.AbbreviatedMonthNames);return Array.indexOf(a._upperAbbrMonths,a._toUpper(b))};Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex}}if(window.Sys&&Sys.loader)Sys.loader.registerScript(scriptName,["ComponentModel"],execute);else execute()})();var $common,CommonToolkitScripts;
//END Common.Common.js
//START ExtenderBase.BaseScripts.js
(function(){var b="ExtendedBase";function a(){var l="Underline",k="Justify Left",j="Ordered List",i="Justify Center",h="Justify Right",b="undefined",f="populating",e="populated",d="dispose",c="initialize",a=null,g=this,m=Sys.version;if(!m&&!Sys._versionChecked){Sys._versionChecked=true;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BehaviorBase=function(c){var b=this;Sys.Extended.UI.BehaviorBase.initializeBase(b,[c]);b._clientStateFieldID=a;b._pageRequestManager=a;b._partialUpdateBeginRequestHandler=a;b._partialUpdateEndRequestHandler=a};Sys.Extended.UI.BehaviorBase.prototype={initialize:function(){Sys.Extended.UI.BehaviorBase.callBaseMethod(this,c)},dispose:function(){var b=this;Sys.Extended.UI.BehaviorBase.callBaseMethod(b,d);if(b._pageRequestManager){if(b._partialUpdateBeginRequestHandler){b._pageRequestManager.remove_beginRequest(b._partialUpdateBeginRequestHandler);b._partialUpdateBeginRequestHandler=a}if(b._partialUpdateEndRequestHandler){b._pageRequestManager.remove_endRequest(b._partialUpdateEndRequestHandler);b._partialUpdateEndRequestHandler=a}b._pageRequestManager=a}},get_ClientStateFieldID:function(){return this._clientStateFieldID},set_ClientStateFieldID:function(a){if(this._clientStateFieldID!=a){this._clientStateFieldID=a;this.raisePropertyChanged("ClientStateFieldID")}},get_ClientState:function(){if(this._clientStateFieldID){var b=document.getElementById(this._clientStateFieldID);if(b)return b.value}return a},set_ClientState:function(b){if(this._clientStateFieldID){var a=document.getElementById(this._clientStateFieldID);if(a)a.value=b}},registerPartialUpdateEvents:function(){var a=this;if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){a._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(a._pageRequestManager){a._partialUpdateBeginRequestHandler=Function.createDelegate(a,a._partialUpdateBeginRequest);a._pageRequestManager.add_beginRequest(a._partialUpdateBeginRequestHandler);a._partialUpdateEndRequestHandler=Function.createDelegate(a,a._partialUpdateEndRequest);a._pageRequestManager.add_endRequest(a._partialUpdateEndRequestHandler)}}},_partialUpdateBeginRequest:function(){},_partialUpdateEndRequest:function(){}};Sys.Extended.UI.BehaviorBase.registerClass("Sys.Extended.UI.BehaviorBase",Sys.UI.Behavior);Sys.Extended.UI.DynamicPopulateBehaviorBase=function(c){var b=this;Sys.Extended.UI.DynamicPopulateBehaviorBase.initializeBase(b,[c]);b._DynamicControlID=a;b._DynamicContextKey=a;b._DynamicServicePath=a;b._DynamicServiceMethod=a;b._cacheDynamicResults=false;b._dynamicPopulateBehavior=a;b._populatingHandler=a;b._populatedHandler=a};Sys.Extended.UI.DynamicPopulateBehaviorBase.prototype={initialize:function(){var a=this;Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(a,c);a._populatingHandler=Function.createDelegate(a,a._onPopulating);a._populatedHandler=Function.createDelegate(a,a._onPopulated)},dispose:function(){var b=this;if(b._populatedHandler){b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.remove_populated(b._populatedHandler);b._populatedHandler=a}if(b._populatingHandler){b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.remove_populating(b._populatingHandler);b._populatingHandler=a}if(b._dynamicPopulateBehavior){b._dynamicPopulateBehavior.dispose();b._dynamicPopulateBehavior=a}Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(b,d)},populate:function(c){var b=this;if(b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.get_element()!=$get(b._DynamicControlID)){b._dynamicPopulateBehavior.dispose();b._dynamicPopulateBehavior=a}if(!b._dynamicPopulateBehavior&&b._DynamicControlID&&b._DynamicServiceMethod){b._dynamicPopulateBehavior=$create(Sys.Extended.UI.DynamicPopulateBehavior,{id:b.get_id()+"_DynamicPopulateBehavior",ContextKey:b._DynamicContextKey,ServicePath:b._DynamicServicePath,ServiceMethod:b._DynamicServiceMethod,cacheDynamicResults:b._cacheDynamicResults},a,a,$get(b._DynamicControlID));b._dynamicPopulateBehavior.add_populating(b._populatingHandler);b._dynamicPopulateBehavior.add_populated(b._populatedHandler)}b._dynamicPopulateBehavior&&b._dynamicPopulateBehavior.populate(c?c:b._DynamicContextKey)},_onPopulating:function(b,a){this.raisePopulating(a)},_onPopulated:function(b,a){this.raisePopulated(a)},get_dynamicControlID:function(){return this._DynamicControlID},get_DynamicControlID:g.get_dynamicControlID,set_dynamicControlID:function(b){var a=this;if(a._DynamicControlID!=b){a._DynamicControlID=b;a.raisePropertyChanged("dynamicControlID");a.raisePropertyChanged("DynamicControlID")}},set_DynamicControlID:g.set_dynamicControlID,get_dynamicContextKey:function(){return this._DynamicContextKey},get_DynamicContextKey:g.get_dynamicContextKey,set_dynamicContextKey:function(b){var a=this;if(a._DynamicContextKey!=b){a._DynamicContextKey=b;a.raisePropertyChanged("dynamicContextKey");a.raisePropertyChanged("DynamicContextKey")}},set_DynamicContextKey:g.set_dynamicContextKey,get_dynamicServicePath:function(){return this._DynamicServicePath},get_DynamicServicePath:g.get_dynamicServicePath,set_dynamicServicePath:function(b){var a=this;if(a._DynamicServicePath!=b){a._DynamicServicePath=b;a.raisePropertyChanged("dynamicServicePath");a.raisePropertyChanged("DynamicServicePath")}},set_DynamicServicePath:g.set_dynamicServicePath,get_dynamicServiceMethod:function(){return this._DynamicServiceMethod},get_DynamicServiceMethod:g.get_dynamicServiceMethod,set_dynamicServiceMethod:function(b){var a=this;if(a._DynamicServiceMethod!=b){a._DynamicServiceMethod=b;a.raisePropertyChanged("dynamicServiceMethod");a.raisePropertyChanged("DynamicServiceMethod")}},set_DynamicServiceMethod:g.set_dynamicServiceMethod,get_cacheDynamicResults:function(){return this._cacheDynamicResults},set_cacheDynamicResults:function(a){if(this._cacheDynamicResults!=a){this._cacheDynamicResults=a;this.raisePropertyChanged("cacheDynamicResults")}},add_populated:function(a){this.get_events().addHandler(e,a)},remove_populated:function(a){this.get_events().removeHandler(e,a)},raisePopulated:function(b){var a=this.get_events().getHandler(e);a&&a(this,b)},add_populating:function(a){this.get_events().addHandler(f,a)},remove_populating:function(a){this.get_events().removeHandler(f,a)},raisePopulating:function(b){var a=this.get_events().getHandler(f);a&&a(this,b)}};Sys.Extended.UI.DynamicPopulateBehaviorBase.registerClass("Sys.Extended.UI.DynamicPopulateBehaviorBase",Sys.Extended.UI.BehaviorBase);Sys.Extended.UI.ControlBase=function(c){var b=this;Sys.Extended.UI.ControlBase.initializeBase(b,[c]);b._clientStateField=a;b._callbackTarget=a;b._onsubmit$delegate=Function.createDelegate(b,b._onsubmit);b._oncomplete$delegate=Function.createDelegate(b,b._oncomplete);b._onerror$delegate=Function.createDelegate(b,b._onerror)};Sys.Extended.UI.ControlBase.__doPostBack=function(c,b){if(!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())for(var a=0;a<Sys.Extended.UI.ControlBase.onsubmitCollection.length;a++)Sys.Extended.UI.ControlBase.onsubmitCollection[a]();Function.createDelegate(window,Sys.Extended.UI.ControlBase.__doPostBackSaved)(c,b)};Sys.Extended.UI.ControlBase.prototype={initialize:function(){var d=this;Sys.Extended.UI.ControlBase.callBaseMethod(d,c);d._clientStateField&&d.loadClientState(d._clientStateField.value);if(typeof Sys.WebForms!==b&&typeof Sys.WebForms.PageRequestManager!==b){Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,d._onsubmit$delegate);if(Sys.Extended.UI.ControlBase.__doPostBackSaved==a||typeof Sys.Extended.UI.ControlBase.__doPostBackSaved==b){Sys.Extended.UI.ControlBase.__doPostBackSaved=window.__doPostBack;window.__doPostBack=Sys.Extended.UI.ControlBase.__doPostBack;Sys.Extended.UI.ControlBase.onsubmitCollection=[]}Array.add(Sys.Extended.UI.ControlBase.onsubmitCollection,d._onsubmit$delegate)}else $addHandler(document.forms[0],"submit",d._onsubmit$delegate)},dispose:function(){var a=this;if(typeof Sys.WebForms!==b&&typeof Sys.WebForms.PageRequestManager!==b){Array.remove(Sys.Extended.UI.ControlBase.onsubmitCollection,a._onsubmit$delegate);Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,a._onsubmit$delegate)}else $removeHandler(document.forms[0],"submit",a._onsubmit$delegate);Sys.Extended.UI.ControlBase.callBaseMethod(a,d)},findElement:function(a){return $get(this.get_id()+"_"+a.split(":").join("_"))},get_clientStateField:function(){return this._clientStateField},set_clientStateField:function(b){var a=this;if(a.get_isInitialized())throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_CannotSetClientStateField);if(a._clientStateField!=b){a._clientStateField=b;a.raisePropertyChanged("clientStateField")}},loadClientState:function(){},saveClientState:function(){return a},_invoke:function(i,f,j){var c=this;if(!c._callbackTarget)throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_ControlNotRegisteredForCallbacks);if(typeof WebForm_DoCallback===b)throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_PageNotRegisteredForCallbacks);for(var g=[],d=0;d<f.length;d++)g[d]=f[d];var e=c.saveClientState();if(e!=a&&!String.isInstanceOfType(e))throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_InvalidClientStateType);var h=Sys.Serialization.JavaScriptSerializer.serialize({name:i,args:g,state:c.saveClientState()});WebForm_DoCallback(c._callbackTarget,h,c._oncomplete$delegate,j,c._onerror$delegate,true)},_oncomplete:function(a,b){a=Sys.Serialization.JavaScriptSerializer.deserialize(a);if(a.error)throw Error.create(a.error);this.loadClientState(a.state);b(a.result)},_onerror:function(a){throw Error.create(a);},_onsubmit:function(){if(this._clientStateField)this._clientStateField.value=this.saveClientState();return true}};Sys.Extended.UI.ControlBase.registerClass("Sys.Extended.UI.ControlBase",Sys.UI.Control);Sys.Extended.UI.Resources={PasswordStrength_InvalidWeightingRatios:"Strength Weighting ratios must have 4 elements",HTMLEditor_toolbar_button_FontSize_defaultValue:"default",HTMLEditor_toolbar_button_DesignMode_title:"Design mode",Animation_ChildrenNotAllowed:'AjaxControlToolkit.Animation.createAnimation cannot add child animations to type "{0}" that does not derive from AjaxControlToolkit.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:h,RTE_JustifyCenter:i,PasswordStrength_RemainingUpperCase:"{0} more upper case characters",HTMLEditor_toolbar_popup_LinkProperties_button_Cancel:"Cancel",Animation_TargetNotFound:'AjaxControlToolkit.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:j,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:'AjaxControlToolkit.Animation.createAnimation found no property corresponding to "{0}" or "{1}"',Animation_InvalidBaseType:"AjaxControlToolkit.Animation.registerAnimation can only register types that inherit from AjaxControlToolkit.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:k,RTE_Cut:"Cut",AsyncFileUpload_UploadingProblem:"The requested file uploading problem.",ResizableControlBehavior_CannotChangeProperty:"Changes to {0} not supported",RTE_ViewSource:"View Source",Common_InvalidPaddingUnit:'A unit type of "{0}" is invalid for parsePadding',RTE_Paste:"Paste",ExtenderBase_ControlNotRegisteredForCallbacks:"This Control has not been registered for callbacks",Calendar_Today:"Today: {0}",MultiHandleSlider_CssHeightWidthRequired:"You must specify a CSS width and height for all handle styles as well as the rail.",Common_DateTime_InvalidFormat:"Invalid format",HTMLEditor_toolbar_button_Copy_title:"Copy",ListSearch_DefaultPrompt:"Type to search",CollapsiblePanel_NoControlID:'Failed to find element "{0}"',RTE_ViewEditor:"View Editor",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Current:"Current window",RTE_BarColor:"Bar Color",AsyncFileUpload_InternalErrorMessage:"The AsyncFileUpload control has encountered an error with the uploader in this page. Please refresh the page and try again.",HTMLEditor_toolbar_button_Underline_title:l,PasswordStrength_DefaultStrengthDescriptions:"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!",HTMLEditor_toolbar_button_SuperScript_title:"Super script",HTMLEditor_toolbar_button_Ltr_title:"Left to right direction",HTMLEditor_toolbar_button_RemoveAlignment_title:"Remove Alignment",HTMLEditor_toolbar_button_OrderedList_title:j,HTMLEditor_toolbar_popup_LinkProperties_field_Target_New:"New window",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Top:"Top window",HTMLEditor_toolbar_button_JustifyCenter_title:i,RTE_Inserttexthere:"Insert text here",Animation_UknownAnimationName:'AjaxControlToolkit.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:k,Rating_CallbackError:"An unhandled exception has occurred:\\r\\n{0}",HTMLEditor_toolbar_button_Undo_title:"Undo",HTMLEditor_toolbar_button_Redo_title:"Redo",Tabs_OwnerExpected:"owner must be set before initialize",DynamicPopulate_WebServiceTimeout:"Web service call timed out",PasswordStrength_RemainingLowerCase:"{0} more lower case characters",HTMLEditor_toolbar_button_BulletedList_title:"Bulleted List",HTMLEditor_toolbar_button_Paste_title:"Paste",Animation_MissingAnimationName:"AjaxControlToolkit.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:h,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:"AjaxControlToolkit.AlwaysVisibleControlBehavior must have an element",HTMLEditor_toolbar_button_SubScript_title:"Sub script",Slider_NoSizeProvided:"Please set valid values for the height and width attributes in the slider's CSS classes",DynamicPopulate_WebServiceError:"Web Service call failed: {0}",PasswordStrength_StrengthPrompt:"Strength: ",HTMLEditor_toolbar_button_Rtl_title:"Right to left direction",PasswordStrength_RemainingCharacters:"{0} more characters",HTMLEditor_toolbar_button_BackColorClear_title:"Clear background color",PasswordStrength_Satisfied:"Nothing more required",RTE_Hyperlink:"Hyperlink",Animation_NoPropertyFound:'AjaxControlToolkit.Animation.createAnimation found no property corresponding to "{0}"',PasswordStrength_InvalidStrengthDescriptionStyles:"Text Strength description style classes must match the number of text descriptions.",HTMLEditor_toolbar_button_Use_verb:"Use {0}",HTMLEditor_toolbar_popup_LinkProperties_field_Target_Parent:"Parent window",PasswordStrength_GetHelpRequirements:"Get help on password requirements",HTMLEditor_toolbar_button_FixedBackColor_title:"Background color",PasswordStrength_InvalidStrengthDescriptions:"Invalid number of text strength descriptions specified",RTE_Underline:l,HTMLEditor_toolbar_button_IncreaseIndent_title:"Increase Indent",AsyncFileUpload_ServerResponseError:"Server Response Error",Tabs_PropertySetAfterInitialization:"{0} cannot be changed after initialization",RTE_Rows:"Rows",RTE_Redo:"Redo",RTE_Size:"Size",RTE_Undo:"Undo",RTE_Bold:"Bold",RTE_Copy:"Copy",RTE_Font:"Font",HTMLEditor_toolbar_button_FontSize_label:"Size",HTMLEditor_toolbar_button_Cut_title:"Cut",CascadingDropDown_MethodError:"[Method error {0}]",HTMLEditor_toolbar_button_InsertLink_message_EmptyURL:"URL can not be empty",RTE_BorderColor:"Border Color",HTMLEditor_toolbar_button_RemoveStyles_title:"Remove styles",RTE_Paragraph:"Paragraph",RTE_InsertHorizontalRule:"Insert Horizontal Rule",HTMLEditor_toolbar_button_Paragraph_title:"Make Paragraph",Common_UnitHasNoDigits:"No digits",RTE_Outdent:"Outdent",Common_DateTime_InvalidTimeSpan:'"{0}" is not a valid TimeSpan format',Animation_CannotNestSequence:"AjaxControlToolkit.Animation.SequenceAnimation cannot be nested inside AjaxControlToolkit.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."}}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ComponentModel","Serialization"],a);else a()})();
//END ExtenderBase.BaseScripts.js
//START HTMLEditor.Editor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.Editor=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Editor.initializeBase(a,[b]);a._editPanel=null;a._changingToolbar=null;if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||Sys.Extended.UI.HTMLEditor.isOpera)a._onresize$delegate=Function.createDelegate(a,a._onresize)};Sys.Extended.UI.HTMLEditor.Editor.prototype={get_autofocus:function(){return this._editPanel.get_autofocus()},set_autofocus:function(a){this._editPanel.set_autofocus(a)},get_content:function(){return this._editPanel.get_content()},set_content:function(a){this._editPanel.set_content(a)},get_activeMode:function(){return this._editPanel.get_activeMode()},set_activeMode:function(a){this._editPanel.set_activeMode(a)},get_editPanel:function(){return this._editPanel},set_editPanel:function(a){this._editPanel=a},get_changingToolbar:function(){return this._changingToolbar},set_changingToolbar:function(a){this._changingToolbar=a},add_propertyChanged:function(a){this._editPanel.add_propertyChanged(a)},remove_propertyChanged:function(a){this._editPanel.remove_propertyChanged(a)},initialize:function(){var c="BackCompat",a=this;Sys.Extended.UI.HTMLEditor.Editor.callBaseMethod(a,"initialize");var b=a.get_element(),e=b.className;Sys.UI.DomElement.removeCssClass(b,e);Sys.UI.DomElement.addCssClass(b,"ajax__htmleditor_editor_base");Sys.UI.DomElement.addCssClass(b,e);if(!Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!=c)a.get_element().style.height="100%";if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!=c||Sys.Extended.UI.HTMLEditor.isOpera){$addHandlers(b,{resize:a._onresize$delegate});var d=a.get_editPanel();a._saved_setActive=d._setActive;d._setActive=Function.createDelegate(a,a._setActive);var f=a;if(Sys.Extended.UI.HTMLEditor.isOpera)setTimeout(function(){f._ensureVisibleResize()},0);else f._ensureVisibleResize()}},_setActive:function(c){var a=this,b=a;Function.createDelegate(a.get_editPanel(),a._saved_setActive)(c);if(!Sys.Extended.UI.HTMLEditor.isReallyVisible(a.get_element()))setTimeout(function(){b._ensureVisibleResize()},0);else b._ensureVisibleResize()},_ensureVisibleResize:function(){var b=false,a;if(!Sys.Extended.UI.HTMLEditor.isReallyVisible(this.get_element())){b=true;a=Sys.Extended.UI.HTMLEditor.setElementVisibility(this.get_element())}this._onresize();if(b){Sys.Extended.UI.HTMLEditor.restoreElementVisibility(a);delete a}},dispose:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||Sys.Extended.UI.HTMLEditor.isOpera){$common.removeHandlers(a.get_element(),{resize:a._onresize$delegate});a.get_editPanel()._setActive=a._saved_setActive}Sys.Extended.UI.HTMLEditor.Editor.callBaseMethod(a,"dispose")},_onresize:function(c){var b="undefined";try{var a=this.get_editPanel().get_element().parentNode;if(typeof c==b||c==null)a.style.height="";var d=Sys.Extended.UI.HTMLEditor.Editor.MidleCellHeightForIE(a.parentNode.parentNode.parentNode,a.parentNode);a.style.height=d;typeof this.get_editPanel().get_activePanel()._onresize!=b&&this.get_editPanel().get_activePanel()._onresize()}catch(e){}return true}};Sys.Extended.UI.HTMLEditor.Editor.registerClass("Sys.Extended.UI.HTMLEditor.Editor",Sys.UI.Control);Sys.Extended.UI.HTMLEditor.Editor.MidleCellHeightForIE=function(a,h){var e="100%";if(Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!="BackCompat"||Sys.Extended.UI.HTMLEditor.isOpera)try{for(var g=2,c=0;c<a.rows.length;c++)if(a.rows[c]!=h)g+=a.rows[c].offsetHeight+1;var b=a.clientHeight;if(Sys.Browser.version==8||Sys.Extended.UI.HTMLEditor.isOpera){var d=a.style.height,f=a.parentNode.style.height;if(d.indexOf("px")>0)b=parseInt(d);else if(d=="100%"&&f.indexOf("px")>0)b=parseInt(f)}e=(b-g)*100/(b*1)+"%"}catch(i){e=""}return e};
//END HTMLEditor.Editor.js
//START HTMLEditor.Toolbar.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.Toolbar=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Toolbar.initializeBase(a,[b]);a._loaded=false;a._cachedButtonIds=null;a._cachedEditPanel=null;a._buttons=null;a._alwaysVisible=false;a._app_onload$delegate=Function.createDelegate(a,a._app_onload)};Sys.Extended.UI.HTMLEditor.Toolbar.prototype={get_alwaysVisible:function(){return this._alwaysVisible},set_alwaysVisible:function(a){this._alwaysVisible=a;this.get_isInitialized()&&this.raisePropertyChanged("alwaysVisible")},set_activeEditPanel:function(c){var a=this;if(!a._loaded){a._cachedEditPanel=c;return}for(var b=0;b<a.get_buttons().length;b++)a.get_buttons()[b].set_activeEditPanel(c)},disable:function(){var a=this;if(a.get_isInitialized()){if(a._alwaysVisible)return;for(var b=0;b<a.get_buttons().length;b++)a.get_buttons()[b].set_activeEditPanel(null)}},get_buttons:function(){if(this._buttons==null)this._buttons=[];return this._buttons},set_buttons:function(a){this.get_buttons().push(a)},get_buttonIds:function(){},set_buttonIds:function(c){if(!this.get_isInitialized()){this._cachedButtonIds=c;return}for(var b=c.split(";"),a=0;a<b.length;a++)b[a].length>0&&this.set_buttons($find(b[a]))},initialize:function(){Sys.Extended.UI.HTMLEditor.Toolbar.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate)},dispose:function(){this._loaded=false;Sys.Application.remove_load(this._app_onload$delegate);Sys.Extended.UI.HTMLEditor.Toolbar.callBaseMethod(this,"dispose")},_app_onload:function(){var b=null,a=this;if(a._cachedButtonIds!=b){a.set_buttonIds(a._cachedButtonIds);a._cachedButtonIds=b}a._loaded=true;if(a._cachedEditPanel!=b){a.set_activeEditPanel(a._cachedEditPanel);a._cachedEditPanel=b}}};Sys.Extended.UI.HTMLEditor.Toolbar.registerClass("Sys.Extended.UI.HTMLEditor.Toolbar",Sys.UI.Control);
//END HTMLEditor.Toolbar.js
//START HTMLEditor.Toolbar_buttons.CommonButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.initializeBase(a,[b]);a._loaded=false;a._preservePlace=false;a._editPanel=null;a._activeModes=null;a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a._cssClass="";a._onmouseover$delegate=Function.createDelegate(a,a._onmouseover);a._onmouseout$delegate=Function.createDelegate(a,a._onmouseout);a._onmousedown$delegate=Function.createDelegate(a,a._onmousedown);a._onmouseup$delegate=Function.createDelegate(a,a._onmouseup);a._onclick$delegate=Function.createDelegate(a,a._onclick)};Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.prototype={get_preservePlace:function(){return this._preservePlace},set_preservePlace:function(a){this._preservePlace=a},set_activeEditPanel:function(b){var a=this;a._editPanel=b;if(a._editPanel==null)a.hideButton();else if(a.isAllowedActiveMode(a._editPanel.get_activeMode())&&a.canBeShown()){a.showButton();a.onEditPanelActivity()}else a.hideButton()},isImage:function(){return true},checkRangeInDesign:function(){var a=this;if(typeof a._designPanel=="undefined")return false;if(a._designPanel==null)return false;if(a._designPanel.isPopup())return false;var b=Sys.Extended.UI.HTMLEditor.getSelParent(a._designPanel);if(b.nodeType==3)b=b.parentNode;return b.ownerDocument==a._designPanel._doc},get_buttonName:function(){var a=Object.getType(this).getName();a=a.substring(a.lastIndexOf(".")+1);return a},get_message:function(messageName){var expression="Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_"+this.get_buttonName()+"_message_"+messageName;return eval(expression)},isDisplayed:function(){var a=this.get_element();if(a){var b=a.style;return b.display!="none"&&b.visibility!="hidden"}else return false},hideButton:function(){var a=this.get_element();if(a)if(!this._preservePlace)a.style.display="none";else a.style.visibility="hidden"},showButton:function(){var a=this.get_element();if(a){if(a.style.display=="none")a.style.display="";if(this._preservePlace)a.style.visibility="visible"}},canBeShown:function(){return true},onEditPanelActivity:function(){},get_activeModes:function(){if(this._activeModes==null)this._activeModes=[];return this._activeModes},set_activeModes:function(a){this.get_activeModes().push(a)},get_activeModesIds:function(){},set_activeModesIds:function(c){for(var b=c.split(";"),a=0;a<b.length;a++)this.set_activeModes(parseInt(b[a]))},set_toolTip:function(a){this.get_element().title=a},get_toolTip:function(){return this.get_element().title},isAllowedActiveMode:function(b){for(var a=0;a<this.get_activeModes().length;a++)if(this.get_activeModes()[a]==b)return true;return false},initialize:function(){var c="none",a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.callBaseMethod(a,"initialize");Sys.Application.add_load(a._app_onload$delegate);var b=a.get_element();if(a._preservePlace&&!a.canBeShown())b.style.display=c;a._cssClass=b.className;a.isImage()&&$addHandlers(b,{mouseover:a._onmouseover$delegate,mouseout:a._onmouseout$delegate,mousedown:a._onmousedown$delegate,mouseup:a._onmouseup$delegate,click:a._onclick$delegate});if(Sys.Extended.UI.HTMLEditor.isIE){function d(a){if(a.nodeType==1&&a.tagName){var b=a.tagName.toUpperCase();if(b!="INPUT"&&b!="TEXTAREA"&&b!="IFRAME")a.unselectable="on";for(var c=0;c<a.childNodes.length;c++)d(a.childNodes.item(c))}}d(b)}else try{b.style.MozUserSelect=c;b.parentNode.style.MozUserSelect=c}catch(e){}},dispose:function(){var a=this;a.isImage()&&$common.removeHandlers(a.get_element(),{mouseover:a._onmouseover$delegate,mouseout:a._onmouseout$delegate,mousedown:a._onmousedown$delegate,mouseup:a._onmouseup$delegate,click:a._onclick$delegate});a._loaded=false;Sys.Application.remove_load(a._app_onload$delegate);Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.callBaseMethod(a,"dispose")},_app_onload:function(){this.onButtonLoaded();this._loaded=true},onButtonLoaded:function(){},_onmouseover:function(){if(!this.isEnable())return false;Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_hover");return true},_onmouseout:function(){var a=this;if(!a.isEnable())return false;Sys.UI.DomElement.removeCssClass(a.get_element(),a._cssClass+"_hover");Sys.UI.DomElement.removeCssClass(a.get_element(),a._cssClass+"_mousedown");return true},_onmousedown:function(){if(!this.isEnable())return null;Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_mousedown");return false},_onmouseup:function(){if(!this.isEnable())return false;Sys.UI.DomElement.removeCssClass(this.get_element(),this._cssClass+"_mousedown");return true},_onclick:function(){if(!this.isEnable())return false;return true},isEnable:function(){if(!this._loaded)return false;if(this._editPanel==null)return false;return true},setActivity:function(b){var a=this;if(b)Sys.UI.DomElement.addCssClass(a.get_element(),a._cssClass+"_active");else Sys.UI.DomElement.removeCssClass(a.get_element(),a._cssClass+"_active")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton",Sys.UI.Control);
//END HTMLEditor.Toolbar_buttons.CommonButton.js
//START HTMLEditor.Toolbar_buttons.ImageButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.initializeBase(a,[b]);a._normalSrc="";a._hoverSrc="";a._downSrc="";a._activeSrc="";a._downTimer=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.prototype={get_normalSrc:function(){return this._normalSrc},set_normalSrc:function(b){this._normalSrc=b;var a=this.get_element();if(/none$/.test(a.src))a.src=b},get_hoverSrc:function(){return this._hoverSrc},set_hoverSrc:function(a){this._hoverSrc=a},get_downSrc:function(){return this._downSrc},set_downSrc:function(a){this._downSrc=a},get_activeSrc:function(){return this._activeSrc},set_activeSrc:function(a){this._activeSrc=a},isImage:function(){return true},_onmouseover:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmouseover"))return false;if(a._hoverSrc.length>0)a.get_element().src=a._hoverSrc;return true},_onmouseout:function(){var a=this,b=a.get_element();if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmouseout"))return false;if(a._hoverSrc.length>0)if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_mousedown")&&a._downSrc.length>0)b.src=a._downSrc;else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active")&&a._activeSrc.length>0)b.src=a._activeSrc;else b.src=a._normalSrc;return true},_onmousedown:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmousedown")===null)return null;if(a._downSrc.length>0){a.get_element().src=a._downSrc;a._downTimer=setTimeout(Function.createDelegate(a,a._onmouseup),1e3)}return true},_onmouseup:function(){var a=this,b=a.get_element();if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmouseup"))return false;if(a._downSrc.length>0){if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_hover")&&a._hoverSrc.length>0)b.src=a._hoverSrc;else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active")&&a._activeSrc.length>0)b.src=a._activeSrc;else b.src=a._normalSrc;if(a._downTimer!=null){clearTimeout(a._downTimer);a._downTimer=null}}return true},setActivity:function(c){var a=this,b=a.get_element();if(a._activeSrc.length>0)if(c){if(!Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active"))b.src=a._activeSrc}else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active"))if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_mousedown")&&a._downSrc.length>0)b.src=a._downSrc;else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_hover")&&a._hoverSrc.length>0)b.src=a._hoverSrc;else b.src=a._normalSrc;Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"setActivity",[c])}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);
//END HTMLEditor.Toolbar_buttons.ImageButton.js
//START HTMLEditor.Toolbar_buttons.DesignModeImageButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.initializeBase(this,[a]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.prototype={_onmousedown:function(c){var a=false,b=this;if(b._designPanel==null)return a;if(b._designPanel.isPopup())return a;if(Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.callBaseMethod(b,"_onmousedown",[c])===null)return a;b.callMethod();return a},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){if(this._designPanel==null)return false;if(this._designPanel.isPopup())return false;return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton);
//END HTMLEditor.Toolbar_buttons.DesignModeImageButton.js
//START HTMLEditor.Toolbar_buttons.MethodButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.initializeBase(this,[a])};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);
//END HTMLEditor.Toolbar_buttons.MethodButton.js
//START HTMLEditor.Toolbar_buttons.Undo.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.callBaseMethod(this,"callMethod"))return false;this._designPanel.undo()}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Undo",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.Undo.js
//START HTMLEditor.Toolbar_buttons.Redo.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.callBaseMethod(this,"callMethod"))return false;this._designPanel.redo()}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Redo",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.Redo.js
//START HTMLEditor.Toolbar_buttons.HorizontalSeparator.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.prototype={isImage:function(){return false}};Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);
//END HTMLEditor.Toolbar_buttons.HorizontalSeparator.js
//START HTMLEditor.Toolbar_buttons.EditorToggleButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.prototype={onEditPanelActivity:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.callBaseMethod(this,"onEditPanelActivity");this.setActivity(this.checkState())},checkState:function(){if(!this.checkRangeInDesign())return false;return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);
//END HTMLEditor.Toolbar_buttons.EditorToggleButton.js
//START HTMLEditor.Toolbar_buttons.Bold.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("bold",false,null)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.callBaseMethod(this,"checkState"))return false;return this._designPanel._queryCommandState("bold")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Bold.js
//START HTMLEditor.Toolbar_buttons.Italic.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("italic",false,null)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.callBaseMethod(this,"checkState"))return false;return this._designPanel._queryCommandState("italic")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Italic.js
//START HTMLEditor.Toolbar_buttons.Underline.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("underline",false,null)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.callBaseMethod(this,"checkState"))return false;return this._designPanel._queryCommandState("underline")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Underline.js
//START HTMLEditor.Toolbar_buttons.StrikeThrough.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("strikeThrough",false,null)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.callBaseMethod(this,"checkState"))return false;return this._designPanel._queryCommandState("strikeThrough")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.StrikeThrough",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.StrikeThrough.js
//START HTMLEditor.Toolbar_buttons.SubScript.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("subScript",false,null)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.callBaseMethod(this,"checkState"))return false;return this._designPanel._queryCommandState("subScript")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SubScript",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.SubScript.js
//START HTMLEditor.Toolbar_buttons.SuperScript.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("superScript",false,null)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.callBaseMethod(this,"checkState"))return false;return this._designPanel._queryCommandState("superScript")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SuperScript",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.SuperScript.js
//START HTMLEditor.Toolbar_buttons.Ltr.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.prototype={callMethod:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.callBaseMethod(a,"callMethod"))return false;a._designPanel._doc.body.style.direction=!a.checkState()?"":"rtl";if(!Sys.Extended.UI.HTMLEditor.isIE){var b=a._designPanel._getSelection(),d=a._designPanel._createRange(b);a._designPanel._removeAllRanges(b);a._designPanel._selectRange(b,d);a._designPanel.focusEditor()}var c=a;setTimeout(function(){c._editPanel.updateToolbar()},0)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.callBaseMethod(this,"checkState"))return false;if(!(this._designPanel._doc.body.style.direction&&this._designPanel._doc.body.style.direction=="rtl"))return true;return false}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Ltr",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Ltr.js
//START HTMLEditor.Toolbar_buttons.Rtl.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.prototype={callMethod:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.callBaseMethod(a,"callMethod"))return false;a._designPanel._doc.body.style.direction=!a.checkState()?"rtl":"";if(!Sys.Extended.UI.HTMLEditor.isIE){var b=a._designPanel._getSelection(),d=a._designPanel._createRange(b);a._designPanel._removeAllRanges(b);a._designPanel._selectRange(b,d);a._designPanel.focusEditor()}var c=a;setTimeout(function(){c._editPanel.updateToolbar()},0)},checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.callBaseMethod(this,"checkState"))return false;if(this._designPanel._doc.body.style.direction&&this._designPanel._doc.body.style.direction=="rtl")return true;return false}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Rtl",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Rtl.js
//START HTMLEditor.Toolbar_buttons.BoxButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.initializeBase(this,[a])};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);
//END HTMLEditor.Toolbar_buttons.BoxButton.js
//START HTMLEditor.Toolbar_buttons.DesignModeBoxButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.initializeBase(this,[a]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.prototype={_onmousedown:function(c){var a=false,b=this;if(b._designPanel==null)return a;if(b._designPanel.isPopup())return a;if(Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.callBaseMethod(b,"_onmousedown",[c])===null)return a;b.callMethod();return a},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){if(this._designPanel==null)return false;if(this._designPanel.isPopup())return false;return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton);
//END HTMLEditor.Toolbar_buttons.DesignModeBoxButton.js
//START HTMLEditor.Toolbar_buttons.FixedColorButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.initializeBase(a,[b]);a._defaultColor="#000000";a._colorDiv=null;a._methodButton=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.prototype={get_defaultColor:function(){return this._defaultColor},set_defaultColor:function(a){this._defaultColor=a;if(this._colorDiv!=null)this._colorDiv.get_element().style.backgroundColor=a},get_colorDiv:function(){return this._colorDiv},set_colorDiv:function(a){this._colorDiv=a},get_methodButton:function(){return this._methodButton},set_methodButton:function(a){this._methodButton=a},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.callBaseMethod(this,"callMethod"))return false;this.setColor(this.get_defaultColor())},setColor:function(){},initialize:function(){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.callBaseMethod(a,"initialize");if(a._methodButton!=null)a._methodButton.callMethod=Function.createDelegate(a,a.callMethod);if(a._colorDiv!=null)a._colorDiv.callMethod=Function.createDelegate(a,a.callMethod)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton);
//END HTMLEditor.Toolbar_buttons.FixedColorButton.js
//START HTMLEditor.Toolbar_buttons.FixedForeColor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.prototype={setColor:function(a){this._designPanel._execCommand("forecolor",false,a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor",Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton);
//END HTMLEditor.Toolbar_buttons.FixedForeColor.js
//START HTMLEditor.Toolbar_buttons.DesignModePopupImageButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.initializeBase(a,[b]);a._relatedPopup=null;a._autoClose=true;a._forclose_onmousedown$delegate=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.prototype={set_activeEditPanel:function(b){var a=this;a._editPanel!=b&&a._editPanel!=null&&a.closePopup();Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.callBaseMethod(a,"set_activeEditPanel",[b])},get_autoClose:function(){return this._autoClose},set_autoClose:function(a){this._autoClose=a},get_relatedPopup:function(){return this._relatedPopup},set_relatedPopup:function(a){this._relatedPopup=a},openPopup:function(h,j,i){var c=null,a=this;if(a._autoClose&&a._forclose_onmousedown$delegate!=c)return;if(a._relatedPopup!=c){a._bookmark=c;if(Sys.Extended.UI.HTMLEditor.isIE){var e=a._designPanel._getSelection();a._selType=e.type.toLowerCase();var d=a._designPanel._createRange(e);if(a._selType=="text"||a._selType=="none")try{a._bookmark=d.duplicate()}catch(k){}else if(a._selType=="control"){a._bookmark=d.item(0);d.remove(0);e.empty()}}if(typeof a._relatedPopup.set_relatedElement=="function"){a._relatedPopup.set_relatedElement(a.get_element());a._forclose_onmousedown$delegate=Function.createDelegate(a,a._forclose_onmousedown);if(a._autoClose){var f=a._designPanel.get_element().contentWindow,g=f.document.body,b=a;setTimeout(function(){var d="keydown",a="mousedown";if(b._forclose_onmousedown$delegate!=c){Sys.Extended.UI.HTMLEditor._addEvent(g,a,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(g,d,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(document.body,d,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(window,d,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(f,a,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(document.body,a,b._forclose_onmousedown$delegate);document.documentElement&&Sys.Extended.UI.HTMLEditor._addEvent(document.documentElement,a,b._forclose_onmousedown$delegate)}},0)}a._relatedPopup.open(h)}else a._relatedPopup.open(h,j,i)}},_forclose_onmousedown:function(e){var d="keydown",c="mousedown",a=this;if(a._forclose_onmousedown$delegate==null)return true;if(a._relatedPopup.isOpened)a._relatedPopup.close();else return true;if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{if(a._bookmark){if(Sys.Extended.UI.HTMLEditor.isIE){var b;if(a._selType=="control"){b=a._designPanel._doc.body.createControlRange();b.add(a._bookmark)}else b=a._bookmark;b.select()}a._bookmark=null}if(!Sys.Extended.UI.HTMLEditor.isIE){var f=a._designPanel._getSelection(),b=a._designPanel._createRange(f);a._designPanel._removeAllRanges(f);a._designPanel._selectRange(f,b);a._designPanel.focusEditor()}}catch(j){}var i=a;setTimeout(function(){if(i._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{i._editPanel.updateToolbar()}catch(a){}},0);if(a._autoClose)try{var g=a._designPanel.get_element().contentWindow,h=g.document.body;document.documentElement&&Sys.Extended.UI.HTMLEditor._removeEvent(document.documentElement,c,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(h,d,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(document.body,d,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(window,d,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(h,c,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(g,c,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(document.body,c,a._forclose_onmousedown$delegate)}catch(j){}a._forclose_onmousedown$delegate=null;if(e&&e.type)if(e.type==d){Sys.Extended.UI.HTMLEditor._stopEvent(e);return false}return true},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);
//END HTMLEditor.Toolbar_buttons.DesignModePopupImageButton.js
//START HTMLEditor.Toolbar_buttons.Selector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.initializeBase(this,[a])};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);
//END HTMLEditor.Toolbar_buttons.Selector.js
//START HTMLEditor.Toolbar_buttons.ColorSelector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.initializeBase(this,[a]);this._fixedColorButton=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.prototype={get_fixedColorButton:function(){return this._fixedColorButton},set_fixedColorButton:function(a){this._fixedColorButton=a},callMethod:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.callBaseMethod(a,"callMethod"))return false;a.openPopup(Function.createDelegate(a,a._onopened));return true},_onopened:function(a){a.setColor=Function.createDelegate(this,this.setColor)},setColor:function(a){this.closePopup();this._fixedColorButton!=null&&this._fixedColorButton.set_defaultColor(a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector);
//END HTMLEditor.Toolbar_buttons.ColorSelector.js
//START HTMLEditor.Toolbar_buttons.ForeColorSelector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.callBaseMethod(this,"callMethod"))return false},setColor:function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.callBaseMethod(this,"setColor",[a]);this._designPanel._execCommand("forecolor",false,a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector);
//END HTMLEditor.Toolbar_buttons.ForeColorSelector.js
//START HTMLEditor.Popups.Popup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.Popup=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Popups.Popup.initializeBase(a,[b]);a._iframe=null;a._top=0;a._left=0;a._doc=null;a._initialContent="";a._cssPath="";a._autoDimensions=true;a._registeredFields=[];a._registeredHandlers=[];a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a.isOpened=false;a.isLoaded=false;a.isLoading=false};Sys.Extended.UI.HTMLEditor.Popups.Popup.prototype={getDocument:function(){return this._doc},getPopupMediator:function(){if(this._iframe.contentWindow&&this._iframe.contentWindow.popupMediator)return this._iframe.contentWindow.popupMediator;else return null},get_registeredFields:function(){return this._registeredFields},set_registeredFields:function(value){this._registeredFields=eval(value)},get_registeredHandlers:function(){return this._registeredHandlers},set_registeredHandlers:function(value){this._registeredHandlers=eval(value)},get_initialContent:function(){return this._initialContent},set_initialContent:function(a){this._initialContent=a},get_cssPath:function(){return this._cssPath},set_cssPath:function(a){this._cssPath=a},get_autoDimensions:function(){return this._autoDimensions},set_autoDimensions:function(a){this._autoDimensions=a},get_iframe:function(){return this._iframe},set_iframe:function(a){this._iframe=a},checkCorrectLoaded:function(c){var a=this,b=a;if(b.isLoaded&&(b._iframe.style.height=="0px"||b._iframe.style.width=="0px"))a.isLoaded=false;if(!a.isLoaded){!a.isLoading&&a.reload();typeof c!="undefined"&&setTimeout(c,10);return false}return true},_baseOpen:function(b,e,d){var f="undefined",a=this,c=a;if(!a.checkCorrectLoaded(function(){c._baseOpen(b,e,d)}))return;var g=a.get_element();if(typeof d!=f)a._left=parseInt(d);if(typeof e!=f)a._top=parseInt(e);g.style.top=a._top+"px";g.style.left=a._left+"px";setTimeout(function(){typeof b=="function"&&c._onDocumentLoaded(b);c.isOpened=true},0)},open:function(a,c,b){this._baseOpen(a,c,b)},close:function(a){var b=this.get_element();this.isOpened=false;b.style.top="-2000px";b.style.left="-2000px";typeof a=="function"&&a()},reload:function(){var a=this;a.isLoading=true;var c=a.get_element(),d=c.parentNode;document.body.appendChild(c);d.appendChild(a.get_element());a._doc=a._iframe.contentWindow.document;a._doc.open();var b=new Sys.StringBuilder;b.append('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html><head>');a._cssPath.length>0&&b.append('<link rel="stylesheet" href="'+a._cssPath+'" media="all" />');b.append("<script>var __loaded__ = false;</sc"+"ript></head><body style='margin:0px; padding:0px; border-width:0px;' onload='__loaded__ = true;'>");a._autoDimensions&&b.append("<table cellspacing='0' cellpadding='0' border='0'><tr><td>");b.append(a._initialContent);a._autoDimensions&&b.append("</td></tr></table>");b.append("</body></html>");a._doc.write(b.toString());a._doc.close();a.isLoaded=false;a._afterReload()},_afterReload:function(){var e=true,g="TEXTAREA",d=false,c=this,b=c._iframe.contentWindow,a=c;c.isLoaded=b.__loaded__;if(!(a._doc.body&&a._doc.body.innerHTML))c.isLoaded=d;if(!c.isLoaded){setTimeout(function(){a._afterReload()},10);return}c.isLoaded=d;b.popupMediator={};b.popupMediator.registeredFields=c._registeredFields;b.popupMediator.registeredHandlers=c._registeredHandlers;b.popupMediator.get_callMethodByName=function(e){for(var c=b.popupMediator.registeredHandlers,a=0;a<c.length;a++){var d=c[a];if(d.name==e)return d.callMethod}return null};b.popupMediator.set_callMethodByName=function(f,e){for(var c=b.popupMediator.registeredHandlers,a=0;a<c.length;a++){var d=c[a];if(d.name==f)d.callMethod=e}};b.popupMediator.getField=function(e){for(var c=b.popupMediator.registeredFields,a=0;a<c.length;a++){var d=c[a];if(d.name==e)return b.document.getElementById(d.clientID)}return null};b.Sys=Sys;for(var f=0;f<c._registeredHandlers.length;f++)$find(c._registeredHandlers[f].clientID).activate(b.document.getElementById(c._registeredHandlers[f].clientID));if(Sys.Extended.UI.HTMLEditor.isIE)a._doc.onselectstart=function(){var c=a._iframe.contentWindow.event,b=c.srcElement.tagName.toUpperCase();if(b=="INPUT"||b==g)return e;return d};else{a._doc.onmousedown=function(b){var a=b.target.tagName.toUpperCase();if(a=="INPUT"||a==g||a=="SELECT")return e;if(Sys.Extended.UI.HTMLEditor.isSafari)if(a=="TABLE"||a=="TR"||a=="TD"||a=="DIV")return e;return d};for(var h=a._doc.getElementsByTagName("input"),f=0;f<h.length;f++)h[f].setAttribute("autocomplete","off")}if(c._autoDimensions){a._iframe.style.height="1000px";a._iframe.style.width="1000px";setTimeout(function(){a._iframe.style.height=a._doc.body.firstChild.offsetHeight+"px";a._iframe.style.width=a._doc.body.firstChild.offsetWidth+"px";a.isLoaded=e;a.isLoading=d},0)}else{a.isLoaded=e;a.isLoading=d}},_onDocumentLoaded:function(b){var a=this,c=a;if(!a.isLoaded){setTimeout(function(){c._onDocumentLoaded(b)},10);return}a.isLoaded=true;b(a._iframe.contentWindow)},initialize:function(){this.__appLoaded__=false;Sys.Extended.UI.HTMLEditor.Popups.Popup.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate)},dispose:function(){var a=this;Sys.Application.remove_load(a._app_onload$delegate);a.isOpened&&a.close();Sys.Extended.UI.HTMLEditor.Popups.Popup.callBaseMethod(a,"dispose")},_app_onload:function(){var a=this;if(a.__appLoaded__)return;a.__appLoaded__=true;var b=a.get_element();if(Sys.Extended.UI.HTMLEditor.isReallyVisible(b)){a._parentNode_=b.parentNode;a.reload()}}};Sys.Extended.UI.HTMLEditor.Popups.Popup.registerClass("Sys.Extended.UI.HTMLEditor.Popups.Popup",Sys.UI.Control);
//END HTMLEditor.Popups.Popup.js
//START HTMLEditor.Popups.AttachedPopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.initializeBase(this,[a]);this._relatedElement=null};Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.prototype={get_relatedElement:function(){return this._relatedElement},set_relatedElement:function(a){this._relatedElement=a},open:function(j){var a=this;if(a._relatedElement!=null){var n=a;if(!a.checkCorrectLoaded(function(){n.open(j)}))return;var k=$common.getLocation(a._relatedElement),d=k.x,e=k.y+a._relatedElement.offsetHeight,b=a.get_element().parentNode;while(b&&b.tagName&&b.tagName.toUpperCase()!="BODY"){var f=Sys.Extended.UI.HTMLEditor.getStyle(b,"position");if(f=="absolute"||f=="fixed"){var m=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"top")),l=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"left"));if(!isNaN(m)&&!isNaN(l)){d-=l;e-=m}break}else if(f=="relative"){var g=$common.getLocation(b);d-=g.x;e-=g.y}b=b.parentNode}var c=Sys.Extended.UI.HTMLEditor.getClientViewportElement(a._iframe),i=c.clientWidth+c.scrollLeft,h=c.clientHeight+c.scrollTop;if(e<c.scrollTop)e=c.scrollTop;if(d<c.scrollLeft)d=c.scrollLeft;if(e+a._iframe.offsetHeight>h)e-=e+a._iframe.offsetHeight-h;if(d+a._iframe.offsetWidth>i)d-=d+a._iframe.offsetWidth-i;Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.callBaseMethod(a,"open",[j,e,d])}},close:function(a){Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"close",[a])},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);
//END HTMLEditor.Popups.AttachedPopup.js
//START HTMLEditor.Popups.AttachedTemplatePopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.initializeBase(this,[a]);this._contentDiv=null};Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.prototype={get_contentDiv:function(){return this._contentDiv},set_contentDiv:function(a){this._contentDiv=a},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);
//END HTMLEditor.Popups.AttachedTemplatePopup.js
//START HTMLEditor.Popups.BaseColorsPopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup.initializeBase(this,[a])};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);
//END HTMLEditor.Popups.BaseColorsPopup.js
//START HTMLEditor.Toolbar_buttons.ForeColorClear.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("forecolor",false,"")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.ForeColorClear.js
//START HTMLEditor.Toolbar_buttons.FixedBackColor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor.prototype={setColor:function(a){this._designPanel._execCommand("backcolor",false,a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedBackColor",Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton);
//END HTMLEditor.Toolbar_buttons.FixedBackColor.js
//START HTMLEditor.Toolbar_buttons.BackColorSelector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.callBaseMethod(this,"callMethod"))return false},setColor:function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.callBaseMethod(this,"setColor",[a]);this._designPanel._execCommand("backcolor",false,a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector);
//END HTMLEditor.Toolbar_buttons.BackColorSelector.js
//START HTMLEditor.Toolbar_buttons.BackColorClear.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("backcolor",false,"")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BackColorClear",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.BackColorClear.js
//START HTMLEditor.Toolbar_buttons.RemoveStyles.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.prototype={callMethod:function(){var b=false;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.callBaseMethod(this,"callMethod"))return b;var a=this._designPanel;setTimeout(function(){var s="function",w="size",v="face",u="color",t="class",l="_right_",k="_left_",h=true,c=null,d="",O=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):d,q=a._getSelection(),o=a._createRange(q),f=c,J=b;if(!a.isControl()&&(Sys.Extended.UI.HTMLEditor.isIE&&o.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&O.length>0))f=a._getTextNodeCollection();else{f=a._tryExpand();J=h}if(f!=c&&f.length>0){var K=b,C=h,R=c;a._saveContent();var m=a._doc.createElement("span");m.id=k;var j=a._doc.createElement("span");j.id=l;var P=f[0].parentNode,N=f[f.length-1].parentNode;P.insertBefore(m,f[0]);if(f[f.length-1].nextSibling)N.insertBefore(j,f[f.length-1].nextSibling);else N.appendChild(j);while(C){C=b;for(var n=0;n<f.length;n++){var g=f[n].parentNode;if(g)if(f[n].previousSibling==c&&f[n].nextSibling==c){var z=g.tagName.toUpperCase();if(Sys.Extended.UI.HTMLEditor.isStyleTag(z)&&z!="A"&&(g.className!=Sys.Extended.UI.HTMLEditor.smartClassName||z.substr(0,1)=="H")){var D=Sys.Extended.UI.HTMLEditor.differAttr(g,[t,u,v,w]);K=h;if(D.length==0){var x=g.parentNode,r=g.firstChild?g.firstChild:c,F=c;if(z.toUpperCase().substr(0,1)=="H"&&Sys.Extended.UI.HTMLEditor.isIE){F=a._doc.createElement("p");F.className=Sys.Extended.UI.HTMLEditor.smartClassName;x.insertBefore(F,g);while(g.firstChild)F.appendChild(g.firstChild)}else{while(g.firstChild)x.insertBefore(g.firstChild,g);if(z.toUpperCase().substr(0,1)=="H"){var Q=a._doc.createElement("br");x.insertBefore(Q,g)}}x.removeChild(g);C=h}else{for(var x=g.parentNode,I=a._doc.createElement(z),E=0;E<D.length;E++)I.setAttribute(D[E][0],D[E][1]);x.insertBefore(I,g);while(g.firstChild)I.appendChild(g.firstChild);x.removeChild(g)}}}}}for(var n=0;n<f.length;n++){var r=f[n],i=f[n].parentNode!=c&&typeof f[n].parentNode!="undefined"?f[n].parentNode:c;if(i){var p=c;while(i&&i.tagName&&i.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName)&&i.tagName.toUpperCase()!="A"&&Sys.Extended.UI.HTMLEditor.differAttr(i,[t,u,v,w]).length==0){p=i;i=i.parentNode}if(p){K=h;function H(f,e,g,h){var a=g.cloneNode(b);if(f)if(f.push&&typeof f.push==s)for(var j=0;j<f.length;j++)a.appendChild(f[j]);else a.appendChild(f);while(e){var q=h?e.previousSibling:e.nextSibling;if(e.nodeType==1||e.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(d+e.data+d).length>0){if(e.nodeType==1){Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.tagName.toUpperCase()!="A"&&(!e.id||e.id!=k&&e.id!=l)&&Sys.Extended.UI.HTMLEditor.spanJoiner(e);if(Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.childNodes.length==0&&(!e.id||e.id!=k&&e.id!=l))e=c}if(e)if(a.childNodes.length==0||!h)a.appendChild(e);else a.insertBefore(e,a.firstChild)}e=q}if(a.childNodes.length==0){delete a;a=c}else if(a.childNodes.length==1&&a.firstChild.nodeType==3&&(d+a.firstChild.data+d).length==0){delete a;a=c}else if(Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){for(var n=a.childNodes.length,i=0;i<a.childNodes.length;i++){var m=a.childNodes.item(i);if(m.nodeType==1&&!Sys.Extended.UI.HTMLEditor.isStyleTag(m.tagName))n--}if(n==0){var o=[];while(a.firstChild){var m=a.removeChild(a.firstChild);o.push(m)}a=o}}if(g==p)return a;else return H(a,h?g.previousSibling:g.nextSibling,g.parentNode,h)}i=r.parentNode;if(r.previousSibling==c&&r.nextSibling==c&&i&&i.tagName&&i.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName)&&Sys.Extended.UI.HTMLEditor.differAttr(i,[t,u,v,w]).length>0)r=i;var A=H(c,r.previousSibling,r.parentNode,h),B=H(c,r.nextSibling,r.parentNode,b),g=p.parentNode;if(A){if(A.push&&typeof A.push==s)for(var y=0;y<A.length;y++)g.insertBefore(A[y],p);else g.insertBefore(A,p);if(Sys.Extended.UI.HTMLEditor.isIE){m=a._doc.getElementById(k);j=a._doc.getElementById(l)}}g.insertBefore(r,p);if(B){if(B.push&&typeof B.push==s)for(var y=0;y<B.length;y++)g.insertBefore(B[y],p);else g.insertBefore(B,p);if(Sys.Extended.UI.HTMLEditor.isIE){m=a._doc.getElementById(k);j=a._doc.getElementById(l)}}g.removeChild(p)}}}if(J){if(Sys.Extended.UI.HTMLEditor.isIE&&a.__saveBM__!=c){try{var e=m.parentNode;e.removeChild(m);while(e&&e.childNodes.length==0){e.parentNode.removeChild(e);e=e.parentNode}e=j.parentNode;e.removeChild(j);while(e&&e.childNodes.length==0){e.parentNode.removeChild(e);e=e.parentNode}m=c;j=c}catch(S){}var q=a._getSelection(),o=a._createRange(q);o.moveToBookmark(a.__saveBM__);o.select();a.__saveBM__=c}else if(a.__saveBM__!=c){if(a.__saveBM__[0].nodeType==3){var q=a._getSelection(),o=a._doc.createRange();o.setStart(a.__saveBM__[0],a.__saveBM__[1]);o.setEnd(a.__saveBM__[0],a.__saveBM__[1]);a._removeAllRanges(q);a._selectRange(q,o)}else{a._trySelect(a.__saveBM__[0],a.__saveBM__[0]);a.__saveBM__[0].parentNode.removeChild(a.__saveBM__[0])}a.__saveBM__=c}}else if(!Sys.Extended.UI.HTMLEditor.isIE){f=[];var C=b;function M(a,e){while(a){if(a==j){C=h;return}if(a.nodeType==3){while(a.nextSibling&&a.nextSibling.nodeType==3){a.data=d+a.data+d+a.nextSibling.data+d;a.parentNode.removeChild(a.nextSibling)}Sys.Extended.UI.HTMLEditor.Trim(d+a.data+d).length>0&&f.push(a)}else M(a.firstChild,b);if(C)return;var g=a.parentNode;if(e)while(a&&a.nextSibling==c)a=a.parentNode;a=a.nextSibling}}M(m,h);o=a._doc.createRange();o.setStart(f[0],0);o.setEnd(f[f.length-1],(d+f[f.length-1].data+d).length);a._removeAllRanges(q);a._selectRange(q,o)}else try{q=a._getSelection();var G=a._createRange(q),L=a._createRange(q);G.moveToElementText(m);L.moveToElementText(j);G.setEndPoint("EndToEnd",L);G.select()}catch(S){}try{var e;if(m!=c){e=m.parentNode;e.removeChild(m);while(e&&e.childNodes.length==0){e.parentNode.removeChild(e);e=e.parentNode}}if(j!=c){e=j.parentNode;e.removeChild(j);while(e&&e.childNodes.length==0){e.parentNode.removeChild(e);e=e.parentNode}}}catch(S){}a.onContentChanged();a._editPanel.updateToolbar()}},0)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveStyles",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.RemoveStyles.js
//START HTMLEditor.Toolbar_buttons.SelectButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.initializeBase(a,[b]);a._onclick_option$delegate=Function.createDelegate(a,a._onclick_option);a._onchange$delegate=Function.createDelegate(a,a._onchange)};Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.prototype={initialize:function(){var a=this,c=a.get_element().id;Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.callBaseMethod(a,"initialize");a._select=$get(c+"_select");$addHandler(a._select,"change",a._onchange$delegate);for(var b=0;b<a._select.options.length;b++){var d=a._select.options[b];$addHandler(d,"click",a._onclick_option$delegate)}},dispose:function(){var a=this;for(var b=0;b<a._select.options.length;b++){var c=a._select.options[b];$removeHandler(c,"click",a._onclick_option$delegate)}$removeHandler(a._select,"change",a._onchange$delegate);Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.callBaseMethod(a,"dispose")},isImage:function(){return false},callMethod:function(){return true},_onclick_option:function(b){if(!this.isEnable())return false;var a=b.target;a.parentNode.value=a.value;Sys.Extended.UI.HTMLEditor._stopEvent(b);if(!Sys.Extended.UI.HTMLEditor.isSafari)return false;this.callMethod(a.parentNode,b);return true},_onchange:function(a){if(!this.isEnable())return false;var b=a.target;Sys.Extended.UI.HTMLEditor._stopEvent(a);this.callMethod(b,a);return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);
//END HTMLEditor.Toolbar_buttons.SelectButton.js
//START HTMLEditor.Toolbar_buttons.DesignModeSelectButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.initializeBase(this,[a]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.prototype={onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel();this.checkState()},checkState:function(){if(!this.checkRangeInDesign())return false;return true},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.callBaseMethod(this,"callMethod"))return false;if(this._designPanel==null)return false;if(this._designPanel.isPopup())return false;return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton);
//END HTMLEditor.Toolbar_buttons.DesignModeSelectButton.js
//START HTMLEditor.Toolbar_buttons.FontName.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"initialize")},callMethod:function(a){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"callMethod"))return false;try{var b=this._designPanel;b._execCommand("fontname",false,a.options.item(a.selectedIndex).value)}catch(d){}},checkState:function(){var e=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(e,"checkState"))return false;var f=e._designPanel,a=null;try{a=Function.createDelegate(f,Sys.Extended.UI.HTMLEditor._queryCommandValue)("fontname")}catch(i){}if(!f._FontNotSet)if(!a||a.length==0)a=Sys.Extended.UI.HTMLEditor.getStyle(f._doc.body,"font-family");var c=e._select,b=0;if(a&&a.length>0){var g=a.toLowerCase().split(",")[0].replace(/^(['"])/,"").replace(/(['"])$/,"");for(b=0;b<c.options.length;b++){var h=c.options.item(b).value.toLowerCase().split(",")[0];if(h==g)break}if(b==c.options.length)try{var d=document.createElement("OPTION");d.value=a.replace(/^(['"])/,"").replace(/(['"])$/,"");d.text=a.split(",")[0].replace(/^(['"])/,"").replace(/(['"])$/,"");c.add(d,Sys.Extended.UI.HTMLEditor.isIE?b:null);$addHandler(d,"click",e._onclick_option$delegate)}catch(i){b=0}}c.selectedIndex=b}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton);
//END HTMLEditor.Toolbar_buttons.FontName.js
//START HTMLEditor.Toolbar_buttons.FontSize.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(this,"initialize")},callMethod:function(a){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(this,"callMethod"))return false;try{var b=this._designPanel;b._execCommand("FontSize",false,Sys.Extended.UI.HTMLEditor.fontSizeSeek(a.options.item(a.selectedIndex).value))}catch(d){}},checkState:function(){var c=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(c,"checkState"))return false;var f=c._designPanel,a=null,g=c._select.id;try{a=Function.createDelegate(f,Sys.Extended.UI.HTMLEditor._queryCommandValue)("fontsize",g)}catch(j){}if(a)a=a.toString();if(!f._FontNotSet)if(!a||a.length==0){a=Sys.Extended.UI.HTMLEditor.getStyle(f._doc.body,"font-size");a=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(a,c,g)}try{var d=c._select,b=0;if(a&&a.length>0){var h=a.toLowerCase().split(",")[0];for(b=0;b<d.options.length;b++){var i=Sys.Extended.UI.HTMLEditor.fontSizeSeek(d.options.item(b).value.toLowerCase().split(",")[0]);if(i==h)break}if(b==d.options.length)try{var e=document.createElement("OPTION");e.value=a;e.text=a;d.add(e,Sys.Extended.UI.HTMLEditor.isIE?b:null);$addHandler(e,"click",c._onclick_option$delegate)}catch(j){b=0}}d.selectedIndex=b}catch(j){}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton);
//END HTMLEditor.Toolbar_buttons.FontSize.js
//START HTMLEditor.Toolbar_buttons.Cut.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut.callBaseMethod(this,"callMethod"))return false;var a=this._designPanel;if(Sys.Extended.UI.HTMLEditor.isIE){a.openWait();setTimeout(function(){a.isShadowed();a._copyCut("x",true);a.closeWait()},0)}else a._copyCut("x",true)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Cut",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.Cut.js
//START HTMLEditor.Toolbar_buttons.Copy.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy.initializeBase(this,[a])};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 false;var a=this._designPanel;if(Sys.Extended.UI.HTMLEditor.isIE){a.openWait();setTimeout(function(){a.isShadowed();a._copyCut("c",true);a.closeWait();a._ifShadow()},0)}else a._copyCut("c",true)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Copy",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.Copy.js
//START HTMLEditor.Toolbar_buttons.Paste.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste.prototype={canBeShown:function(){return Sys.Extended.UI.HTMLEditor.isIE},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste.callBaseMethod(this,"callMethod"))return false;var a=this._designPanel;if(Sys.Extended.UI.HTMLEditor.isIE){a._saveContent();a.openWait();setTimeout(function(){a._paste(true);a.closeWait()},0)}else{var b=a._getSelection(),c=a._createRange(b);a._removeAllRanges(b);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"));a._selectRange(b,c);a.isWord=false;a.isPlainText=false}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Paste",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.Paste.js
//START HTMLEditor.Toolbar_buttons.PasteText.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText.callBaseMethod(this,"callMethod"))return false;var a=this._designPanel;if(Sys.Extended.UI.HTMLEditor.isIE){a._saveContent();a.openWait();setTimeout(function(){a._paste(false);a.closeWait()},0)}else{var b=a._getSelection(),d=a._createRange(b),c=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"),e=String.format(Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_OnPastePlainText,c);alert(e);setTimeout(function(){a._removeAllRanges(b);a._selectRange(b,d)},0);a.isPlainText=true}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteText",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.PasteText.js
//START HTMLEditor.Toolbar_buttons.PasteWord.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord.callBaseMethod(this,"callMethod"))return false;var a=this._designPanel;if(Sys.Extended.UI.HTMLEditor.isIE){a._saveContent();a.openWait();setTimeout(function(){a._paste(true,true);a.closeWait()},0)}else{var b=a._getSelection(),d=a._createRange(b),c=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"),e=String.format(Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_OnPasteFromMSWord,c);alert(e);setTimeout(function(){a._removeAllRanges(b);a._selectRange(b,d)},0);a.isWord=true}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.PasteWord",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.PasteWord.js
//START HTMLEditor.Toolbar_buttons.DecreaseIndent.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("Outdent")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DecreaseIndent",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.DecreaseIndent.js
//START HTMLEditor.Toolbar_buttons.IncreaseIndent.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("Indent")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.IncreaseIndent",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.IncreaseIndent.js
//START HTMLEditor.Toolbar_buttons.Paragraph.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.prototype={checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.callBaseMethod(this,"checkState"))return false;return this._designPanel._textAlignState("")},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("Paragraph")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Paragraph",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Paragraph.js
//START HTMLEditor.Toolbar_buttons.JustifyLeft.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.prototype={checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.callBaseMethod(this,"checkState"))return false;return this._designPanel._textAlignState("left")},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("JustifyLeft")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyLeft",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.JustifyLeft.js
//START HTMLEditor.Toolbar_buttons.JustifyCenter.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.prototype={checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.callBaseMethod(this,"checkState"))return false;return this._designPanel._textAlignState("center")},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("JustifyCenter")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyCenter",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.JustifyCenter.js
//START HTMLEditor.Toolbar_buttons.JustifyRight.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.prototype={checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.callBaseMethod(this,"checkState"))return false;return this._designPanel._textAlignState("right")},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("JustifyRight")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyRight",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.JustifyRight.js
//START HTMLEditor.Toolbar_buttons.JustifyFull.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.prototype={checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.callBaseMethod(this,"checkState"))return false;return this._designPanel._textAlignState("justify")},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("JustifyFull")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.JustifyFull",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.JustifyFull.js
//START HTMLEditor.Toolbar_buttons.RemoveAlignment.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.prototype={checkState:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.callBaseMethod(this,"checkState"))return false;return this._designPanel._textAlignState(null)},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.callBaseMethod(this,"callMethod"))return false;var a=this._designPanel,b=this._editPanel;a._saveContent();a.MSIE_justify("left",true);a.onContentChanged();setTimeout(function(){b.updateToolbar()},0)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveAlignment",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.RemoveAlignment.js
//START HTMLEditor.Toolbar_buttons.OrderedList.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("InsertOrderedList")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.OrderedList",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.OrderedList.js
//START HTMLEditor.Toolbar_buttons.BulletedList.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("InsertUnorderedList")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BulletedList",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.BulletedList.js
//START HTMLEditor.Toolbar_buttons.InsertHR.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.callBaseMethod(this,"callMethod"))return false;var a=this._designPanel;try{a._saveContent();var e=a._doc.createElement("div");e.innerHTML="<hr>";var b=e.firstChild,c=a._getSafePlace();if(!c)return;var d=c.parentNode;d.insertBefore(b,c);d.removeChild(c);b=b.nextSibling?b.nextSibling:b;Sys.Extended.UI.HTMLEditor._setCursor(b,a);setTimeout(function(){a.onContentChanged();a._editPanel.updateToolbar()},0);a.focusEditor();return true}catch(f){}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertHR",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.InsertHR.js
//START HTMLEditor.Toolbar_buttons.OkCancelPopupButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.prototype={set_activeEditPanel:function(c){var a=this;if(a._editPanel!=c&&a._editPanel!=null){var b=a.get_relatedPopup();if(typeof b._forceImClose=="function"){var d=b._forceImClose;d(b._iframe.contentWindow)}}Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.callBaseMethod(a,"set_activeEditPanel",[c])},callMethod:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.callBaseMethod(a,"callMethod"))return false;a.openPopup(Function.createDelegate(a,a._onopened));return true},_onopened:function(b){var a=this;b.popupMediator.set_callMethodByName("OK",Function.createDelegate(a,a._onOK));b.popupMediator.set_callMethodByName("Cancel",Function.createDelegate(a,a._onCancel));var c=a.get_relatedPopup();c._popup=a._designPanel._popup;c._forceImClose=Function.createDelegate(a,a._onCancel);a._designPanel._popup=a.get_relatedPopup();a.opened(b)},opened:function(){},_onOK:function(b){var a=this;a.okCheck(b)&&a._exit(Function.createDelegate(a,a.ok),b)},_onCancel:function(b){var a=this;a.cancelCheck(b)&&a._exit(Function.createDelegate(a,a.cancel),b)},_exit:function(c,b){var a=this;a.closePopup();a._designPanel._popup=a.get_relatedPopup()._popup;a.get_relatedPopup()._popup=null;a.get_relatedPopup()._forceImClose=null;c(b)},ok:function(){},cancel:function(){},okCheck:function(){return true},cancelCheck:function(){return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton);
//END HTMLEditor.Toolbar_buttons.OkCancelPopupButton.js
//START HTMLEditor.Toolbar_buttons.InsertLink.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.initializeBase(this,[a]);this._emptySrc=window.location.href.replace(/(http[s]*\:\/\/)[^\u0000]*/i,"$1")};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.prototype={callMethod:function(){var b=this,c=b._designPanel,d=c._getSelection(),e=c._createRange(d),a=Sys.Extended.UI.HTMLEditor.getSelParent(c);if(a.nodeType==3)a=a.parentNode;while(a&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A")a=a.parentNode;if(a&&a.tagName.toUpperCase()=="A"){b._edit=true;b._editLink(a)}else{b._edit=false;if(!b._createLink())return false}if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.callBaseMethod(b,"callMethod"))return false;return true},opened:function(a){this._preparePopup(a)},ok:function(d){var b=null,e="target",a=this,c=d.popupMediator.getField(e);if(c!=b)a._obj.target=c.value;var f=d.popupMediator.getField("url");if(f!=b)a._obj.href=f.value;if(/^javascript:/.test(a._obj.href)){a._obj.target=b;try{a._obj.removeAttribute(e)}catch(g){}}else{var c=d.popupMediator.getField(e);if(c!=b)a._obj.target=c.value}if(a._edit)a._edit_callback(true);else a._create_callback(true)},cancel:function(){if(this._edit)this._edit_callback(false);else this._create_callback(false)},_createLink:function(){var g=false,k="span",b=this,a=b._designPanel,l=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"",h=a._getSelection(),c=a._createRange(h);b._txt=null;if(!(a.isControl()&&Sys.Extended.UI.HTMLEditor.getSelParent(a).tagName&&(Sys.Extended.UI.HTMLEditor.getSelParent(a).tagName.toUpperCase()=="EMBED"||Sys.Extended.UI.HTMLEditor.getSelParent(a).tagName.toUpperCase()=="IMG"))&&!(!a.isControl()&&(Sys.Extended.UI.HTMLEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&l.length>0))){a._saveContent();var j=a._doc.createElement(k);j.innerHTML="new link";j.id=Sys.Extended.UI.HTMLEditor.smartClassName;var n=true;if(Sys.Extended.UI.HTMLEditor.isIE&&a.isControl()){var d=c.item(0),o=a._doc.createElement(k);d.parentNode.insertBefore(o,d);b._txt=j.firstChild;d.parentNode.insertBefore(b._txt,d);var p=a._doc.createElement(k);d.parentNode.insertBefore(p,d);d.parentNode.removeChild(d);a.setSelectionAfterOperation([o,p],g);n=g}else{a.insertHTML(Sys.Extended.UI.HTMLEditor.getHTML(j,true));var f=a._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);b._txt=f.firstChild;f.parentNode.insertBefore(f.firstChild,f);f.parentNode.removeChild(f)}if(!Sys.Extended.UI.HTMLEditor.isIE){c=a._createRange();c.setStart(b._txt,0);c.setEnd(b._txt,(""+b._txt.data+"").length);a._removeAllRanges(h);a._selectRange(h,c)}else n&&c.select();l=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";h=a._getSelection();c=a._createRange(h)}if(a.isControl()&&Sys.Extended.UI.HTMLEditor.getSelParent(a).tagName.toUpperCase()=="IMG"||!a.isControl()&&(Sys.Extended.UI.HTMLEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&l.length>0)){a._saveContent();b._obj={target:"default",href:b._emptySrc,title:""};for(var m=a._doc.getElementsByTagName("A"),i=[],e=0;e<m.length;e++)i.push([m[e],""+m[e].href+""]);a._execCommand("createLink",g,b._emptySrc);b._oldList=[];for(var e=0;e<i.length;e++){var q=i[e][0],r=i[e][1];q.href==r&&b._oldList.push(q)}}else{if(b._txt){a._undo(g);a.__stack.pop()}return g}return true},_editLink:function(b){var a=this._designPanel;this._obj=b;a._saveContent()},_preparePopup:function(c){var a=this;if(a._obj.target&&a._obj.target.length>0&&a._obj.target=="default")a._obj.target=a.get_relatedPopup().get_defaultTarget();var d=c.popupMediator.getField("target");if(d!=null)d.value=a._obj.target&&a._obj.target.length>0&&a._obj.target.substr(0,1)=="_"?a._obj.target.toLowerCase():"_self";var b=c.popupMediator.getField("url");if(b!=null){if(a._edit)b.value=Sys.Extended.UI.HTMLEditor.getRealAttribute(a._obj,"href");else b.value=a._obj.href;if(b.value.length==0)b.value=a._emptySrc;b.value=b.value.replace(/\&quot;/g,'"');setTimeout(function(){Sys.Extended.UI.HTMLEditor.setSelectionRange(b,0,b.value.length)},0)}},_edit_callback:function(c){var a=this,b=a._designPanel;try{if(!c)b._undo(false);else{if(a._obj.title.length==0){a._obj.title=null;a._obj.removeAttribute("title")}b.onContentChanged()}}catch(d){}return true},okCheck:function(b){var c=b.popupMediator.getField("url");if(c!=null){var a=c.value;if(a==""||a.length>=3&&a.substr(a.length-3,3)=="://"){b.alert(this.get_message("EmptyURL"));b.setTimeout(function(){try{c.focus()}catch(a){}},0);return false}return true}return false},_create_callback:function(k){var a=this,b=a._designPanel;try{if(k){for(var e=b._doc.getElementsByTagName("A"),i=0,g=0;g<e.length;g++){for(var j=true,f=e[g],h=0;h<a._oldList.length;h++)if(f==a._oldList[h]){j=false;break}if(!j)continue;i=g;if(a._obj.target)f.target=a._obj.target;f.href=a._obj.href;if(a._obj.title.length>0)f.title=a._obj.title}if(a._txt)a._txt.data=a._obj.href;if(e.length>0){var d=e[i],c=b._doc.createElement("span");c.innerHTML="&nbsp;";if(d.nextSibling!=null)d.parentNode.insertBefore(c,d.nextSibling);else d.parentNode.appendChild(c);setTimeout(function(){Sys.Extended.UI.HTMLEditor._setCursor(c,b);setTimeout(function(){d.parentNode.removeChild(c)},0)},0)}setTimeout(function(){b._editPanel.updateToolbar();b.onContentChanged()},0)}else{b._undo(false);b.__stack.pop();if(a._txt){b._undo(false);b.__stack.pop()}}b.focusEditor()}catch(l){}return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.InsertLink",Sys.Extended.UI.HTMLEditor.ToolbarButton.OkCancelPopupButton);
//END HTMLEditor.Toolbar_buttons.InsertLink.js
//START HTMLEditor.Popups.OkCancelAttachedTemplatePopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.OkCancelAttachedTemplatePopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.OkCancelAttachedTemplatePopup.initializeBase(this,[a])};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);
//END HTMLEditor.Popups.OkCancelAttachedTemplatePopup.js
//START HTMLEditor.Popups.LinkProperties.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.LinkProperties=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Popups.LinkProperties.initializeBase(a,[b]);a._defaultTarget="_self";a._targetTextHolder=null;a._urlTextHolder=null};Sys.Extended.UI.HTMLEditor.Popups.LinkProperties.prototype={get_defaultTarget:function(){return this._defaultTarget},set_defaultTarget:function(a){this._defaultTarget=a}};Sys.Extended.UI.HTMLEditor.Popups.LinkProperties.registerClass("Sys.Extended.UI.HTMLEditor.Popups.LinkProperties",Sys.Extended.UI.HTMLEditor.Popups.OkCancelAttachedTemplatePopup);
//END HTMLEditor.Popups.LinkProperties.js
//START HTMLEditor.Popups.PopupCommonButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton.initializeBase(a,[b]);a._loaded=false;a._activated=null;a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a._cssClass="";a._name="";a._onmouseover$delegate=Function.createDelegate(a,a._onmouseover);a._onmouseout$delegate=Function.createDelegate(a,a._onmouseout);a._onmousedown$delegate=Function.createDelegate(a,a._onmousedown);a._onmouseup$delegate=Function.createDelegate(a,a._onmouseup);a._onclick$delegate=Function.createDelegate(a,a._onclick)};Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton.prototype={isImage:function(){return true},set_toolTip:function(a){this.get_element().title=a},get_toolTip:function(){return this.get_element().title},set_name:function(a){this._name=a},get_name:function(){return this._name},initialize:function(){var a=this,b=a.get_element();Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton.callBaseMethod(a,"initialize");Sys.Application.add_load(a._app_onload$delegate);a._cssClass=b.className.split(" ")[0];a.isImage()&&$addHandlers(b,{mouseover:a._onmouseover$delegate,mouseout:a._onmouseout$delegate,mousedown:a._onmousedown$delegate,mouseup:a._onmouseup$delegate,click:a._onclick$delegate});if(Sys.Extended.UI.HTMLEditor.isIE){function c(a){if(a.nodeType==1&&a.tagName){var b=a.tagName.toUpperCase();if(b!="INPUT"&&b!="TEXTAREA"&&b!="IFRAME")a.unselectable="on";for(var d=0;d<a.childNodes.length;d++)c(a.childNodes.item(d))}}c(b)}else try{b.style.MozUserSelect="none";b.parentNode.style.MozUserSelect="none"}catch(d){}},activate:function(b){var a=this;a._activated=b;if(a.isImage()){Sys.Extended.UI.HTMLEditor._addEvent(a._activated,"mouseover",a._onmouseover$delegate);Sys.Extended.UI.HTMLEditor._addEvent(a._activated,"mouseout",a._onmouseout$delegate);Sys.Extended.UI.HTMLEditor._addEvent(a._activated,"mousedown",a._onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(a._activated,"mouseup",a._onmouseup$delegate);Sys.Extended.UI.HTMLEditor._addEvent(a._activated,"click",a._onclick$delegate)}},dispose:function(){var a=this;if(a.isImage()&&a._activated!=null){Sys.Extended.UI.HTMLEditor._removeEvent(a._activated,"mouseover",a._onmouseover$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(a._activated,"mouseout",a._onmouseout$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(a._activated,"mousedown",a._onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(a._activated,"mouseup",a._onmouseup$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(a._activated,"click",a._onclick$delegate)}a._activated=null;a._loaded=false;Sys.Application.remove_load(a._app_onload$delegate);Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton.callBaseMethod(a,"dispose")},_app_onload:function(){if(this._loaded)return;this.onButtonLoaded();this._loaded=true},onButtonLoaded:function(){},_onmouseover:function(){if(!this.isEnable())return false;Sys.UI.DomElement.addCssClass(this._activated,this._cssClass+"_hover");return true},_onmouseout:function(c){var b=this;if(!b.isEnable())return false;var a=c.toElement||c.relatedTarget;try{while(a&&typeof a!="undefined")if(a==b._activated)break;else a=a.parentNode}catch(d){a=null}if(a!=null)return true;Sys.UI.DomElement.removeCssClass(b._activated,b._cssClass+"_hover");Sys.UI.DomElement.removeCssClass(b._activated,b._cssClass+"_mousedown");return true},_onmousedown:function(){if(!this.isEnable())return null;Sys.UI.DomElement.addCssClass(this._activated,this._cssClass+"_mousedown");return false},_onmouseup:function(){if(!this.isEnable())return false;Sys.UI.DomElement.removeCssClass(this._activated,this._cssClass+"_mousedown");return true},_onclick:function(a){if(!this.isEnable())return false;this.callMethod(a);return true},callMethod:function(){var a=this,c=a._activated.ownerDocument||a._activated.document||target,b=c.defaultView||c.parentWindow,d=b.popupMediator.get_callMethodByName(a._name);Function.createDelegate(a,d)(b)},isEnable:function(){if(!this._loaded)return false;return true}};Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton.registerClass("Sys.Extended.UI.HTMLEditor.Popups.PopupCommonButton",Sys.UI.Control);
//END HTMLEditor.Popups.PopupCommonButton.js
//START HTMLEditor.Popups.PopupBoxButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.PopupBoxButton=function(a){Sys.Extended.UI.HTMLEditor.Popups.PopupBoxButton.initializeBase(this,[a]);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);
//END HTMLEditor.Popups.PopupBoxButton.js
//START HTMLEditor.Popups.PopupBGIButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.PopupBGIButton=function(a){Sys.Extended.UI.HTMLEditor.Popups.PopupBGIButton.initializeBase(this,[a])};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);
//END HTMLEditor.Popups.PopupBGIButton.js
//START HTMLEditor.Toolbar_buttons.RemoveLink.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.callBaseMethod(this,"callMethod"))return false;var b=this._designPanel,d=b._getSelection(),e=b._createRange(d),a=Sys.Extended.UI.HTMLEditor.getSelParent(b);if(a.nodeType==3)a=a.parentNode;while(a&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A")a=a.parentNode;if(a&&a.tagName.toUpperCase()=="A"){b._saveContent();var c=a.firstChild;while(a.firstChild)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a);c&&Sys.Extended.UI.HTMLEditor._setCursor(c,b);setTimeout(function(){b._editPanel.updateToolbar()},0);b.onContentChanged()}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.RemoveLink",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.RemoveLink.js
//START HTMLEditor.HTMLEditor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.Trim=function(a){return a.replace(/[\x00-\x1F]+/g,"")};Sys.Extended.UI.HTMLEditor.TrimAll=function(a){return a.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(c){var a=c,e=/(rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\))/ig;function b(a){return a<16?"0"+a.toString(16):a.toString(16)}function d(h,i,a,c,d){var g=parseInt(a),f=parseInt(c),e=parseInt(d);return "#"+b(g)+b(f)+b(e)}try{a=a.replace(e,d)}catch(f){}return a};Sys.Extended.UI.HTMLEditor._getScrollTop=function(c){var a=c.document,b=0;if(typeof c.pageYOffset=="number")b=c.pageYOffset;if(a.body&&a.body.scrollTop)b=a.body.scrollTop;else if(a.documentElement&&a.documentElement.scrollTop)b=a.documentElement.scrollTop;return b};Sys.Extended.UI.HTMLEditor._getScrollLeft=function(c){var a=c.document,b=0;if(typeof c.pageXOffset=="number")b=c.pageXOffset;else if(a.body&&a.body.scrollLeft)b=a.body.scrollLeft;else if(a.documentElement&&a.documentElement.scrollLeft)b=a.documentElement.scrollLeft;return b};Sys.Extended.UI.HTMLEditor.addFormOnSubmit=function(e,d){var b="undefined",a=null,c=window.theForm;if(window.theForm!=a&&typeof window.theForm!=b){if(c.HTMLEditor_editPanels==a||typeof c.HTMLEditor_editPanels==b){c.originalOnSubmit_HTMLEditor=window.theForm.onsubmit;c.HTMLEditor_editPanels=[];window.theForm.onsubmit=Sys.Extended.UI.HTMLEditor.EditPanelsOnSubmit;if(window.__doPostBack!=a&&typeof window.__doPostBack!=b)if(window.__doPostBack_HTMLEditor_original==a||typeof window.__doPostBack_HTMLEditor_original==b){window.__doPostBack_HTMLEditor_original=window.__doPostBack;window.__doPostBack=Sys.Extended.UI.HTMLEditor.EditPanelsOnPostBack}if(window.ValidatorGetValue!=a&&typeof window.ValidatorGetValue!=b)if(window.ValidatorGetValue_HTMLEditor_original==a||typeof window.ValidatorGetValue_HTMLEditor_original==b){window.ValidatorGetValue_HTMLEditor_original=window.ValidatorGetValue;window.ValidatorGetValue=Sys.Extended.UI.HTMLEditor.ValidatorGetValue}}c.HTMLEditor_editPanels.push({handler:e,editPanel:d})}};Sys.Extended.UI.HTMLEditor.removeFormOnSubmit=function(h){var c="undefined",b=null,a=window.theForm;if(window.theForm!=b&&typeof window.theForm!=c){var g=a.originalOnSubmit_HTMLEditor;if(a.HTMLEditor_editPanels!=b&&typeof a.HTMLEditor_editPanels!=c){for(var e=[],d=0;d<a.HTMLEditor_editPanels.length;d++){var f=a.HTMLEditor_editPanels[d];f.handler!=h&&e.push(f)}a.HTMLEditor_editPanels=e;if(a.HTMLEditor_editPanels.length==0){window.theForm.onsubmit=g;a.originalOnSubmit_HTMLEditor=b;a.HTMLEditor_editPanels=b;if(window.__doPostBack_HTMLEditor_original!=b&&typeof window.__doPostBack_HTMLEditor_original!=c){window.__doPostBack=window.__doPostBack_HTMLEditor_original;window.__doPostBack_HTMLEditor_original=b}if(window.ValidatorGetValue_HTMLEditor_original!=b&&typeof window.ValidatorGetValue_HTMLEditor_original!=c){window.ValidatorGetValue=window.ValidatorGetValue_HTMLEditor_original;window.ValidatorGetValue_HTMLEditor_original=b}}}}};Sys.Extended.UI.HTMLEditor.EditPanelsOnSubmit=function(d){for(var a=window.theForm,c=true,b=0;b<a.HTMLEditor_editPanels.length;b++){var c=a.HTMLEditor_editPanels[b].handler(d);if(!c)break}if(c&&a.originalOnSubmit_HTMLEditor!=null&&typeof a.originalOnSubmit_HTMLEditor!="undefined")c=a.originalOnSubmit_HTMLEditor(d);if(!c||!window.Page_IsValid)for(var b=0;b<a.HTMLEditor_editPanels.length;b++)a.HTMLEditor_editPanels[b].editPanel._contentPrepared=false;return c};Sys.Extended.UI.HTMLEditor.ValidatorGetValue=function(e){var c=null,a=$find(e);if(a!=c){var b=c;if(Sys.Extended.UI.HTMLEditor.Editor.isInstanceOfType(a))b=a.get_editPanel();else if(Sys.Extended.UI.HTMLEditor.EditPanel.isInstanceOfType(a))b=a;if(b!=c){var d=b._contentForValidation;if(d==c||typeof d=="undefined")d=b.get_content();return d}}return window.ValidatorGetValue_HTMLEditor_original(e)};Sys.Extended.UI.HTMLEditor.EditPanelsOnPostBack=function(d,c){for(var b=window.theForm,a=0;a<b.HTMLEditor_editPanels.length;a++){var e=b.HTMLEditor_editPanels[a].handler(null);if(!e)return false}if(window.__doPostBack_HTMLEditor_original!=null&&typeof window.__doPostBack_HTMLEditor_original!="undefined")return window.__doPostBack_HTMLEditor_original(d,c);return true};Sys.Extended.UI.HTMLEditor.getRealAttributeIE=function(e,f,g){var c="^(?:<[^>]*?",b=g,a="";function d(c,b){a=b}e.outerHTML.replace(new RegExp(c+f+'=")([^"]*?)"',"ig"),d);a==""&&e.outerHTML.replace(new RegExp(c+f+"=')([^']*?)'","ig"),d);a==""&&e.outerHTML.replace(new RegExp(c+f+"=)([^s>]*?)","ig"),d);if(b!=a&&a!=""){b=a;b=b.replace(/&amp;/g,"&")}return b};Sys.Extended.UI.HTMLEditor.getRealAttribute=function(d,b){var f=b.toLowerCase(),e=d.attributes,a="";for(i=0;i<e.length;++i){var c=e.item(i);if(!c.specified)continue;var b=c.name.toLowerCase();if(b==f){a=c.value;if(Sys.Extended.UI.HTMLEditor.isIE)a=Sys.Extended.UI.HTMLEditor.getRealAttributeIE(d,b,a);if(b=="src"||b=="href")a=a.replace(/(\(S\([A-Za-z0-9_]+\)\)\/)/,"");break}}return a};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(f){var a="",c,b=Sys.Extended.UI.HTMLEditor.Trim(f.replace(/[\x00-\x1F]+/g," ")).replace(/^[^\u0000]+?<html(?:[^>]*?)>/gi,a).replace(/<\/html(?:[^>]*?)>[^\u0000]*$/gi,a).replace(/<head(?:[^>]*?)>[^\u0000]*?<\/head(?:[^>]*?)>/gi,a).replace(/<body[^>]*?>([^\u0000]*?)<\/body(?:[^>]*?)>/gi,"$1").replace(/<\/?html(?:[^>]*?)>/gi,a).replace(/<\/?head(?:[^>]*?)>/gi,a).replace(/<\/?body(?:[^>]*?)>/gi,a).replace(/<!--(\w|\W)+?-->/ig,a).replace(/(<[\/]?)(?:o|v|x|p|w|\?xml):(\w+)([^>]*?>)/ig,"$1$2$3").replace(/<(IMAGEDATA)([^>]*?)>/ig,"<img$2>").replace(/<p[^>]*><p>&nbsp;<\/p><\/p>/ig,"<br>").replace(/<p[^>]*?\/>/ig,a).replace(/<(p|div)[^>]*?>&nbsp;<\/(\1)[^>]*?>/ig,a).replace(/<(p|div)[^>]*?><\/(\1)[^>]*?>/ig,a);do{c=b;b=b.replace(/<([^>]*)(?:class|size|lang|face|start|type|border|[ovwxp]:\w+)=(?:\'[^\']*\'|\"[^\"]*\"|[^> ]+)([^>]*)>/ig,"<$1$2>")}while(b!=c);var d=document.createElement("div");d.innerHTML=b;function e(m){var h="solid",g="black",f="1px",d="height",c="width";for(var r=m.childNodes.length,i=0;i<m.childNodes.length;i++){var b=m.childNodes.item(i);if(b.nodeType==1)if(b.tagName.indexOf("/")>=0){i--;b.parentNode.removeChild(b)}else{for(var j=b.tagName.toLowerCase(),q=false,s=Sys.Extended.UI.HTMLEditor.enabledWordTags.length,n=0;n<s;n++)if(Sys.Extended.UI.HTMLEditor.enabledWordTags[n]==j){q=true;break}e(b);if(!q){i+=b.childNodes.length;while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b);i--}else{var k=b.style.backgroundColor,l=b.style.color;b.style.cssText=a;b.removeAttribute("style");if(b.getAttribute(c)&&b.getAttribute(c).length>0)b.style.width=b.getAttribute(c);if(b.width&&b.width.length>0)b.style.width=b.width;b.width=a;try{b.removeAttribute(c)}catch(u){}if(b.getAttribute(d)&&b.getAttribute(d).length>0)b.style.height=b.getAttribute(d);if(b.height&&b.height.length>0)b.style.height=b.height;b.height=a;try{b.removeAttribute(d)}catch(u){}if(j=="table"){b.style.borderLeftWidth=f;b.style.borderLeftColor=g;b.style.borderLeftStyle=h;b.style.borderTopWidth=f;b.style.borderTopColor=g;b.style.borderTopStyle=h;b.style.backgroundColor=k;b.style.color=l}if(j=="td"){b.style.borderRightWidth=f;b.style.borderRightColor=g;b.style.borderRightStyle=h;b.style.borderBottomWidth=f;b.style.borderBottomColor=g;b.style.borderBottomStyle=h;b.style.backgroundColor=k;b.style.color=l}if(j=="font"||j=="span"){b.style.backgroundColor=k;b.style.color=l;for(var p=b.attributes,r=0,o=0;o<p.length;++o){var t=p.item(o);if(!t.specified)continue;r++}if(r==0&&b.style.cssText==a){i+=b.childNodes.length;while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b);i--}}}}}}e(d);b=Sys.Extended.UI.HTMLEditor.Trim(d.innerHTML);delete d;b=b.replace(/<[\/]?(xml|del|ins)[^>]*?>/ig,a).replace(/<(p|div)[^>]*?>/ig,a).replace(/<\/(p|div)[^>]*?>/ig,"<br>");do{c=b;b=b.replace(/<b><\/b>/ig,a).replace(/<i><\/i>/ig,a).replace(/<u><\/u>/ig,a).replace(/<strong><\/strong>/ig,a).replace(/<em><\/em>/ig,a).replace(/<sub><\/sub>/ig,a).replace(/<sup><\/sup>/ig,a);b=b.replace(/<span[^>]*?><\/span>/ig,a).replace(/<span>([^<]+?)<\/span>/ig,"$1");b=b.replace(/<font[^>]*?><\/font>/ig,a).replace(/<font>([^<]+?)<\/font>/ig,"$1")}while(b!=c);b=b.replace(/&rsquo;/g,"'").replace(/&lsquo;/g,"'").replace(/&ndash;/g,"-").replace(/&mdash;/g,"-").replace(/&hellip;/g,"...").replace(/&quot;/g,'"').replace(/&ldquo;/g,'"').replace(/&rdquo;/g,'"').replace(//g,a).replace(/&bull;/g,a).replace(/[ \s]+/g," ").replace(/((&nbsp;)+)/g,"&nbsp;");if(document.all)b=b.replace(/^[\x00-\x1F]*&nbsp;/,a);return b};Sys.Extended.UI.HTMLEditor.spanJoiner=function(g,s,o,p,r){var l="SPAN",k="class",j=null,n="undefined",q=0,e=g.childNodes.length;if(typeof o!=n&&o!=j)q=o;if(typeof p!=n&&p!=j)e=p;for(var f=q;f<e&&f<g.childNodes.length;f++){var a=g.childNodes.item(f);if(a.parentNode!=g)continue;switch(a.nodeType){case 1:if(a.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!(a.className.length>0||a.getAttribute(k)&&a.getAttribute(k).length>0)&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){g.removeChild(a);f--;e--;continue}if(a.tagName.toUpperCase()==l){while(a.childNodes.length==1&&a.firstChild.nodeType==1){if(a.firstChild.tagName.toUpperCase()==l&&!Sys.Extended.UI.HTMLEditor.isTempElement(a.firstChild)){var h=Sys.Extended.UI.HTMLEditor.differAttr(a.firstChild,[]),d=Sys.Extended.UI.HTMLEditor.differStyle(a.firstChild),i=a.firstChild,w=i.childNodes;while(i.firstChild!=j)a.insertBefore(i.firstChild,i);for(var b=0;b<d.length;b++)if(d[b][1])try{if(a.style[d[b][0]])if(d[b][0].toLowerCase().indexOf("color")>=0)a.style[d[b][0]]=d[b][1];else try{var u=a.style[d[b][0]];a.style[d[b][0]]=a.style[d[b][0]]+" "+d[b][1];if(u==a.style[d[b][0]])a.style[d[b][0]]=d[b][1]}catch(x){a.style[d[b][0]]=d[b][1]}else a.style[d[b][0]]=d[b][1]}catch(x){}for(var b=0;b<h.length;b++)h[b][1]&&a.setAttribute(h[b][0],h[b][1]);a.removeChild(i);continue}else if(a.firstChild.tagName.toUpperCase()==l&&Sys.Extended.UI.HTMLEditor.isTempElement(a.firstChild)){var t=a.firstChild;a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a);a=t}break}var m=[],c=a.nextSibling;while(!Sys.Extended.UI.HTMLEditor.isTempElement(a)&&c&&f+1<e&&(c.nodeType==3||c.nodeType==1&&(c.tagName.toUpperCase()==l||c.tagName.toUpperCase()=="BR"&&typeof r==n)&&!Sys.Extended.UI.HTMLEditor.isTempElement(c)))if(c.nodeType==3)if((""+c.data+"").length==0){c.parentNode.removeChild(c);c=a.nextSibling;e--}else break;else if(c.tagName.toUpperCase()=="BR"){m.push(c);c=c.nextSibling}else{var h=Sys.Extended.UI.HTMLEditor.differAttr(a,[],c),d=Sys.Extended.UI.HTMLEditor.differStyle(a,c);if(h.length==0&&d.length==0&&a.className==c.className){for(var v=m.length,b=0;b<v;b++){a.appendChild(m[b]);e--}m=[];while(c.firstChild)a.appendChild(c.firstChild);c.parentNode.removeChild(c);c=a.nextSibling;e--}else break}if(!Sys.Extended.UI.HTMLEditor.isTempElement(a)&&a.className.length==0){var h=Sys.Extended.UI.HTMLEditor.differAttr(a,[]),d=Sys.Extended.UI.HTMLEditor.differStyle(a);if(h.length==0&&d.length==0){f--;e--;while(a.firstChild){a.parentNode.insertBefore(a.firstChild,a);e++}a.parentNode.removeChild(a);continue}}}if(a.parentNode!=j)if(a.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!(a.className.length>0||a.getAttribute(k)&&a.getAttribute(k).length>0)&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){g.removeChild(a);f--;e--;continue}else Sys.Extended.UI.HTMLEditor.spanJoiner(a,s)}}};Sys.Extended.UI.HTMLEditor._styleTags=["strong","em","u","strike","s","span","font","b","sub","sup","a","i"];Sys.Extended.UI.HTMLEditor.isStyleTag=function(b){if(!b)return false;for(var a=0;a<Sys.Extended.UI.HTMLEditor._styleTags.length;a++)if(Sys.Extended.UI.HTMLEditor._styleTags[a].toLowerCase()==b.toLowerCase())return true;return false};Sys.Extended.UI.HTMLEditor.smartClassName="MSIEparagraph";Sys.Extended.UI.HTMLEditor.noContextMenuAttribute="obout-no-contextmenu";Sys.Extended.UI.HTMLEditor.isTempElement=function(a){if(a.id&&a.id.length>0&&a.id.indexOf(Sys.Extended.UI.HTMLEditor.smartClassName)>=0)return true;return false};Sys.Extended.UI.HTMLEditor.differAttr=function(c,j,h){var d=[],b=c.parentNode;if(typeof h!="undefined")b=h;if(!b||!b.tagName||!Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName))b=null;if(c.attributes)for(var f=0;f<c.attributes.length;f++){for(var a=c.attributes[f],i=false,g=0;g<j.length;g++)if(a.name.toUpperCase()==j[g].toUpperCase()){i=true;break}if(i)continue;if(a.name.toUpperCase()=="STYLE")continue;if(a.name.toUpperCase().substr(0,4)=="_MOZ")continue;if(a.specified)if(b&&b.attributes&&b.attributes[a.name]){var e=b.attributes[a.name];if(e)(a.name!=e.name||a.value!=e.value)&&d.push([a.name,a.value])}else{if(a.name.toUpperCase()=="CLASS"&&a.value=="")continue;d.push([a.name,a.value])}}return d};Sys.Extended.UI.HTMLEditor.differStyle=function(e,l){var i="length",h="csstext",g="accelerator",f="string",m="undefined",k=[],d=e.parentNode;if(typeof l!=m)d=l;if(!d||!d.tagName||!Sys.Extended.UI.HTMLEditor.isStyleTag(d.tagName))d=null;function j(b,a){a=""+a;if(b.toLowerCase()=="textdecoration")for(var d=a.split(" "),c=0;c<d.length;c++)k.push([b,Sys.Extended.UI.HTMLEditor.Trim(d[c])]);else k.push([b,a])}for(var b in e.style)if(b&&typeof b==f&&b!=g){var a=b;if(!isNaN(parseInt(b))){if(!Sys.Extended.UI.HTMLEditor.isSafari)continue;a=e.style[b]}var c=e.style[a];if(c&&typeof c==f&&c!=g)if(d&&d.style){var n=d.style[a];if(a.toLowerCase()!=h&&a.toLowerCase()!=i)c!=n&&j(a,c)}else a.toLowerCase()!=h&&a.toLowerCase()!=i&&j(a,c)}if(typeof l!=m)for(var b in d.style)if(b&&typeof b==f&&b!=g){var a=b;if(!isNaN(parseInt(b))){if(!Sys.Extended.UI.HTMLEditor.isSafari)continue;a=e.style[b]}var c=d.style[a];if(c&&typeof c==f&&c!=g){var n=e.style[a];if(b.toLowerCase()!=h&&a.toLowerCase()!=i)c!=n&&j(a,c)}}return k};Sys.Extended.UI.HTMLEditor.brXHTML=function(a){return a.replace(/<br>/ig,"<br/>")};Sys.Extended.UI.HTMLEditor._needsClosingTag=function(b){var a=" script style div span a del strong em u strike font b sub sup p iframe li ul ol placeholder textarea td tr ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor._encodeText_=function(a){return a.replace(/&/ig,"&amp;").replace(/</ig,"&lt;").replace(/>/ig,"&gt;").replace(/\"/ig,"&quot;").replace(/\xA0/ig,"&nbsp;")};Sys.Extended.UI.HTMLEditor._noNeedsClosingTag=function(b){var a=" hr br ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor.canBeInsideP=function(b,e){var d="TABLE";if(b&&b.style&&b.style.display&&b.style.display.toLowerCase()=="inline")return true;var c=b.tagName.toUpperCase();if(c.length==2)if(c.substr(0,1)=="H"&&parseInt(c.substr(1,1))>0)return false;switch(c){case "TBODY":case "TR":case "TD":if(typeof e!="undefined"){var a=b.parentNode;while(a&&a.tagName&&a.tagName.toUpperCase()!=d)a=a.parentNode;if(a.tagName.toUpperCase()==d&&a.style&&a.style.display&&a.style.display.toLowerCase()=="inline")return true}case "P":case "PRE":case d:case "OL":case "UL":case "LI":case "HR":case "DIV":case "BLOCKQUOTE":case "FORM":case "FIELDSET":case "LEGEND":return false;default:return true}};Sys.Extended.UI.HTMLEditor.convertAlign=function(b){var a,c;try{c=parseInt(b)-1}catch(d){return b}switch(c){case 1:a="left";break;case 2:a="right";break;case 3:a="texttop";break;case 4:a="absmiddle";break;case 5:a="baseline";break;case 6:a="absbottom";break;case 7:a="bottom";break;case 8:a="middle";break;case 9:a="top";break;default:a=b.replace(/\"/g,"&quot;")}return a};Sys.Extended.UI.HTMLEditor.getHTML=function(a,b,d){try{if(typeof d=="undefined")if(!b&&a.nodeType==1)return a.innerHTML;else if(b&&a.nodeType==1&&Sys.Extended.UI.HTMLEditor.isIE)return a.outerHTML}catch(e){}var c=new Sys.Extended.UI.HTMLEditor.jsDocument(true);Sys.Extended.UI.HTMLEditor._getHTML_(c,a,b);return c.toString()};Sys.Extended.UI.HTMLEditor._getHTML_=function(c,a,v){var f='"',g="&quot;",e="",j=null,s="embed";switch(a.nodeType){case 1:case 11:if(a.tagName&&a.tagName.indexOf("/")>=0){if(Sys.Extended.UI.HTMLEditor.isIE){var h=a.tagName.toLowerCase().substr(a.tagName.indexOf("/")+1),o=a.previousSibling;if(h==s)return;while(o!=j){if(o.nodeType==a.nodeType&&o.tagName&&o.tagName.toLowerCase()==h){c.append("</teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":"+a.tagName.toLowerCase().substr(a.tagName.indexOf("/")+1)+">");return}o=o.previousSibling}}return}var l,r,i;if(v&&a.tagName.length>0){var h=a.tagName.toLowerCase();l=!(a.hasChildNodes()||Sys.Extended.UI.HTMLEditor._needsClosingTag(a));r=true;var u=e;if(Sys.Extended.UI.HTMLEditor.isIE&&a.scopeName&&typeof a.scopeName!="undefined")u=a.scopeName.toUpperCase()=="HTML"?e:a.scopeName+":";if(Sys.Extended.UI.HTMLEditor.isIE&&(l||h=="placeholder")&&!Sys.Extended.UI.HTMLEditor._noNeedsClosingTag(a)&&h!=s){var n=a.nextSibling;while(n!=j){if(n.nodeType==a.nodeType&&n.tagName){var t=n.tagName;if(t.indexOf("/")>=0)if(t.toLowerCase().substr(t.indexOf("/")+1)==h){l=false;r=false;break}}n=n.nextSibling}}!Sys.Extended.UI.HTMLEditor.canBeInsideP(a)&&c.append("\n");c.append("<"+(!l&&!r?"teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":":u)+h);Sys.Extended.UI.HTMLEditor.isIE&&a.name&&a.name.length>0&&c.append(' name="'+a.name.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.value&&a.value.length>0&&h!="textarea"&&c.append(' value="'+a.value.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.className&&a.className.length>0&&c.append(' class="'+a.className.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.align&&a.align.length>0&&c.append(' align="'+a.align.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.color&&a.color.length>0&&c.append(' color="'+a.color.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.size&&a.size.length>0&&a.size!="+0"&&c.append(' size="'+a.size.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.shape&&a.shape.length>0&&c.write(' shape="'+a.shape.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.coords&&a.coords.length>0&&c.write(' coords="'+a.coords.replace(/\"/g,g)+f);var w=a.attributes,q=j;for(i=0;i<w.length;++i){var p=w.item(i);if(!p.specified)continue;var d=p.name.toLowerCase();if(d.substr(0,4)=="_moz")continue;if(d=="teoalign")continue;var b;if(d!="style")if(d=="width"){b=a.width;if(Sys.Extended.UI.HTMLEditor.isIE&&b==0){var k=0;a.outerHTML.replace(new RegExp("^(?:<[^>]*?width=)([\\d]+)","ig"),function(b,a){k=a});if(b!=k)b=k}}else if(d=="height"){b=a.height;if(Sys.Extended.UI.HTMLEditor.isIE&&b==0){var k=0;a.outerHTML.replace(new RegExp("^(?:<[^>]*?height=)([\\d]+)","ig"),function(b,a){k=a});if(b!=k)b=k}}else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="name"&&a.name&&a.name.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="value"&&a.value&&a.value.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="align"&&a.align&&a.align.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="class"&&a.className&&a.className.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="color"&&a.color&&a.color.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="size"&&a.size&&a.size.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="shape"&&a.shape&&a.shape.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="coords"&&a.coords&&a.coords.length>0)continue;else if(h==s&&d=="align"&&Sys.Extended.UI.HTMLEditor.isIE)b=Sys.Extended.UI.HTMLEditor.convertAlign(p.value);else{b=p.value;if(Sys.Extended.UI.HTMLEditor.isSafari&&d=="class")if(/apple-style/ig.test(b))continue;if(d=="src"||d=="href"){if(Sys.Extended.UI.HTMLEditor.isIE)b=Sys.Extended.UI.HTMLEditor.getRealAttributeIE(a,d,b);b=b.replace(/(\(S\([A-Za-z0-9_]+\)\)\/)/,e)}b=b.replace(/\"/g,g)}else{if(Sys.Extended.UI.HTMLEditor.isSafari)q=p.value;continue}var m=f;if((e+b+e).indexOf(f)>=0)m="'";d!=j&&c.append(" "+d+"="+m+b+m)}if(a.style.cssText.length>0||q!=j){var d="style",z=/(url\((?:[^\)]*)\))/ig,y=[];function C(b,a){y.push(a)}var b=(q!=j?q:a.style.cssText).toLowerCase();b.replace(z,C);var x=0;function D(){var a=y[x];x++;return a}b=Sys.Extended.UI.HTMLEditor.tryReplaceRgb(b.replace(z,D)).replace(/(font-weight\s*:\s*)(700)/ig,"$1bold").replace(/([\s]*-moz-[^;]*[;][\s]*)/ig,e).replace(/(-moz-.*)$/i,e).replace(/(background-position: 0% 0%[;]*[\s]*)/ig,e);if(Sys.Extended.UI.HTMLEditor.isSafari){function B(d,a,b,c){return a+b.replace(/(,)/g,e)+c}b=b.replace(/(text-decoration:)([^;$]+)([;$])/ig,B)}if(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera){function A(d,a,b,c){return a+b.replace(/(['"])/g,e)+c}b=b.replace(/(font-family:)([^;]+)([;]*)/ig,A)}if(b.length>0){var m=f;if((e+b+e).indexOf(f)>=0)m="'";c.append(" "+d+"="+m+b+m)}}c.append(l?" />":">");h=="br"&&c.append("\n")}a.tagName&&a.tagName.toUpperCase()=="SCRIPT"&&c.append(a.text);if(a.tagName&&a.tagName.toUpperCase()=="STYLE")c.append(a.innerHTML);else for(i=a.firstChild;i;i=i.nextSibling)Sys.Extended.UI.HTMLEditor._getHTML_(c,i,true);v&&a.tagName.length>0&&!l&&r&&c.append("</"+u+a.tagName.toLowerCase()+">");break;case 3:c.append(Sys.Extended.UI.HTMLEditor._encodeText_(e+a.data+e));break;case 8:if(a.length>0)c.append("<!--"+a.data+"-->");else c.append("<!---->")}};Sys.Extended.UI.HTMLEditor.RemoveContextMenu=function(){var a=this,b=a._contextElement.parentNode.removeChild(a._contextElement);if(b)delete b;a._contextElement=null;a._contextTable=null;if(a.__saved_range__){a.__saved_range__.select();a.__saved_range__=null}};Sys.Extended.UI.HTMLEditor.contentEditable=function(a,f){var e="undefined",b=null;while(a!=b){try{var c=b;if(a.contentEditable!=b&&typeof a.contentEditable!=e&&!(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera))if(!a.contentEditable||a.contentEditable=="false")c=false;else c=true;else{var d=a.getAttribute("contenteditable");if(typeof d=="boolean")c=d;else if(typeof d=="string"&&d.toLowerCase()=="false")c=false}if(c!=b&&typeof c=="boolean")if(!c)return a}catch(g){}if(typeof f!=e&&f)return b;if(a.tagName!=b&&typeof a.tagName!=e&&(a.tagName.toUpperCase()=="BODY"||a.tagName.toUpperCase()=="HTML"))break;a=a.parentNode}return b};Sys.Extended.UI.HTMLEditor.getSelParent=function(c){var d=c._getSelection(),b=c._createRange(d),a=null;if(Sys.Extended.UI.HTMLEditor.isIE)if(d.type.toLowerCase()=="control")a=b.item(0);else a=c._getParent(b);else{a=c._getParent(b);if(a.nodeType!=3&&b.startContainer==b.endContainer){var e=a;a=a.childNodes.item(b.startOffset);if(a==null)a=e}}return a};Sys.Extended.UI.HTMLEditor.__getIndex=function(b){var a=0;if(b.parentNode)for(;a<b.parentNode.childNodes.length;a++)if(b.parentNode.childNodes.item(a)==b)break;return a};Sys.Extended.UI.HTMLEditor.isInlineElement=function(a){var b=false;if(a.nodeType==3)return true;if(a.nodeType!=1)return b;if(!a.tagName||a.tagName.length==0)return b;if(a&&a.style&&a.style.display&&a.style.display.toLowerCase()=="inline")return true;var c=a.tagName.toUpperCase();if(c.length==2)if(c.substr(0,1)=="H"&&parseInt(c.substr(1,1))>0)return b;switch(c){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 b;default:return true}};Sys.Extended.UI.HTMLEditor.capLock=function(b){var a=b.charCode,c=b.shiftKey?b.shiftKey:a==16?true:false;if(a>=65&&a<=90&&!c||a>=97&&a<=122&&c)return true;else return false};Sys.Extended.UI.HTMLEditor.operateAnchors=function(e,i,k){for(var h=i.getElementsByTagName("A"),j=false,f=0;f<h.length;f++){var a=h[f];if(a.name&&a.name.length>0){for(var d=[],g=0;g<a.childNodes.length;g++){var b=a.childNodes.item(g);if(b.nodeType==1&&b.tagName&&b.tagName.toUpperCase()=="IMG"&&b.src==e._editPanel.get_imagePath_anchor()){d.push(b);j=true}}while(d.length>0)a.removeChild(d.pop());if(!k){var c=i.createElement("IMG");c.title=a.name;c.src=e._editPanel.get_imagePath_anchor();c.setAttribute(e.noContextMenuAttributeName(),"yes");a.appendChild(c)}}}return j};Sys.Extended.UI.HTMLEditor.operatePlaceHolders=function(q,h,r){var n="undefined",m="PLACEHOLDER",l="placeholder",k="dummytag",o=false;if(r){for(var g=h.getElementsByTagName("IMG"),c=[],b=0;b<g.length;b++)c.push(g[b]);for(var b=0;b<c.length;b++){var a=c[b],i=a.getAttribute(k);if(i&&i.length>0&&i.toLowerCase()==l){var j=h.createElement(m),d=a.title;if(d==null||typeof d==n)d=a.getAttribute("title");j.name=d;j.setAttribute("name",d);a.parentNode.insertBefore(j,a);a.parentNode.removeChild(a);o=true}}}else{for(var g=h.getElementsByTagName(m),c=[],b=0;b<g.length;b++)c.push(g[b]);for(var b=0;b<c.length;b++){var a=c[b],p=true;try{if(a.childNodes.length>0)p=false}catch(s){}if(p){var e=a.name;if(e==null||typeof e==n)e=a.getAttribute("name");var f=h.createElement("IMG");f.title=e;f.src=q._editPanel.get_imagePath_placeHolder();f.setAttribute(k,l);f.setAttribute("title",e);a.parentNode.insertBefore(f,a);a.parentNode.removeChild(a)}}}return o};Sys.Extended.UI.HTMLEditor.inspectForShadows=function(e){var d="draggesture",c="dragstart";for(var b=e.getElementsByTagName("IMG"),a=0;a<b.length;a++)if(b[a].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&b[a].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0){try{if(Sys.Extended.UI.HTMLEditor.isIE)$removeHandler(b[a],c,Sys.Extended.UI.HTMLEditor.stopDrag);else $removeHandler(b[a],d,Sys.Extended.UI.HTMLEditor.stopDrag)}catch(f){}if(Sys.Extended.UI.HTMLEditor.isIE)$addHandler(b[a],c,Sys.Extended.UI.HTMLEditor.stopDrag);else $addHandler(b[a],d,Sys.Extended.UI.HTMLEditor.stopDrag)}};Sys.Extended.UI.HTMLEditor.attachedIdAttribute="obout-attached-id";Sys.Extended.UI.HTMLEditor.stopDrag=function(a){a&&a.stopPropagation();a.preventDefault();return false};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(c,h){var f="cssText";for(var k=c.innerHTML,l=false,d=0;d<Sys.Extended.UI.HTMLEditor.replacingRules.length;d++){var n=new RegExp("<"+Sys.Extended.UI.HTMLEditor.replacingRules[d][0]+"[s>]","ig");if(n.test(k)){l=true;break}}if(!l)if(!/<font[\s>]/ig.test(k))return;for(var i=0;i<c.childNodes.length;i++){var a=c.childNodes.item(i);if(a.nodeType==1){for(var e=null,j=a.tagName.toLowerCase(),d=0;d<Sys.Extended.UI.HTMLEditor.replacingRules.length;d++)if(Sys.Extended.UI.HTMLEditor.replacingRules[d][0].toLowerCase()==j){e=Sys.Extended.UI.HTMLEditor.replacingRules[d];break}if(e){var b=h._doc.createElement("SPAN");b.style[f]=a.style[f];if(Sys.Extended.UI.HTMLEditor.isIE)b.style[e[1]]=e[2];else b.style[e[1].replace(/\-(\w)/g,function(b,a){return a.toUpperCase()})]=e[2];while(a.firstChild)b.appendChild(a.firstChild);c.insertBefore(b,a);c.removeChild(a);a=b}else if(j=="font"){var b=h._doc.createElement("SPAN"),m=a.size;b.style[f]=a.style[f];if(a.color)b.style.color=a.color;if(a.face)b.style.fontFamily=a.face;while(a.firstChild)b.appendChild(a.firstChild);c.insertBefore(b,a);c.removeChild(a);if(m){var g=h._doc.createElement("FONT");g.size=m;c.insertBefore(g,b);if(b.style[f].length>0){g.appendChild(b);a=b}else{while(b.firstChild)g.appendChild(b.firstChild);c.removeChild(b);a=g}}else a=b}Sys.Extended.UI.HTMLEditor.replaceOldTags(a,h)}}};Sys.Extended.UI.HTMLEditor.getStyle=function(a,b){var c="";if(a.nodeType==1)if(a.ownerDocument&&a.ownerDocument.defaultView&&a.ownerDocument.defaultView.getComputedStyle)c=a.ownerDocument.defaultView.getComputedStyle(a,"").getPropertyValue(b);else if(a.currentStyle)try{b=b.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()});c=a.currentStyle[b]}catch(d){c=a.style[b]}else c=a.style[b];return c};Sys.Extended.UI.HTMLEditor._Marker=function(c,d,f){var b=this;if(Sys.Extended.UI.HTMLEditor.isIE){b._nArr=Sys.Extended.UI.HTMLEditor.getNames(c._doc.body);b._save=c._doc.body.innerHTML;b._tree=null;if(f.type.toLowerCase()=="control")try{var a=d.item(0);b._tree=[];while(a&&(a.nodeType==3||!a.tagName||a.tagName.toUpperCase()!="BODY")){var e=0;while(a.previousSibling){e++;a=a.previousSibling}b._tree.push(e);a=a.parentNode}}catch(g){}else{b._offsetLeft=d.offsetLeft;b._offsetTop=d.offsetTop}}else{if(Sys.Extended.UI.HTMLEditor.isOpera)b._save=Sys.Extended.UI.HTMLEditor.Trim(c._doc.body.innerHTML);else b._save=c._doc.body.cloneNode(true);b._tree=[];b._offset=0;try{var a=d.startContainer;b._offset=d.startOffset;if(a&&a.nodeType==1&&a.tagName.toUpperCase()=="HTML"){a=c._doc.body;setTimeout(function(){try{f=c._getSelection();d=c._createRange();c._removeAllRanges(f);d.setStart(a,0);d.setEnd(a,0);c._selectRange(f,d)}catch(b){}},0)}while(a&&a.nodeType&&(a.nodeType==3||!a.tagName||a.tagName.toUpperCase()!="BODY")){var e=0;while(a.previousSibling){e++;if(Sys.Extended.UI.HTMLEditor.isOpera)if(a.nodeType==3&&a.previousSibling!=null&&a.previousSibling.nodeType==3)e--;a=a.previousSibling}b._tree.push(e);a=a.parentNode}}catch(g){}}};Sys.Extended.UI.HTMLEditor.__stackMaxSize=30;Sys.Extended.UI.HTMLEditor.getNames=function(i){for(var e=i.all,g=[],h=[],d=0;d<e.length;d++){var a=e[d];if(a.name&&a.name.length>0){for(var b=a.tagName,f=i.getElementsByTagName(b),j=0,c=0;c<f.length;c++)if(f[c]==a){j=c;break}h[b]=j;g.push([b,h[b],a.name])}}return g};Sys.Extended.UI.HTMLEditor.setNames=function(c,b){for(var a=0;a<b.length;a++)if(c.getElementsByTagName(b[a][0]).length>b[a][1])c.getElementsByTagName(b[a][0])[b[a][1]].name=b[a][2]};Sys.Extended.UI.HTMLEditor._lookChild=function(c,d){for(var a=0;a<c.childNodes.length;a++){var b=c.childNodes.item(a);if(b==d)return a;if(b.nodeType==1)if(Sys.Extended.UI.HTMLEditor._lookChild(b,d)>=0)return a}return -1};Sys.Extended.UI.HTMLEditor.getHrefsText=function(d){var a=[];function b(g,e,h,i,j,f){for(var d=e.replace(/^<([^\s>]+)/,"$1"),c=true,b=0;b<a.length;b++)if(a[b][0]==d){c=false;break}if(c)a[b]=[d];a[b].push(f)}var c=new RegExp("(<[^\\s><]+)([^><]*?)(href=)(\"|')([^\\4]*?)(\\4)((?:[^><]*?)>)","ig");d.replace(c,b);return a};Sys.Extended.UI.HTMLEditor.setHrefsText=function(g,d){for(var b=0;b<d.length;b++)for(var c=g.getElementsByTagName(d[b][0]),e=1,a=0;a<c.length;a++){if(!c[a].href)continue;if(d[b][e]&&d[b][e].length>0){var f;if(Sys.Extended.UI.HTMLEditor.isIE)f=c[a].innerHTML;c[a].href=d[b][e].replace(/&amp;/ig,"&");if(Sys.Extended.UI.HTMLEditor.isIE)c[a].innerHTML=f}e++}};Sys.Extended.UI.HTMLEditor.getImagesText=function(c){var a=[];function b(b,d,e,c){a.push(c);return b}c.replace(/(<img(?:.*?))(src=")(.*?)(")((?:.*?)>)/ig,b);return a};Sys.Extended.UI.HTMLEditor.setImagesText=function(e,d){for(var c=e.getElementsByTagName("IMG"),b=0,a=0;a<c.length;a++){if(!c[a].src)continue;if(d[b]&&d[b].length>0)c[a].src=d[b].replace(/&amp;/ig,"&");b++}};Sys.Extended.UI.HTMLEditor.canHaveChildren=function(a){if(Sys.Extended.UI.HTMLEditor.isIE)return a.canHaveChildren;else return !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(a.tagName.toLowerCase())};Sys.Extended.UI.HTMLEditor._setCursor=function(j,a){var c=j;if(Sys.Extended.UI.HTMLEditor.isIE){var e=a._getSelection(),b=a._createRange(e);if(e.type.toLowerCase()=="control"){b.remove(0);e.empty();b=a._createRange()}var g=c.nodeType==3,d;if(g){d=a._doc.createElement("SPAN");d.innerHTML="&nbsp;";c.parentNode.insertBefore(d,c);c=d}var f=$common.getLocation(c),h=f.x,i=f.y;g&&d.parentNode.removeChild(d);try{b.moveToPoint(h,i)}catch(k){}b.select()}else{var e=a._getSelection(),b=a._createRange();b.setStart(c,0);b.setEnd(c,0);a._removeAllRanges(e);a._selectRange(e,b);a.focusEditor()}};Sys.Extended.UI.HTMLEditor.myClone=function(a,e,d){var b;if(Sys.Extended.UI.HTMLEditor.isIE&&a.tagName&&(a.tagName.toUpperCase()=="EMBED"||a.tagName.toUpperCase()=="OBJECT")){var c=e.createElement("DIV");try{c.innerHTML=a.outerHTML;b=c.firstChild}catch(f){b=a}delete c}else b=a.cloneNode(d);return b};Sys.Extended.UI.HTMLEditor.unStyle=function(a){var k="function",f=false,b=null,c=a.parentNode!=b&&typeof a.parentNode!="undefined"?a.parentNode:b;if(c){var d=b;while(c&&c.tagName&&c.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)&&c.tagName.toUpperCase()!="A"){d=c;c=c.parentNode}if(d){function j(g,c,h,i,l){var a=h.cloneNode(f);if(g)if(g.push&&typeof g.push==k)for(var n=0;n<g.length;n++)a.appendChild(g[n]);else a.appendChild(g);if(l)a.appendChild(c);else while(c){var q=i?c.previousSibling:c.nextSibling;if(c.nodeType==1||c.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+c.data+"").length>0){if(c.nodeType==1)if(c.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)&&c.childNodes.length==0&&!Sys.Extended.UI.HTMLEditor.isTempElement(c))c=b;if(c)if(a.childNodes.length==0||!i)a.appendChild(c);else a.insertBefore(c,a.firstChild)}c=q}if(a.childNodes.length==0){delete a;a=b}else if(a.childNodes.length==1&&a.firstChild.nodeType==3&&(""+a.firstChild.data+"").length==0){delete a;a=b}else if(!l&&a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){for(var o=a.childNodes.length,m=0;m<a.childNodes.length;m++){var e=a.childNodes.item(m);if(e.nodeType==1&&e.tagName&&!Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&(e.tagName.toUpperCase()=="BR"||e.tagName.toUpperCase()=="TABLE"||Sys.Extended.UI.HTMLEditor.isTempElement(e)))o--}if(o==0){var p=[];while(a.firstChild){var e=a.removeChild(a.firstChild);p.push(e)}a=p}}if(h==d)return a;else if(!l)return j(a,i?h.previousSibling:h.nextSibling,h.parentNode,i,l);else return j(b,a,h.parentNode,i,l)}c=a.parentNode;if(a.previousSibling==b&&a.nextSibling==b&&c&&c.tagName&&c.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)&&Sys.Extended.UI.HTMLEditor.differAttr(c,["class","color","face","size"]).length>0)a=c;var h=j(b,a.previousSibling,a.parentNode,true,f),i=j(b,a.nextSibling,a.parentNode,f,f),e=d.parentNode;if(h)if(h.push&&typeof h.push==k)for(var g=0;g<h.length;g++)e.insertBefore(h[g],d);else e.insertBefore(h,d);if(a.nodeType==1&&a.tagName&&(a.tagName.toUpperCase()=="BR"||a.tagName.toUpperCase()=="TABLE"||Sys.Extended.UI.HTMLEditor.isTempElement(a)))e.insertBefore(a,d);else{var l=j(b,a,a.parentNode,f,true);e.insertBefore(l,d)}if(i)if(i.push&&typeof i.push==k)for(var g=0;g<i.length;g++)e.insertBefore(i[g],d);else e.insertBefore(i,d);e.removeChild(d)}}};Sys.Extended.UI.HTMLEditor.isTempElement=function(a){if(a.id&&a.id.length>0&&a.id.indexOf(Sys.Extended.UI.HTMLEditor.smartClassName)>=0)return true;return false};Sys.Extended.UI.HTMLEditor._moveTagsUp=function(d,e){function b(a){if(!Sys.Extended.UI.HTMLEditor.isInlineElement(a)||a.nodeType==3)Sys.Extended.UI.HTMLEditor.unStyle(a);else if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){var c=a.firstChild;while(c!=null){var d=c.nextSibling;b(c);c=d}}}var a=d;while(a!=null&&a!=e){var c=a.nextSibling;b(a);a=c}};Sys.Extended.UI.HTMLEditor._commonTotalParent=function(e,g){var h=null,a=e.parentNode,f=e;while(a){if(a.tagName&&!Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){var d=Sys.Extended.UI.HTMLEditor._lookChild(a,g);if(d>=0){for(var c=0,b=0;b<a.childNodes.length;b++)if(a.childNodes.item(b)==f){c=b;break}return {parent:a,indexFirst:c,indexLast:d}}}f=a;a=a.parentNode}return h};Sys.Extended.UI.HTMLEditor._commonParent=function(e,g){var h=null,a=e.parentNode,f=e;while(a&&a.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){var d=Sys.Extended.UI.HTMLEditor._lookChild(a,g);if(d>=0){for(var c=0,b=0;b<a.childNodes.length;b++)if(a.childNodes.item(b)==f){c=b;break}return {parent:a,indexFirst:c,indexLast:d}}f=a;a=a.parentNode}return h};Sys.Extended.UI.HTMLEditor.positionInParagraph=function(b,e,c,a,f){while(true){var d=Sys.Extended.UI.HTMLEditor.positionInParagraphLevel(b,e,c,f);if(d!=null)return d;if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){e=c?a.previousSibling:a.nextSibling;a=a.parentNode}else{if(!c||a.firstChild==null)a.appendChild(b);else a.insertBefore(b,a.firstChild);return b}}};Sys.Extended.UI.HTMLEditor.positionInParagraphLevel=function(c,a,d,g){while(a){var j=d?a.previousSibling:a.nextSibling;if(!Sys.Extended.UI.HTMLEditor.isInlineElement(a)){var e=a.parentNode;if(!d)e.insertBefore(c,a);else if(a.nextSibling)e.insertBefore(c,a.nextSibling);else e.appendChild(c);return c}else if(typeof g=="function"&&a.nodeType==3){var b,f=""+a.data+"";if(d){for(b=f.length-1;b>=0;b--)if(g(f.substr(b,1)))break}else for(b=0;b<f.length;b++)if(g(f.substr(b,1)))break;if(b>=0&&b<f.length){var e=a.parentNode,h;if((b>0||d&&b==0)&&(b<f.length-1||!d&&b==f.length-1)){if(d)h=a.splitText(b+1);else h=a.splitText(b);e.insertBefore(c,h)}else if(!d)e.insertBefore(c,a);else if(a.nextSibling)e.insertBefore(c,a.nextSibling);else e.appendChild(c);return c}}a=d?a.lastChild:a.firstChild;if(a){var i=Sys.Extended.UI.HTMLEditor.positionInParagraphLevel(c,a,d,g);if(i!=null)return i}a=j}return null};Sys.Extended.UI.HTMLEditor._addEvent=function(a,b,c){if(a.attachEvent)a.attachEvent("on"+b,c);else a.addEventListener&&a.addEventListener(b,c,true)};Sys.Extended.UI.HTMLEditor._addEvents=function(d,b,c){for(var a=0;a<b.length;a++)Sys.Extended.UI.HTMLEditor._addEvent(d,b[a],c)};Sys.Extended.UI.HTMLEditor._removeEvent=function(a,b,c){if(a.detachEvent)a.detachEvent("on"+b,c);else a.removeEventListener&&a.removeEventListener(b,c,true)};Sys.Extended.UI.HTMLEditor._removeEvents=function(d,b,c){for(var a=0;a<b.length;a++)Sys.Extended.UI.HTMLEditor._removeEvent(d,b[a],c)};Sys.Extended.UI.HTMLEditor._stopEvent=function(a){if(a)if(Sys.Extended.UI.HTMLEditor.isIE){a.cancelBubble=true;a.returnValue=false}else{a.preventDefault();a.stopPropagation()}};Sys.Extended.UI.HTMLEditor.restrictedTags=["DIV","P","TD","TR","TABLE","TBODY","LI","OL","UL","FORM","INPUT"];Sys.Extended.UI.HTMLEditor.isRestricted=function(b){for(var c=b.tagName.toUpperCase(),a=0;a<Sys.Extended.UI.HTMLEditor.restrictedTags.length;a++)if(Sys.Extended.UI.HTMLEditor.restrictedTags[a].toUpperCase()==c)return true;if(Sys.Extended.UI.HTMLEditor.isIE&&b.scopeName.toUpperCase()!="HTML")return true;return false};Sys.Extended.UI.HTMLEditor.jsDocument=function(c){var a="\n",b=this;b.noExtraLf=typeof c!="undefined"&&c;b.text=[];b.write=function(c){var b=this;if(!b.noExtraLf||b.text.length==0&&c!=a||b.text.length>0&&(b.text[b.text.length-1]!=a||c!=a))b.text[b.text.length]=c};b.append=b.write;b.writeln=function(b){this.text[this.text.length]=b+a};b.toString=function(){return this.text.join("")};b.clear=function(){delete this.text;this.text=null;this.text=[]}};Sys.Extended.UI.HTMLEditor.isHeader=function(b){var a=b.tagName.toUpperCase();if(a.length==2)if(a.substr(0,1)=="H"&&parseInt(a.substr(1,1))>0)return true;return false};Sys.Extended.UI.HTMLEditor._getReallyFirst=function(a){var b="undefined";if(typeof a.firstChild!=b&&a.firstChild!=null)if(typeof a.firstChild.childNodes!=b&&a.firstChild.childNodes!=null)return Sys.Extended.UI.HTMLEditor._getReallyFirst(a.firstChild);return a};Sys.Extended.UI.HTMLEditor._getReallyLast=function(a){var b="undefined";if(typeof a.lastChild!=b&&a.lastChild!=null)if(typeof a.lastChild.childNodes!=b&&a.lastChild.childNodes!=null)return Sys.Extended.UI.HTMLEditor._getReallyLast(a.lastChild);return a};Sys.Extended.UI.HTMLEditor._reallyFirst=function(a,b){if(a.firstChild){if(a.firstChild==b)return true;if(a.firstChild.childNodes)if(Sys.Extended.UI.HTMLEditor._lookChild(a.firstChild,b)==0)return Sys.Extended.UI.HTMLEditor._reallyFirst(a.firstChild,b)}return false};Sys.Extended.UI.HTMLEditor._reallyLast=function(a,b){if(a.lastChild){if(a.lastChild==b)return true;if(a.lastChild.childNodes)if(Sys.Extended.UI.HTMLEditor._lookChild(a.lastChild,b)==a.lastChild.childNodes.length-1)return Sys.Extended.UI.HTMLEditor._reallyLast(a.lastChild,b)}return false};Sys.Extended.UI.HTMLEditor.getContainer=function(b,c){if(c==b)return b;if(b.nodeType==1)for(var d=0;d<b.childNodes.length;d++){var a=b.childNodes.item(d);if(c==a)return a;if(a.nodeType==1){var e=Sys.Extended.UI.HTMLEditor._lookChild(a,c);if(e>=0)if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a))return Sys.Extended.UI.HTMLEditor.getContainer(a,c);else return a}}return null};Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt=function(h,f,g){var c=h.replace(/^(\d+)\.(\d+)px/i,"$1px");if(!Sys.Extended.UI.HTMLEditor.isIE)if(c&&c.length>0){var d=c.toLowerCase().split(",")[0];if(typeof g!="undefined"){var e=document.getElementById(g);if(e!=null){for(var a=0;a<e.options.length;a++){var i=Sys.Extended.UI.HTMLEditor.fontSizeSeek(e.options.item(a).value.toLowerCase().split(",")[0]);if(i==d)break}if(a==e.options.length){var b=f._doc.createElement("SPAN");f._doc.body.appendChild(b);for(a=1;a<100;a++){b.style.fontSize=a+"pt";if(Sys.Extended.UI.HTMLEditor.getStyle(b,"font-size").replace(/^(\d+)\.(\d+)px/i,"$1px")==d){d=a+"pt";break}}b.parentNode.removeChild(b)}}}c=d}return c};Sys.Extended.UI.HTMLEditor.fontSizeSeek=function(b){var a=b.toString();switch(a){case "1":a="8pt";break;case "2":a="10pt";break;case "3":a="12pt";break;case "4":a="14pt";break;case "5":a="18pt";break;case "6":a="24pt";break;case "7":a="36pt"}return a};Sys.Extended.UI.HTMLEditor.getOwnerDocument=function(a){return a.nodeType==9?a:a.ownerDocument||a.document};Sys.Extended.UI.HTMLEditor.getClientViewportElement=function(b){var a;if(b.nodeType==9)a=b;else a=Sys.Extended.UI.HTMLEditor.getOwnerDocument(b);if(Sys.Extended.UI.HTMLEditor.isIE&&a.compatMode!="CSS1Compat")return a.body;return a.documentElement};Sys.Extended.UI.HTMLEditor.isReallyVisible=function(c){var a=c,b=true;while(a){if(a.style&&Sys.Extended.UI.HTMLEditor.getStyle(a,"display")=="none"){b=false;break}a=a.parentNode}return b};Sys.Extended.UI.HTMLEditor.setSelectionRange=function(a,c,e){var d="character";a.focus();if(a.setSelectionRange)a.setSelectionRange(c,e);else if(a.createTextRange){var b=a.createTextRange();b.collapse(true);b.moveEnd(d,e);b.moveStart(d,c);b.select()}};Sys.Extended.UI.HTMLEditor.setElementVisibility=function(e){var d=[],a=e;while(a&&a.nodeType==1&&a.tagName.toUpperCase()!="BODY"){var c=a.style.display,b=a.style.visibility;if(a.style&&(c=="none"||b=="hidden")){d.push({element:a,display:c,visibility:b});a.style.display="";a.style.visibility="visible"}a=a.parentNode}return d};Sys.Extended.UI.HTMLEditor.restoreElementVisibility=function(d){for(var b=0;b<d.length;b++){var a=d[b],c=a.element.style;c.display=a.display;c.visibility=a.visibility}};if(!Sys.Extended.UI.HTMLEditor.isIE)try{Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText=function(g,b){for(var d=g.childNodes,c=0;c<d.length;c++){var a=d[c];a.nodeType==3&&b.write(a.nodeValue.replace("\n",""));if(a.nodeType==1){var f=Sys.Extended.UI.HTMLEditor.getStyle(a,"display"),e=Sys.Extended.UI.HTMLEditor.getStyle(a,"visibility");Sys.Extended.UI.HTMLEditor.__needLineBreakBefore(a)&&b.write("\n");Sys.Extended.UI.HTMLEditor.__needTabBefore(a)&&b.write("\t");f!="none"&&e!="hidden"&&Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText(a,b);Sys.Extended.UI.HTMLEditor.__needLineBreakAfter(a)&&b.write("\n")}}};Sys.Extended.UI.HTMLEditor.__needLineBreakBefore=function(b){var a=" div table p pre ol ul blockquote form fieldset ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor.__needLineBreakAfter=function(b){var a=" br div table tr p pre ol ul li hr blockquote form fieldset legend ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor.__needTabBefore=function(b){var a=" td li ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1}}catch(a){};
//END HTMLEditor.HTMLEditor.js
//START HTMLEditor.Events.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs=function(d,c,b){var a=this;if(arguments.length!=3)throw Error.parameterCount();Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs.initializeBase(a);a._oldMode=d;a._newMode=c;a._editPanel=b};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);
//END HTMLEditor.Events.js
//START HTMLEditor.EditPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=null;Sys.Extended.UI.HTMLEditor.EditPanel=function(e){var d=true,b=null,c=false,a=this;Sys.Extended.UI.HTMLEditor.EditPanel.initializeBase(a,[e]);a._loaded=c;a._eAfter=b;a._toolbars=b;a._modePanels=b;a._contentChangedElement=b;a._contentElement=b;a._contentForceElement=b;a._activeModeElement=b;a._suppressTabInDesignMode=c;a._keyboardEnabled=d;a._noPaste=c;a._hotkeys=b;a._showAnchors=c;a._showPlaceHolders=c;a._startEnd=d;a._relativeImages=d;a._documentCssPath=b;a._designPanelCssPath=b;a._imagePath_1x1=b;a._imagePath_flash=b;a._imagePath_media=b;a._imagePath_anchor=b;a._imagePath_placeHolder=b;a._autofocus=d;a._initialCleanUp=c;a._noScript=c;a._noUnicode=c;a._cachedToolbarIds=b;a._contentPrepared=c;a._activeMode=b;a._pageRequestManager=b;a._formOnSubmitSaved=b;a._validators=b;a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a._onsubmit$delegate=Function.createDelegate(a,a._onsubmit);a._disposed=d};Sys.Extended.UI.HTMLEditor.EditPanel.prototype={get_relativeImages:function(){return this._relativeImages},set_relativeImages:function(a){this._relativeImages=a;this._loaded&&this.raisePropertyChanged("relativeImages")},get_startEnd:function(){return this._startEnd},set_startEnd:function(a){this._startEnd=a;this._loaded&&this.raisePropertyChanged("startEnd")},get_showPlaceHolders:function(){return this._showPlaceHolders},set_showPlaceHolders:function(a){this._showPlaceHolders=a;this._loaded&&this.raisePropertyChanged("showPlaceHolders")},get_showAnchors:function(){return this._showAnchors},set_showAnchors:function(a){this._showAnchors=a;this._loaded&&this.raisePropertyChanged("showAnchors")},get_hotkeys:function(){return this._hotkeys},set_hotkeys:function(a){this._hotkeys=a;this._loaded&&this.raisePropertyChanged("noPaste")},get_noPaste:function(){return this._noPaste},set_noPaste:function(a){this._noPaste=a;this._loaded&&this.raisePropertyChanged("noPaste")},get_suppressTabInDesignMode:function(){return this._suppressTabInDesignMode},set_suppressTabInDesignMode:function(a){this._suppressTabInDesignMode=a;this._loaded&&this.raisePropertyChanged("suppressTabInDesignMode")},get_keyboardEnabled:function(){return this._keyboardEnabled},set_keyboardEnabled:function(a){this._keyboardEnabled=a;this._loaded&&this.raisePropertyChanged("keyboardEnabled")},get_noUnicode:function(){return this._noUnicode},set_noUnicode:function(a){this._noUnicode=a;this._loaded&&this.raisePropertyChanged("noUnicode")},get_noScript:function(){return this._noScript},set_noScript:function(a){this._noScript=a;this._loaded&&this.raisePropertyChanged("noScript")},get_initialCleanUp:function(){return this._initialCleanUp},set_initialCleanUp:function(a){this._initialCleanUp=a;this._loaded&&this.raisePropertyChanged("initialCleanUp")},get_imagePath_1x1:function(){return this._imagePath_1x1},set_imagePath_1x1:function(a){this._imagePath_1x1=a},get_imagePath_flash:function(){return this._imagePath_flash},set_imagePath_flash:function(a){this._imagePath_flash=a},get_imagePath_media:function(){return this._imagePath_media},set_imagePath_media:function(a){this._imagePath_media=a},get_imagePath_anchor:function(){return this._imagePath_anchor},set_imagePath_anchor:function(a){this._imagePath_anchor=a},get_imagePath_placeHolder:function(){return this._imagePath_placeHolder},set_imagePath_placeHolder:function(a){this._imagePath_placeHolder=a},get_documentCssPath:function(){return this._documentCssPath},set_documentCssPath:function(a){this._documentCssPath=a;this._loaded&&this.raisePropertyChanged("documentCssPath")},get_designPanelCssPath:function(){return this._designPanelCssPath},set_designPanelCssPath:function(a){this._designPanelCssPath=a;this._loaded&&this.raisePropertyChanged("designPanelCssPath")},get_autofocus:function(){return this._autofocus},set_autofocus:function(a){this._autofocus=a;this._loaded&&this.raisePropertyChanged("autofocus")},get_content:function(){var a=this;if(a._activeMode==null){if(a.get_contentElement()!=null)return a._getContentForPostback();return ""}return a.getContent()},set_content:function(b){var a=this;if(!a.get_isInitialized()||!a._loaded){if(a.get_contentElement()!=null)a.get_contentElement().value=b.replace(/\"/g,"&quot;");return}a.setContent(b);a._contentPrepared=false;a._loaded&&a.raisePropertyChanged("content")},get_activeMode:function(){if(this._activeMode==null)return Sys.Extended.UI.HTMLEditor.ActiveModeType.Design;return this._activeMode},set_activeMode:function(b){var a=this;if(!Sys.Extended.UI.HTMLEditor.ActiveModeType_checkValue(b))throw Error.argumentOutOfRange("value, function: Sys.Extended.UI.HTMLEditor.EditPanel.set_activeMode");var c=a._activeMode,d=true;if(a._loaded&&c!=null&&c!=b){var e=new Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs(c,b,a);a.raiseBeforeActiveModeChanged(e);a._eAfter=new Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs(c,b,a);d=a._setMode(b)}else a._activeMode=b;a.get_activeModeElement().value=b;return d},get_contentChangedElement:function(){return this._contentChangedElement},set_contentChangedElement:function(a){this._contentChangedElement=a},get_contentElement:function(){return this._contentElement},set_contentElement:function(a){this._contentElement=a},get_contentForceElement:function(){return this._contentForceElement},set_contentForceElement:function(a){this._contentForceElement=a},get_activeModeElement:function(){return this._activeModeElement},set_activeModeElement:function(a){this._activeModeElement=a},setCancelOnPostback:function(){if(this._loaded)this.get_contentForceElement().value=""},setAcceptOnPostback:function(){if(this._loaded)this.get_contentForceElement().value="1"},get_toolbars:function(){if(this._toolbars==null)this._toolbars=[];return this._toolbars},set_toolbars:function(a){this.get_toolbars().push(a)},get_toolbarIds:function(){},set_toolbarIds:function(c){if(!this.get_isInitialized()){this._cachedToolbarIds=c;return}for(var b=c.split(";"),a=0;a<b.length;a++)b[a].length>0&&this.set_toolbars($find(b[a]))},get_modePanels:function(){if(this._modePanels==null)this._modePanels=[];return this._modePanels},set_modePanel:function(a){this.get_modePanels().push(a)},get_modePanelIds:function(){},set_modePanelIds:function(c){for(var b=c.split(";"),a=0;a<b.length;a++)this.set_modePanel($find(b[a]))},add_focused:function(a){this.get_events().addHandler("focused",a)},remove_focused:function(a){this.get_events().removeHandler("focused",a)},raiseFocused:function(b){var a=this.get_events().getHandler("focused");a&&a(this,b)},add_activeModeChanged:function(a){this.get_events().addHandler("activeModeChanged",a)},remove_activeModeChanged:function(a){this.get_events().removeHandler("activeModeChanged",a)},raiseActiveModeChanged:function(b){var a=this.get_events().getHandler("activeModeChanged");a&&a(this,b)},add_beforeActiveModeChanged:function(a){this.get_events().addHandler("beforeActiveModeChanged",a)},remove_beforeActiveModeChanged:function(a){this.get_events().removeHandler("beforeActiveModeChanged",a)},raiseBeforeActiveModeChanged:function(b){var a=this.get_events().getHandler("beforeActiveModeChanged");a&&a(this,b)},get_activePanel:function(){var a=this.get_modePanels()[this.get_activeMode()];if(a==null||typeof a=="undefined")throw Error.argumentOutOfRange("activeMode, function: Sys.Extended.UI.HTMLEditor.EditPanel.get_activePanel");return a},initialize:function(){var a=this;a.__appLoaded__=false;Sys.Extended.UI.HTMLEditor.EditPanel.callBaseMethod(a,"initialize");a._disposed=false;Sys.Application.add_load(a._app_onload$delegate);if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){a._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(a._pageRequestManager){a._partialUpdateEndRequestHandler=Function.createDelegate(a,a._partialUpdateEndRequest);a._pageRequestManager.add_endRequest(a._partialUpdateEndRequestHandler);a._invokingRequestHandler=Function.createDelegate(a,a._invokingRequest);Sys.Net.WebRequestManager.add_invokingRequest(a._invokingRequestHandler);a._completedRequestHandler=Function.createDelegate(a,a._completedRequest);Sys.Net.WebRequestManager.add_completedRequest(a._completedRequestHandler)}}Sys.Extended.UI.HTMLEditor.addFormOnSubmit(a._onsubmit$delegate,a)},dispose:function(){var b=null,a=this;a._loaded=false;a._disposed=true;if(a._pageRequestManager){if(a._invokingRequestHandler){a._pageRequestManager.remove_endRequest(a._partialUpdateEndRequestHandler);a._partialUpdateEndRequestHandler=b;Sys.Net.WebRequestManager.remove_invokingRequest(a._invokingRequestHandler);a._invokingRequestHandler=b;Sys.Net.WebRequestManager.remove_completedRequest(a._completedRequestHandler);a._completedRequestHandler=b}a._pageRequestManager=b}Sys.Extended.UI.HTMLEditor.removeFormOnSubmit(a._onsubmit$delegate);Sys.Application.remove_load(a._app_onload$delegate);a.disableToolbars();Sys.Extended.UI.HTMLEditor.EditPanel.callBaseMethod(a,"dispose")},_onsubmit:function(){var a=this;if(!a._contentPrepared){a._prepareContentForPostback(a.get_content());a._contentPrepared=true}return true},_invokingRequest:function(f,d){var a=this;if(a._contentPrepared)return;var c=d.get_webRequest(),b=c.get_body(),e=new RegExp("([\\?&])("+a.get_contentElement().name+"=)([^&$]*)([&$])","g");a._prepareContentForPostback(a.get_content());b=b.replace(e,"$1$2"+escape(a.get_contentElement().value)+"$4");a._contentPrepared=true;c.set_body(b)},_completedRequest:function(){this._contentPrepared=false},_partialUpdateEndRequest:function(){var a=this;a._contentPrepared=false;if(Sys.Extended.UI.HTMLEditor.isIE&&a.__blured){a.__blured=false;a.get_activePanel()._focus()}},_app_onload:function(){var c=null,d=true,a=this;if(a.__appLoaded__)return;a.__appLoaded__=d;if(a._disposed)return;var l=a;a._loaded=d;a.set_activeMode(parseInt(a.get_activeModeElement().value));if(a._cachedToolbarIds!=c){a.set_toolbarIds(a._cachedToolbarIds);a._cachedToolbarIds=c}a._validators=a.get_modePanels()[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html].get_element().Validators;a._shouldResize=false;if(Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!="BackCompat")a._shouldResize=d;if(a._shouldResize){var f=a.get_modePanels(),e=f[Sys.Extended.UI.HTMLEditor.ActiveModeType.Design];if(e==c)e=f[Sys.Extended.UI.HTMLEditor.ActiveModeType.Preview];var i=f[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html];if(e!=c&&i!=c){var b=e.get_element();b.style.display="";var g=b.offsetHeight,j=false,h;if(g==0){j=d;h=Sys.Extended.UI.HTMLEditor.setElementVisibility(b.parentNode);g=b.offsetHeight}i.get_element().style.height=g+"px";if(j){Sys.Extended.UI.HTMLEditor.restoreElementVisibility(h);delete h}b.style.display="none"}}var k=a.get_contentElement().value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&");a.setContent(a._initialCleanUp?Sys.Extended.UI.HTMLEditor.cleanUp(k.replace(/[\n\r]+/g," ")):k);a.setAcceptOnPostback()},_setActive:function(){var a=this;for(var b=0;b<a.get_toolbars().length;b++)a.get_toolbars()[b].set_activeEditPanel(a,true);if(a._eAfter!=null){a.raisePropertyChanged("activeMode");a.raiseActiveModeChanged(a._eAfter);a._eAfter=null}},_focused:function(c){var a=this;if(!(typeof c!="undefined"&&c))for(var b=0;b<a.get_toolbars().length;b++)a.get_toolbars()[b].set_activeEditPanel(a);Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=a},_really_focused:function(){this._focused();this.raiseFocused(new Sys.EventArgs)},updateToolbar:function(){this._focused()},getContent:function(){var a=this.get_activePanel().get_content().replace(/<\/?html(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?head(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?body(?=\s|>)(?:[^>]*?)>/gi,"").replace(/^([\n\r]+)/,"").replace(/([\n\r]+)$/,"");if(!Sys.Extended.UI.HTMLEditor.isIE)a=a.replace(/^<br\s*[\/]*>$/,"");return a},setContent:function(c){var b=this,a=c;if(b.get_noScript())a=a.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/ig,"");a=a.replace(/<\/?html(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?head(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?body(?=\s|>)(?:[^>]*?)>/gi,"").replace(/^([\n\r]+)/,"").replace(/([\n\r]+)$/,"");b._prepareContentForPostback(a);b.get_activePanel().set_content(a);b._validate(null,a)},_validate:function(d,c){var a=this._validators;if(a!=null&&typeof a!="undefined"){this._contentForValidation=c;try{for(var b=0;b<a.length;b++)window.ValidatorValidate(a[b],null,d);window.ValidatorUpdateIsValid()}catch(e){}this._contentForValidation=null}},_prepareContentForPostback:function(a){this.get_contentElement().value=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")},_getContentForPostback:function(){return this.get_contentElement().value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},_setMode:function(b){var a=this,g=a.get_activePanel();if(!g._activated){var k=a;setTimeout(function(){k._setMode(b)},10);return false}var d=a.get_content();if(Sys.Extended.UI.HTMLEditor.isOpera)d=d.replace(/\r/ig,"");if(a._shouldResize&&b==Sys.Extended.UI.HTMLEditor.ActiveModeType.Html){var h=a.get_activePanel(),i=a.get_modePanels()[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html];if(h!=null&&i!=null){var c=h.get_element(),e=c.offsetHeight,j=false,f;if(e==0){j=true;f=Sys.Extended.UI.HTMLEditor.setElementVisibility(c.parentNode);e=c.offsetHeight}i.get_element().style.height=e+"px";if(j){Sys.Extended.UI.HTMLEditor.restoreElementVisibility(f);delete f}}}a.disableToolbars(b);g._deactivate();a._activeMode=b;a.setContent(d);return true},disableToolbars:function(c){for(var a=0;a<this.get_toolbars().length;a++){var b=this.get_toolbars()[a];b._loaded&&b.disable(c)}},openWait:function(){},closeWait:function(){}};Sys.Extended.UI.HTMLEditor.EditPanel.registerClass("Sys.Extended.UI.HTMLEditor.EditPanel",Sys.UI.Control);
//END HTMLEditor.EditPanel.js
//START HTMLEditor.DesignPanelEventHandler.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.DesignPanelEventHandler=function(b){var Z="'></span>",R="<span id='",ib="StyleForTyping",Q="EMBED",P="BR",D="\n",O="text",N="span",k="",M="LI",x="P",H="undefined",w="BODY",C="control",hb="function",B="keypress",e=null,j="keydown",Y="mousedown",c=false,m=true,f=this;try{var a=f;if(a._editPanel!=Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)return m;if(Sys.Extended.UI.HTMLEditor.isIE)try{var Db=f._doc.selection,Ib=f._createRange(Db)}catch(Lb){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}(b.type==Y||b.type=="dblclick")&&f._focus(m);if(!Sys.Extended.UI.HTMLEditor.isIE&&b.type==j&&b.keyCode==Sys.UI.Key.tab&&f._editPanel.get_suppressTabInDesignMode()){Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=e;return m}if(f.isPopup()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}var gb=c;if(a._contextElement&&a._contextElement!=e){Function.createDelegate(f,Sys.Extended.UI.HTMLEditor.RemoveContextMenu)();if(b.type==j||b.type==B){Sys.Extended.UI.HTMLEditor._stopEvent(b);return}gb=m}if(typeof a.captureInDesign==hb)if(a.captureInDesign(b)===c){Sys.Extended.UI.HTMLEditor._stopEvent(b);return}if(Sys.Extended.UI.HTMLEditor.isIE&&b.type==Y&&b.ctrlKey){var l=a._getSelection(),zb=b.clientX,Ab=b.clientY;setTimeout(function(){var c=a._getSelection();if(c.type.toLowerCase()!=C){var d=a._doc.body.createTextRange();d.moveToPoint(zb,Ab);d.select()}c=a._getSelection();var d=a._createRange(c),b=Sys.Extended.UI.HTMLEditor.getSelParent(a);while(b!=e&&b.tagName.toUpperCase()!=w){if(b.tagName.toUpperCase()=="A"&&b.href!=e&&typeof b.href!=H&&b.href.length>0){window.open(b.href,"LinkViewWindow");break}b=b.parentNode}},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}var h=!Sys.Extended.UI.HTMLEditor.isIE?b.target:b.srcElement;if(h.tagName!=e&&typeof h.tagName!=H&&(h.tagName.toUpperCase()=="HTML"||h.tagName.toUpperCase()==w)){if(a.__kkoka!=m){a.__kkoka=m;setTimeout(function(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)if(!a.toEndOfProtected())try{a.focusEditor()}catch(b){}a.__kkoka=c},0)}}else Sys.Extended.UI.HTMLEditor.contentEditable(h)!=e&&setTimeout(function(){a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&a.toEndOfProtected()},0);if(gb&&Sys.Extended.UI.HTMLEditor.isIE){var ub=f._getSelection(),Ib;try{Ib=f._createRange(ub);if(ub.type.toLowerCase()==C){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}catch(Lb){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}var F=Sys.Extended.UI.HTMLEditor.isIE&&b.type==j||b.type==B,Kb=b.type+"--"+F;if(F&&!f._editPanel.get_keyboardEnabled()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}var p=String.fromCharCode(Sys.Extended.UI.HTMLEditor.isIE?b.keyCode:b.charCode).toLowerCase();if(F&&a._editPanel.get_hotkeys()!=e)if(a._editPanel.get_hotkeys().length>0){var Cb=a._editPanel.get_hotkeys().length,ob=p;if(b.keyCode==18||b.keyCode==17||b.keyCode==16)ob=e;for(var eb=0;eb<Cb;eb++){var G=a._editPanel.get_hotkeys()[eb];if(G[1]==ob&&G[2]==b.altKey&&G[3]==b.shiftKey&&G[4]==b.ctrlKey){typeof G[0]==hb&&setTimeout(function(){G[0](a);a.onContentChanged();a.focusEditor()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}}if(F&&b.shiftKey&&b.keyCode==45)f._commonPaste(b);else if(F&&b.ctrlKey&&b.altKey&&b.keyCode==Sys.UI.Key.home){var V=e,h=Sys.Extended.UI.HTMLEditor.getSelParent(a);while(h&&(h.nodeType==3||h.tagName&&h.tagName.toUpperCase()!=w)){if(h.nodeType==3||!h.tagName){h=h.parentNode;continue}var t=h.tagName.toUpperCase();if(!Sys.Extended.UI.HTMLEditor.canBeInsideP(h)&&t!=x){if(t=="TD")while(t!="TABLE"){h=h.parentNode;t=h.tagName.toUpperCase()}else if(t==M)while(t!="OL"&&t!="UL"){h=h.parentNode;t=h.tagName.toUpperCase()}V=h;break}h=h.parentNode}if(V!=e){var l=a._getSelection(),d=a._createRange(l),s=a._doc.createTextNode(k);V.parentNode.insertBefore(s,V);if(Sys.Extended.UI.HTMLEditor.isIE){var ab=a._createRange(l),lb=a._createRange(l),bb=a._doc.createElement(N),U=a._doc.createElement(N);s.parentNode.insertBefore(bb,s);if(s.nextSibling)s.parentNode.insertBefore(U,s.nextSibling);else s.parentNode.appendChild(U);try{ab.moveToElementText(bb);lb.moveToElementText(U);ab.setEndPoint("EndToEnd",lb);ab.select()}catch(Lb){}s.parentNode.removeChild(bb);s.parentNode.removeChild(U)}else{a._removeAllRanges(l);d.setStart(s,0);d.setEnd(s,0);a._selectRange(l,d)}}}else if(Sys.Extended.UI.HTMLEditor.isIE&&b.keyCode>=33&&b.keyCode<=40&&!b.shiftKey){var yb=b.keyCode==Sys.UI.Key.pageDown||b.keyCode==Sys.UI.Key.end||b.keyCode==Sys.UI.Key.right||b.keyCode==Sys.UI.Key.down;setTimeout(function(){var f=a._getSelection(),d=a._createRange(f);if(f.type.toLowerCase()==C){var b=d.item(0);if(!b.contentEditable||b.contentEditable=="false"){d.remove(0);f.empty();d=a._createRange(f);var c=a._doc.createElement("SPAN");c.appendChild(a._doc.createTextNode(k));if(yb)if(b.nextSibling==e)b.parentNode.appendChild(c);else b.parentNode.insertBefore(c,b.nextSibling);else b.parentNode.insertBefore(c,b);d.moveToElementText(c);d.select();setTimeout(function(){a.focusEditor();c.parentNode.removeChild(c)},0)}}},0)}else if((F&&!Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isSafari&&b.type==j)&&b.ctrlKey&&!b.altKey){a._a_prize=c;var l=e,d=e,p=String.fromCharCode(Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isOpera||Sys.Extended.UI.HTMLEditor.isSafari?b.keyCode:b.charCode).toLowerCase(),u=e,K=e;if((Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isSafari)&&b.keyCode==17)return c;else if(!Sys.Extended.UI.HTMLEditor.isIE&&b.keyCode==Sys.UI.Key.end&&!b.shiftKey)a._setToEnd();else if(b.keyCode==46&&f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}else if(b.keyCode==46||b.keyCode==Sys.UI.Key.backspace)(Sys.Extended.UI.HTMLEditor.isIE&&b.type==j||!Sys.Extended.UI.HTMLEditor.isIE&&b.type==B)&&f._saveContent();else switch(p){case "a":if(!Sys.Extended.UI.HTMLEditor.isIE){l=f._getSelection();f._removeAllRanges(l);d=f._createRange();d.selectNodeContents(f._doc.body);f._selectRange(l,d);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}else a._a_prize=m;break;case "z":f.undo();Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case "p":if(!Sys.Extended.UI.HTMLEditor.isIE){setTimeout(function(){a._contextMenuCallP()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}break;case "y":f.redo();Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case "x":if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}f._saveContent();if(Sys.Extended.UI.HTMLEditor.isIE)if(b.type==j){a.openWait();setTimeout(function(){a._copyCut(p,c);a.closeWait()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}break;case "c":if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(Sys.Extended.UI.HTMLEditor.isIE)if(b.type==j){a.openWait();setTimeout(function(){a._copyCut(p,c);a.closeWait();setTimeout(function(){a._ifShadow()},0)},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}break;case "v":if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(Sys.Extended.UI.HTMLEditor.isIE){f._saveContent();return m}f._commonPaste(b);break;case "b":f._execCommand("bold",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case "i":f._execCommand("italic",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case "u":f._execCommand("underline",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case "s":f._execCommand("strikethrough",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case "l":u="justifyleft";break;case "e":u="justifycenter";break;case "r":u="justifyright";break;case "j":u="justifyfull";break;case "q":alert(f._doc.body.innerHTML);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case "0":var Gb="Your browser:\n\n"+navigator.userAgent;alert(Gb);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case "9":if(!Sys.Extended.UI.HTMLEditor.isIE){var l=a._getSelection(),d=a._createRange(l),g=d.startContainer,A=d.endContainer,y=k;y+="startContainer: "+(g.nodeType==1?g.tagName:O)+D;y+="endContainer  : "+(A.nodeType==1?A.tagName:O)+D;if(g==A){y+="startOffset: "+d.startOffset+D;y+="endOffset  : "+d.endOffset+D;if(g.nodeType==1){g=g.childNodes.item(d.startOffset);if(g&&g.nodeType){y+="startOffset node: "+(g.nodeType==1?g.tagName:O)+D;if(d.startOffset!=d.endOffset){g=A.childNodes.item(d.endOffset);if(g&&g.nodeType)y+="endOffset node: "+(g.nodeType==1?g.tagName:O)+D}}else y+=g}}alert(y)}else{var l=a._getSelection(),d=a._createRange(l);alert("boundingLeft: "+d.boundingLeft+" boundingTop: "+d.boundingTop+D+"boundingWidth: "+d.boundingWidth+" boundingHeight: "+d.boundingHeight)}Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(u){f._execCommand(u,c,K);if(u=="formatblock"&&!Sys.Extended.UI.HTMLEditor.isIE){f._saveContent();f._undo(c)}Sys.Extended.UI.HTMLEditor._stopEvent(b);(u=="delete"||u=="paste")&&f._clearP()}}else if(F||(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type==j){if(Sys.Extended.UI.HTMLEditor.isIE&&f._tryForward){var d=f._createRange(f._getSelection());d.select();f._tryForward=c}var p=String.fromCharCode(Sys.Extended.UI.HTMLEditor.isIE?b.keyCode:b.charCode).toLowerCase();if(a._a_prize){a._a_prize=c;function Bb(){var c=a._createRange(a._getSelection()),b=c.parentElement();if(b&&b.nodeType==1&&b.tagName.toUpperCase()==x){while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b)}}setTimeout(Bb,0)}if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}switch(b.keyCode){case Sys.UI.Key.tab:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type!=j)break;if(!f._editPanel.get_suppressTabInDesignMode()){!f.isControl()&&f.insertHTML("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");Sys.Extended.UI.HTMLEditor._stopEvent(b)}else{Sys.Extended.UI.HTMLEditor.isSafari&&Sys.Extended.UI.HTMLEditor._stopEvent(b);Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=e;return m}break;case 46:case Sys.UI.Key.backspace:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type!=j)break;((Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isSafari)&&b.type==j||!Sys.Extended.UI.HTMLEditor.isIE&&b.type==B)&&f._saveContent();if(!Sys.Extended.UI.HTMLEditor.isIE){var d=f._createRange(f._getSelection()),g=d.startContainer,A=d.endContainer;if(b.type==B)if(Sys.Extended.UI.HTMLEditor.contentEditable(g)!=e||Sys.Extended.UI.HTMLEditor.contentEditable(A)!=e){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(g==A&&g.nodeType==1&&g.tagName.toUpperCase()=="TD"&&d.startOffset==d.startOffset&&g.childNodes.item(d.startOffset)&&g.childNodes.item(d.startOffset).tagName&&g.childNodes.item(d.startOffset).tagName.toUpperCase()==P){var tb=g.childNodes.item(d.startOffset),qb=0,nb=0,z;z=tb.previousSibling;while(z){qb++;z=z.previousSibling}z=tb.nextSibling;while(z){nb++;z=z.nextSibling}if(b.keyCode==46&&nb==0||b.keyCode==Sys.UI.Key.backspace&&qb==0){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}else if(b.keyCode==46&&g.firstChild==g.lastChild&&g.firstChild.nodeType==1){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}if(g==A&&g.nodeType==3&&d.startOffset==d.endOffset&&!Sys.Extended.UI.HTMLEditor.isOpera){var Fb=g.data+k;if(b.keyCode==46)if(d.startOffset==Fb.length&&!(g.nextSibling&&g.nextSibling.nodeType==3)){if(g.nextSibling){g.parentNode.removeChild(g.nextSibling);a.onContentChanged()}Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(b.keyCode==Sys.UI.Key.backspace)if(d.startOffset==0&&!(g.previousSibling&&g.previousSibling.nodeType==3)){if(g.previousSibling){g.parentNode.removeChild(g.previousSibling);a.onContentChanged()}Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}if(b.keyCode==Sys.UI.Key.backspace&&g.nodeType==1&&g==A&&d.startOffset==d.endOffset){var v=g.childNodes.item(d.startOffset);if(v!=e&&v.nodeType==1&&v.tagName.toUpperCase()==P){v=v.previousSibling;if(v!=e&&v.nodeType!=3){v.parentNode.removeChild(v);a.onContentChanged();Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}}setTimeout(function(){var j=a._getSelection(),b=a._createRange(j),h=b.startContainer,l=b.endContainer;if(Sys.Extended.UI.HTMLEditor.contentEditable(h)!=e||Sys.Extended.UI.HTMLEditor.contentEditable(l)!=e){a._undo(c);return}if(Sys.Extended.UI.HTMLEditor.isOpera&&h==l&&h.nodeType==3&&h.data.length==0)h.parentNode.removeChild(h);else if(h==l&&h.nodeType==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(h.tagName)&&b.startOffset==b.endOffset&&h.childNodes.length==0){while(h.parentNode.nodeType==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(h.parentNode.tagName)&&h.parentNode.childNodes.length==1)h=h.parentNode;var d=h.nextSibling,f=h.previousSibling,i=h.parentNode;i.removeChild(h);a.onContentChanged();if(d==e&&f==e){b.setStart(i,0);b.setEnd(i,0)}else if(d!=e&&f!=e)if(d.nodeType==3&&f.nodeType==3){var g=(k+f.data+k).length;f.appendData(d.data);i.removeChild(d);b.setStart(f,g);b.setEnd(f,g)}else if(f.nodeType==3){var g=(k+f.data+k).length;b.setStart(f,g);b.setEnd(f,g)}else if(d.nodeType==3){b.setStart(d,0);b.setEnd(d,0)}else if(d.childNodes.length>0){b.setStart(d,0);b.setEnd(d,0)}else{var g=Sys.Extended.UI.HTMLEditor.__getIndex(d);b.setStart(i,g);b.setEnd(i,g)}else if(f!=e)if(f.nodeType==3){var g=(k+f.data+k).length;b.setStart(f,g);b.setEnd(f,g)}else{var g=f.childNodes.length;if(g>0){b.setStart(f,g);b.setEnd(f,g)}else{g=Sys.Extended.UI.HTMLEditor.__getIndex(f);b.setStart(i,g);b.setEnd(i,g)}}else if(d!=e)if(d.nodeType==3){b.setStart(d,0);b.setEnd(d,0)}else{var g=d.childNodes.length;if(g>0){b.setStart(d,g);b.setEnd(d,g)}else{g=Sys.Extended.UI.HTMLEditor.__getIndex(d);b.setStart(i,g);b.setEnd(i,g)}}a._removeAllRanges(j);a._selectRange(j,b)}},0)}else{var l=a._getSelection();if(l.type.toLowerCase()==C){if(b.keyCode==8){setTimeout(function(){a._ifShadow();a.onContentChanged()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return}var r=a._createRange(l),W=r.item(0);if(W.tagName.toUpperCase()==Q){W.src=k;W.parentNode.removeChild(W);while(r.length>0)r.remove(0);try{r.collapse(c)}catch(Lb){}Sys.Extended.UI.HTMLEditor._stopEvent(b);a._saveContent();setTimeout(function(){a._undo(c);a.onContentChanged()},0);return}}var fb=a._doc.body.getElementsByTagName(Q).length;if(fb>0){var mb=a._body.ownerDocument.createElement("div");a._body.appendChild(mb);var Jb=b.keyCode;setTimeout(function(){a._body.removeChild(mb);var b=a._doc.body.getElementsByTagName(Q);if(fb!=b.length){a._saveContent();setTimeout(function(){a._undo(c);a.onContentChanged()},0)}},0)}setTimeout(function(){a._clearP()},0)}break;case Sys.UI.Key.enter:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type==j)break;(!Sys.Extended.UI.HTMLEditor.isIE&&b.type==B||Sys.Extended.UI.HTMLEditor.isIE&&b.type==j)&&f._saveContent();if(Sys.Extended.UI.HTMLEditor.isIE&&b.type==j){var l=a._getSelection();if(l.type.toLowerCase()==C)break;var r=a._createRange(l);if(!b.shiftKey){var i=r.parentElement();if(i.tagName.toUpperCase()=="TEXTAREA")break;while(i&&i.tagName&&i.tagName.toUpperCase()!=w&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName))i=i.parentNode;if(i&&i.tagName){var t=i.tagName.toUpperCase();if(t==x||t==M){if(t==M){function Hb(){r=a._createRange(a._getSelection());var b=r.parentElement();while(b&&b.tagName&&b.tagName.toUpperCase()!=w&&Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName))b=b.parentNode;if(b&&b.nodeType==1&&b.tagName.toUpperCase()==x){var d=a._doc.createElement(N),f=a._doc.createTextNode(" "),c=b;while(c.firstChild!=e&&c.firstChild.nodeType==1)c=c.firstChild;if(c.nodeType==1){c.appendChild(f);c.appendChild(d);while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b)}else{b.parentNode.insertBefore(f,b);b.parentNode.insertBefore(d,b)}b.parentNode.removeChild(b);r.moveToElementText(d);r.select();d.parentNode.removeChild(d);a.onContentChanged()}}setTimeout(Hb,0)}break}}try{var db=Sys.Extended.UI.HTMLEditor.smartClassName+"_middle_add",n=e,I="<span id="+db+"></span>";function wb(){var c=a._getSelection(),b=a._createRange(c);if(n!=e){n.innerHTML="&nbsp;";b.moveToElementText(n);b.select();n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n);a.onContentChanged()}}r.pasteHTML(I);var S=c;n=a._doc.getElementById(db);if(n!=e){var E=n.nextSibling,J=n.parentNode;while(E==e&&J!=e&&Sys.Extended.UI.HTMLEditor.isStyleTag(J.tagName)){E=J.nextSibling;J=J.parentNode}if(E!=e&&!Sys.Extended.UI.HTMLEditor.isInlineElement(E)&&E.tagName!=e&&typeof E.tagName!=H){var X=E.tagName.toUpperCase();if(X!=P&&X!="UL"&&X!="OL"&&X!=x)S=m}n.parentNode.removeChild(n)}r.pasteHTML("<br/>"+(S?I:k));if(S)n=a._doc.getElementById(db);r.select();if(S){setTimeout(wb,0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}catch(Lb){}}else break;Sys.Extended.UI.HTMLEditor._stopEvent(b)}else if(!b.shiftKey&&(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)){var i=Sys.Extended.UI.HTMLEditor.getSelParent(f);if(i.nodeType==3)i=i.parentNode;while(i&&i.tagName&&i.tagName.toUpperCase()!=w&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName))i=i.parentNode;if(i&&i.tagName&&(i.tagName.toUpperCase()==x||i.tagName.toUpperCase()==M))break;var I="<br />";if(Sys.Extended.UI.HTMLEditor.isOpera){var l=a._getSelection(),d=a._createRange(l);if(d.startContainer==d.endContainer)if(d.startContainer.nodeType==1){var kb=d.startContainer.childNodes.item(d.startOffset);if(kb.nodeType==1&&kb.tagName.toUpperCase()==P)I+="<br />"}else if(d.startContainer.nodeType==3&&d.startOffset==d.endOffset&&d.startContainer.data.length==d.endOffset&&!(d.startContainer.nextSibling&&d.startContainer.nextSibling.nodeType==3))I+="&nbsp;"}f.insertHTML(I);Sys.Extended.UI.HTMLEditor._stopEvent(b);if(Sys.Extended.UI.HTMLEditor.isOpera){var l=a._getSelection(),d=a._createRange(l);if(d.startContainer==d.endContainer&&d.startContainer.nodeType==3&&d.startOffset==d.endOffset&&d.startContainer.data.length==0){var rb=d.startContainer.previousSibling;d.startContainer.parentNode.removeChild(d.startContainer);a._removeAllRanges(l);d=a._createRange();d.setStart(rb,0);d.setEnd(rb,1);a._selectRange(l,d)}}a.onContentChanged()}else if(Sys.Extended.UI.HTMLEditor.isSafari){f.insertHTML("<br/>");Sys.Extended.UI.HTMLEditor._stopEvent(b);a.onContentChanged()}}}else a._a_prize=c;if(Sys.Extended.UI.HTMLEditor.isIE&&b.type==B&&!b.ctrlKey){var p=b.keyCode,sb=a._getSelection(),T=a._createRange(sb);if(T.text.length>0){var L=String.fromCharCode(p),pb=Sys.Extended.UI.HTMLEditor.capLock(b),Eb=b.shiftKey&&!pb||pb;if(!Eb)L=L.toLowerCase();var q=Sys.Extended.UI.HTMLEditor.smartClassName+ib,o=a._doc.getElementById(q);if(o!=e){L=R+q+Z+L+R+q+q+Z;o.parentNode.removeChild(o)}T.pasteHTML(L);if(o!=e){a.trickWithStyles(q);o=a._doc.getElementById(q+q);o.parentNode.removeChild(o)}Sys.Extended.UI.HTMLEditor._stopEvent(b);a.onContentChanged();return c}}if(b.type=="mouseup"||b.type==Y||b.type==j){var xb=m;if(b.type==j&&!b.ctrlKey){var p=b.keyCode;if(p>=48&&p<=90||p==32||p==13||p>=186&&p<=222||p>=96&&p<=111)if(a._StyleForTyping!=e){a.n_arr=[];for(var cb=0;cb<a._StyleForTyping.length;cb++)a.n_arr.push(a._StyleForTyping[cb]);var q=Sys.Extended.UI.HTMLEditor.smartClassName+ib,jb=m;if(!Sys.Extended.UI.HTMLEditor.isIE)a.insertHTML(R+q+Z);else{a.insertHTML(R+q+"'>&nbsp;</span>");var o=a._doc.getElementById(q);if(o&&o.nextSibling&&o.nextSibling.nodeType==3){jb=c;var sb=a._getSelection(),T=a._createRange(sb);T.moveToElementText(a._doc.getElementById(q));T.select()}else o&&o.removeChild(o.firstChild)}jb&&setTimeout(function(){a.trickWithStyles(q);a.onContentChanged()},0)}}if(xb||!Sys.Extended.UI.HTMLEditor.isIE)if(!a._updated_now){if(a._updateTimer){clearTimeout(a._updateTimer);a._updateTimer=e}a._updateTimerLimit=3;function vb(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{if(Sys.Extended.UI.HTMLEditor.isIE){try{var b=a._doc.selection}catch(d){return c}if(a._getSelection().type=="None"&&a._doc.queryCommandValue("backcolor")==0&&a._doc.queryCommandValue("forecolor")==0){a._updateTimerLimit--;if(a._updateTimerLimit>0){a._updateTimer=setTimeout(vb,100);return}}}a._updated_now=m;a._editPanel.updateToolbar();a._updated_now=c;a._updateTimer=e;!Sys.Extended.UI.HTMLEditor.isIE&&a.focusEditor()}catch(d){}}a._updateTimer=setTimeout(vb,300)}}if(!(!Sys.Extended.UI.HTMLEditor.isIE&&(b.type==j||b.type=="keyup")||Sys.Extended.UI.HTMLEditor.isIE&&(b.type==j||b.type=="keyup")&&(b.keyCode==16||b.keyCode==20)))a._StyleForTyping=e;Sys.Extended.UI.HTMLEditor.isSafari&&setTimeout(function(){a._createRange(a._getSelection())},0);!Sys.Extended.UI.HTMLEditor.isIE&&setTimeout(function(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){var c=a._getSelection(),b=a._createRange(c);if(b.startContainer.nodeType!=3&&b.startContainer==b.endContainer)if(b.startOffset==b.endOffset)if(b.startContainer.childNodes.item(b.startOffset))if(b.startContainer.childNodes.item(b.startOffset).nodeType==3){var d=b.startContainer.childNodes.item(b.startOffset);c.collapseToEnd();a._removeAllRanges(c);c=a._getSelection();b=a._createRange(c);b.setStart(d,0);b.setEnd(d,0);a._selectRange(c,b)}}},0);if(!Sys.Extended.UI.HTMLEditor.isIE){var l=a._getSelection(),d=a._createRange(l);a._saved_startContainer=d.startContainer;a._saved_startOffset=d.startOffset}setTimeout(function(){try{a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&a._ifShadow()}catch(b){}},0);if(b.type==j)if(a._AfterOnContentChanged==e||typeof a._AfterOnContentChanged==H||!a._AfterOnContentChanged){a._AfterOnContentChanged=m;setTimeout(function(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){a.onContentChanged();a._AfterOnContentChanged=c}},0)}return m}catch(Lb){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}};
//END HTMLEditor.DesignPanelEventHandler.js
//START HTMLEditor.ExecCommandEmulation.js
Sys.Extended.UI.HTMLEditor.MSIE_list=function(r){var f="LI",h=false,a=null,m=this,k=m.get_paragraphs(),j=m.getSelectionAfterOperation(k),e=a,c=[],g=m,b=a,d=[],n=r.toUpperCase(),q=h;function i(){if(b!=a){var e;e=b.cloneNode(h);b.parentNode.insertBefore(e,b);while(b.firstChild!=d[0])e.appendChild(b.firstChild);e.firstChild==a&&e.parentNode.removeChild(e);if(b.tagName.toUpperCase()==n)for(var k=0;k<d.length;k++){var c=d[k];if(c.nodeType==1&&c.tagName&&c.tagName.toUpperCase()==f){var p=h;b.parentNode.insertBefore(c,b);if(c.style.textAlign=="")c.style.textAlign=b.style.textAlign;if(b.childNodes.length==0&&k==d.length-1){b.parentNode.removeChild(b);b=a}if(c.style.textAlign==""||c.style.textAlign.toLowerCase()=="left"&&!g.rtlState()||c.style.textAlign.toLowerCase()=="right"&&g.rtlState()){p=g.tryUnWrap(c,j);if(p)q=true}if(!p){for(var l=g._doc.createElement(g.dfltBlockElement),o=c.attributes,m=0;m<o.length;++m){var i=o.item(m);if(!i.specified)continue;if(i.name.toLowerCase()=="style")continue;l.setAttribute(i.name,i.value)}l.style.cssText=c.style.cssText;if(l.tagName.toUpperCase()=="P")l.style.margin="0px";while(c.firstChild)l.appendChild(c.firstChild);c.parentNode.insertBefore(l,c);c.parentNode.removeChild(c)}}else b.parentNode.insertBefore(c,b)}else{for(var e=g._doc.createElement(n),o=b.attributes,m=0;m<o.length;++m){var i=o.item(m);if(!i.specified)continue;if(i.name.toLowerCase()=="style")continue;e.setAttribute(i.name,i.value)}e.style.cssText=b.style.cssText;b.parentNode.insertBefore(e,b);for(var k=0;k<d.length;k++){var c=d[k];e.appendChild(c)}}if(b!=a){e=b.cloneNode(h);b.parentNode.insertBefore(e,b);while(b.firstChild)e.appendChild(b.firstChild);e.firstChild==a&&e.parentNode.removeChild(e);b.parentNode.removeChild(b)}}b=a;d=[]}function p(){var t="BR",E=e.firstChild,F=e.lastChild,q=e.tagName.toUpperCase();if(!Sys.Extended.UI.HTMLEditor.isInlineElement(e)&&c[0][0]==E&&c[c.length-1][c[c.length-1].length-1]==F&&(q=="OL"||q=="UL"||q=="DL"||q==f||(q=="P"||q=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(e))&&q==f)){i();d=[];if(q==f){b=e.parentNode;d.push(e)}else if(q=="P"||q=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(e)){b=e.parentNode.parentNode;d.push(e.parentNode)}else{b=e;for(var s=0;s<c.length;s++)for(var r=c[s],m=0;m<r.length;m++)d.push(r[m])}i()}else if(q==f&&c.length<k.length){if(b!=e.parentNode){i();b=e.parentNode;d=[]}d.push(e)}else if(q=="OL"||q=="UL"||q=="DL"){i();b=e;d=[];for(var s=0;s<c.length;s++)for(var r=c[s],m=0;m<r.length;m++)d.push(r[m]);i()}else{var l=a,o=a;function v(){if(l!=a)if(l.childNodes==1&&(l.firstChild==j[0]||l.firstChild==j[1])){l.parentNode.insertBefore(l.firstChild,l);l.parentNode.removeChild(l)}l=a}b!=a&&i();var y="";if(c.length==1&&c[0].length==1&&c[0][0].nodeType==1&&c[0][0].tagName)y=c[0][0].tagName.toUpperCase();if(y=="OL"||y=="UL"||y=="DL"){var p=c[0][0];b=p;d=[];for(var s=0;s<p.childNodes.length;s++){var H=p.childNodes.item(s);d.push(H)}i()}else for(var s=0;s<c.length;s++){for(var r=c[s],m=0;m<r.length;m++){var p=r[m],z=p.tagName?p.tagName.toUpperCase():"";if(o==a){o=g._doc.createElement(n);p.parentNode.insertBefore(o,p)}if(!Sys.Extended.UI.HTMLEditor.isInlineElement(p)&&z!=t){l&&l.firstChild&&v();if(l==a){l=g._doc.createElement(f);o.appendChild(l)}l.appendChild(p);v()}else{if(l==a){l=g._doc.createElement(f);o.appendChild(l)}var C=r[r.length-1]==j[1]?r.length-1:r.length,D=r[0]==j[0]?1:0;if(z==t&&m==C-1&&m==D)if(Sys.Extended.UI.HTMLEditor.isIE){l.appendChild(g._doc.createTextNode(String.fromCharCode(160)));p.parentNode.removeChild(p)}else l.appendChild(p);else if(z==t&&m==C-1&&m>D)p.parentNode.removeChild(p);else l.appendChild(p);if(z==t&&m==r.length-1){v();l=a}if(p==j[1]&&m==r.length-1){v();l=a}}}l&&l.firstChild&&v()}if(o!=a){for(var u=[],m=0;m<o.childNodes.length;m++)u.push(o.childNodes.item(m).style.textAlign);for(var w=1;w<u.length;w++)if(u[w-1]!=u[w])break;if(w==u.length){for(var G=u[0]=="left"&&!g.rtlState()||u[0]=="right"&&g.rtlState()?"":u[0],m=0;m<o.childNodes.length;m++)o.childNodes.item(m).style.textAlign="";o.style.textAlign=G}}if(o!=a)if(o.parentNode.tagName.toUpperCase()=="P"&&o.parentNode.childNodes.length==1){var x=o.parentNode,A=x.cloneNode(h);x.parentNode.insertBefore(o,x);x.parentNode.removeChild(x);if(o.childNodes.length==1){var B=o.firstChild;while(B.firstChild)A.appendChild(B.firstChild);B.appendChild(A)}else delete A}}}for(var o=0;o<k.length;o++){var l=k[o];if(l.length>0){if(l[0].parentNode!=e){c.length>0&&p();c=[];e=l[0].parentNode}c.push(l)}}c.length>0&&p();b!=a&&i();m.setSelectionAfterOperation(j,q)};Sys.Extended.UI.HTMLEditor.MSIE_justify=function(e,u,p){var a="",k=false,g=true,c=null,o=this,r=o.get_paragraphs(),h=o.getSelectionAfterOperation(r),b=c,f=[],j=o,d=typeof u!="undefined"&&u?g:k,i=typeof p=="string"?g:k,l=typeof p=="string"?p:a,m=k;function q(a){if(a!=c)if(a.childNodes==1&&(a.firstChild==h[0]||a.firstChild==h[1])){a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}}function t(){var H="TABLE",u="0px",D="LI",C="remain",s="left",o="P",z="DIV",y="align",U=b.firstChild,V=b.lastChild,T=k,x;if(b.tagName&&!Sys.Extended.UI.HTMLEditor.isInlineElement(b)&&f[0][0]==U&&f[f.length-1][f[f.length-1].length-1]==V){x=b.tagName.toUpperCase();if(x!="TD"&&x!="TH"&&x!="FIELDSET"&&x!="LEGEND")T=g}if(T){var L=a;if(b.getAttribute(y)&&b.getAttribute(y).length>0)L=b.getAttribute(y);if(b.align&&b.align.length>0)L=b.align;if(b.style.textAlign&&b.style.textAlign.length>0)L=b.style.textAlign;b.align=a;b.setAttribute(y,a);b.removeAttribute(y);if((x==z||x==o||Sys.Extended.UI.HTMLEditor.isHeader(b))&&e==s&&d){if(j.tryUnWrap(b,h,d))m=g}else{if(e!=C)if(!(e==s&&d)||x==D&&b.parentNode.style.textAlign.length>0)b.style.textAlign=e;else b.style.textAlign=a;if(d)b.style.margin=x==o?u:a;if(x==D){for(var t=b.parentNode,w=[],F=0;F<t.childNodes.length;F++)t.childNodes.item(F).nodeType==1&&w.push(t.childNodes.item(F).style.textAlign);for(var A=1;A<w.length;A++)if(w[A-1]!=w[A])break;if(A==w.length){for(var L=w[0]==s&&d?a:w[0],r=0;r<t.childNodes.length;r++)if(t.childNodes.item(r).nodeType==1){t.childNodes.item(r).style.textAlign=a;if(d)t.childNodes.item(r).style.margin=t.childNodes.item(r).tagName.toUpperCase()==o?u:a}t.style.textAlign=L}}if((x==z||x==o||Sys.Extended.UI.HTMLEditor.isHeader(b))&&i&&l.toUpperCase()!=x){for(var E=j._doc.createElement(l),M=b.attributes,K=0;K<M.length;++K){var G=M.item(K);if(!G.specified)continue;if(G.name.toLowerCase()=="style")continue;E.setAttribute(G.name,G.value)}E.style.cssText=b.style.cssText;while(b.firstChild)E.appendChild(b.firstChild);b.parentNode.insertBefore(E,b);b.parentNode.removeChild(b)}}}else for(var v=c,Q=0;Q<f.length;Q++){if(!i)v=c;for(var B=f[Q],r=0;r<B.length;r++){var n=B[r],p=n.nodeType==1&&n.tagName?n.tagName.toUpperCase():c;if(p!=c&&(p=="UL"||p=="OL"||p=="DL"||p==z||Sys.Extended.UI.HTMLEditor.isHeader(n)||p==o||p==D||p==H)){q(v);v=c;if(e!=C)if(p!=H&&!d)n.style.textAlign=e;if(d)n.style.margin=p==o?u:a;if(p=="UL"||p=="OL"||p=="DL"){for(var O=0;O<n.childNodes.length;O++){var J=n.childNodes.item(O);if(J.nodeType==1){J.style.textAlign=a;if(d)J.style.margin=J.tagName.toUpperCase()==o?u:a;for(var P=0;P<J.childNodes.length;P++){var I=J.childNodes.item(P);if(I.nodeType==1&&I.tagName){var N=I.tagName.toUpperCase();if(d)I.style.margin=N==o?u:a;if(N==z||N==o||Sys.Extended.UI.HTMLEditor.isHeader(I))if(j.tryUnWrap(I,h,d))m=g}}}}if(e==s&&d)n.style.textAlign=a;continue}else if(p==D){if(e!=C)if(!(e==s&&d)||n.parentNode.style.textAlign.length>0)n.style.textAlign=e;else n.style.textAlign=a;if(d)n.style.margin=p==o?u:a;for(var t=n.parentNode,w=[],F=0;F<t.childNodes.length;F++)t.childNodes.item(F).nodeType==1&&w.push(t.childNodes.item(F).style.textAlign);for(var A=1;A<w.length;A++)if(w[A-1]!=w[A])break;if(A==w.length){for(var L=w[0]==s&&d?a:w[0],r=0;r<t.childNodes.length;r++)if(t.childNodes.item(r).nodeType==1){t.childNodes.item(r).style.textAlign=a;if(d)t.childNodes.item(r).style.margin=t.childNodes.item(r).tagName.toUpperCase()==o?u:a}t.style.textAlign=L}continue}else if(p==H)if(e!=C)if(!(e==s&&d))n.align=e;else{n.align=a;n.removeAttribute(y)}if((p==z||p==o||Sys.Extended.UI.HTMLEditor.isHeader(n))&&e==s&&d)if(j.tryUnWrap(n,h,d))m=g;if((p==z||p==o||Sys.Extended.UI.HTMLEditor.isHeader(n))&&i&&l.toUpperCase()!=p){for(var E=j._doc.createElement(l),M=n.attributes,K=0;K<M.length;++K){var G=M.item(K);if(!G.specified)continue;if(G.name.toLowerCase()=="style")continue;E.setAttribute(G.name,G.value)}E.style.cssText=n.style.cssText;while(n.firstChild)E.appendChild(n.firstChild);n.parentNode.insertBefore(E,n);n.parentNode.removeChild(n)}}else if(!(e==s&&d)||i){if(v==c){v=j._doc.createElement(i?l:j.dfltBlockElement);if(j.dfltBlockElement.toUpperCase()==o&&!i)v.style.margin=u;if(!i)v.style.textAlign=e;n.parentNode.insertBefore(v,n)}var R=B[B.length-1]==h[1]?B.length-1:B.length,S=B[0]==h[0]?1:0;if(p=="BR"&&r==R-1&&r==S)if(Sys.Extended.UI.HTMLEditor.isIE){v.appendChild(j._doc.createTextNode(String.fromCharCode(160)));n.parentNode.removeChild(n)}else v.appendChild(n);else if(p=="BR"&&r==R-1&&r>S&&(!i||n.nextSibling!=c&&n.nextSibling==h[1]))n.parentNode.removeChild(n);else v.appendChild(n);if(p=="BR"&&r==B.length-1&&!i){q(v);v=c}if(n==h[1]&&r==B.length-1){q(v);v=c}}}}}for(var s=0;s<r.length;s++){var n=r[s];if(n.length>0){if(n[0].parentNode!=b){f.length>0&&t();f=[];b=n[0].parentNode}f.push(n)}}f.length>0&&t();o.setSelectionAfterOperation(h,m)};Sys.Extended.UI.HTMLEditor.MSIE_indent=function(s){var h="px",a="",e="P",c=null,m=this,p=m.get_paragraphs(),i=m.getSelectionAfterOperation(p),b=c,f=[],d=m,k=false;function j(a){if(a.nodeType==1){var b=!d.rtlState()?a.style.marginLeft:a.style.marginRight;if(b.length>0)return parseInt(b)}return 0}function g(c,b){if(c.nodeType==1){if(c.tagName.toUpperCase()==e&&b==a)b="0px";if(!d.rtlState())c.style.marginLeft=b;else c.style.marginRight=b}}function n(b){if(s)g(b,j(b)+40+h);else if(b.tagName.toUpperCase()==e)if(j(b)>=40)g(b,j(b)-40+h);else g(b,"0px");else if(j(b)>40)g(b,j(b)-40+h);else g(b,a)}function o(a){if(a!=c)if(a.childNodes==1&&(a.firstChild==i[0]||a.firstChild==i[1])){a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}}function r(){var z="LI",y="DIV",B="right",A="left",u="align",N=b.firstChild,O=b.lastChild;if(b.tagName&&!Sys.Extended.UI.HTMLEditor.isInlineElement(b)&&f[0][0]==N&&f[f.length-1][f[f.length-1].length-1]==O){var m=a;if(b.getAttribute(u)&&b.getAttribute(u).length>0)m=b.getAttribute(u);if(b.align&&b.align.length>0)m=b.align;if(b.style.textAlign&&b.style.textAlign.length>0)m=b.style.textAlign;if(m.toLowerCase()==A&&!d.rtlState()||m.toLowerCase()==B&&d.rtlState())m=a;b.align=a;b.setAttribute(u,a);b.removeAttribute(u);n(b);var E=b.tagName.toUpperCase();if((E==y||E==e||Sys.Extended.UI.HTMLEditor.isHeader(b))&&m==a){if(d.tryUnWrap(b,i))k=true}else{if(m!=a||E==z&&b.parentNode.style.textAlign.length>0)b.style.textAlign=m;else b.style.textAlign=a;if(E==z){for(var v=b.parentNode,r=[],D=0;D<v.childNodes.length;D++)r.push(j(v.childNodes.item(D)));for(var w=1;w<r.length;w++)if(r[w-1]!=r[w])break;if(w==r.length){for(var M=r[0]==0?a:r[0]+h,q=0;q<v.childNodes.length;q++)g(v.childNodes.item(q),a);g(v,M)}}}}else for(var I=0;I<f.length;I++)for(var t=c,x=f[I],q=0;q<x.length;q++){var l=x[q],p=l.nodeType==1&&l.tagName?l.tagName.toUpperCase():c;if(p!=c&&(p=="UL"||p=="OL"||p=="DL"||p==y||Sys.Extended.UI.HTMLEditor.isHeader(l)||p==e||p==z)){o(t);t=c;n(l);if(p=="UL"||p=="OL"||p=="DL"){for(var G=0;G<l.childNodes.length;G++){var F=l.childNodes.item(G);if(F.nodeType==1){g(F,a);for(var H=0;H<F.childNodes.length;H++){var C=F.childNodes.item(H),m=C.nodeType==1?l.style.textAlign:a;if(m.toLowerCase()==A&&!d.rtlState()||m.toLowerCase()==B&&d.rtlState())m=a;if(C.nodeType==1){g(C,a);if(m==a&&C.tagName){var K=C.tagName.toUpperCase();if(K==y||K==e)if(d.tryUnWrap(C,i))k=true}}}}}continue}else if(p==z){for(var v=l.parentNode,r=[],D=0;D<v.childNodes.length;D++)r.push(j(v.childNodes.item(D)));for(var w=1;w<r.length;w++)if(r[w-1]!=r[w])break;if(w==r.length){for(var M=r[0]==0?a:r[0]+h,q=0;q<v.childNodes.length;q++)g(v.childNodes.item(q),a);g(v,M)}continue}var m=l.style.textAlign;if(m.toLowerCase()==A&&!d.rtlState()||m.toLowerCase()==B&&d.rtlState())m=a;if((p==y||p==e||Sys.Extended.UI.HTMLEditor.isHeader(l))&&m==a)if(d.tryUnWrap(l,i))k=true}else if(s){if(t==c){t=d._doc.createElement(d.dfltBlockElement);if(d.dfltBlockElement.toUpperCase()==e)t.style.margin="0px";n(t);l.parentNode.insertBefore(t,l)}var J=x[x.length-1]==i[1]?x.length-1:x.length,L=x[0]==i[0]?1:0;if(p=="BR"&&q==J-1&&q==L)if(Sys.Extended.UI.HTMLEditor.isIE){t.appendChild(d._doc.createTextNode(String.fromCharCode(160)));l.parentNode.removeChild(l)}else t.appendChild(l);else if(p=="BR"&&q==J-1&&q>L)l.parentNode.removeChild(l);else t.appendChild(l);if(p=="BR"&&q==x.length-1){o(t);t=c}if(l==i[1]&&q==x.length-1){o(t);t=c}}}}for(var q=0;q<p.length;q++){var l=p[q];if(l.length>0){if(l[0].parentNode!=b){f.length>0&&r();f=[];b=l[0].parentNode}f.push(l)}}f.length>0&&r();m.setSelectionAfterOperation(i,k)};Sys.Extended.UI.HTMLEditor.getSelectionAfterOperation=function(a){if(a.length==0)return [];var e=this._doc.createElement("SPAN"),d=this._doc.createElement("SPAN"),f=a[0][0],b=a[a.length-1][a[a.length-1].length-1];if(f==b&&b.nodeType==1&&b.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.canHaveChildren(b)){b.appendChild(e);b.appendChild(d)}else{var g=Sys.Extended.UI.HTMLEditor._getReallyFirst(f);g.parentNode.insertBefore(e,g);if(g==f){var h=[];h.push(e);for(var i=0;i<a[0].length;i++)h.push(a[0][i]);a[0]=h}var c=Sys.Extended.UI.HTMLEditor._getReallyLast(b);if(c.nextSibling)c.parentNode.insertBefore(d,c.nextSibling);else c.parentNode.appendChild(d);c==b&&a[a.length-1].push(d)}return [e,d]};Sys.Extended.UI.HTMLEditor.setSelectionAfterOperation=function(m,p){var a=null,c=this;if(m.length==0)return;var d=m[0],b=m[1],g=c._getSelection(),f=a,j=a;if(Sys.Extended.UI.HTMLEditor.isIE){g.empty();g=c._getSelection();var h=c._createRange(g),l=c._createRange(g);try{if(d!=a&&b!=a&&d.nextSibling==b){f=c._doc.createTextNode(" ");b.parentNode.insertBefore(f,b)}c._TcurrentFormat=a;d!=a&&h.moveToElementText(d);b!=a&&l.moveToElementText(b);if(d!=a&&b!=a){h.setEndPoint("EndToStart",l);h.select();if(f!=a){h.collapse(false);h.select();f.parentNode.removeChild(f)}}else if(d!=a)h.select();else b!=a&&l.select()}catch(r){}}else try{var e,i=d.nextSibling,q=b.previousSibling;c._TcurrentFormat=a;if(i==q&&i.nodeType==1&&i.tagName.toUpperCase()=="BR"){var o=Sys.Extended.UI.HTMLEditor.__getIndex(i);e=c._doc.createRange();e.setStart(i.parentNode,o);e.setEnd(i.parentNode,o)}else{f=c._doc.createTextNode("");j=c._doc.createTextNode("");d.parentNode.insertBefore(f,d);b.parentNode.insertBefore(j,b);e=c._doc.createRange();e.setStart(f,0);e.setEnd(j,0)}c._removeAllRanges(g);c._selectRange(g,e)}catch(r){}var n=Sys.Extended.UI.HTMLEditor._commonTotalParent(d==a?b:d,b==a?d:b),k=a;if(n!=a)k=n.parent;d!=a&&d.parentNode.removeChild(d);b!=a&&b.parentNode.removeChild(b);if(p&&k!=a){Sys.Extended.UI.HTMLEditor.spanJoiner(k,c._doc);if(!Sys.Extended.UI.HTMLEditor.isIE&&f!=a&&j!=a){var e=c._doc.createRange();e.setStart(f,0);e.setEnd(j,0);c._removeAllRanges(g);c._selectRange(g,e)}}};Sys.Extended.UI.HTMLEditor.get_paragraphs=function(){var a=this;a._TcurrentFormat=null;var b=a.getPseudoP();if(b.length==0)try{var e="<span id='"+Sys.Extended.UI.HTMLEditor.smartClassName+"_ll'></span><span id='"+Sys.Extended.UI.HTMLEditor.smartClassName+"_rr'></span><br>";a.insertHTML(e);var c=a._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName+"_ll"),d=a._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName+"_rr"),f=a._TcurrentFormat;a._TcurrentFormat=null;a.setSelectionAfterOperation([c,d],false);a._TcurrentFormat=f;b=a.getPseudoP()}catch(g){}return b};Sys.Extended.UI.HTMLEditor.getPseudoP=function(){var y="<span id='",n="SPAN",c=null,d=this,s=[];try{var l=d._getSelection(),j=d._createRange(l),q=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",v=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",h=c,g=c;if(Sys.Extended.UI.HTMLEditor.isIE){if(l.type.toLowerCase()!="control"){h=j.duplicate();g=j.duplicate();h.setEndPoint("EndToStart",j);g.setEndPoint("StartToEnd",j)}}else{h=j.cloneRange();g=j.cloneRange();h.setEnd(h.startContainer,h.startOffset);g.setStart(g.endContainer,g.endOffset)}var a=c,b=c;if(Sys.Extended.UI.HTMLEditor.isIE&&l.type.toLowerCase()=="control"){var o=j.item(0),i;i=d._doc.createElement(n);i.id=v;o.parentNode.insertBefore(i,o);i=d._doc.createElement(n);i.id=q;if(o.nextSibling==c)o.parentNode.appendChild(i);else o.parentNode.insertBefore(i,o.nextSibling)}else{if(!d.insertHTML(y+q+"'/>",g))return [];if(!d.insertHTML(y+v+"'/>",h)){var x=d._doc.getElementById(q);if(x!=c){p=x.parentNode;p.removeChild(x)}return []}}a=d._doc.getElementById(v);b=d._doc.getElementById(q);if(a!=c&&b!=c)while(a.nextSibling==c)if(a.parentNode.nextSibling)a.parentNode.parentNode.insertBefore(a,a.parentNode.nextSibling);else a.parentNode.parentNode.appendChild(a);if(a!=c&&b!=c){while(b.previousSibling==c)b.parentNode.parentNode.insertBefore(b,b.parentNode);if(b.previousSibling.nodeType==1){var A=b.previousSibling.tagName.toUpperCase();if(A!="BR"&&A!="IMG"){var t=Sys.Extended.UI.HTMLEditor._getReallyLast(b.previousSibling);if(t.nodeType==1&&Sys.Extended.UI.HTMLEditor.canHaveChildren(t))t.appendChild(b);else t.parentNode.appendChild(b)}}b.previousSibling&&b.previousSibling.nodeType==1&&b.previousSibling.tagName.toUpperCase()=="BR"&&b.parentNode.insertBefore(b,b.previousSibling)}if(a==c){var f=d._doc.createElement(n);f.id=v;b.parentNode.insertBefore(f,b);a=f}if(b==c){var f=d._doc.createElement(n);f.id=q;if(a.nextSibling)a.parentNode.insertBefore(f,a.nextSibling);else a.parentNode.appendChild(f);b=f}if(a!=c&&b!=c)if(a.parentNode==b)b.parentNode.insertBefore(a,b);else if(b.parentNode==a)if(a.nextSibling!=c)a.parentNode.insertBefore(b,a.nextSibling);else a.parentNode.appendChild(b);while(a.nextSibling!=c&&a.nextSibling.nodeType==3&&(""+a.nextSibling.data+"").length==0)a.parentNode.removeChild(a.nextSibling);if(d._TcurrentFormat==c&&a!=c&&b!=c&&a.nextSibling==b){var k=b.parentNode;d._TcurrentFormat=c;while(k&&k.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(k.tagName)){if(k.tagName.toUpperCase()!="A"){var p=k.cloneNode(false);if(d._TcurrentFormat==c)d._TcurrentFormat=p;else{p.appendChild(d._TcurrentFormat);d._TcurrentFormat=p}}k=k.parentNode}if(d._TcurrentFormat){var C=d._doc.createElement("span");C.appendChild(d._TcurrentFormat);d._TcurrentFormat=C.innerHTML}}var e=a;while(e&&e.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.tagName.toUpperCase()!="A")e=e.parentNode;if(e!=c&&e.tagName.toUpperCase()=="P")if(e.firstChild!=c)e.insertBefore(a,e.firstChild);else e.appendChild(a);else Sys.Extended.UI.HTMLEditor.positionInParagraph(a,a.previousSibling,true,a.parentNode);e=b;while(e&&e.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.tagName.toUpperCase()!="A")e=e.parentNode;if(e!=c&&e.tagName.toUpperCase()=="P")e.appendChild(b);else Sys.Extended.UI.HTMLEditor.positionInParagraph(b,b.nextSibling,false,b.parentNode);s=d.getPseudoP_Recur(a,b,0);var z=a.parentNode.tagName.toUpperCase();if(s.length==0&&a.previousSibling==c&&b.nextSibling==c&&a.nextSibling==b&&(z=="P"||llpTagName=="DIV"||z=="LI"))s=[[a.parentNode]];if(Sys.Extended.UI.HTMLEditor.isIE){l.empty();l=d._getSelection();var r=d._createRange(l),w=d._createRange(l);try{a!=c&&r.moveToElementText(a);b!=c&&w.moveToElementText(b);if(a!=c&&b!=c){r.setEndPoint("EndToEnd",w);r.select()}else if(a!=c)r.select();else b!=c&&w.select()}catch(E){}}a!=c&&a.parentNode.removeChild(a);b!=c&&b.parentNode.removeChild(b)}catch(E){for(var B=d._doc.getElementsByTagName(n),u=[],m=0;m<B.length;m++){var f=B[m];if(f.id&&f.id.length>0){var D=new RegExp(Sys.Extended.UI.HTMLEditor.smartClassName,"ig");D.test(f.id)&&u.push(f)}}for(var m=0;m<u.length;m++)u[m].parentNode.removeChild(u[m])}return s};Sys.Extended.UI.HTMLEditor.getPseudoP_Recur=function(u,p,t){var A="span",K="_left_",J="_right_",I="TABLE",z=true,k=null,r=this,n=[],b=u,h=p.nextSibling!=k&&p.nextSibling.tagName&&p.nextSibling.tagName.toUpperCase()=="BR"?p.nextSibling:p,j=k;if(b==k||h==k){if(b!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(b,b);if(h!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(h,h)}else j=Sys.Extended.UI.HTMLEditor._commonTotalParent(b,h);if(j!=k){b=Sys.Extended.UI.HTMLEditor.getContainer(j.parent.childNodes.item(j.indexFirst),b);h=Sys.Extended.UI.HTMLEditor.getContainer(j.parent.childNodes.item(j.indexLast),h);Sys.Extended.UI.HTMLEditor.unStyle(b);Sys.Extended.UI.HTMLEditor.unStyle(h);while(b.parentNode!=j.parent)b=b.parentNode;while(h.parentNode!=j.parent)h=h.parentNode;Sys.Extended.UI.HTMLEditor._moveTagsUp(b.nextSibling,h);j=k;if(u==k||p==k){if(u!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(u,u);if(p!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(p,p)}else j=Sys.Extended.UI.HTMLEditor._commonTotalParent(u,p);j!=k&&Sys.Extended.UI.HTMLEditor.spanJoiner(j.parent,r._doc,j.indexFirst,j.indexLast+1,z);function V(a){if(!Sys.Extended.UI.HTMLEditor.isInlineElement(a))return z;else if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){var b=a.firstChild;while(b!=k){nnnNext=b.nextSibling;var c=V(b);if(c)return z;b=nnnNext}}return false}var d=0,c=[],f=0;if(b.tagName&&h.tagName){var x=b.tagName.toUpperCase(),F=h.tagName.toUpperCase();if((x=="TD"||x=="TR")&&(F=="TD"||F=="TR")){while(b.tagName.toUpperCase()!=I)b=b.parentNode;h=b}else if((x=="DD"||x=="DT")&&(F=="DD"||F=="DT")){while(b.tagName&&b.tagName.toUpperCase()!="DL")b=b.parentNode;h=b}else if(x=="LI"&&F=="LI"){while(x!="UL"&&x!="OL"){b=b.parentNode;x=b.tagName?b.tagName.toUpperCase():k}h=b}}var l=u?u:p,m=p?p:u,a=b;while(z){if(!Sys.Extended.UI.HTMLEditor.isTempElement(a)){var Z=V(a);if(!Z){if(a.nodeType&&a.nodeType==3){var X=""+a.data+"";if(X.length==0||/^[\n\r]+$/.test(X)){var Y=a.nextSibling;a.parentNode.removeChild(a);if(a==h)break;a=Y;continue}}c[f]=a;f++}else if(a.tagName&&a.tagName.toUpperCase()=="BR"){c[f]=a;n[d]=c;d++;c=[];f=0}else if((a==h||a==b)&&!(a==h&&a==b?Sys.Extended.UI.HTMLEditor._reallyFirst(a,l)&&Sys.Extended.UI.HTMLEditor._reallyLast(a,m):Sys.Extended.UI.HTMLEditor._reallyFirst(a,l)||Sys.Extended.UI.HTMLEditor._reallyLast(a,m))){var G=a.tagName?a.tagName.toUpperCase():k;if(G==I||G=="TBODY"){var s=a;while(s.tagName.toUpperCase()!=I)s=s.parentNode;for(var R=0,L=0,S=s.rows.item(s.rows.length-1).cells.length-1,M=s.rows.length-1,i=0;i<s.rows.length;i++)for(var W=s.rows.item(i),y=0;y<W.cells.length;y++){var q=W.cells.item(y);if(Sys.Extended.UI.HTMLEditor._lookChild(q,l)>=0){R=y;L=i}if(Sys.Extended.UI.HTMLEditor._lookChild(q,m)>=0){S=y;M=i}}for(var i=L;i<=M;i++)for(var y=i==L?R:0;y<=(i==M?S:s.rows.item(i).cells.length-1);y++){var q=s.rows.item(i).cells.item(y);if(f>0){n[d]=c;d++;c=[];f=0}var B=Sys.Extended.UI.HTMLEditor._lookChild(q,l)>=0,C=Sys.Extended.UI.HTMLEditor._lookChild(q,m)>=0;if(B||C){var e=l,g=m,Q=Sys.Extended.UI.HTMLEditor.smartClassName+J+t,P=Sys.Extended.UI.HTMLEditor.smartClassName+K+t;if(B){g=r._doc.createElement(A);g.id=Q;q.appendChild(g)}if(C){e=r._doc.createElement(A);e.id=P;if(q.firstChild)q.insertBefore(e,q.firstChild);else q.appendChild(e)}for(var D=r.getPseudoP_Recur(e,g,t+1),v=0;v<D.length;v++){n[d]=D[v];d++}e!=l&&e.parentNode.removeChild(e);g!=m&&g.parentNode.removeChild(g)}else{for(var N=0,O=q.childNodes.length,w=N;w<O;w++){var E=q.childNodes.item(w);if(!Sys.Extended.UI.HTMLEditor.isTempElement(E)){c[f]=E;f++}}if(c.length>0){n[d]=c;d++;c=[];f=0}}}}else if(G=="UL"||G=="OL"||G=="DL"){for(var H=a,T=0,U=H.childNodes.length-1,i=0;i<H.childNodes.length;i++){var o=H.childNodes.item(i);if(o.nodeType==1){if(o==l||Sys.Extended.UI.HTMLEditor._lookChild(o,l)>=0)T=i;if(o==m||Sys.Extended.UI.HTMLEditor._lookChild(o,m)>=0)U=i}}for(var i=T;i<=U;i++){var o=H.childNodes.item(i);if(f>0){n[d]=c;d++;c=[];f=0}var B=Sys.Extended.UI.HTMLEditor._lookChild(o,l)>=0,C=Sys.Extended.UI.HTMLEditor._lookChild(o,m)>=0;if(B||C){var e=l,g=m,Q=Sys.Extended.UI.HTMLEditor.smartClassName+J+t,P=Sys.Extended.UI.HTMLEditor.smartClassName+K+t;if(B){g=r._doc.createElement(A);g.id=Q;o.appendChild(g)}if(C){e=r._doc.createElement(A);e.id=P;if(o.firstChild)o.insertBefore(e,o.firstChild);else o.appendChild(e)}for(var D=r.getPseudoP_Recur(e,g,t+1),v=0;v<D.length;v++){n[d]=D[v];d++}e!=l&&e.parentNode.removeChild(e);g!=m&&g.parentNode.removeChild(g)}else{for(var N=0,O=o.childNodes.length,w=N;w<O;w++){var E=o.childNodes.item(w);if(!Sys.Extended.UI.HTMLEditor.isTempElement(E)){c[f]=E;f++}}if(c.length>0){n[d]=c;d++;c=[];f=0}}}}else{var B=Sys.Extended.UI.HTMLEditor._lookChild(a,l)>=0,C=Sys.Extended.UI.HTMLEditor._lookChild(a,m)>=0;if(f>0){n[d]=c;d++;c=[];f=0}if(B||C){var e=l,g=m,Q=Sys.Extended.UI.HTMLEditor.smartClassName+J+t,P=Sys.Extended.UI.HTMLEditor.smartClassName+K+t;if(B){g=r._doc.createElement(A);g.id=Q;a.appendChild(g)}if(C){e=r._doc.createElement(A);e.id=P;if(a.firstChild)a.insertBefore(e,a.firstChild);else a.appendChild(e)}for(var D=r.getPseudoP_Recur(e,g,t+1),v=0;v<D.length;v++){n[d]=D[v];d++}e!=l&&e.parentNode.removeChild(e);g!=m&&g.parentNode.removeChild(g)}else{for(var N=0,O=a.childNodes.length,w=N;w<O;w++){var E=a.childNodes.item(w);if(!Sys.Extended.UI.HTMLEditor.isTempElement(E)){c[f]=E;f++}}if(c.length>0){n[d]=c;d++;c=[];f=0}}}}else{if(f>0){n[d]=c;d++;c=[];f=0}c[f]=a;n[d]=c;d++;c=[];f=0}}if(a==h)break;a=a.nextSibling}if(f>0)n[d]=c}return n};Sys.Extended.UI.HTMLEditor.unWrap=function(a,f){var d="BR",e=this;if(a.firstChild){while(a.firstChild&&a.firstChild.nodeType==3&&""+a.firstChild.data+""=="")a.removeChild(a.firstChild);var b=[];while(a.firstChild){a.firstChild!=f[0]&&a.firstChild!=f[1]&&b.push(a.firstChild);a.parentNode.insertBefore(a.firstChild,a)}if(b.length==0){var g=e._doc.createElement(d);a.parentNode.insertBefore(g,a)}if(Sys.Extended.UI.HTMLEditor.isIE&&b.length==1&&b[0].nodeType==3){var h=""+b[0].data+"";if(h.length==1&&h.charCodeAt(0)==160){var g=e._doc.createElement(d);b[0].parentNode.insertBefore(g,b[0]);b[0].parentNode.removeChild(b[0])}}while(a.nextSibling&&a.nextSibling.nodeType==3&&""+a.nextSibling.data+""=="")a.parentNode.removeChild(a.nextSibling);var c=a.previousSibling&&f[1]==a.previousSibling?f[1].previousSibling:a.previousSibling;if(c&&Sys.Extended.UI.HTMLEditor.isInlineElement(c))if(c.nodeType==1&&c.childNodes.length>0)c=Sys.Extended.UI.HTMLEditor._getReallyLast(c);if(Sys.Extended.UI.HTMLEditor.isInlineElement(c)&&a.nextSibling!=null){var g=e._doc.createElement(d);a.parentNode.insertBefore(g,a)}}else{var g=e._doc.createElement(d);a.parentNode.insertBefore(g,a)}a.parentNode.removeChild(a)};Sys.Extended.UI.HTMLEditor.tryUnWrap=function(b,m,e){var g="undefined",l=this;b.style.textAlign="";for(var h=0,i=b.attributes,f=0;f<i.length;++f){var j=i.item(f);if(!j.specified)continue;if(j.name.toLowerCase()=="style")continue;h++}var k=b.style.cssText,d=0,a,c=b.tagName.toUpperCase();if(!(typeof e!=g&&e))if(c!="LI")try{a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-top"));if(isNaN(a))a=c=="P"?1:0;d+=a;a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-bottom"));if(isNaN(a))a=c=="P"?1:0;d+=a;a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-right"));if(isNaN(a))a=c=="P"?1:0;d+=a;a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-left"));if(isNaN(a))a=c=="P"?1:0;d+=a}catch(n){d=1}b.style.margin="";if(h==0&&b.style.cssText.length==0&&d==0||typeof e!=g&&e&&c!="LI"){l.unWrap(b,m);return true}else{b.style.cssText=k;return false}};Sys.Extended.UI.HTMLEditor._queryCommandValue=function(n,o){var e="font-size",l="font-family",g=null,d=this,f=d._rangeStartEnd();if(f==g)return "";try{if(n.toLowerCase()=="backcolor"){var i=f.start;while(i){var j=Sys.Extended.UI.HTMLEditor.getStyle(i,"background-color").toLowerCase();if(j.length>0&&j!="transparent")return j;i=i.parentNode}return "#FFFFFF"}var c="none";switch(n.toLowerCase()){case "forecolor":c="color";break;case "fontname":c=l;break;case "fontsize":c=e}var b;if((c==e||c==l)&&d._FontNotSet){b="";var a=f.start;while(a!=g){if(c==e){if(a.style&&a.style.fontSize&&a.style.fontSize.length>0){b=a.style.fontSize;break}else if(a.tagName&&a.tagName.toUpperCase()=="FONT"&&a.size&&a.size.length>0){b=Sys.Extended.UI.HTMLEditor.fontSizeSeek(a.size);break}}else if(a.style&&a.style.fontFamily&&a.style.fontFamily.length>0){b=a.style.fontFamily;break}else if(a.tagName&&a.tagName.toUpperCase()=="FONT"&&a.face&&a.face.length>0){b=a.face;break}if(a.className&&a.className.length>0){b=Sys.Extended.UI.HTMLEditor.getStyle(a,c).toLowerCase();if(c==e)if(!Sys.Extended.UI.HTMLEditor.isIE)b=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(b,d,o);break}var h=a.tagName.toUpperCase();if(h=="BODY"||h=="TD")break;a=a.parentNode}}else{b=Sys.Extended.UI.HTMLEditor.getStyle(f.start,c).toLowerCase();if(c==e)if(!Sys.Extended.UI.HTMLEditor.isIE){b=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(b,d,o);var a=f.start;while(a!=g){if(a.style&&a.style.fontSize&&a.style.fontSize.length>0){b=a.style.fontSize;break}if(a.className&&a.className.length>0)break;var h=a.tagName.toUpperCase();if(h=="BODY"||h=="TD")break;a=a.parentNode}}}if(d._StyleForTyping!=g&&d._StyleForTyping.length>0)for(var k=0;k<d._StyleForTyping.length;k++){var m=d._StyleForTyping[k];if(m.name==c){b=m.value;break}}return b}catch(p){return ""}};
//END HTMLEditor.ExecCommandEmulation.js
//START HTMLEditor.ModePanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.ModePanel=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ModePanel.initializeBase(a,[b]);a._activated=false;a._isActivating=false;a._editPanel=null;a._cachedContent=null;a._onbeforeunload$delegate=Function.createDelegate(a,a._onbeforeunload)};Sys.Extended.UI.HTMLEditor.ModePanel.prototype={set_editPanel:function(a){this._editPanel=a},get_content:function(){var a=this;if(a._activated)return a._getContent();else if(a._cachedContent!=null)return a._cachedContent;else return ""},set_content:function(b){var a=this;a._cachedContent=b;if(!a._activated&&!a._isActivating)a._activate(b);else if(!a._isActivating)a._setContent(b);else{var c=a;setTimeout(function(){c.set_content(b)},10);return false}return true},_activate:function(){this.get_element().style.display="";this._isActivating=true},_activateFinished:function(){var a=this;a._activated=true;a._isActivating=false;a._editPanel._setActive();a._editPanel.get_autofocus()&&a._focus()},_deactivate:function(){this.get_element().style.display="none";this._activated=false;this._isActivating=false},initialize:function(){Sys.Extended.UI.HTMLEditor.ModePanel.callBaseMethod(this,"initialize");Sys.Extended.UI.HTMLEditor.isIE&&$addHandlers(window,{beforeunload:this._onbeforeunload$delegate})},dispose:function(){var a=this;Sys.Extended.UI.HTMLEditor.isIE&&$common.removeHandlers(window,{beforeunload:a._onbeforeunload$delegate});if(a._activated){Sys.Extended.UI.HTMLEditor.isIE&&a._onbeforeunload();a._deactivate()}Sys.Extended.UI.HTMLEditor.ModePanel.callBaseMethod(a,"dispose")},_onbeforeunload:function(){var a=this;if(a._activated)if(!a._editPanel._contentPrepared){a._editPanel._prepareContentForPostback(a.get_content());a._editPanel._contentPrepared=true}},_getContent:function(){if(this._cachedContent!=null)return this._cachedContent;else return ""},_setContent:function(){},_focus:function(){this._focused()},_focused:function(a){this._editPanel._focused(a);this._editPanel.set_autofocus(true)},_really_focused:function(){this._editPanel._really_focused();this._editPanel.set_autofocus(true)}};Sys.Extended.UI.HTMLEditor.ModePanel.registerClass("Sys.Extended.UI.HTMLEditor.ModePanel",Sys.UI.Control);
//END HTMLEditor.ModePanel.js
//START HTMLEditor.DesignPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.DesignPanel=function(d){var c=false,b=null,a=this;Sys.Extended.UI.HTMLEditor.DesignPanel.initializeBase(a,[d]);a._doc=b;a._updated_now=c;a._updateTimer=b;a._popup=b;a._contextElement=b;a._a_prize=c;a.__stack=b;a._StyleForTyping=b;a.isWord=c;a.isPlainText=c;a.dfltBlockElement="P";a._FontNotSet=true;a._design_timer1=b;a._events$delegate=Function.createDelegate(a,Sys.Extended.UI.HTMLEditor.DesignPanelEventHandler);a._blur$delegate=Function.createDelegate(a,a._blur);a._focus$delegate=Function.createDelegate(a,a._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(b){var a=this;Sys.Extended.UI.HTMLEditor.DesignPanel.callBaseMethod(a,"_activate");a._wasFocused=false;a._initIframe(b);a._onDocumentLoaded()},_deactivate:function(){var a=this;a._deactivateCommon();if(Sys.Extended.UI.HTMLEditor.isIE){a._doc.open();a._doc.write("");a._doc.close();a.get_element().src="javascript:false;"}a._doc=null;Sys.Extended.UI.HTMLEditor.DesignPanel.callBaseMethod(a,"_deactivate")},_deactivateCommon:function(){var a=this;a._editPanel.__blured=false;for(var c=a._doc.body.getElementsByTagName("IMG"),b=0;b<c.length;b++)if(c[b].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&c[b].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0)try{if(Sys.Extended.UI.HTMLEditor.isIE)$removeHandler(c[b],"dragstart",Sys.Extended.UI.HTMLEditor.stopDrag);else $removeHandler(c[b],"draggesture",Sys.Extended.UI.HTMLEditor.stopDrag)}catch(d){}Sys.Extended.UI.HTMLEditor._removeEvents(a._doc,["keydown","keypress","mousedown","mouseup","dblclick"],a._events$delegate);Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["blur"],a._blur$delegate);Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["focus"],a._focus$delegate)},_initIframe:function(b){var a=this;if(!Sys.Extended.UI.HTMLEditor.isIE){a._savedValue=b;a._absAndFixedParents=a._getAbsAndFixedParents()}var c=Sys.Extended.UI.HTMLEditor.Trim(a._prepareContent(b));a._doc=a.get_element().contentWindow.document;if(!Sys.Extended.UI.HTMLEditor.isIE)a._doc.designMode="on";a._doc.open();a._doc.write('<html><head><link rel="stylesheet" href="'+a._editPanel.get_documentCssPath()+'" media="all" /><link rel="stylesheet" href="'+a._editPanel.get_designPanelCssPath()+'" media="all" /></head><body>'+c+"</body></html>");a._doc.close();a._doc.id="EditorDocument";if(Sys.Extended.UI.HTMLEditor.isIE){a._doc.body.contentEditable=true;a._tryForward=true}},_blur:function(b){var a=this;a._editPanel.__blured=true;if(!Sys.Extended.UI.HTMLEditor.isIE&&a._design_timer1!=null){clearTimeout(a._design_timer1);a._design_timer1=null}!a.isPopup&&a._editPanel._validate(b,null);return true},_focus_event:function(){var a=this;a._editPanel.__blured=false;if(Sys.Extended.UI.HTMLEditor.isIE)a._really_focused();else{var b=a;Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=a._editPanel;if(a._design_timer1==null)a._design_timer1=setTimeout(function(){b._really_focused();b._design_timer1=null},0)}return true},_getAbsAndFixedParents:function(){var a=this.get_element(),b="";while(a!=null&&a.tagName&&a.tagName.toLowerCase()!="body"){b+=a.tagName;if(a.style.position=="absolute"||a.style.position=="fixed")b+=": "+a.style.position;b+="\n";a=a.parentNode}return b},_onDocumentLoaded:function(){var a=this,b=a;if(!Sys.Extended.UI.HTMLEditor.isIE){var c=a._getAbsAndFixedParents();if(c!=a._absAndFixedParents){a._initIframe(a._savedValue);setTimeout(function(){b._onDocumentLoaded()},10);return}}try{if(!Sys.Extended.UI.HTMLEditor.isIE){a._doc.queryCommandValue("forecolor");if(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)if(!Sys.Extended.UI.HTMLEditor.isReallyVisible(a.get_element())){setTimeout(function(){b._onDocumentLoaded()},10);return}}var d=b._doc.body.innerHTML}catch(e){setTimeout(function(){b._onDocumentLoaded()},10);return}a._afterBodyIsFormed();setTimeout(function(){b._activateFinished();Sys.Extended.UI.HTMLEditor.isIE&&!b._editPanel.get_autofocus()&&b._getSelection().empty()},0)},_afterBodyIsFormed:function(){var b=this,d=b;Sys.Extended.UI.HTMLEditor._addEvents(b._doc,["keydown","keypress","mousedown","mouseup","dblclick"],b._events$delegate);Sys.Extended.UI.HTMLEditor._addEvents(b.get_element().contentWindow,["blur"],b._blur$delegate);Sys.Extended.UI.HTMLEditor._addEvents(b.get_element().contentWindow,["focus"],b._focus$delegate);Sys.Extended.UI.HTMLEditor.inspectForShadows(d._doc.body);var a=b._doc.body;if(a.childNodes.length==1&&a.firstChild.tagName&&a.firstChild.tagName.toUpperCase()=="DIV"&&a.firstChild.style.cssText.length>0&&a.firstChild.style.direction.length>0&&Sys.Extended.UI.HTMLEditor.getStyle(a.firstChild,"position")!="absolute"){a.style.cssText=a.firstChild.style.cssText;var c=a.firstChild;while(c.firstChild)a.insertBefore(c.firstChild,c);a.removeChild(c)}d._clearP()},_getContent:function(){var v="pseudomode",u="dummybgcolor",t="dummysrc",s="dummytag",f="$1$3",r="$1<br/>$3",b=this;if(b._popup!=null)if(typeof b._popup._forceImClose=="function"){var y=b._popup._forceImClose;y(b._popup._iframe.contentWindow)}b._clearP();var a;if(Sys.Extended.UI.HTMLEditor.isIE){Sys.Extended.UI.HTMLEditor.spanJoiner(b._doc.body,b._doc);a=Sys.Extended.UI.HTMLEditor.getHTML(b._doc.body,false,true);a=a.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,"$1&nbsp;$3").replace(/(<td[^>]*?>)\s*(&nbsp;)\s*(<\/td[^>]*?>)/ig,r).replace(/(<p[^>]*?>)\s*(&nbsp;)\s*(<\/p[^>]*?>)/ig,r);a=(b._doc.body.style.cssText.length>0?'<div style="'+b._doc.body.style.cssText.replace('"',"'")+'">':"")+a+(b._doc.body.style.cssText.length>0?"</div>":"");if(b._editPanel.get_noScript())a=a.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"");if(/<embed/ig.test(a))a=a.replace(/(<embed(?:.*?))(\sloop=\"true\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\splay=\"true\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\sbgcolor=\"\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\sscale=\"\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\shspace=\"0\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\svspace=\"0\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\swmode=\"[^\"]+\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(pseudomode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1wmode=$3$4").replace(/(<embed(?:.*?))(\swmode=\"\")((?:.*?)>)/ig,f);var x=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":)","ig");a=a.replace(x,"$1")}else{var h=b._doc.createElement("DIV"),q=new Sys.Extended.UI.HTMLEditor.DesignPanel.ScriptRecover;h.style.cssText=b._doc.body.style.cssText;!b._editPanel.get_noScript()&&b._doc.body.innerHTML.replace(/<script(?:[^>]*?)>(.*?)<\/script(?:[^>]*?>)/gi,function(a,b){return q.regReplScript1(a,b)});h.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(b._doc.body.innerHTML);for(var p=h.getElementsByTagName("IMG"),l=[],i=0;i<p.length;i++)l.push(p[i]);for(var o=0;o<l.length;o++){var c=l[o],k;k=c.getAttribute(s);if(k&&k.length>0&&k.toLowerCase()=="embed"){var z=c.getAttribute(t),j=c.getAttribute(u),m=c.getAttribute(v),w=c.attributes,e=b._doc.createElement("EMBED");e.src=z;e.width=c.width;e.height=c.height;if(j&&j.length>0){j=Sys.Extended.UI.HTMLEditor.tryReplaceRgb(j);e.setAttribute("bgcolor",j)}m&&m.length>0&&e.setAttribute("wmode",m);for(var i=0;i<w.length;++i){var n=w.item(i);if(!n.specified)continue;var d=n.name.toLowerCase(),g=n.value;if(d==s||d==t||d==u||d=="style"||d=="wmode"||d==v||d=="src")continue;if(d=="loop"&&g=="true")continue;if(d=="play"&&g=="true")continue;if(d=="hspace"&&g=="0")continue;if(d=="vspace"&&g=="0")continue;if(d=="scale"&&g.length==0)continue;if(d=="align"&&g.length==0)continue;e.setAttribute(d,g)}if(c.style.width&&c.style.width.length>0)e.style.width=c.style.width;if(c.style.height&&c.style.height.length>0)e.style.height=c.style.height;c.parentNode.insertBefore(e,c);c.parentNode.removeChild(c)}}Sys.Extended.UI.HTMLEditor.spanJoiner(h,b._doc);a=Sys.Extended.UI.HTMLEditor.getHTML(h,h.style.cssText.length>0?true:false,true);if(!b._editPanel.get_noScript())a=a.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(a,b,c,d){return q.regReplFromScript1(a,b,c,d)});else a=a.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"");delete h}a=Sys.Extended.UI.HTMLEditor.brXHTML(a.replace(/^([\n|\r]+)/,""));if(b._editPanel.get_noUnicode())a=a.replace(/([\u0080-\uFFFF])/g,function(b,a){return "&#"+a.charCodeAt(0).toString(10)+";"});if(Sys.Extended.UI.HTMLEditor.Trim(a)=="<br />")a="";return a},_setContent:function(b){var a=this;a._deactivateCommon();var c=Sys.Extended.UI.HTMLEditor.Trim(a._prepareContent(b));a._doc.open();a._doc.write('<html><head><link rel="stylesheet" href="'+a._editPanel.get_documentCssPath()+'" media="all" /><link rel="stylesheet" href="'+a._editPanel.get_designPanelCssPath()+'" media="all" /></head><body>'+c+"</body></html>");a._doc.close();if(Sys.Extended.UI.HTMLEditor.isIE){a._doc.body.contentEditable=true;a._tryForward=true}a._afterBodyIsFormed();a._editPanel.get_autofocus()&&a._focus();Sys.Extended.UI.HTMLEditor.isIE&&!a._editPanel.get_autofocus()&&a._getSelection().empty()},_focus:function(a){this.focusEditor();this._focused(a)},focusEditor:function(){var a=this;try{a.get_element().contentWindow.focus()}catch(b){}if(!a._wasFocused){a._wasFocused=true;!a._editPanel.get_startEnd()&&a._setToEnd()}},_prepareContent:function(o){var m="$1&nbsp;$3",g=this,a=o;a=a.replace(/<object(?:[^>]*?)>(?:[^\u0000]*?)(<embed(?:[^>]*?)>)(?:[^\u0000]*?)<\/object(?:[^>]*?)>/gi,"$1");if(Sys.Extended.UI.HTMLEditor.isIE){a=Sys.Extended.UI.HTMLEditor.Trim(a.replace(/([\n\r]+<)/g,"<").replace(/([^>])([\n\r]+)([^<])/g,"$1 $3")).replace(/(&amp;)/g,"&amp;amp;").replace(/<br\s*[\/]*>\s*<\/td>/ig,"</td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,m).replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/ig,m);if(/<embed/ig.test(a))a=a.replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/ig,'$1 wmode="transparent"$2');a=a.replace(/&amp;/ig,"&");return a}else{var i=new Sys.Extended.UI.HTMLEditor.DesignPanel.ScriptRecover,f=document.createElement("DIV");!g._editPanel.get_noScript()&&a.replace(/<script(?:[^>]*?)>(.*?)<\/script(?:[^>]*?>)/gi,function(a,b){return i.regReplScript1(a,b)});f.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(a.replace(/([^>])([\n\r]+)([^<])/g,"$1 $3"));for(var l=f.getElementsByTagName("EMBED"),h=[],e=0;e<l.length;e++)h.push(l[e]);for(var k=0;k<h.length;k++){var b=h[k],c=document.createElement("IMG"),n=b.attributes;c.src=g._editPanel.get_imagePath_1x1();c.setAttribute("dummytag","embed");for(var e=0;e<n.length;++e){var j=n.item(e);if(!j.specified)continue;var d=j.name.toLowerCase(),o=j.value;if(d=="src")d="dummysrc";else if(d=="bgcolor")d="dummybgcolor";else if(d=="wmode")d="pseudomode";c.setAttribute(d,o)}c.style.cssText="border: 1px dotted #000000; background-image: url('"+(c.getAttribute("type").toLowerCase()=="application/x-mplayer2"?g._editPanel.get_imagePath_media():tthis._editPanel.get_imagePath_flash())+"'); background-position: center; background-repeat: no-repeat; background-color: #c0c0c0;";if(b.style.width&&b.style.width.length>0)c.style.width=b.style.width;if(b.style.height&&b.style.height.length>0)c.style.height=b.style.height;b.parentNode.insertBefore(c,b);b.parentNode.removeChild(b)}Sys.Extended.UI.HTMLEditor.spanJoiner(f,document);a=Sys.Extended.UI.HTMLEditor.Trim(Sys.Extended.UI.HTMLEditor.getHTML(f,false,true));if(!g._editPanel.get_noScript())a=a.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(a,b,c,d){return i.regReplFromScript1(a,b,c,d)});delete f;delete i;a=Sys.Extended.UI.HTMLEditor.brXHTML(a);if(a.length==0)a="<br/>";return a}},_clearP:function(){var b=true;try{var a=this._doc.body;if(a.firstChild)if(a.firstChild.nodeType==3){var d=Sys.Extended.UI.HTMLEditor.Trim(""+a.firstChild.data+"");if(d.length==0)a.removeChild(a.firstChild);else if(d!=""+a.firstChild.data+"")a.firstChild.data=d}if(Sys.Extended.UI.HTMLEditor.isIE)if(a.childNodes.length==1){a=a.firstChild;if(a.nodeType==1){var c=a.tagName.toLowerCase();if(c=="p"||c=="ul"||c=="ol"){var f=false,g=c=="ul"||c=="ol";function e(a){var d=false;if(a.nodeType==1){var c=a.tagName.toUpperCase();if(!(g&&c=="LI"))if(Sys.Extended.UI.HTMLEditor.isRestricted(a)||c=="IMG"||c=="IFRAME"||c=="EMBED"||c=="SCRIPT")return b;if(a.childNodes.length>1)return b;if(a.childNodes.length==0)return false;d|=e(a.firstChild)}else if(a.nodeType==3)d|=b;return d}if(a.childNodes.length==1)if(!e(a.firstChild)){a.removeChild(a.firstChild);f=b}(f||a.parentNode.innerHTML.toLowerCase()=="<p>&nbsp;</p>")&&this._doc.body.removeChild(a)}}}}catch(h){}},isControl:function(){var b=false;try{var d=this._getSelection();if(Sys.Extended.UI.HTMLEditor.isIE)if(d.type.toLowerCase()=="control")return true;else return b;else{var a=this._createRange(d),c=this._getParent(a);if(c.nodeType!=3&&a.startContainer==a.endContainer){if(!c.tagName)return b;if(a.startContainer.childNodes.item(a.startOffset)==null)return b;if(a.startOffset==a.endOffset&&a.startContainer.childNodes.item(a.startOffset).tagName&&(a.startContainer.childNodes.item(a.startOffset).tagName.toUpperCase()=="BR"||Sys.Extended.UI.HTMLEditor.isStyleTag(a.startContainer.childNodes.item(a.startOffset).tagName)))return b;if(c.tagName.toUpperCase()=="BODY"&&a.startOffset==0&&a.endOffset>0&&a.endOffset==c.childNodes.length)return b;if(a.startOffset==a.endOffset&&a.startContainer.childNodes.item(a.startOffset).nodeType==3)return b;return true}else return b}}catch(e){return true}},isPopup:function(){return this._popup!=null},_getSelection:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.isIE){var b=a._doc.selection;return b}else{a.focusEditor();var b,c,d,e=a.get_element().contentWindow;b=e.getSelection();c=a._createRange(b);d=c.startContainer;try{while(d&&d.nodeType)d=d.parentNode}catch(f){a._removeAllRanges(b);c=a._createRange(b);c.setStart(a._saved_startContainer,a._saved_startOffset);c.setEnd(a._saved_startContainer,a._saved_startOffset);a._selectRange(b,c);b=e.getSelection()}return b}},_createRange:function(b){var c="undefined",a=this;if(Sys.Extended.UI.HTMLEditor.isIE)if(typeof b==c)return a._doc.body.createTextRange();else return b.createRange();else{a.focusEditor();if(typeof b==c)return a._doc.createRange();else try{var d=b.getRangeAt(0);return d}catch(e){return a._doc.createRange()}}},toEndOfProtected:function(){var e=null,c=this,g=this._getSelection(),b;try{b=this._createRange(g)}catch(h){return false}var a;if(!Sys.Extended.UI.HTMLEditor.isIE){a=Sys.Extended.UI.HTMLEditor.contentEditable(b.startContainer);if(a==e)a=Sys.Extended.UI.HTMLEditor.contentEditable(b.endContainer)}else a=Sys.Extended.UI.HTMLEditor.contentEditable(Sys.Extended.UI.HTMLEditor.getSelParent(c));if(Sys.Extended.UI.HTMLEditor.isIE&&a!=e){try{b.remove(a)}catch(h){}b=c._doc.body.createControlRange();b.add(a);b.select()}else if(!Sys.Extended.UI.HTMLEditor.isIE&&a!=e){var f=c._getSelection(),d;if(a.nextSibling!=e&&a.nextSibling.nodeType==3)d=a.nextSibling;else{d=c._doc.createTextNode("");if(a.nextSibling!=e)a.parentNode.insertBefore(d,a.nextSibling);else a.parentNode.appendChild(d)}c._removeAllRanges(f);var b=c._createRange(f);b.setStart(d,0);b.setEnd(d,0);c._selectRange(f,b)}return true},_commonPaste:function(h){var c=null,d=this,a=d;d._saveContent();if(Sys.Extended.UI.HTMLEditor.isIE){d.openWait();setTimeout(function(){a._paste(!a._editPanel.get_noPaste());a.closeWait()},0);Sys.Extended.UI.HTMLEditor._stopEvent(h)}else if(!d.isPlainText&&!d.isWord&&!d._editPanel.get_noPaste())setTimeout(function(){Sys.Extended.UI.HTMLEditor.operateAnchors(a,a._doc,!a._editPanel.get_showAnchors());Sys.Extended.UI.HTMLEditor.operatePlaceHolders(a,a._doc,!a._editPanel.get_showPlaceHolders());Sys.Extended.UI.HTMLEditor.inspectForShadows(a._doc.body);a._checkImages(a._doc.body);a.onContentChanged()},0);else{var e=a._getSafePlace();if(e!=c){var b=a._doc.createElement("div");b.style.display="inline";b.style.borderStyle="none";e.parentNode.insertBefore(b,e);b.appendChild(e);b.removeChild(e);b.innerHTML="xx";var g=a._getSelection(),f=a._createRange();a._removeAllRanges(g);f.setStart(b.firstChild,0);f.setEnd(b.firstChild,1);a._selectRange(g,f);a.openWait();setTimeout(function(){var i=b.parentNode;b.lastChild.deleteData(b.lastChild.length-1,1);if(a.isWord){b.innerHTML=Sys.Extended.UI.HTMLEditor.cleanUp(b.innerHTML);Sys.Extended.UI.HTMLEditor.replaceOldTags(b,a);Sys.Extended.UI.HTMLEditor.spanJoiner(b,a._doc)}else{var g=document.createElement("div");g.innerHTML=Sys.Extended.UI.HTMLEditor.cleanUp(b.innerHTML);var j=new Sys.Extended.UI.HTMLEditor.jsDocument(true);Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText(g,j);b.innerHTML=j.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"").replace(/\n/g,"<br/>").replace(/\t/g,"&nbsp;");delete g}while(b.firstChild)i.insertBefore(b.firstChild,b);var e=c,d=c;if(b.nextSibling&&b.nextSibling.nodeType==3&&b.previousSibling&&b.previousSibling.nodeType==3){e=b.nextSibling;d=b.previousSibling}i.removeChild(b);var f=c;if(e!=c&&d!=c){f=d.data.length;d.data=""+d.data+""+e.data+"";e.parentNode.removeChild(e)}a.isWord=false;a.isPlainText=false;a.closeWait();if(f!=c){var k=a._getSelection(),h=a._createRange();a._removeAllRanges(k);h.setStart(d,f);h.setEnd(d,f);a._selectRange(k,h)}a.onContentChanged()},0)}else Sys.Extended.UI.HTMLEditor._stopEvent(h)}},_selectRange:function(b,a){b.addRange(a);this.focusEditor()},_selectRng:function(a){var d="character",b=this,g=b._getSelection();if(!Sys.Extended.UI.HTMLEditor.isIE){var h=b._doc.createRange();h.setStart(a[0],0);h.setEnd(a[a.length-1],(""+a[a.length-1].data+"").length);b._removeAllRanges(g);b._selectRange(g,h)}else{var c=b._createRange(g),e=b._createRange(g),i=b._doc.createElement("span"),f=b._doc.createElement("span");a[0].parentNode.insertBefore(i,a[0]);if(a[a.length-1].nextSibling)a[a.length-1].parentNode.insertBefore(f,a[a.length-1].nextSibling);else a[a.length-1].parentNode.appendChild(f);try{c.moveToElementText(i);var j=c.moveStart(d,1);c.moveStart(d,-j);e.moveToElementText(f);j=e.moveEnd(d,-1);e.moveEnd(d,-j);c.setEndPoint("EndToEnd",e);c.select()}catch(k){}a[0].parentNode.removeChild(i);a[a.length-1].parentNode.removeChild(f)}},_removeAllRanges:function(a){a.removeAllRanges()},_setToEnd:function(){var a=this;setTimeout(function(){a._setToEnd_();a._editPanel.updateToolbar()},0)},_setToEnd_:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.isIE){var f=a._getSelection(),d=a._createRange(f);if(f.type.toLowerCase()!="control"){d.moveEnd("textedit",1);d.collapse(false)}d.select();a.focusEditor();return}var e=0,b=a._doc.body,c=null;if(b.lastChild&&b.lastChild.nodeType==3){b=b.lastChild;e=(""+b.data+"").length}else{var g=a._doc.createTextNode("");if(b.lastChild&&b.lastChild.nodeType==1&&b.lastChild.tagName.toUpperCase()=="BR")b.insertBefore(g,b.lastChild);else b.appendChild(g);b=g;e=0}var f=a._getSelection();a._removeAllRanges(f);var d=a._createRange();d.setStart(b,e);d.setEnd(b,e);a._selectRange(f,d);c!=null&&a._doc.body.removeChild(c);a.focusEditor();if(!Sys.Extended.UI.HTMLEditor.isSafari&&!Sys.Extended.UI.HTMLEditor.isOpera)try{var c=a._doc.createElement("button");c.style.width="0px";c.style.height="20px";a._doc.body.appendChild(c);c.focus();c.blur();a.focusEditor();a._doc.body.removeChild(c)}catch(h){}},isShadowed:function(){var b=this;if(!b.isControl())return false;var e=b._getSelection(),a=b._createRange(e),c;if(Sys.Extended.UI.HTMLEditor.isIE)c=a.item(0);else c=a.startContainer.childNodes.item(a.startOffset);if(c.tagName&&c.tagName.toUpperCase()=="IMG"&&c.getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&c.getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0){var d=b.getAttachedElement(c);if(d!=null){if(Sys.Extended.UI.HTMLEditor.isIE){a=b._doc.body.createControlRange();a.add(d);a.select()}else try{var f=Sys.Extended.UI.HTMLEditor.__getIndex(d);e.collapseToEnd();b._removeAllRanges(e);a=b._createRange(e);a.setStart(d.parentNode,f);a.setEnd(d.parentNode,f+1);b._selectRange(e,a)}catch(g){return true}return false}return true}return false},_ifShadow:function(){if(Sys.Extended.UI.HTMLEditor.isIE)try{var g=this._doc.selection}catch(h){return false}var b=this,d=null,a=Sys.Extended.UI.HTMLEditor.getSelParent(b);while(a&&(a.nodeType==3||a.tagName&&a.tagName.toUpperCase()!="BODY")){if(a.nodeType==3||!a.tagName){a=a.parentNode;continue}var f=a.tagName.toUpperCase();if(f=="TABLE"&&a.getAttribute(Sys.Extended.UI.HTMLEditor.noContextMenuAttribute)&&a.getAttribute(Sys.Extended.UI.HTMLEditor.noContextMenuAttribute)=="yes"){d=a.rows.item(0).cells.item(0).firstChild;if(Sys.Extended.UI.HTMLEditor.isIE&&f=="P")d=d.firstChild;break}a=a.parentNode}if(d!=null){var e=b._getSelection(),c=b._createRange(e);if(Sys.Extended.UI.HTMLEditor.isIE){c=b._doc.body.createControlRange();c.add(d);c.select()}else try{e.collapseToEnd();b._removeAllRanges(e);c=b._createRange(e);c.setStart(d.parentNode,0);c.setEnd(d.parentNode,1);b._selectRange(e,c)}catch(h){}}},_saveContent:function(){var a=this,b,d,c;try{try{b=a._getSelection();d=a._createRange(b)}catch(e){}c=new Sys.Extended.UI.HTMLEditor._Marker(a,d,b)}catch(e){return}if(!a.__stack){a.__stack=[];a.__stackPos=0}while(a.__stackPos<a.__stack.length)a.__stack.pop();if(a.__stack.length==Sys.Extended.UI.HTMLEditor.__stackMaxSize){a.__stack.reverse();a.__stack.pop();a.__stack.reverse()}a.__stack.push(c);a.__stackPos=a.__stack.length},_restoreContent:function(){var a=this;if(a.__stack&&a.__stackPos>=0&&a.__stackPos<a.__stack.length){var b=a.__stack[a.__stackPos],f,d;if(Sys.Extended.UI.HTMLEditor.isIE){function o(d,b,e,a,c){return b.replace(/\salign=[^\s>]*/ig,"")+(a=='"X"'?"":"align="+a)+c.replace(/\salign=[^\s>]*/ig,"")}for(var l=a._doc.body.getElementsByTagName("EMBED"),h=[],c=0;c<l.length;c++)h.push(l[c]);for(var i=0;i<h.length;i++)h[i].parentNode.removeChild(h[i]);var g=b._save.replace(/&amp;/ig,"&");g=g.replace(/(<embed(?:.*?))(teoalign=)(\"[^\"]*\")((?:.*?)>)/ig,o);a._doc.body.innerHTML="!!!<span></span>"+Sys.Extended.UI.HTMLEditor.Trim(g);a._doc.body.firstChild&&a._doc.body.removeChild(a._doc.body.firstChild);a._doc.body.firstChild&&a._doc.body.removeChild(a._doc.body.firstChild);var k=Sys.Extended.UI.HTMLEditor.getHrefsText(g);Sys.Extended.UI.HTMLEditor.setHrefsText(a._doc.body,k);if(a._editPanel.get_relativeImages()){k=Sys.Extended.UI.HTMLEditor.getImagesText(g);Sys.Extended.UI.HTMLEditor.setImagesText(a._doc.body,k)}Sys.Extended.UI.HTMLEditor.setNames(a._doc.body,b._nArr);Sys.Extended.UI.HTMLEditor.operateAnchors(a,a._doc,!a._editPanel.get_showAnchors());Sys.Extended.UI.HTMLEditor.operatePlaceHolders(a,a._doc,!a._editPanel.get_showPlaceHolders());if(b._tree!=null){var e=a._doc.body,c;try{for(c=b._tree.length-1;c>=0;c--)e=e.childNodes.item(b._tree[c])}catch(q){if(a.__stackPos>0){a.__stackPos--;a._restoreContent();a.__stackPos++}return}try{var n=a._doc.body.createControlRange();n.add(e);n.select()}catch(q){}}else{var j=a;setTimeout(function(){try{if(j._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){f=j._getSelection();d=j._createRange(f);if(f.type.toLowerCase()!="control")try{d.moveToPoint(b._offsetLeft,b._offsetTop)}catch(a){}d.select()}}catch(a){}},0)}}else{if(Sys.Extended.UI.HTMLEditor.isOpera)a._doc.body.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(b._save);else{a._doc.body.innerHTML="";for(var c=0;c<b._save.childNodes.length;c++)a._doc.body.appendChild(b._save.childNodes.item(c).cloneNode(true))}Sys.Extended.UI.HTMLEditor.operateAnchors(a,a._doc,!a._editPanel.get_showAnchors());Sys.Extended.UI.HTMLEditor.operatePlaceHolders(a,a._doc,!a._editPanel.get_showPlaceHolders());try{f=a._getSelection();d=a._createRange();a._removeAllRanges(f)}catch(q){}for(var p="",e=a._doc.body,c=b._tree.length-1;c>=0;c--){p+=" "+b._tree[c];e=e.childNodes.item(b._tree[c])}var m=b._offset;try{d.setStart(e,m);d.setEnd(e,m)}catch(q){Sys.Extended.UI.HTMLEditor.inspectForShadows(a._doc.body);return}try{a._selectRange(f,d)}catch(q){}}try{Sys.Extended.UI.HTMLEditor.inspectForShadows(a._doc.body)}catch(q){}}},SaveContent:function(){this._saveContent()},RestoreContent:function(){this._undo(false)},_undo:function(c){var a=this;if(a.__stack)if(a.__stackPos>0){a.__stackPos==a.__stack.length&&c&&a._saveContent();do{var d=Sys.Extended.UI.HTMLEditor.Trim(a._doc.body.innerHTML);a.__stackPos--;a._restoreContent()}while(Sys.Extended.UI.HTMLEditor.Trim(a._doc.body.innerHTML)==d&&a.__stackPos>0&&c);var b=a;setTimeout(function(){try{b._ifShadow()}catch(a){}if(b._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{b._editPanel.updateToolbar()}catch(a){}!c&&b.onContentChanged()},0)}},_redo:function(){var a=this;if(a.__stack)if(a.__stackPos<a.__stack.length-1){a.__stackPos++;var b=a,c;if(Sys.Extended.UI.HTMLEditor.isIE){c=b._doc.body.getElementsByTagName("EMBED").length;if(c>0){var d=b._body.ownerDocument.createElement("div");b._body.appendChild(d);setTimeout(function(){b._body.removeChild(d)},0)}}a._restoreContent();var b=a;setTimeout(function(){b._ifShadow();b._editPanel.updateToolbar()},0)}},undo:function(){this._undo(true);this.onContentChanged()},redo:function(){this._redo();this.onContentChanged()},_contextMenuCallP:function(){},onContentChanged:function(){},_copyCut:function(i,q){var e=true,a=this,l=a;if(Sys.Extended.UI.HTMLEditor.isIE){var c=a._getSelection(),b=a._createRange(c),j=false,f="";i=="x"&&a._saveContent();if(c.type.toLowerCase()=="control"){j=e;f=Sys.Extended.UI.HTMLEditor.getHTML(b.item(0),e)}else if(b.text!=""){j=e;f=b.htmlText;var o=b.duplicate(),h=a._getTextNodeCollection();if(h.length<1)return;var m=Sys.Extended.UI.HTMLEditor._commonParent(h[0],h[h.length-1]);if(m!=null&&h[0].previousSibling&&h[0].previousSibling.nodeType==3){var g=m.parent;while(g&&g.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(g.tagName)){var n=g.cloneNode(false);n.innerHTML=f;f=n.outerHTML;g=g.parentNode}}c=a._getSelection();c.empty();b=a._createRange(c);b.setEndPoint("EndToEnd",o);b.setEndPoint("StartToStart",o);b.select()}else if(b.htmlText!=""){j=e;f=b.htmlText}if(j){var d=a._doc.createElement("DIV");d.innerHTML="!!!<span></span>"+f;d.removeChild(d.firstChild);d.removeChild(d.firstChild);var k=Sys.Extended.UI.HTMLEditor.getHTML(d,false,e),p=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":)","ig");k=k.replace(p,"$1");delete d;a._contentCopy(k,e);b.select();if(i=="x"){c.clear();a._clearP()}}else if(i=="x"){c.clear();a._clearP()}q&&setTimeout(function(){l._editPanel.updateToolbar()},0)}else if(i=="x"){a._saveContent();var c=a._getSelection(),b=a._createRange(c);a._removeAllRanges(c);b.deleteContents();if(a._doc.body.innerHTML==""){a._doc.body.innerHTML="<br/>";b.setStart(a._doc.body,0);b.setEnd(a._doc.body,0)}l.onContentChanged();a._selectRange(c,b)}else{var c=a._getSelection(),b=a._createRange(c);a._removeAllRanges(c);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"));a._selectRange(c,b)}},_paste:function(m,n){var c=this,d=c,o=c._getSelection(),g=c._createRange(o),k,l;if(!m){k=g.offsetLeft;l=g.offsetTop;c.insertHTML(c._getPlain());d.onContentChanged();return}if(c._editPanel.get_noPaste())return;k=g.offsetLeft;l=g.offsetTop;var b=c._doc.createElement("span"),a,h=c._contentCopy("",false,n);if(/<[\/]*p[\s>]+/i.test(h)||/<[\/]*h/i.test(h))a=c._getSafePlace();else{a=c._doc.createElement("SPAN");a.id=Sys.Extended.UI.HTMLEditor.smartClassName;if(!c.insertHTML(Sys.Extended.UI.HTMLEditor.getHTML(a,true)))return;a=c._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);if(a){a.id=null;a.removeAttribute("id");a.setAttribute("para","no")}}b.innerHTML=h;if(!a)return;c._checkImages(b);var i=a.parentNode,f=a.getAttribute("para");if(f!="no"){if(f.indexOf("left")>=0&&b.firstChild)if(b.firstChild.tagName&&b.firstChild.tagName.toUpperCase()=="P"){while(b.firstChild.firstChild)a.previousSibling.appendChild(b.firstChild.firstChild);b.removeChild(b.firstChild)}if(f.indexOf("right")>=0&&b.lastChild)if(b.lastChild.tagName&&b.lastChild.tagName.toUpperCase()=="P"){while(b.lastChild.lastChild)a.nextSibling.insertBefore(b.lastChild.lastChild,a.nextSibling.firstChild);b.removeChild(b.lastChild)}}var j=a,e=null;if(b.childNodes.length==0&&f.indexOf("left")>=0&&f.indexOf("right")>=0){if(a.nextSibling.firstChild){e=c._doc.createElement("span");j=e;e.innerHTML="111";a.previousSibling.appendChild(e)}while(a.nextSibling.firstChild)a.previousSibling.appendChild(a.nextSibling.firstChild);i.removeChild(a.nextSibling)}else while(b.firstChild)i.insertBefore(b.firstChild,a);setTimeout(function(){var c=d._getSelection(),b=d._createRange(c);if(c.type.toLowerCase()=="control")while(b.length>0)b.remove(0);try{b.collapse(false)}catch(f){}d.focusEditor();Sys.Extended.UI.HTMLEditor._setCursor(j,d);e&&e.parentNode.removeChild(e);i.removeChild(a);Sys.Extended.UI.HTMLEditor.inspectForShadows(d._doc.body);d.onContentChanged();b.select()},0)},_contentCopy:function(i,n,p){var j=true,o="$1<br/>$3",m="$1&nbsp;$3",b=this;if(i!="")i=i.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,m).replace(/(<td[^>]*?>)\s*(&nbsp;)\s*(<\/td[^>]*?>)/ig,o).replace(/(<p[^>]*?>)\s*(&nbsp;)\s*(<\/p[^>]*?>)/ig,o);var e=b._doc.createElement("iframe");e.width="0";e.height="0";if(Sys.Extended.UI.HTMLEditor.isIE)e.src="javascript:false;";b._doc.appendChild(e);var a=e.contentWindow.document;a.write("<html><head></head><body>"+i+"</body></html>");a.close();a.body.contentEditable=j;var k=a.body.createTextRange(),q=false;if(i==""){k.execCommand("paste");for(var t=a.createElement("DIV"),d=0;d<a.body.childNodes.length;d++){var h=a.body.childNodes.item(d);if(h.nodeType==8){var c=""+h.data+"";if(c.search(/StartFragment/i)>=0)if(h.nextSibling&&h.nextSibling.nodeType==3){var c=""+h.nextSibling.data+"";if(c.length)if(c.charCodeAt(0)==160){c=c.substr(1);h.nextSibling.data=c;q=j;break}}}}if(typeof p!="undefined"&&p)a.body.innerHTML=Sys.Extended.UI.HTMLEditor.cleanUp(a.body.innerHTML);var c=Sys.Extended.UI.HTMLEditor.Trim(Sys.Extended.UI.HTMLEditor.getHTML(a.body,false,j));c=c.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"");a.body.innerHTML=c;if(!n){Sys.Extended.UI.HTMLEditor.operateAnchors(b,a,!b.showAnchors);Sys.Extended.UI.HTMLEditor.operatePlaceHolders(b,a,!b.showPlaceHolders);for(var l=a.body.getElementsByTagName("EMBED"),f=[],d=0;d<l.length;d++)f.push(l[d]);for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g])}delete k;delete t;if(n&&Sys.Extended.UI.HTMLEditor.isIE)k=a.body.createTextRange()}if(n&&Sys.Extended.UI.HTMLEditor.isIE){if(i!=""){Sys.Extended.UI.HTMLEditor.operateAnchors(b,a,j);Sys.Extended.UI.HTMLEditor.operatePlaceHolders(b,a,j)}k.select();k.execCommand("copy")}for(var s=Sys.Extended.UI.HTMLEditor.Trim(a.body.innerHTML).replace(/<br\s*[\/]*>\s*<\/td>/ig,"</td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,m).replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/ig,m).replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/ig,'$1 wmode="transparent"$2'),l=a.body.getElementsByTagName("EMBED"),f=[],d=0;d<l.length;d++)f.push(l[d]);for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);e.src="";var r=b;r._doc.removeChild(e);delete e;return s},insertHTML:function(p,c){var n="<span>qqq</span>",b=this;b.focusEditor();var w=b._getSelection();if(typeof c=="undefined")c=b._createRange(w);if(Sys.Extended.UI.HTMLEditor.isIE){function r(b,a){return '<span class="'+Sys.Extended.UI.HTMLEditor.smartClassName+"_script\" style='display:none;visibility:hidden;'>"+a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</span>"}function q(b,a){return a.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}var d='<span id="'+Sys.Extended.UI.HTMLEditor.smartClassName+'">111<span></span>'+p+"</span>",u=Sys.Extended.UI.HTMLEditor.getHrefsText(d),s=Sys.Extended.UI.HTMLEditor.getImagesText(d);if(!b._editPanel.get_noScript())d=d.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,r);else d=d.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,"");var x=b;try{if(c.pasteHTML)c.pasteHTML(d);else{var f=b._doc.createElement("DIV");f.innerHTML=d;while(f.firstChild)c(0).parentNode.insertBefore(f.firstChild,c(0));c(0).parentNode.removeChild(c(0));c.remove(0);delete f}}catch(y){return false}var a=b._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);a.innerHTML=n+Sys.Extended.UI.HTMLEditor.getHTML(a,false,true).replace(new RegExp("<span(?:[^>]*?)class="+Sys.Extended.UI.HTMLEditor.smartClassName+"_script(?:[^>]*?)>(.*?)</span(?:[^>]*?)>","gi"),q)+n;a.removeChild(a.firstChild);a.removeChild(a.lastChild);Sys.Extended.UI.HTMLEditor.setHrefsText(a,u);Sys.Extended.UI.HTMLEditor.setImagesText(a,s);a.firstChild&&a.removeChild(a.firstChild);a.firstChild&&a.removeChild(a.firstChild);while(a.firstChild)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a);delete a;return true}else{var f=b._doc.createElement("div");f.innerHTML=p;for(var m=f.getElementsByTagName("EMBED"),j=[],h=0;h<m.length;h++)j.push(m[h]);for(var l=0;l<j.length;l++){var i=j[l],g=document.createElement("IMG"),o=i.attributes;g.src=b._images_list[1];g.setAttribute("dummytag","embed");for(var h=0;h<o.length;++h){var k=o.item(h);if(!k.specified)continue;var e=k.name.toLowerCase(),t=k.value;if(e=="src")e="dummysrc";else if(e=="bgcolor")e="dummybgcolor";else if(e=="wmode")e="pseudomode";g.setAttribute(e,t)}g.getAttribute("type");g.style.cssText="border: 1px dotted #000000; background-image: url('"+(g.getAttribute("type").toLowerCase()=="application/x-mplayer2"?b._images_list[3]:b._images_list[2])+"'); background-position: center; background-repeat: no-repeat; background-color: #c0c0c0;";i.parentNode.insertBefore(g,i);i.parentNode.removeChild(i)}var v=b.insertNodeAtSelection(f,c);return v}},insertNodeAtSelection:function(e,b){var d=false,c=this;if(!Sys.Extended.UI.HTMLEditor.isIE){var f=c._getSelection();if(typeof b=="undefined")try{b=c._createRange(f)}catch(l){c._removeAllRanges(f);return d}var a=b.startContainer,j=b.startOffset;if(a.ownerDocument.id!="EditorDocument")return d;if(b.startContainer.nodeType==1&&b.startContainer.tagName.toUpperCase()=="TR"||b.endContainer.nodeType==1&&b.endContainer.tagName.toUpperCase()=="TR")return d;c._removeAllRanges(f);b.deleteContents();try{b=c._createRange()}catch(l){c._removeAllRanges(f);return d}switch(a.nodeType){case 3:if(j>0)a=a.splitText(j);while(e.firstChild)a.parentNode.insertBefore(e.firstChild,a);b.setStart(a,0);b.setEnd(a,0);break;case 1:case 11:try{c._removeAllRanges(f);if(a.childNodes.length>=j+1){a=a.childNodes.item(j);while(e.firstChild)a.parentNode.insertBefore(e.firstChild,a);var g=c._doc.createTextNode("");a.parentNode.insertBefore(g,a);a=g}else{var g=c._doc.createTextNode("");if(Sys.Extended.UI.HTMLEditor.canHaveChildren(a)){while(e.firstChild)a.appendChild(e.firstChild);a.appendChild(g)}else{while(e.firstChild)a.parentNode.insertBefore(e.firstChild,a);a.parentNode.insertBefore(g,a)}a=g}if(a.nodeType==1){for(var h=a.parentNode,k=h,i=0;i<h.childNodes.length;i++)if(a==h.childNodes.item(i))break;b.setStart(h,i);b.setEnd(h,i)}else{b.setStart(a,0);b.setEnd(a,0)}}catch(l){c._removeAllRanges(f);return d}}c._selectRange(f,b);return true}else return d},trickWithStyles:function(j){var a=this,c=a._doc.getElementById(j);if(c!=null)if(c.nextSibling&&c.nextSibling.nodeType==3){var b=c.nextSibling;c.parentNode.removeChild(c);var e=(""+b.data+"").indexOf(" ");if(e>0)b.splitText(e);else e==0&&b.splitText(1);if(a.n_arr!=null)for(var h=0;h<a.n_arr.length;h++)a.MSIE_applyCssStyle(a.n_arr[h],[b],false);a.n_arr=null;var g=a._getSelection();if(!Sys.Extended.UI.HTMLEditor.isIE){var f=a._doc.createRange();f.setStart(b,b.length);f.setEnd(b,b.length);a._removeAllRanges(g);a._selectRange(g,f)}else{var i=a._createRange(g),d=a._doc.createElement("span");if(b.nextSibling)b.parentNode.insertBefore(d,b.nextSibling);else b.parentNode.appendChild(d);try{i.moveToElementText(d);i.select()}catch(k){}d.parentNode.removeChild(d)}}else c.parentNode.removeChild(c)},_getParent:function(a){if(Sys.Extended.UI.HTMLEditor.isIE)return a.parentElement();else return a.startContainer},_checkImages:function(g){var e="qwerty.gif";if(this._editPanel.get_relativeImages())for(var f=g.getElementsByTagName("IMG"),d=0;d<f.length;d++){var a=f[d];if(a.src.indexOf("http://")>=0){var b=a.src;a.src=e;var c=a.src.indexOf(e);if(b.substr(0,c)==a.src.substr(0,c))b=b.substr(c,b.length-c);a.src=b}}},_getSafePlace:function(d){var e="para",b=null,g=this,a=g._doc.createElement("SPAN"),j=g;a.id=Sys.Extended.UI.HTMLEditor.smartClassName;if(typeof d=="undefined"){if(!g.insertHTML(Sys.Extended.UI.HTMLEditor.getHTML(a,true)))return b}else{if(d.nextSibling==b)d.parentNode.appendChild(a);else d.parentNode.insertBefore(a,d.nextSibling);d.parentNode.removeChild(d)}a=g._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);a.id=b;a.removeAttribute("id");a.setAttribute(e,"no");var c=a.parentNode,f=c.tagName.toUpperCase();while(f!="BODY"&&f!="TD"&&f!="P"&&f!="DIV")if(Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)){c=c.parentNode;f=c.tagName.toUpperCase()}else break;if(f=="P"){a.setAttribute(e,"");function i(k,a,e,f){var l,d=Sys.Extended.UI.HTMLEditor.myClone(e,j._doc,false);k&&d.appendChild(k);while(a){if(a.nodeType==1||a.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+a.data+"").length>0){var g=b;if(a.tagName&&a.tagName.toUpperCase()=="SCRIPT")g=a.text;var h=Sys.Extended.UI.HTMLEditor.myClone(a,j._doc,true);if(d.childNodes.length==0||!f)d.appendChild(h);else d.insertBefore(h,d.firstChild);if(g!=b)h.text=g}a=f?a.previousSibling:a.nextSibling}if(d.childNodes.length==0){delete d;d=b}if(e==c)return d;else return i(d,f?e.previousSibling:e.nextSibling,e.parentNode,f)}var k=i(b,a.previousSibling,a.parentNode,true),l=i(b,a.nextSibling,a.parentNode,false),h=c.parentNode;if(k){h.insertBefore(k,c);a.setAttribute(e,a.getAttribute(e)+" left")}h.insertBefore(a,c);if(l){h.insertBefore(l,c);a.setAttribute(e,a.getAttribute(e)+" right")}h.removeChild(c)}return a},noContextMenuAttributeName:function(){return Sys.Extended.UI.HTMLEditor.noContextMenuAttribute},_getTextNodeCollection:function(x){var a="",u="<span id='",n="undefined",f=null,d=this,e=[];if(d.isControl())return e;var o=d._getSelection(),j=d._createRange(o),m=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",r=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",g=f,i=f,q;if(typeof x==n){if(Sys.Extended.UI.HTMLEditor.isIE){g=j.duplicate();i=j.duplicate();g.setEndPoint("EndToStart",j);i.setEndPoint("StartToEnd",j)}else{g=j.cloneRange();i=j.cloneRange();g.setEnd(g.startContainer,g.startOffset);i.setStart(i.endContainer,i.endOffset);q=g.endOffset}if(!d.insertHTML(u+m+"'/>",i))return e;else{if(Sys.Extended.UI.HTMLEditor.isOpera){g.setEnd(g.startContainer,q);g.setStart(g.startContainer,q)}if(!d.insertHTML(u+r+"'/>",g)){var t=d._doc.getElementById(m);if(t!=f){h=t.parentNode;h.removeChild(t)}var s=d._doc.getElementById(rl);if(s!=f){h=s.parentNode;h.removeChild(s)}return e}}}else{var k;k=d._doc.createElement("SPAN");k.id=m;d._doc.body.appendChild(k);k=d._doc.createElement("SPAN");k.id=r;d._doc.body.insertBefore(k,d._doc.body.firstChild)}var b=d._doc.getElementById(r),c=d._doc.getElementById(m);if(b==f||c==f){var h;if(b!=f){h=b.parentNode;h.removeChild(b)}if(c!=f){h=c.parentNode;h.removeChild(c)}return []}while(b.firstChild)b.removeChild(b.firstChild);while(c.firstChild)c.removeChild(c.firstChild);while(b.previousSibling&&b.previousSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+b.previousSibling.data+a).length==0)b.parentNode.removeChild(b.previousSibling);while(b.nextSibling&&b.nextSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+b.nextSibling.data+a).length==0)b.parentNode.removeChild(b.nextSibling);while(c.previousSibling&&c.previousSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+c.previousSibling.data+a).length==0)c.parentNode.removeChild(c.previousSibling);while(c.nextSibling&&c.nextSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+c.nextSibling.data+a).length==0)c.parentNode.removeChild(c.nextSibling);var w=false,l=d;function v(b,d){while(b){if(b.id&&b.id==m){w=true;return}if(b.nodeType==3){while(b.nextSibling&&(b.nextSibling.nodeType==3||!Sys.Extended.UI.HTMLEditor.isIE&&typeof l.__saveBM__!=n&&l.__saveBM__!=f&&l.__saveBM__[0]==b.nextSibling)){if(b.nextSibling.nodeType==3)b.data=a+b.data+a+b.nextSibling.data+a;else{l.__saveBM__[0]=b;l.__saveBM__[1]=(a+b.data+a).length}b.parentNode.removeChild(b.nextSibling)}Sys.Extended.UI.HTMLEditor.Trim(a+b.data+a).length>0&&e.push(b)}else{var c=b.tagName;if(b.tagName){c=c.toUpperCase();if(!(c=="MAP"||c=="AREA"||c=="SCRIPT"||c=="NOSCRIPT"))!(b.style&&(Sys.Extended.UI.HTMLEditor.getStyle(b,"display")=="none"||Sys.Extended.UI.HTMLEditor.getStyle(b,"visibility")=="hidden"))&&v(b.firstChild,false)}}if(w)return;var g=b.parentNode;if(d)while(b.nextSibling==f)b=b.parentNode;b=b.nextSibling}}v(b,true);var h;h=b.parentNode;h.removeChild(b);h=c.parentNode;h.removeChild(c);if(typeof x==n)if(Sys.Extended.UI.HTMLEditor.isIE){o.empty();i.select()}else if(e.length>0){d._removeAllRanges(o);var p=d._createRange();p.setEnd(e[e.length-1],e[e.length-1].length);p.setStart(e[e.length-1],e[e.length-1].length);d._selectRange(o,p)}return e},_getPlain:function(){var a=this._doc.createElement("textarea");a.width="0";a.height="0";this._doc.appendChild(a);var c=a.createTextRange();c.execCommand("paste");var b=a.value;b=b.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"").replace(/\n/g,"<br/>");this._doc.removeChild(a);return b},_execCommand:function(c,g,b){var e=false,h="createlink",a=this,i=a,d,f;if(Sys.Extended.UI.HTMLEditor.isIE&&!a.isControl()){d=a._getSelection();f=a._createRange(d);var j=f.parentElement();if(j.tagName.toUpperCase()=="TEXTAREA")return}c.toLowerCase()!=h&&a._saveContent();switch(c.toLowerCase()){case h:if(Sys.Extended.UI.HTMLEditor.isIE||!g)a._doc.execCommand(c,g,b);else{var b;(b=prompt("Enter URL"))&&a._doc.execCommand(c,e,b)}break;case "backcolor":case "forecolor":case "fontname":case "fontsize":a.MSIE_applyCommand(c.toLowerCase(),b);break;case "indent":a.MSIE_indent(true);break;case "outdent":a.MSIE_indent(e);break;case "justifyleft":a.MSIE_justify("left");break;case "justifyfull":a.MSIE_justify("justify");break;case "justifycenter":a.MSIE_justify("center");break;case "justifyright":a.MSIE_justify("right");break;case "paragraph":a.MSIE_justify("remain",e,"P");break;case "formatblock":if(b!=null&&typeof b=="string"&&b.length==2)if(b.substr(0,1).toUpperCase()=="H"&&parseInt(b.substr(1,1))>0){a.MSIE_justify("remain",e,b);break}a._doc.execCommand(c,g,b);break;case "insertunorderedlist":a.MSIE_list("UL");break;case "insertorderedlist":a.MSIE_list("OL");break;case "bold":case "italic":case "underline":case "strikethrough":case "superscript":case "subscript":a.MSIE_applyCommand(c.toLowerCase());break;default:a._doc.execCommand(c,g,b)}a.onContentChanged();if(!Sys.Extended.UI.HTMLEditor.isIE){d=a._getSelection();f=a._createRange(d);a._removeAllRanges(d);a._selectRange(d,f);a.focusEditor()}var i=a;setTimeout(function(){i._editPanel.updateToolbar()},0)},MSIE_indent:function(a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.MSIE_indent)(a)},MSIE_justify:function(c,b,a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.MSIE_justify)(c,b,a)},MSIE_list:function(a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.MSIE_list)(a)},getSelectionAfterOperation:function(a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.getSelectionAfterOperation)(a)},setSelectionAfterOperation:function(b,a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.setSelectionAfterOperation)(b,a)},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(b,c,a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.getPseudoP_Recur)(b,c,a)},unWrap:function(a,b){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.unWrap)(a,b)},tryUnWrap:function(a,c,b){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.tryUnWrap)(a,c,b)},MSIE_applyCommand:function(n,g){var f=null,k="vertical-align",j="text-decoration",i="underline",d=false,a=this,l=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";if(a.isControl())return;var e=a._getSelection(),c=a._createRange(e),o=Sys.Extended.UI.HTMLEditor.isIE?[c.boundingLeft,c.boundingTop]:[c.startContainer,c.startOffset],m=Sys.Extended.UI.HTMLEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&l.length>0,b={name:"none",value:"none"};switch(n.toLowerCase()){case "bold":b={name:"font-weight",value:"bold",repl:d};break;case "italic":b={name:"font-style",value:"italic",repl:d};break;case i:b={name:j,value:i,repl:d};break;case "strikethrough":b={name:j,value:"line-through",repl:d};break;case "superscript":b={name:k,value:"super",repl:d};break;case "subscript":b={name:k,value:"sub",repl:d};break;case "forecolor":b={name:"color",value:g,repl:d};break;case "backcolor":b={name:"background-color",value:g,repl:d};break;case "fontname":b={name:"font-family",value:g,repl:d};break;case "fontsize":b={name:"font-size",value:g,repl:d}}if(m){var h=a._getTextNodeCollection();a.MSIE_applyCssStyle(b,h,true)}else{if(a.isControl())return;var h=a._tryExpand();if(h.length>0){a.MSIE_applyCssStyle(b,h,d);if(Sys.Extended.UI.HTMLEditor.isIE&&a.__saveBM__!=f){e=a._getSelection();c=a._createRange(e);c.moveToBookmark(a.__saveBM__);c.select();a.__saveBM__=f}else if(a.__saveBM__!=f){if(a.__saveBM__[0].nodeType==3){e=a._getSelection();c=a._doc.createRange();c.setStart(a.__saveBM__[0],a.__saveBM__[1]);c.setEnd(a.__saveBM__[0],a.__saveBM__[1]);a._removeAllRanges(e);a._selectRange(e,c)}else{a._trySelect(a.__saveBM__[0],a.__saveBM__[0]);a.__saveBM__[0].parentNode.removeChild(a.__saveBM__[0])}a.__saveBM__=f}}else a._setStyleForTyping(b)}},MSIE_applyCssStyle:function(h,c,J){var q=true,G="text-decoration",u=null,p="SPAN",i=this,b=h.name.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()}),d=h.value,L=h.repl,A=false,B=false;i._saveContent();var N=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",M=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",o=i._doc.createElement(p);o.id=M;var m=i._doc.createElement(p);m.id=N;c[0].parentNode.insertBefore(o,c[0]);if(c[c.length-1].nextSibling!=u)c[c.length-1].parentNode.insertBefore(m,c[c.length-1].nextSibling);else c[c.length-1].parentNode.appendChild(m);Sys.Extended.UI.HTMLEditor.unStyle(o);Sys.Extended.UI.HTMLEditor.unStyle(m);for(var n=[],g=0;g<c.length;g++){for(var l=c[g],a=l.parentNode,z=0;z<n.length;z++){var x=n[z];if(x.parent==a){x.textNodes.push(l);break}}z==n.length&&n.push({parent:a,textNodes:[l]})}for(var g=0;g<n.length;g++){var x=n[g];if(x.textNodes.length>1){var e=x.textNodes,w=i._doc.createElement(p),t=i._doc.createElement(p);e[0].parentNode.insertBefore(w,e[0]);if(e[e.length-1].nextSibling!=u)e[e.length-1].parentNode.insertBefore(t,e[e.length-1].nextSibling);else e[e.length-1].parentNode.appendChild(t);Sys.Extended.UI.HTMLEditor._moveTagsUp(w,t);w.parentNode.removeChild(w);t.parentNode.removeChild(t)}}for(var g=0;g<c.length;g++){var l=c[g],a=l.parentNode,D=false;while(a&&a.tagName&&a.childNodes.length==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){var f=a.tagName.toUpperCase();if((f=="I"||f=="EM")&&h.name=="font-style"||(f=="B"||f=="STRONG")&&h.name=="font-weight"||(f=="S"||f=="STRIKE")&&h.name==G||f=="U"&&h.name==G||(f=="SUB"||f=="SUP")&&h.name=="vertical-align"){var v=a;a=a.parentNode;while(v.firstChild)a.insertBefore(v.firstChild,v);a.removeChild(v);D=q;continue}else if(a.style&&a.style[b]&&a.style[b].length>0){var k=a.style[b];if(b.toLowerCase().indexOf("color")>=0||b=="fontFamily"||b=="fontSize")a.style[b]=d;else if(L)try{a.style[b]=a.style[b]+" "+d;if(k==a.style[b])a.style[b]=d}catch(O){a.style[b]=d}else if(!A){var F=k.replace(d,"");if(b=="fontWeight"&&k.toString()=="700")F="";if(F==k)try{a.style[b]=a.style[b]+" "+d;if(k==a.style[b])a.style[b]=d}catch(O){a.style[b]=d}else{a.style[b]=F.replace(/,/,"");B=q}A=q}else if(B)a.style[b]=k.replace(d,"").replace(/,/,"");else try{a.style[b]=a.style[b]+" "+d;if(k==a.style[b])a.style[b]=d}catch(O){a.style[b]=d}D=q}a=a.parentNode}if(!D&&!B){var y;y=i._doc.createElement(p);y.style[b]=d;var K=l.parentNode;K.insertBefore(y,l);y.appendChild(l);A=q}}var j=Sys.Extended.UI.HTMLEditor._commonTotalParent(o,m),I=j.parent.childNodes.item(j.indexFirst).previousSibling,s=j.parent.childNodes.item(j.indexLast).nextSibling;o.parentNode.removeChild(o);m.parentNode.removeChild(m);var H=0,r=j.parent.childNodes.length;if(I!=u)H=Sys.Extended.UI.HTMLEditor.__getIndex(I);if(s!=u){r=Sys.Extended.UI.HTMLEditor.__getIndex(s)+1;if(r<j.parent.childNodes.length)if(s.nodeType==3)r++;else if(s.nodeType==1){var E=s.tagName.toUpperCase();if(E!="TR"&&E!="TD"&&E!="LI")r++}}Sys.Extended.UI.HTMLEditor.spanJoiner(j.parent,i._doc,H,r);var C=i;J&&C._selectRng(c);setTimeout(function(){!Sys.Extended.UI.HTMLEditor.isIE&&C.focusEditor();C._editPanel.updateToolbar()},0)},_tryExpand:function(p){var u="'></span><span id='",h=false,n="undefined",a=this,v=[],i,j,m=a._getSelection(),b=a._createRange(m),l,k,x=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_add",w=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_add",q=Sys.Extended.UI.HTMLEditor.smartClassName+"_middle_add";if(Sys.Extended.UI.HTMLEditor.isIE&&typeof p==n){b.execCommand("bold");a.__saveBM__=b.getBookmark();b.execCommand("bold")}if(Sys.Extended.UI.HTMLEditor.isIE){var d=null,r="<span id="+q+"></span>",o=b.duplicate();try{b.pasteHTML(r)}catch(y){}d=a._doc.getElementById(q);if(d==null)return [];if(typeof p!=n)a.__saveBM__=d;if(d.nextSibling!=null&&!Sys.Extended.UI.HTMLEditor.isInlineElement(d.nextSibling)){d.parentNode.removeChild(d);return []}b.expand("word");b.select();if(b.text.length==0){d.parentNode.removeChild(d);o.select();return []}var t=new RegExp(r,"ig");if(!t.test(b.htmlText.replace(/[\n\r]/g,""))){d.parentNode.removeChild(d);o.select();return []}t=new RegExp(r+"(</span>|&nbsp;|[\\s])*$","ig");if(t.test(b.htmlText.replace(/[\n\r]/g,""))){d.parentNode.removeChild(d);o.select();return []}while(b.text.length>0&&b.text.substr(b.text.length-1,1)==" "){b.moveEnd("character",-1);b.select();if(b.text.length==0){d.parentNode.removeChild(d);o.select();return []}}typeof p==n&&d.parentNode.removeChild(d);return a._getTextNodeCollection()}function s(b){var a=/[\d\w]/;if(a.test(b))return h;a=/[\u0080-\u024F]/;if(a.test(b))return h;a=/[\u0370-\u2000]/;if(a.test(b))return h;return true}if(!a.insertHTML("<span id='"+w+u+q+u+x+"'></span>"))return [];var c=a._doc.getElementById(w),e=a._doc.getElementById(x),g=a._doc.getElementById(q);Sys.Extended.UI.HTMLEditor.positionInParagraph(c,c.previousSibling,true,c.parentNode,s);try{a._trySelect(c,e)}catch(y){}l=a._getSelection();k=a._createRange(l);i=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";j=Sys.Extended.UI.HTMLEditor.isIE&&k.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&i.length>0;if(!j||a._getTextNodeCollection().length==0){var f=a._doc.createTextNode("");c.parentNode.insertBefore(f,c);c.parentNode.removeChild(c);e.parentNode.removeChild(e);g.parentNode.removeChild(g);var b=a._doc.createRange();b.setStart(f,0);b.setEnd(f,0);b.setStart(f,0);b.setEnd(f,0);a._removeAllRanges(m);a._selectRange(m,b);return []}e.parentNode.insertBefore(c,g);Sys.Extended.UI.HTMLEditor.positionInParagraph(e,e.nextSibling,h,e.parentNode,s);a._trySelect(c,e);l=a._getSelection();k=a._createRange(l);i=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";j=Sys.Extended.UI.HTMLEditor.isIE&&k.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&i.length>0;if(!j||a._getTextNodeCollection().length==0){var f=a._doc.createTextNode("");c.parentNode.insertBefore(f,c);c.parentNode.removeChild(c);e.parentNode.removeChild(e);g.parentNode.removeChild(g);var b=a._doc.createRange();b.setStart(f,0);b.setEnd(f,0);b.setStart(f,0);b.setEnd(f,0);a._removeAllRanges(m);a._selectRange(m,b);return []}Sys.Extended.UI.HTMLEditor.positionInParagraph(c,c.previousSibling,true,c.parentNode,s);a._trySelect(c,e);l=a._getSelection();k=a._createRange(l);i=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";j=Sys.Extended.UI.HTMLEditor.isIE&&k.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&i.length>0;if(Sys.Extended.UI.HTMLEditor.isIE)if(typeof p!=n)a.__saveBM__=g;else g.parentNode.removeChild(g);else a.__saveBM__=[g,0];if(j)v=a._getTextNodeCollection();c.parentNode.removeChild(c);e.parentNode.removeChild(e);return v},_setStyleForTyping:function(c){var a=this,i=c.name.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()}),h=c.value,j=c.repl;if(a._StyleForTyping==null)a._StyleForTyping=[];for(var e=[],d=true,b=0;b<a._StyleForTyping.length;b++){var g=a._StyleForTyping[b].name.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()}),f=a._StyleForTyping[b].value;if(!(g==i&&(f==h||j)))e.push(a._StyleForTyping[b]);else d=false}a._StyleForTyping=e;d&&a._StyleForTyping.push(c)},_trySelect:function(c,d){var b=null,a=this,e=a._getSelection(),i=b,j=b;if(Sys.Extended.UI.HTMLEditor.isIE){e.empty();e=a._getSelection();var f=a._createRange(e),g=a._createRange(e);try{c!=b&&f.moveToElementText(c);d!=b&&g.moveToElementText(d);if(c!=b&&d!=b){f.setEndPoint("EndToEnd",g);f.select()}else if(c!=b)f.select();else d!=b&&g.select()}catch(k){}}else try{i=a._doc.createTextNode("");j=a._doc.createTextNode("");c.parentNode.insertBefore(i,c);d.parentNode.insertBefore(j,d);var h=a._doc.createRange();h.setStart(i,0);h.setEnd(j,0);a._removeAllRanges(e);a._selectRange(e,h)}catch(k){}},getSelectedHTML:function(){var c=this._getSelection(),b=this._createRange(c),a=null;if(Sys.Extended.UI.HTMLEditor.isIE)a=b.htmlText;else if(Sys.Extended.UI.HTMLEditor.isSafari&&(c.type=="Caret"||c.type=="None"))a="";else{if(Sys.Extended.UI.HTMLEditor.isSafari)if(b.cloneContents()==null)return "";a=Sys.Extended.UI.HTMLEditor.getHTML(b.cloneContents(),false)}return a},_queryCommandState:function(h){var r="vertical-align",k="line-through",j="strikethrough",q="text-decoration",f="underline",m="font-weight",i="bold",g=this,n=g._rangeStartEnd();if(n==null)return false;try{var a={name:"none",value:"none"};switch(h.toLowerCase()){case i:a={name:m,value:i};break;case "italic":a={name:"font-style",value:"italic"};break;case f:a={name:q,value:f};break;case j:a={name:q,value:k};break;case "superscript":a={name:r,value:"super"};break;case "subscript":a={name:r,value:"sub"}}var b=n.start,c=n.end,d=Sys.Extended.UI.HTMLEditor.getStyle(b,a.name).toString().toLowerCase(),e=Sys.Extended.UI.HTMLEditor.getStyle(c,a.name).toString().toLowerCase();if(a.name==m&&d=="700")d=i;if(a.name==m&&e=="700")e=i;if(/MSIE (5|6)/.test(navigator.userAgent)&&h.toLowerCase()==j&&(d==f||e==f)){while(b&&Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName)){if(b.style.textDecoration.indexOf(k)>=0){d=b.style.textDecoration;break}b=b.parentNode}while(c&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)){if(c.style.textDecoration.indexOf(k)>=0){e=c.style.textDecoration;break}c=c.parentNode}}if(Sys.Extended.UI.HTMLEditor.isSafari&&(h.toLowerCase()==j||h.toLowerCase()==f)){var l=h.toLowerCase();if(l==j)l=k;while(b&&Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName)){if(b.style.textDecoration.indexOf(l)>=0){d=b.style.textDecoration;break}b=b.parentNode}while(c&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)){if(c.style.textDecoration.indexOf(l)>=0){e=c.style.textDecoration;break}c=c.parentNode}}var o=d.indexOf(a.value)>=0&&e.indexOf(a.value)>=0;if(g._StyleForTyping!=null&&g._StyleForTyping.length>0)for(var p=0;p<g._StyleForTyping.length;p++){var s=g._StyleForTyping[p];if(s.name==a.name&&s.value==a.value){o=!o;break}}return o}catch(t){return false}},_textAlignState:function(b){var a=this._rangeStartEnd();if(a==null)return false;try{var c=this._textAlignStateSingle(a.start),d=this._textAlignStateSingle(a.end);return c==b&&d==b}catch(e){return false}},_textAlignStateSingle:function(a){while(a&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName))a=a.parentNode;if(a!=null){var b=a.tagName.toUpperCase();if(b=="P"||b=="DIV")return a.style.textAlign.toLowerCase()}return null},_rangeStartEnd:function(){var i="<span id='",b=null,e=this;if(e.isControl())return b;try{var o=e._getSelection(),a=e._createRange(o),c=b,d=b;if(!Sys.Extended.UI.HTMLEditor.isIE){function f(c,d){var e=b;while(e==b){if(c.nodeType==3)if(d&&a.startContainer!=a.endContainer&&a.startOffset==c.length&&c.nextSibling)e=f(c.nextSibling,d);else if(!d&&a.startContainer!=a.endContainer&&a.endOffset==0&&c.previousSibling)e=f(c.previousSibling,d);else e=c;else if((d?c.firstChild:c.lastChild)==b)e=b;else e=f(d?c.firstChild:c.lastChild,d);if(e==b){c=d?c.nextSibling:c.previousSibling;if(c==b)return b}else return e}}var n=e._getParent(a);if(n.nodeType!=3&&a.startContainer==a.endContainer&&a.startOffset==a.endOffset&&a.startContainer.childNodes.item(a.startOffset).tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.startContainer.childNodes.item(a.startOffset).tagName))return {start:a.startContainer.childNodes.item(a.startOffset),end:a.startContainer.childNodes.item(a.startOffset)};c=f(a.startContainer,true);if(c!=b&&c.parentNode!=b)c=c.parentNode;if(c==b)c=a.startContainer;d=f(a.endContainer,false);if(d!=b&&d.parentNode!=b)d=d.parentNode;if(d==b)d=a.endContainer}else if(a.text.length==0)c=d=e._getParent(a);else{var m=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_marker",l=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_marker",k=a.duplicate(),j=a.duplicate();k.setEndPoint("EndToStart",a);j.setEndPoint("StartToEnd",a);j.pasteHTML(i+m+"'/>");k.pasteHTML(i+l+"'/>");var g=e._doc.getElementById(l),h=e._doc.getElementById(m);c=g.parentNode;d=h.parentNode;g.parentNode.removeChild(g);h.parentNode.removeChild(h)}return {start:c,end:d}}catch(p){return b}},rtlState:function(){if(this._doc.body.style.direction&&this._doc.body.style.direction=="rtl")return true;return false},openWait:function(){this._editPanel.openWait()},closeWait:function(){this._editPanel.closeWait()}};Sys.Extended.UI.HTMLEditor.DesignPanel.ScriptRecover=function(){var a=this;a.scriptsArray=[];a.scriptsArray_index=-1;a.regReplScript1=function(b,a){this.scriptsArray.push(a);return ""};a.regReplFromScript=function(b,a){return a.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")};a.regReplFromScript1=function(e,c,f,d){var a=this;a.scriptsArray_index++;var b;if(!Sys.Extended.UI.HTMLEditor.isIE)b=a.scriptsArray[a.scriptsArray_index].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"');else b=a.scriptsArray[a.scriptsArray_index];return c+b+d}};Sys.Extended.UI.HTMLEditor.DesignPanel.registerClass("Sys.Extended.UI.HTMLEditor.DesignPanel",Sys.Extended.UI.HTMLEditor.ModePanel);
//END HTMLEditor.DesignPanel.js
//START HTMLEditor.HtmlPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.HtmlPanel=function(b){var a=this;Sys.Extended.UI.HTMLEditor.HtmlPanel.initializeBase(a,[b]);a._onfocus$delegate=Function.createDelegate(a,a._onfocus);if(Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!="BackCompat")a._onresize$delegate=Function.createDelegate(a,a._onresize)};Sys.Extended.UI.HTMLEditor.HtmlPanel.prototype={_activate:function(c){var a=this;a._shouldResize=false;var b=a.get_element();if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version>6&&document.compatMode!="BackCompat"&&b.parentNode.clientHeight>0)a._shouldResize=true;Sys.Extended.UI.HTMLEditor.HtmlPanel.callBaseMethod(a,"_activate");if(Sys.Extended.UI.HTMLEditor.isIE){b.value="";var d=a;setTimeout(function(){b.value=c},0)}else b.value=c;$addHandlers(b,{focus:a._onfocus$delegate});a._shouldResize&&$addHandlers(b,{resize:a._onresize$delegate});a._activateFinished()},_deactivate:function(){var a=this,b=a.get_element();a._shouldResize&&$common.removeHandlers(b,{resize:a._onresize$delegate});a._shouldResize=false;$common.removeHandlers(b,{focus:a._onfocus$delegate});b.value="";Sys.Extended.UI.HTMLEditor.HtmlPanel.callBaseMethod(a,"_deactivate")},_getContent:function(){return this.get_element().value},_setContent:function(b){this.get_element().value=b;if(Sys.Extended.UI.HTMLEditor.isReallyVisible(this.get_element().parentNode))try{var a=this.get_element();a.focus();setTimeout(function(){try{Sys.Extended.UI.HTMLEditor.setSelectionRange(a,0,0)}catch(b){}},0)}catch(c){}},_focus:function(){if(Sys.Extended.UI.HTMLEditor.isReallyVisible(this.get_element().parentNode))try{var a=this.get_element();a.focus();setTimeout(function(){try{Sys.Extended.UI.HTMLEditor.setSelectionRange(a,0,0)}catch(b){}},0)}catch(c){}var b=this;setTimeout(function(){b._focused()},0)},_onfocus:function(){this._really_focused();var a=this.get_element();setTimeout(function(){a.focus()},0);return true},_onresize:function(){var b=this.get_element(),a=b.parentNode.clientHeight;if(a>0)b.style.height=a+"px"}};Sys.Extended.UI.HTMLEditor.HtmlPanel.registerClass("Sys.Extended.UI.HTMLEditor.HtmlPanel",Sys.Extended.UI.HTMLEditor.ModePanel);
//END HTMLEditor.HtmlPanel.js
//START HTMLEditor.PreviewPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.PreviewPanel=function(b){var a=this;Sys.Extended.UI.HTMLEditor.PreviewPanel.initializeBase(a,[b]);a._focus$delegate=Function.createDelegate(a,a._focus_event);a._blur$delegate=Function.createDelegate(a,a._blur_event);a._doc=null;a._content="";a._panel_timer=null};Sys.Extended.UI.HTMLEditor.PreviewPanel.prototype={_focus:function(){try{this.get_element().contentWindow.focus()}catch(a){}this._focused()},_focus_event:function(){var a=this;if(a._panel_timer==null){var c=a.get_element().contentWindow,b=a;a._really_focused();a._panel_timer=setTimeout(function(){c.focus();b._really_focused();b._panel_timer=null},0)}return true},_blur_event:function(){if(this._panel_timer!=null){clearTimeout(this._panel_timer);this._panel_timer=null}return true},_activate:function(b){var a=this;Sys.Extended.UI.HTMLEditor.PreviewPanel.callBaseMethod(a,"_activate");a._content=b;a._wasFocused=false;a._initIframe(b);Sys.Extended.UI.HTMLEditor._addEvents(a.get_element().contentWindow,["focus"],a._focus$delegate);Sys.Extended.UI.HTMLEditor._addEvents(a.get_element().contentWindow,["blur"],a._blur$delegate);a._activateFinished()},_deactivate:function(){var a=this;Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["blur"],a._blur$delegate);Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["focus"],a._focus$delegate);if(Sys.Extended.UI.HTMLEditor.isIE)try{a._doc.open();a._doc.write("");a._doc.close();a.get_element().src="javascript:false;"}catch(b){}a._doc=null;a._content="";Sys.Extended.UI.HTMLEditor.PreviewPanel.callBaseMethod(a,"_deactivate")},_initIframe:function(c){var a=this,b=Sys.Extended.UI.HTMLEditor.Trim(c);a._doc=a.get_element().contentWindow.document;if(Sys.Extended.UI.HTMLEditor.isIE)b=b.replace(/&amp;/ig,"&");a._doc.open();a._doc.write('<html><head><link rel="stylesheet" href="'+a._editPanel.get_documentCssPath()+'" media="all" /></head><body>'+b+"</body></html>");a._doc.close()},_getContent:function(){return this._content},_setContent:function(a){this._content=a;this._initIframe(a)}};Sys.Extended.UI.HTMLEditor.PreviewPanel.registerClass("Sys.Extended.UI.HTMLEditor.PreviewPanel",Sys.Extended.UI.HTMLEditor.ModePanel);
//END HTMLEditor.PreviewPanel.js
//START HTMLEditor.Toolbar_buttons.ModeButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton.initializeBase(this,[a]);this._activeMode=Sys.Extended.UI.HTMLEditor.ActiveModeType.Design};Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton.prototype={get_activeMode:function(){return this._activeMode},set_activeMode:function(a){this._activeMode=a},_onclick:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ModeButton.callBaseMethod(this,"_onclick"))return false;var a=this;setTimeout(function(){a._editPanel.set_activeMode(a._activeMode)},0);return true},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);
//END HTMLEditor.Toolbar_buttons.ModeButton.js
//START HTMLEditor.Toolbar_buttons.DesignMode.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignMode.initializeBase(this,[a])};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);
//END HTMLEditor.Toolbar_buttons.DesignMode.js
//START HTMLEditor.Toolbar_buttons.HtmlMode.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.HtmlMode.initializeBase(this,[a])};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);
//END HTMLEditor.Toolbar_buttons.HtmlMode.js
//START HTMLEditor.Toolbar_buttons.PreviewMode.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.PreviewMode.initializeBase(this,[a])};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);
//END HTMLEditor.Toolbar_buttons.PreviewMode.js
//START TextboxWatermark.TextboxWatermark.js
(function(){var b="ExtendedWatermark";function a(){var f="WatermarkCssClass",e="WatermarkText",c=true,d="keypress",b=false,a=null;Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.TextBoxWatermarkBehavior=function(c){var b=this;Sys.Extended.UI.TextBoxWatermarkBehavior.initializeBase(b,[c]);b._watermarkText=a;b._watermarkCssClass=a;b._focusHandler=a;b._blurHandler=a;b._keyPressHandler=a;b._propertyChangedHandler=a;b._watermarkChangedHandler=a;b._oldClassName=a;b._clearedForSubmit=a;b._maxLength=a;if(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 e=this;Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(e,"initialize");var f=e.get_element(),i=b,g=Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(e,"get_ClientState");if(g!=a&&g!=""){i=g=="Focused";Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(e,"set_ClientState",a)}e._oldClassName=f.className;e._focusHandler=Function.createDelegate(e,e._onFocus);e._blurHandler=Function.createDelegate(e,e._onBlur);e._keyPressHandler=Function.createDelegate(e,e._onKeyPress);$addHandler(f,"focus",e._focusHandler);$addHandler(f,"blur",e._blurHandler);$addHandler(f,d,e._keyPressHandler);e.registerPropertyChanged();var j=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()).get_Current(),h=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());if(""==j||e._watermarkText==j){h.set_Watermark(e._watermarkText);h.set_IsWatermarked(c)}if(i)e._onFocus();else{f.blur();e._onBlur()}e._clearedForSubmit=b;e.registerPartialUpdateEvents();e._watermarkChangedHandler=Function.createDelegate(e,e._onWatermarkChanged);h.add_WatermarkChanged(e._watermarkChangedHandler)},dispose:function(){var c=this,e=c.get_element();if(c._watermarkChangedHandler){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()).remove_WatermarkChanged(c._watermarkChangedHandler);c._watermarkChangedHandler=a}if(e.control&&c._propertyChangedHandler){e.control.remove_propertyChanged(c._propertyChangedHandler);c._propertyChangedHandler=a}if(c._focusHandler){$removeHandler(e,"focus",c._focusHandler);c._focusHandler=a}if(c._blurHandler){$removeHandler(e,"blur",c._blurHandler);c._blurHandler=a}if(c._keyPressHandler){$removeHandler(e,d,c._keyPressHandler);c._keyPressHandler=a}Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()).get_IsWatermarked()&&c.clearText(b);Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(c,"dispose")},_onWatermarkChanged:function(){if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked())this._onBlur();else this._onFocus()},clearText:function(d){var a=this.get_element(),c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a);c.set_Value("");c.set_IsWatermarked(b);if(d){a.setAttribute("autocomplete","off");a.select()}},_onFocus:function(f){var d=this,e=d.get_element();Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_IsWatermarked()&&d.clearText(f?c:b);e.className=d._oldClassName;if(d._maxLength>0){d.get_element().maxLength=d._maxLength;d._maxLength=a}},_onBlur:function(){var a=this,b=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());if(""==b.get_Current()||b.get_IsWatermarked()){if(a.get_element().maxLength>0&&a._watermarkText.length>a.get_element().maxLength){a._maxLength=a.get_element().maxLength;a.get_element().maxLength=a._watermarkText.length}a._applyWatermark()}},_applyWatermark:function(){var a=this,b=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());b.set_Watermark(a._watermarkText);b.set_IsWatermarked(c);if(a._watermarkCssClass)a.get_element().className=a._watermarkCssClass},_onKeyPress:function(){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).set_IsWatermarked(b)},registerPropertyChanged:function(){var a=this,b=a.get_element();if(b.control&&!a._propertyChangedHandler){a._propertyChangedHandler=Function.createDelegate(a,a._onPropertyChanged);b.control.add_propertyChanged(a._propertyChangedHandler)}},_onPropertyChanged:function(b,a){"text"==a.get_propertyName()&&this.set_Text(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current())},_onSubmit:function(){if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this.clearText(b);this._clearedForSubmit=c}},_partialUpdateEndRequest:function(d,c){var a=this;Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(a,"_partialUpdateEndRequest",[d,c]);if(a.get_element()&&a._clearedForSubmit){a.get_element().blur();a._onBlur();a._clearedForSubmit=b}},get_WatermarkText:function(){return this._watermarkText},set_WatermarkText:function(b){var a=this;if(a._watermarkText!=b){a._watermarkText=b;Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).get_IsWatermarked()&&a._applyWatermark();a.raisePropertyChanged(e)}},get_WatermarkCssClass:function(){return this._watermarkCssClass},set_WatermarkCssClass:function(b){var a=this;if(a._watermarkCssClass!=b){a._watermarkCssClass=b;Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).get_IsWatermarked()&&a._applyWatermark();a.raisePropertyChanged(f)}},get_Text:function(){return Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value()},set_Text:function(b){var a=this;if(""==b){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).set_Current("");a.get_element().blur();a._onBlur()}else{a._onFocus();Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).set_Current(b)}}};Sys.Extended.UI.TextBoxWatermarkBehavior.registerClass("Sys.Extended.UI.TextBoxWatermarkBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.TextBoxWatermarkBehavior,{name:"watermark",parameters:[{name:e,type:"String"},{name:f,type:"String"}]});Sys.Extended.UI.TextBoxWatermarkBehavior.WebForm_OnSubmit=function(){var d=Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit();if(d)for(var b=Sys.Application.getComponents(),a=0;a<b.length;a++){var c=b[a];Sys.Extended.UI.TextBoxWatermarkBehavior.isInstanceOfType(c)&&c._onSubmit()}return d}}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ExtendedBase","ExtendedCommon"],a);else a()})();
//END TextboxWatermark.TextboxWatermark.js
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
(function() {var fn = function() {$get('ctl00_mainContent_ToolkitScriptManager1_HiddenField').value += ';;AjaxControlToolkit, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:en-US:86f3ec8f-e11f-41a4-a4db-54c6e3efc9b3:a578e1b4:de1feab2:f9cec9bc:347641bc:5a15a1b0:5f7bdc4f:52352bec:4c797d40:3699b58e:c8f62c63:25452a86:47a6309d:54faba7a:f2b15c81:2a44e3cc:1c9108b5:e70cd33d:42921c86:1177529e:8074c3f9:1eecc3f9:8d1c8c98:73671002:8a2dc8cf:737231d4:9a87c62e:66bd1a69:3def063d:11fb7995:5ec83a74:67f6b48f:983d445b:3fce0808:5e87ca19:4cbfbdb9:ec89763d:b577cb0f:c72764b0:bd1a3ba5:49d880ab:c156824:b399670c:f51fc3d8:b4f826f2:1afc766f:5bea0edc:a68e3267:fa404748:789343a:4fad5f49:a432d795:c5750145:f14fa3a5:bbb7ea0d:f4cfcbf9:c99d32c9:ea1c4087:58bb39a5:6fdc0f25:33a14b0b:c961e0ab:3868b074:a7175a9c:be682e2f:7a78d086:9a2789ea:a737f871:7c33c41:1226bbfb:e48edae4:6cba3bab:8cef1288:50a74782:8afeb62d:4b5e28d8:b3dc9e3:cea4901c:414a2e6d:56de2be0:35576c48';Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();
