if(typeof pln=='undefined'){alert("class_nvi_iframe_panel\nThis file required the PLN Javascript Library(pln.js)and it need to be loaded before this file.");}else if(typeof nvi=='undefined'){alert("class_nvi_iframe_panel\nThis file required the NVI CORE(nvi.core.js)and it need to be loaded before this file.");}else if(typeof class_nvi_basic_panel=='undefined'){alert("class_nvi_iframe_panel\nThis file required the Class Nvi Basic Panel and it need to be loaded before this file.");}else{function class_nvi_iframe_panel(){var _host=this;var _width;var _height;var _url;var _scrolling;var _set=pln.node.setProperty;this.__constructor=function(id){void __super.__constructor(id);};this.toString=function(){return "Nvi Iframe Panel Class";};this.initialize=function(){var element=this.getElement();if(!pln.isset(_url))_url=pln.node.getProperty(element,"src");if(pln.isset(_url)){void toggleContentLoading(null,false);void pln.events.addListener(element,'load',null,toggleContentLoading,true);void _set(element,"src",_url);if(isNaN(_width))void _set(element,"width",_width);if(isNaN(_height))void _set(element,"height",_height);}void __super.initialize();};this.terminate=function(){var element=this.getElement();void pln.events.removeListener(element,'load',null,toggleContentLoading);void _set(element,"src",'about:blank');void __super.terminate();};this.deleteInstance=function(){void this.terminate();void __super.deleteInstance();};function toggleContentLoading(eventObject,display){var element=_host.getElement();var custom_panel=_host.getCustomWaitingPanel();var default_panel=_host.getDefaultWaitingPanel();if(!pln.isset(custom_panel)&&!pln.isset(default_panel))return;var iframeHeight=isNaN(_height)?_height=pln.node.getProperty(element,'offsetHeight'):_height;void _set(element,"visibility",display?'visible':'hidden');void _set(element,"height",(display?iframeHeight:1)+"px");var target_panel=(custom_panel)?custom_panel:(default_panel)?default_panel:null;if(target_panel){void _set(target_panel,"display",display?'none':'block');void nvi.eventManager.dispatchEvent(_host.getId(),nvi.eventManager.events[display?'__opened':'__closed']);if(target_panel==default_panel)void _set(target_panel,'height',display?'':iframeHeight+'px');}};this.setUrl=function(url){if(pln.isString(url))_url=url;};this.enableScrolling=function(enable){if(pln.isBoolean(enable)){_scrolling=enable;pln.node.setProperty(this.getElement(),'overflow',enable?'auto':'hidden');}};this.setDimension=function(width,height){if(pln.isNumber(width))_width=width;if(pln.isNumber(height))_height=height;};this.getSharedRessources=function(){return{type:'iframe',id:_host.getId(),parameters:{url:_url,complementaryData:this.getComplementaryDataObject()}};};};class_nvi_iframe_panel.extend=class_nvi_basic_panel;}
