table.addEventListener('click', function(e) {
		if (e.rowData.id == 2) 
		{
			var network = require('lib/network');
			network.getData(network.SERVICES.DIARIES_DAYS, function(response)
			{
				if(response.length == 0) 
				{
					Ti.UI.createAlertDialog({
					message: L('no_eventos'),
					ok: L('ok'),
					title: L('alert_title')
					}).show();
				}	
	    		else if(response.length > 0) 
				{
					var Window;
					var mainWindow = require("ui/handheld/agenda/HorariosWindow");
					new mainWindow(response, Window).open();
				}
	    		else 
				{
					//error de conexion
				}	
			}); 
			
		} else if (e.rowData.id == 3) {
			var Window;
			var mainWindow = require("ui/handheld/mapa/MapaWindow");
			new mainWindow(Window).open();
		}
	});
	table.addEventListener('click', function(e) {
		if (e.rowData.id == 2) 
		{
			var network = require('lib/network');
			network.getData(network.SERVICES.ACTIVITIES_DAYS, function(response)
			{
				if(response.length == 0) 
				{
					Ti.UI.createAlertDialog({
					message: L('no_actividades'),
					ok: L('ok'),
					title: L('alert_title')
					}).show();
				}	
	    		else if(response.length > 0) 
				{
					var Window;
					var mainWindow = require("ui/handheld/actividades/HorariosWindow");
					new mainWindow(response,Window).open();
				}
	    		else 
				{
					//error de conexion
				}	
			}); 
			
		} else if (e.rowData.id == 3) {
			var Window;
			var mainWindow = require("ui/handheld/mapa/MapaWindow");
			new mainWindow(Window).open();
		}
		/*if (e.row.isparent) {
		 if (e.row.opened) {
		 for (var i = e.row.sub.length; i > 0; i = i - 1) {
		 table.deleteRow(e.index + i);
		 }
		 e.row.opened = false;
		 } else {
		 var currentIndex = e.index;
		 for (var i = 0; i < e.row.sub.length; i++) {
		 table.insertRowAfter(currentIndex, e.row.sub[i]);
		 currentIndex++;
		 }
		 e.row.opened = true;
		 }
		 } else {
		 if (e.row.id == 'directorioexpositores') {
		 var Window;
		 var mainWindow = require("ui/exposiciones/DirectorioWindow");
		 new mainWindow(Window).open();
		 } else if (e.row.id == 'directorioconferencias') {
		 var Window;
		 var mainWindow = require("ui/conferencias/DirectorioWindow");
		 new mainWindow(Window).open();
		 } else if (e.row.id == 'horariosexpositores') {
		 var Window;
		 var mainWindow = require("ui/exposiciones/HorariosWindow");
		 new mainWindow(Window).open();
		 } else if (e.row.id == 'horariosconferencias') {
		 var Window;
		 var mainWindow = require("ui/conferencias/HorariosWindow");
		 new mainWindow(Window).open();
		 }
		 }*/
	});