PopupLayer.prototype=new DynamicLayer;_this=PopupLayer.prototype;function PopupLayer(elmID,strTitle){for(var pop=new DraggableLayer(elmID,null,null,true),objPop=pop.getObject(),children=objPop.childNodes,i=0;i<children.length;i++)if(children[i].className){if(children[i].className=="popupConsole"){this._console=children[i];pop.ignoreLayer(""+children[i].id)}if(children[i].className=="popupDragBar")for(var dragBarChildren=children[i].childNodes,j=0;j<dragBarChildren.length;j++)if(dragBarChildren[j].className){if(dragBarChildren[j].className=="popupButtonContainer")for(var buttons=dragBarChildren[j].childNodes,k=0;k<buttons.length;k++)if(buttons[k].className)if(buttons[k].className=="popupCloseIcon"){buttons[k].popupHandle=this;(new StyleManager).setStyle(buttons[k],"cursor","pointer");(new EventHandler).addEventListener(buttons[k],"click",this._closeBtn_Click)}if(dragBarChildren[j].className=="popupWindowTitle")if(strTitle){this._title=dragBarChildren[j];dragBarChildren[j].innerHTML=strTitle}}}this._dl=pop;this._obj=pop.getObject();this._parent_show=this.show;this._parent_hide=this.hide;this.show=function(){(new DOMManager).hideCombos();this._parent_show()};this.hide=function(){(new DOMManager).showCombos();this._parent_hide()}}_this._closeBtn_Click=function(evt){var obj=(new EventHandler).getProperSourceFromEvent(evt);if(!obj||!obj.popupHandle)return;obj.popupHandle.hide();if($get("HelpPopupMask"))$get("HelpPopupMask").style.visibility="hidden";else if(parent.$get("HelpPopupMask"))parent.$get("HelpPopupMask").style.visibility="hidden";if($get("PopupContent"))$get("PopupContent").style.height="auto";else if(parent.$get("PopupContent"))parent.$get("PopupContent").style.height="auto"};_this.changeContent=function(strNewHTML){this._console.innerHTML=strNewHTML};_this.addContentBefore=function(){alert("method addContentBefore has not been implemented yet! [PopupLayer]");return};_this.addContentAfter=function(){alert("method addContentAfter has not been implemented yet! [PopupLayer]");return};_this.center=function(){var windowHeight=self.innerHeight?self.innerHeight:document.body.clientHeight,windowWidth=self.innerWidth?self.innerWidth:document.body.clientWidth;this.moveTo(windowWidth/2-g_popup.getWidth()/2-17,windowHeight/2-g_popup.getHeight()/2-17)};_this.Move=function(l,t){this.moveTo(l,t)};_this.open=function(url,title){if(title&&this._title)this._title.innerHTML=title;this.hide();var request=null;if(window.XMLHttpRequest)request=new XMLHttpRequest;else if(window.ActiveXObject)request=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XML HTTP Request support cannot be found!");return null}request.open("GET",url);var eventSource=this;request.onreadystatechange=function(){request.readyState==4&&eventSource.changeContent(request.responseText);eventSource.show()};request.send(null)};
