﻿Type.registerNamespace("AjaxControlToolkit.HTMLEditor.Popups");AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup=function(a){AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.initializeBase(this,[a]);this._relatedElement=null};AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.prototype={get_relatedElement:function(){return this._relatedElement},set_relatedElement:function(a){this._relatedElement=a},open:function(g){var a=this;if(a._relatedElement!=null){var i=a;if(!a.checkCorrectLoaded(function(){i.open(g)}))return;var h=$common.getLocation(a._relatedElement),c=h.x,d=h.y+a._relatedElement.offsetHeight,b=AjaxControlToolkit.HTMLEditor.getClientViewportElement(a._iframe),f=b.clientWidth+b.scrollLeft,e=b.clientHeight+b.scrollTop;if(d<b.scrollTop)d=b.scrollTop;if(c<b.scrollLeft)c=b.scrollLeft;if(d+a._iframe.offsetHeight>e)d-=d+a._iframe.offsetHeight-e;if(c+a._iframe.offsetWidth>f)c-=c+a._iframe.offsetWidth-f;AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.callBaseMethod(a,"open",[g,d,c])}},close:function(a){AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"close",[a])},initialize:function(){AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"initialize")},dispose:function(){AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"dispose")}};AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup.registerClass("AjaxControlToolkit.HTMLEditor.Popups.AttachedPopup",AjaxControlToolkit.HTMLEditor.Popups.Popup);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();