Type.registerNamespace("Sys.Extended.UI.HtmlEditor.Popups");Sys.Extended.UI.HtmlEditor.Popups.Popup=function(n){Sys.Extended.UI.HtmlEditor.Popups.Popup.initializeBase(this,[n]);this._iframe=null;this._top=0;this._left=0;this._doc=null;this._initialContent="";this._cssPath="";this._autoDimensions=!0;this._registeredFields=[];this._registeredHandlers=[];this._app_onload$delegate=Function.createDelegate(this,this._app_onload);this.isOpened=!1;this.isLoaded=!1;this.isLoading=!1};Sys.Extended.UI.HtmlEditor.Popups.Popup.prototype={getDocument:function(){return this._doc},getPopupMediator:function(){return this._iframe.contentWindow&&this._iframe.contentWindow.popupMediator?this._iframe.contentWindow.popupMediator:null},get_registeredFields:function(){return this._registeredFields},set_registeredFields:function(value){this._registeredFields=eval(value)},get_registeredHandlers:function(){return this._registeredHandlers},set_registeredHandlers:function(value){this._registeredHandlers=eval(value)},get_initialContent:function(){return this._initialContent},set_initialContent:function(n){this._initialContent=n},get_cssPath:function(){return this._cssPath},set_cssPath:function(n){this._cssPath=n},get_autoDimensions:function(){return this._autoDimensions},set_autoDimensions:function(n){this._autoDimensions=n},get_iframe:function(){return this._iframe},set_iframe:function(n){this._iframe=n},checkCorrectLoaded:function(n){var t=this;return(t.isLoaded&&(t._iframe.style.height=="0px"||t._iframe.style.width=="0px")&&(this.isLoaded=!1),!this.isLoaded)?(this.isLoading||this.reload(),typeof n!="undefined"&&setTimeout(n,10),!1):!0},_baseOpen:function(n,t,i){var r=this,u;this.checkCorrectLoaded(function(){r._baseOpen(n,t,i)})&&(u=this.get_element(),typeof i!="undefined"&&(this._left=parseInt(i)),typeof t!="undefined"&&(this._top=parseInt(t)),u.style.top=this._top+"px",u.style.left=this._left+"px",setTimeout(function(){typeof n=="function"&&r._onDocumentLoaded(n);r.isOpened=!0},0))},open:function(n,t,i){this._baseOpen(n,t,i)},close:function(n){var t=this.get_element();this.isOpened=!1;t.style.top="-2000px";t.style.left="-2000px";typeof n=="function"&&n()},reload:function(){var t,i,n;this.isLoading=!0;t=this.get_element();i=t.parentNode;document.body.appendChild(t);i.appendChild(this.get_element());this._doc=this._iframe.contentWindow.document;this._doc.open();n=new Sys.StringBuilder;n.append('
');this._cssPath.length>0&&n.append('');n.append("