if(typeof pln=='undefined'){alert("This file required the PLN Javascript Library(pln.js)and it need to be loaded before this file.");}else if(typeof nvi=='undefined'){alert("This file required the NVI CORE(nvi.core.js)and it need to be loaded before this file.");}else{function class_nvi_basic_panel(){var _id;var _automaticUpdateTimeout;var _automaticUpdateDelay=5000;var _automaticUpdate=false;var _customWaitingPanelId=null;var _complementaryData={};var _customUpdateViewUrl=null;var _ajaxData=null;this.__constructor=function(id){_id=id;};this.toString=function(){return "Nvi Basic Panel Class";};this.initialize=function(){};this.terminate=function(){void nvi.panelManager.cancelUpdateView(this);};this.deleteInstance=function(){void this.stopAutomaticUpdate();void this.terminate();void pln.node.remove(this.getElement());var customWaitingPanel=this.getCustomWaitingPanel();var defaultWaitingPanel=this.getDefaultWaitingPanel();if(pln.isHtmlElement(customWaitingPanel))void pln.node.remove(customWaitingPanel);if(pln.isHtmlElement(customWaitingPanel))void pln.node.remove(defaultWaitingPanel);};this.getId=function(){return _id;};this.getElement=function(){return pln.node.getById(this.getId());};this.onUpdatedView=function(success,serverData,message){if(_automaticUpdate)void this.startAutomaticUpdate();};this.updateView=function(data){var ajaxData=this.getSharedRessources();var id=this.getId();if(pln.isset(ajaxData)){ajaxData.parameters=data;}_ajaxData=ajaxData;void nvi.panelManager.updateView.apply(nvi.panelManager,[id,ajaxData]);};this.startAutomaticUpdate=function(){_automaticUpdate=true;void clearTimeout(_automaticUpdateTimeout);_automaticUpdateTimeout=setTimeout(pln.delegate(this,this.updateView),_automaticUpdateDelay);};this.stopAutomaticUpdate=function(){_automaticUpdate=false;void clearTimeout(_automaticUpdateTimeout);};this.setAutomaticUpdateDelay=function(delay){if(!pln.isNumber(delay)){void nvi.logManager.log('The delay is undefined or not an integer. Panel('+this.getId()+')','Error','class_nvi_basic_panel','setAutomaticUpdateDelay');}else{_automaticUpdateDelay=Math.max(Math.abs(delay),100);}};this.registerCustomWaitingPanel=function(id){if(!pln.isString(id))return;_customWaitingPanelId=id;nvi.eventManager.addListener(_id,nvi.eventManager.events.__updating,null,function(){void pln.node.setProperty(id,'display','');});nvi.eventManager.addListener(_id,nvi.eventManager.events.__ready,null,function(){void pln.node.setProperty(id,'display','none');});};this.getCustomWaitingPanel=function(){return pln.node.getById(_customWaitingPanelId);};this.getDefaultWaitingPanel=function(){return pln.node.getById(nvi.getDefaultWaitingPanelPrefixId()+this.getId());};this.getSharedRessources=function(){return{type:'basic',id:this.getId(),parameters:{complementaryData:this.getComplementaryDataObject()}};};this.addComplementaryData=function(name,value){try{_complementaryData[name]=value;}catch(error){}};this.removeComplementaryData=function(name){if(pln.isset(_complementaryData[name]))delete _complementaryData[name];};this.getComplementaryDataObject=function(){return _complementaryData;};this.clearComplementaryData=function(){_complementaryData={};};this.setCustomUpdateViewUrl=function(url){if(pln.isString(url))_customUpdateViewUrl=url;};this.getCustomUpdateViewUrl=function(url){return _customUpdateViewUrl;};this.getAjaxData=function(){return _ajaxData;};};class_nvi_basic_panel.extend=null;}