Type.registerNamespace("Sys.Extended.UI.HtmlEditor"),Sys.Extended.UI.HtmlEditor.HtmlPanel=function(e){Sys.Extended.UI.HtmlEditor.HtmlPanel.initializeBase(this,[e]),this._onfocus$delegate=Function.createDelegate(this,this._onfocus),Sys.Extended.UI.HtmlEditor.isIE&&"BackCompat"!=document.compatMode&&(this._onresize$delegate=Function.createDelegate(this,this._onresize))},Sys.Extended.UI.HtmlEditor.HtmlPanel.prototype={_activate:function(e){this._shouldResize=!1;var t=this.get_element();if(Sys.Extended.UI.HtmlEditor.isIE&&Sys.Browser.version>6&&"BackCompat"!=document.compatMode&&t.parentNode.clientHeight>0&&(this._shouldResize=!0),Sys.Extended.UI.HtmlEditor.HtmlPanel.callBaseMethod(this,"_activate"),Sys.Extended.UI.HtmlEditor.isIE){t.value="";setTimeout(function(){t.value=e},0)}else t.value=e;$addHandlers(t,{focus:this._onfocus$delegate}),this._shouldResize&&$addHandlers(t,{resize:this._onresize$delegate}),this._activateFinished()},_deactivate:function(){var e=this.get_element();this._shouldResize&&$common.removeHandlers(e,{resize:this._onresize$delegate}),this._shouldResize=!1,$common.removeHandlers(e,{focus:this._onfocus$delegate}),e.value="",Sys.Extended.UI.HtmlEditor.HtmlPanel.callBaseMethod(this,"_deactivate")},_getContent:function(){return this.get_element().value},_setContent:function(e){if(this.get_element().value=e,Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element().parentNode))try{var t=this.get_element();t.focus(),setTimeout(function(){try{Sys.Extended.UI.HtmlEditor.setSelectionRange(t,0,0)}catch(e){}},0)}catch(e){}},_focus:function(){if(Sys.Extended.UI.HtmlEditor.isReallyVisible(this.get_element().parentNode))try{var e=this.get_element();e.focus(),setTimeout(function(){try{Sys.Extended.UI.HtmlEditor.setSelectionRange(e,0,0)}catch(e){}},0)}catch(e){}var t=this;setTimeout(function(){t._focused()},0)},_onfocus:function(e){this._really_focused();var t=this.get_element();return setTimeout(function(){t.focus()},0),!0},_onresize:function(e){var t=this.get_element(),i=t.parentNode.clientHeight;i>0&&(t.style.height=i+"px")}},Sys.Extended.UI.HtmlEditor.HtmlPanel.registerClass("Sys.Extended.UI.HtmlEditor.HtmlPanel",Sys.Extended.UI.HtmlEditor.ModePanel);