var myConn_include_est_imp_listado= new XHConn();
var terminado_include_est_imp_listado = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_imp_listado(ruta){
	listado_inm = "-1";
	for ( var i in list_inmuebles){
		listado_inm = listado_inm +", "+ list_inmuebles[i];
	}

//alert(ruta);

	//desde la pagina index//
	if (ruta =='1'){
		//recojo valor variable de url//
		var variable_url = location.search.split('/?/');
		var variable = variable_url[0].split('=')[1];
		//alert('desde index - url :'+location+' - var : '+variable);
		
	myConn_include_est_imp_listado.connect("estadisticas/estadistica_impresiones_listado.php", "GET", "listado_inm="+listado_inm+"&variable="+variable, terminado_include_est_imp_listado);
	
	}
	
	//desde pagina dentro de nivel superior//
	if (ruta =='0'){
		//recojo valor variable de url//
		var variable_url = location.search.split('/?/');
		var variable = variable_url[0].split('=')[1];
		//alert('desde un directorio - url :'+location+' - var : '+variable);
		
	myConn_include_est_imp_listado.connect("../estadisticas/estadistica_impresiones_listado.php", "GET", "listado_inm="+listado_inm+"&variable="+variable, terminado_include_est_imp_listado);
	}
}



var myConn_include_est_vis_ficha= new XHConn();
var terminado_include_est_vis_ficha = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_vis_ficha(referencia,iddelegacion){
	//alert(referencia);	
	//alert(iddelegacion);
	referencia = referencia;
	var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_include_est_vis_ficha.connect("../estadisticas/estadistica_visitas_ficha.php", "GET", "referencia="+referencia+"&iddelegacion="+iddelegacion+"&variable="+variable, terminado_include_est_vis_ficha);
}


var myConn_est_vis_captacion_vender= new XHConn();
var terminado_est_vis_captacion_vender = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_vis_captacion_vender(pas){
	//alert(pas);
	var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_est_vis_captacion_vender.connect("estadisticas/estadistica_visitas_captacion_vender.php", "GET","variable="+variable, terminado_est_vis_captacion_vender);
}


var myConn_est_vis_captacion_atencion= new XHConn();
var terminado_est_vis_captacion_atencion = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_vis_captacion_atencion(pas){
	//alert(pas);
		var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_est_vis_captacion_atencion.connect("estadisticas/estadistica_visitas_captacion_atencion.php", "GET","variable="+variable, terminado_est_vis_captacion_atencion);
}

var myConn_est_con_captacion_atencion= new XHConn();
var terminado_est_con_captacion_atencion = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_con_captacion_atencion(pas){
	//alert(pas);
		var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_est_con_captacion_atencion.connect("estadisticas/estadistica_contacto_captacion_atencion.php", "GET","variable="+variable, terminado_est_con_captacion_atencion);
}

var myConn_est_con_captacion_vender= new XHConn();
var terminado_est_con_captacion_vender = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_con_captacion_vender(pas){
	//alert(pas);
		var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_est_con_captacion_vender.connect("estadisticas/estadistica_contacto_captacion_vender.php", "GET","variable="+variable, terminado_est_con_captacion_vender);
}

var myConn_est_con_ficha= new XHConn();
var terminado_est_con_ficha = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_con_ficha(referencia){
	//alert(pas);
		var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_est_con_ficha.connect("../estadisticas/estadistica_contacto_ficha.php", "GET","referencia="+referencia+"&variable="+variable, terminado_est_con_ficha);
}
var myConn_est_con_alerta= new XHConn();
var terminado_est_con_alerta = function (oXML) { document.getElementById('oculto').innerHTML = oXML.responseText; };
function include_est_con_alerta(modo){
	//alert(pas);
		var variable_url = location.search.split('/?/');
	var variable = variable_url[0].split('=')[1];
	
	myConn_est_con_alerta.connect("../estadisticas/estadistica_contacto_alerta.php", "GET","modo="+modo+"&variable="+variable, terminado_est_con_alerta);
}


