Ext.onReady
(
	function()
	{
		MiVGIEventClass = Ext.extend(Ext.TabPanel,{ 
			initComponent:function() {
				// call parent init component
				MiVGIEventClass.superclass.initComponent.apply(this, arguments);
		 
				// add custom events. In this case, we define 3 new events, one for each kind of vgi.
				this.addEvents('incidenciaEvent', 'townEvent','roadEvent','equipamientoEvent');
			}

			,incidencia:function(type, code) {

		 		
				// building vgi event
				this.fireEvent('incidenciaEvent', type, code);
		   }

		 	,town:function(type, code, id) {
				
		 		
				// town vgi event
				this.fireEvent('townEvent', type, code);
		   }

		   ,road:function(type, code) {
				
		 		
				// road vgi event
				this.fireEvent('roadEvent', type, code);
		    }
			,equipamiento:function(type, code) {
				
		 		
				// equipamiento vgi event
				this.fireEvent('equipamientoEvent', type, code);
		    }
		});
	}
);
		

