var TRIM_LEFT  = 0x0001;

var TRIM_RIGHT = 0x0002;

var TRIM_BOTH  = TRIM_LEFT | TRIM_RIGHT;
var cuenta123=0;


function validarRegistroempresa() {

	var Control;

	var Dato;

	var  Control2;

	var sw=0;

	Control=document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre");

		Control.focus();

		sw=1;

		return;

	}

	Control=document.confirmacion.tblnif;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el C.I.F / N.I.T de la empresa");

		Control.focus();

		sw=1;

		return;

	}

	Control=document.confirmacion.tblcorreo;

	Dato = strTrim(Control.value,TRIM_BOTH);

/*	if (Dato.length == 0) {

		alert("Debe ingresar una dirección de correo válida");

		Control.focus();

		sw=1;

		return;

	}

	if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

		Control.focus();

		sw=1;

		return;   

	}

	*/

	Control2=document.confirmacion.confCorreo;

/*	if (Control.value!=Control2.value) {

		alert("No coincide el correo electronico, vuelva a ingresar la información");

		Control2.focus();

		sw=1;

		return;

	}

*/

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el teléfono");

		Control.focus();

		sw=1;

		return;

	}



	Control=document.confirmacion.tblxxx;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre de usuario");

		Control.focus();

		sw=1;

		return;

	}

	Control=document.confirmacion.tblyyy;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una contraseña");

		Control.focus();

		sw=1;

		return;

	}

	

	Control2=document.confirmacion.confContrasena;

	if (Control.value!=Control2.value) {

		alert("No coincide la contraseña");

		Control2.focus();

		sw=1;

		return;

	}

	

	Control=document.confirmacion.tblcontacto;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre completo de la persona de contacto");

		Control.focus();

		sw=1;

		return;

	}



	Control=document.confirmacion.tblmovil;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el movil de la persona de contacto");

		Control.focus();

		sw=1;

		return;

	}

	if(sw==1) return false; else return true;

}





function validarFormi(form, capa1, capa2) {

	if (confirmacion.tbltipooferta.options[confirmacion.tbltipooferta.selectedIndex].value == "") {alert("Debe seleccionar el tipo de oferta que desea registrar."); confirmacion.tbltipooferta.focus(); return; }

	

	if (confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value == "") {alert("Debe seleccionar el tipo de inmueble que desea registrar."); confirmacion.tbltipoinmueble.focus(); return; }

	

	if (confirmacion.tblarea.options[confirmacion.tblarea.selectedIndex].value == "") {alert("Debe seleccionar el Area del inmueble."); confirmacion.tblarea.focus(); return; }

	

	if (confirmacion.provincia.options[confirmacion.provincia.selectedIndex].value == "") {alert("Debe escoger la Provincia donde esta ubicado el inmueble."); confirmacion.provincia.focus(); return; }

	

	if (confirmacion.tblpoblacion.options[confirmacion.tblpoblacion.selectedIndex].value == "") {alert("Debe escoger la Localidad donde esta ubicado el inmueble."); confirmacion.tblpoblacion.focus(); return; }

	

	if (strTrim(confirmacion.tblprecio.value, TRIM_BOTH) == "") {alert("Debe ingresar el precio del inmueble"); confirmacion.tblprecio.value = ""; confirmacion.tblprecio.focus(); return; }



	if ((confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value == "Local") || (confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value == "Nave"))

	{

		if (strTrim(confirmacion.tblescaparates.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de escaparates del inmueble"); confirmacion.tblescaparates.value = ""; confirmacion.tblescaparates.focus(); return; }

		

		if (confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value == "Nave"){

			if (strTrim(confirmacion.tbldespachos.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de despachos del inmueble"); confirmacion.tbldespachos.value = ""; confirmacion.tbldespachos.focus(); return; }

		}

	}else{

		if (confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value != "Oficina" && confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value != "Garaje"){

			if (strTrim(confirmacion.tbldormitorios.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de dormitorios del inmueble"); confirmacion.tbldormitorios.value = ""; confirmacion.tbldormitorios.focus(); return; }

			

			if (strTrim(confirmacion.tblbanos.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de baños del inmueble"); confirmacion.tblbanos.value = ""; confirmacion.tblbanos.focus(); return; }

		}else{

			if(confirmacion.tbltipoinmueble.options[confirmacion.tbltipoinmueble.selectedIndex].value == "Oficina")

			if (strTrim(confirmacion.tbldespachos.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de despachos del inmueble"); confirmacion.tbldespachos.value = ""; confirmacion.tbldespachos.focus(); return; }

		}

	}



	if (confirmacion.tbltipooferta.options[confirmacion.tbltipooferta.selectedIndex].value == "Venta a Estrenar"){

		confirmacion.tblestado.value = "I";		

	}	

	confirmacion.submit();

}





function validarForme() {

	if (confirmacion.tblarea.options[confirmacion.tblarea.selectedIndex].value == "") {alert("Debe seleccionar el Area del inmueble."); confirmacion.tblarea.focus(); return; }

	

	if (strTrim(confirmacion.tblprecio.value, TRIM_BOTH) == "") {alert("Debe ingresar el precio del inmueble"); confirmacion.tblprecio.value = ""; confirmacion.tblprecio.focus(); return; }



	if ((strTrim(confirmacion.tbltipoinmueble.value, TRIM_BOTH) == "Local") || (strTrim(confirmacion.tbltipoinmueble.value, TRIM_BOTH) == "Nave"))

	{

		if (strTrim(confirmacion.tblescaparates.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de escaparates del inmueble"); confirmacion.tblescaparates.value = ""; confirmacion.tblescaparates.focus(); return; }

		

		if (strTrim(confirmacion.tbltipoinmueble.value, TRIM_BOTH) == "Nave"){

			if (strTrim(confirmacion.tbldespachos.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de despachos del inmueble"); confirmacion.tbldespachos.value = ""; confirmacion.tbldespachos.focus(); return; }

		}

	}else{

		if (strTrim(confirmacion.tbltipoinmueble.value, TRIM_BOTH) != "Oficina" && strTrim(confirmacion.tbltipoinmueble.value, TRIM_BOTH) != "Garaje"){

			if (strTrim(confirmacion.tbldormitorios.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de dormitorios del inmueble"); confirmacion.tbldormitorios.value = ""; confirmacion.tbldormitorios.focus(); return; }

			

			if (strTrim(confirmacion.tblbanos.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de baños del inmueble"); confirmacion.tblbanos.value = ""; confirmacion.tblbanos.focus(); return; }

		}else{

			if(strTrim(confirmacion.tbltipoinmueble.value, TRIM_BOTH) == "Oficina")

			if (strTrim(confirmacion.tbldespachos.value, TRIM_BOTH) == "") {alert("Debe ingresar el numero de despachos del inmueble"); confirmacion.tbldespachos.value = ""; confirmacion.tbldespachos.focus(); return; }

		}

	}



	confirmacion.submit();

}





function ValidarSolicitud(){

	if (strTrim(confirmacion.correo.value, TRIM_BOTH) == "") {alert("Ingrese el email"); confirmacion.correo.value = ""; confirmacion.correo.focus(); return false; }

	Control=document.confirmacion.correo;

	Dato = strTrim(Control.value, TRIM_BOTH);

/*	if (!ValidarEmail(Control,"Dirección de correo mal ingresada.")) {	

		Control.focus();

		return false;   

	}*/

//	confirmacion.idi.value = ;

	confirmacion.submit();

}





function ValidarEmail(Campo) {

	var perfect = true;

	with (Campo) {

		// Validar que los caracteres que contiene la cuenta de correo

		// esten dentro de los caracteres de la siguiente lista

		var car_validos = "0123456789abcdefghijlkmnopqrstuvwxyzABCDEFGHIJKMNOPQRSTUVWXYZ@.-_"

		var car_otros = "@.-_";

		for (var i=0; i < value.length; i++) {

			var ch = value.substring(i, i+1);

			if (car_validos.indexOf(ch) == -1) perfect = false;

		}

		apos = value.indexOf("@");

		lastpos = value.length-1;

		// Validar primer y ultimo caracter

		var car1 = value.substring(0, 1);

		var car2 = value.substring(lastpos, lastpos+1);

		if ((car_otros.indexOf(car1) != -1) || (car_otros.indexOf(car2) != -1)) perfect = false;

		// Validar anterior y siguiente caracter despues de "@"

		car1 = value.substring(apos-1, apos);

		car2= value.substring(apos+1, apos+2);

		if ((car_otros.indexOf(car1) != -1) || (car_otros.indexOf(car2) != -1)) perfect = false;

		// Buscar si existe otro simbolo "@" en el campo

		var subcadena = value.substring(apos + 1, 100);

		a2pos = subcadena.indexOf("@");

		spacepos = value.indexOf(" ");

		dotpos = value.lastIndexOf(".");

		posh=subcadena.indexOf(".");

		//if (apos < 1 || a2pos != -1 || dotpos - apos < 2 || lastpos - dotpos > 3 || lastpos - dotpos < 2 || spacepos != -1) {

		if (apos < 1 || a2pos != -1 || lastpos - dotpos < 2 || spacepos != -1||posh==-1) perfect = false;

	}

	/*if (!perfect)  {

		alert('\nEl valor del correo electronico es inválido.\n\nPor favor corrija la información.');

		Campo.focus();return false;

	}*/

	return true;

}





function isNumeric(str) {

	for (var i=0; i < str.length; i++)  {

		var ch = str.substring(i, i+1);

		if (ch < "0" || ch > "9")  {

			return false;

			}

		}

		return true;

	}

	

	

function strTrim( varText, side ) {

	var i = 0;

	var j = varText.length - 1;

	if ( side & TRIM_LEFT ) {

	    for( i = 0; i < varText.length; i++ ) {

		 if ( varText.substring( i, i+1 ) != " " && varText.substring( i, i+1 ) != "\t")

		   {

		     break;

		   }

		}

	}



      if ( side & TRIM_RIGHT )

	 {

	   for( j = varText.length - 1; j >= 0; j-- )

	     {

		if ( varText.substring( j, j+1 ) != " " && varText.substring( j, j+1 ) != "\t")

		  {

		   break;

		  }

	     }

	  }



      if ( i <= j )

	 return( varText.substring( i, (j+1) ) );

      else

	 return("");

}





/*

funciones para el manejo de el panel de control

*/

function VerificarCliente() {

   var Control;

   var Dato;

   Control = document.FrmClientes.clie_nombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar un nombre");

		Control.focus();

		return false;

		}



   Control = document.FrmClientes.clie_apellido;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar los apellidos");

		Control.focus();

		return false;

		}

		/*

    Control = document.FrmClientes.clie_direccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la direccion del cliente");

		Control.focus();

		return false;

		}

*/

    Control = document.FrmClientes.clie_telefohogar;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el telefono del hogar del cliente");

		Control.focus();

		return false;

		}



    Control = document.FrmClientes.clie_ciudad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la ciudad del cliente");

		Control.focus();

		return false;

		}



    Control = document.FrmClientes.clie_nrodoc;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la identificacion del cliente");

		Control.focus();

		return false;

		}



    Control = document.FrmClientes.clie_estado;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el estado o el departamento del cliente");

		Control.focus();

		return false;

		}

    Control = document.FrmClientes.clie_mail;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el mail del usuario ");

		Control.focus();

		return false;

		}



 /*  if (!ValidarEmail(Control,"Direccion de correo mal ingresada")) {	Control.focus();

		return false;   

   }*/

document.FrmClientes.submit();

return true;

}





//Funcion para valida que ingresen usuario y clave de acceso

function validarLogin() {

   var Control;

   var Dato;

   Control = document.frmLogin.txtUsuario;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar un nombre de usuario");

		Control.focus();

		return false;

		}



   Control = document.frmLogin.txtContasena;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la contraseña del usuario");

		Control.focus();

		return false;

		}



document.frmLogin.submit();

return true;

}





function validarEmpresa() {

   var Control;

   var Dato;

   Control = document.confirmacion.tblnit_empresa;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el NIT de su Empresa");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblnombre_empresa;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Nombre de su Empresa");

		Control.focus();

		return false;

		}

		

	/*Control = document.confirmacion.tbltelefono_empresa;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Telefono de su Empresa");

		Control.focus();

		return false;

		}*/
		
	/*	Control = document.confirmacion.tblmovil;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Telefono movil");

		Control.focus();

		return false;

		}
		*/
		
		Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la provincia");

		Control.focus();

		return false;

		}	

		
	Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la poblacion");

		Control.focus();

		return false;

		}	
	
	Control = document.confirmacion.tbltipo_actividad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el tipo de actividad");

		Control.focus();

		return false;

		}	
		
	
	Control = document.confirmacion.tbldireccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la direccion");

		Control.focus();

		return false;

		}	
	
	Control = document.confirmacion.tblcomentario;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el comentario");

		Control.focus();

		return false;

		}	
Control = document.confirmacion.tblid_actividad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la actividad");

		Control.focus();

		return false;

		}	

		
		

		

	Control=document.confirmacion.tblcorreo_empresa;

		Dato = strTrim(Control.value,TRIM_BOTH);
		
	
if (document.confirmacion.aux2.value== "") {alert("No a hubicado la posicion de su empresa para orientar a sus clientes");

document.confirmacion.tblpagina_web.focus();document.confirmacion.aux2.value="ya";getUrlTienda('http://www.rural5.com/Empresas/conectarMapaEmpresa.php?gp='+document.confirmacion.provincia.value+'');return false;  }



/*		if (Dato.length == 0) {

			alert("Debe ingresar una dirección de correo válida");

			Control.focus();

			return false;

		}

		if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

			Control.focus();

			return false;   

		}		

*/

return true;

}





function validarTienda() {

   var Control;

   var Dato;

   Control = document.confirmacion.tblnit;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el NIT de su Tienda");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Nombre de su Tienda");

		Control.focus();

		return false;

		}

		



		

	//Control=document.confirmacion.tblcorreo;

	//	Dato = strTrim(Control.value,TRIM_BOTH);

	/*	if (Dato.length == 0) {

			alert("Debe ingresar una dirección de correo válida");

			Control.focus();

			return false;

		}

		if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

			Control.focus();

			return false;   

		}		

		*/

	Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la provincia");

		Control.focus();

		return false;

		}
	
Control = document.confirmacion.tbltel;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el telefono");

		Control.focus();

		return false;

		}

		

		

	Control = document.confirmacion.tbltipo;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Tipo de Tienda");

		Control.focus();

		return false;

		}



Control = document.confirmacion.tbldireccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la direccion");

		Control.focus();

		return false;

		}


Control = document.confirmacion.tblcodigo_postal;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el codigo postal");

		Control.focus();

		return false;

		}
		
		Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la poblacion");

		Control.focus();

		return false;

		}
		
		 if (document.confirmacion.tblcomentario.value == "")
{ alert("Por favor ingrese comentario"); confirmacion.tblcomentario.focus(); return false; }

if (document.confirmacion.aux2.value== "") {alert("No a hubicado la posision de su tienda para orientar a sus clientes");

document.confirmacion.tblpagina_web.focus();document.confirmacion.aux2.value="ya";getUrlTienda('http://www.rural5.com/tienda/conectarMapaTienda.php?gp='+document.confirmacion.provincia.value+''); return false; }



return true;

}





function validarEspectaculos() {

   var Control;

   var Dato;



   Control = document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Nombre");

		Control.focus();

		return false;

		}

		

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Telefono de su Empresa");

		Control.focus();

		return false;

		}

		

	Control=document.confirmacion.tblcorreo;

		Dato = strTrim(Control.value,TRIM_BOTH);

/*		if (Dato.length == 0) {

			alert("Debe ingresar una dirección de correo válida");

			Control.focus();

			return false;

		}

		if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

			Control.focus();

			return false;   

		}		

	*/	

	Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la Poblacion");

		Control.focus();

		return false;

		}

		

		

	Control = document.confirmacion.tbltipo;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Tipo de Empresa");

		Control.focus();

		return false;

		}







return true;

}





function validarRestaurante() {

   var Control;

   var Dato;

   Control = document.confirmacion.tblnit_restaurante;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el NIT de su Restaurante");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblnombre_restaurante;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Nombre de su Restaurante");

		Control.focus();

		return false;

		}

		

	Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una Provincia");

		Control.focus();

		return false;

		}



	Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una Poblacion");

		Control.focus();

		return false;

		}





	Control = document.confirmacion.tbltelefono_restaurante;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Telefono de su Restaurante");

		Control.focus();

		return false;

		}

		

	Control=document.confirmacion.tblcorreo_restaurante;

		Dato = strTrim(Control.value,TRIM_BOTH);

	//	if (Dato.length == 0) {

	//	alert("Debe ingresar una dirección de correo válida");

	//		Control.focus();

	//		return false;

	//	}

	//	if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

	//		Control.focus();

	//		return false;   

	//	}		

		

	Control = document.confirmacion.tbldireccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Ingrese la Direccion del Restaurante");

		Control.focus();

		return false;

		}		

		

	Control = document.confirmacion.tblcodigo_postal;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Codigo Postal");

		Control.focus();

		return false;

		}



	Control = document.confirmacion.tbltipo_comida;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Por Favor Seleccione el Tipo de comida que ofrece");

		Control.focus();

		return false;

		}

		

	Control = document.confirmacion.tblapertura;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Ingrese el horario de Apertura");

		Control.focus();

		return false;

		}		

		

	Control = document.confirmacion.tblcierre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Ingrese el horario de Cierre");

		Control.focus();

		return false;

		}	
		if (document.confirmacion.aux2.value== "") {alert("No a hubicado la posision de su restaurante/bar para orientar a sus clientes");

document.confirmacion.tblpagina_web.focus();document.confirmacion.aux2.value="ya";getUrlTienda('http://www.rural5.com/restaurantes/conectarMapaRestaurante.php?gp='+document.confirmacion.provincia.value+''); return false;  }	



return true;

}





function validarSalud_belleza() {

   var Control;

   var Dato;

   



   Control = document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Nombre");

		Control.focus();

		return false;

		}

		

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Telefono");

		Control.focus();

		return false;

		}

		

	Control=document.confirmacion.tblcorreo;

		Dato = strTrim(Control.value,TRIM_BOTH);

//		if (Dato.length == 0) {

//			alert("Debe ingresar una dirección de correo válida");

//			Control.focus();

//			return false;

//		}

//		if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

//			Control.focus();

//			return false;   

//		}			



		

	Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la Poblacion");

		Control.focus();

		return false;

		}

		

		

	Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la Poblacion");

		Control.focus();

		return false;

		}

		

		

	Control = document.confirmacion.tbltipo_salud_belleza;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Tipo de Actividad");

		Control.focus();

		return false;

		}

	







return true;

}





function validarBares() {

   var Control;

   var Dato;

   Control = document.confirmacion.tblnit;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el NIT de su Bar");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Nombre de su Bar");

		Control.focus();

		return false;

		}

		

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el Telefono de su Bar");

		Control.focus();

		return false;

		}

		

	Control=document.confirmacion.tblcorreo;

		Dato = strTrim(Control.value,TRIM_BOTH);

//		if (Dato.length == 0) {

//			alert("Debe ingresar una dirección de correo válida");

//			Control.focus();

//			return false;

//		}

//		if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

//			Control.focus();

//			return false;   

//		}		

		

	Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la Poblacion");

		Control.focus();

		return false;

		}



return true;

}





function ValidarPlaya () {

   var Control;

   var Dato;

   var Control1;

   var Dato1;

   Control = document.confirmacion.tblnombre;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la playa");

		Control.focus();

		return false;

	}

   Control = document.confirmacion.tbltexto;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el texto detallado de la playa");

		Control.focus();

		return false;

	}

Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la provincia");

		//Control.focus();

		return false;

	}
    
Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la poblacion");

		//Control.focus();

		return false;

	}



   
 Control = document.confirmacion.tblarena;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar las características de arena (color, textura, etc.)");

		Control.focus();

		return false;

	}

 Control = document.confirmacion.tblentorno;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar caracteristicas delentorno (color, oleaje, etc)");

		Control.focus();

		return false;

	}

 Control = document.confirmacion.tblnudista;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar si la playa es nudista o no");

		Control.focus();

		return false;

	}

 Control = document.confirmacion.tblbandera;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar si la bandera es azul o no");

		Control.focus();

		return false;

	}		
	Control = document.confirmacion.tbldimension;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la dimension");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblalquiler_nautico;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el alquiler nautico");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblhosteleria;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la hosteleria");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblaccesorios;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar accesorios");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblactividades;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar actividad");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblseguridad;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar seguridad");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tbltipo_playa;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar tipo de playa");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tbltransporte;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar transporte");

		Control.focus();

		return false;

	}




return true;

}



function ValidarPlaya2 () {

   var Control;

   var Dato;

   var Control1;

   var Dato1;

   Control = document.confirmacion.tblnombre;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la playa");

		Control.focus();

		return false;

	}

   Control = document.confirmacion.tbltexto;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el texto detallado de la playa");

		Control.focus();

		return false;

	}

    



   
 Control = document.confirmacion.tblarena;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar las características de arena");

		Control.focus();

		return false;

	}

 /*Control = document.confirmacion.tblmar;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar caracteristicas del mar (color, oleaje, etc)");

		Control.focus();

		return false;

	}*/

 Control = document.confirmacion.tblnudista;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar si la playa es nudista o no");

		Control.focus();

		return false;

	}

 Control = document.confirmacion.tblbandera;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar si la bandera es azul o no");

		Control.focus();

		return false;

	}		
	Control = document.confirmacion.tbldimension;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la dimension");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblalquiler_nautico;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el alquiler nautico");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblhosteleria;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la hosteleria");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblaccesorios;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar accesorios");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblactividades;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar actividad");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tblseguridad;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar seguridad");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tbltipo_playa;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar tipo de playa");

		Control.focus();

		return false;

	}

Control = document.confirmacion.tbltransporte;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar transporte");

		Control.focus();

		return false;

	}




return true;

}


function EjecutarScript(Script) {

  window.location = Script;

}





function VentanaConfirmacion(Mensaje) {

  if (confirm(Mensaje)==false)

	 return false;

  return true;

}





function EliminarVentana(Mensaje,Script) {

  if (confirm(Mensaje))

	  if (confirm("Esta seguro que desea eliminar el registro"))

	     EjecutarScript(Script);

}





function ValidarContenido() {

   var Control;

   var Dato;

   Control = document.frmContenidos.tblcont_nombre;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar un nombre al contenido que deben ingresar");

		Control.focus();

		return false;

	}

   Control = document.frmContenidos.tblcont_descripcion;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar una descripcion al contenido que desea grabar");

		Control.focus();

		return false;

	}

   Control = document.frmContenidos.tblcont_texto;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0)

   {

		alert("Debe ingresar el contenido a publicar");

		Control.focus();

		return false;

	}

	document.frmContenidos.submit();

	return true;

}





function ValidarUsuarios() {

   var Control;

   var Dato;

   var Control1;

   var Dato1;

   Control = document.form1.nombre;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar el nombre del usuario");

		Control.focus();

		return false;

		}

   Control = document.form1.usuario;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar un login");

		Control.focus();

		return false;

	}

   Control = document.form1.tipo;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar el tipo de usuario");

		Control.focus();

		return false;

	}

   Control = document.form1.contrasena;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar la clave de acceso");

		Control.focus();

		return false;

	}

   Control1 = document.form1.confContrasena;

   Dato1 = strTrim(Control1.value,TRIM_BOTH);

   if (Dato1.length == 0) {

		alert("Debe ingresar la clave de confirmacion ");

		Control1.focus();

		return false;

		}



   if (Control1.value!=Control.value)

   {

	   alert("Las claves ingresadas no entran");

	   Control.focus();

	   return false;

   }

document.form1.submit();

return true;

}





//validacion noticias

function ValidarNoticias() {

   var Control;

   var Dato;

   var Control1;

   var Dato1;



   Control = document.frmNoticias.tblnoti_nombre;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la noticia");

		Control.focus();

		return false;

		}



   Control = document.frmNoticias.tblnoti_titulo;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar el titulo de la noticia");

		Control.focus();

		return false;

		}

   

   Control = document.frmNoticias.tblnoti_descripcion;

   Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar la descripcion de la noticia");

		Control.focus();

		return false;

		}

	

  Control = document.frmNoticias.tblnoti_imagen;

  Dato = strTrim(Control.value,TRIM_BOTH);

  Control1 = document.frmNoticias.imagen;

  Dato1 = strTrim(Control1.value,TRIM_BOTH);

   

	if (Dato.length == 0 && Dato1.length==0) {

		if (!confirm("Desea guardar la noticia sin imagen asociada")) {

		   Control.focus();

		   return false;

		}

	}

	document.frmNoticias.submit();

	return true;



}





function ValidarAgencias() { 

	var Control;

	var Dato;

	Control=document.frmAgencias.tblagen_nombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la agencia");

		Control.focus();

		return false;

	}



	Control=document.frmAgencias.tblagen_ciudad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la ciudad donde esta la agencia");

		Control.focus();

		return false;

	}

	/*

		Control=document.frmAgencias.tblagen_logo;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Debe ingresar el nombre del logo de la agencia");

			Control.focus();

			return false;

		}

	

		Control=document.frmAgencias.tblagen_bandera;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Debe ingresar el nombre de la imagen de la bandera del pais donde esta la agencia");

			Control.focus();

			return false;

		}

	*/

	Control=document.frmAgencias.tblagen_telefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el telefono de la agencia");

		Control.focus();

		return false;

	}



	Control=document.frmAgencias.tblagen_direccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la direccion de la agencia");

		Control.focus();

		return false;

	}



	Control=document.frmAgencias.tblagen_contacto;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el contacto de la agencia");

		Control.focus();

		return false;

	}



	Control=document.frmAgencias.tblagen_mailcontacto;

	Dato = strTrim(Control.value,TRIM_BOTH);

/*	if (Dato.length == 0) {

		alert("Debe ingresar el mail del contacto de la agencia");

		Control.focus();

		return false;

	}*/

	document.frmAgencias.submit();

	return true;



}





function ValidarInfoAdicional() {

 var Control;

   var Dato;

 /*Control=document.frmInfoAdiciona.tblinfo_adicional;

Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar la informacion adicional");

		Control.focus();

		return false;

		}*/

document.frmInfoAdiciona.submit();

return true;

}





function ValidarArchivos() {

   var Control;

   var Dato;

   var Control1;

   var Dato1;



Control=document.frmArchivos.tblarch_nombre;

Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar el nombre para identificar el archivo");

		Control.focus();

		return false;

		}



Control=document.frmArchivos.tblarch_descri;

Dato = strTrim(Control.value,TRIM_BOTH);

   if (Dato.length == 0) {

		alert("Debe ingresar la descripcion del archivo");

		Control.focus();

		return false;

		}



Control=document.frmArchivos.tblarch_archivo;

Dato = strTrim(Control.value,TRIM_BOTH);

Control1=document.frmArchivos.Archivo;

Dato1 = strTrim(Control1.value,TRIM_BOTH);



   if (Dato.length == 0 &&Dato1.length==0) {

		alert("Debe seleccionar elarchivo a subir al servidor ");

		Control.focus();

		return false;

		}

document.frmArchivos.submit();

return true;



}





function ValidarMenus() {

   var Control;

   var Dato;

Control=document.frmMenu.tblmenu_nombre;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar el nombre al menu");

	Control.focus();

	return false;

	}

Control=document.frmMenu.tblmenu_descripcion;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar la descripcion de ese menu");

	Control.focus();

	return false;

	}



Control=document.frmMenu.tblmenu_padre;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe seleccionar el menu en el cual se agrupa esa nueva opcion");

	Control.focus();

	return false;

	}



Control=document.frmMenu.tblmenu_script;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe seleccionar el script a ejecutar para ese menu");

	Control.focus();

	return false;

	}



//Control=document.frmMenu.tblmenu_link;

Control=document.frmMenu.tblmenu_contenido;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe seleccionar el contenido a mostrar en esa opcion de menu");

	Control.focus();

	return false;

	}



//Control=document.frmMenu.tbl menu_ejecuta;

//Control=document.frmMenu.tblmenu_forma;

//Control=document.frmMenu.tblmenu_alcance;

Control=document.frmMenu.tblmenu_imagen;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	if (confirm("Desea grabar la informacion sin imagen de apoyo")) {

	     document.frmMenu.submit();

         return true;

	    }

//	alert("Debe escoger una imagen de apoyo para ese menu ingresar el nombre al menu");

	Control.focus();

	return false;

	}

document.frmMenu.submit();

return true;

}





function ValidarFotos() {

  var Control;

  var Dato;

  var Control1;

  var Dato1;



Control=document.frmFotos.tblfoto_nombre ;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar el nombre al grupo de fotografias");

	Control.focus();

	return false;

	}



Control=document.frmFotos.tblfoto_descripcion;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar la descripción de las fotografias");

	Control.focus();

	return false;

	}



Control=document.frmFotos.tblfoto_path1;

Dato = strTrim(Control.value,TRIM_BOTH);

Control1=document.frmFotos.foto_path1;

Dato1 = strTrim(Control1.value,TRIM_BOTH);



if (Dato.length == 0 && Dato1.length==0) {

	alert("Debe ingresar al menos una fotografia");

	Control.focus();

	return false;

	}



document.frmFotos.submit();

return true;

}





function validarAgendas() {

var Control;

var Dato;



Control=document.frmAgenda.tblagen_nombre;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar un nombre  a la agencia");

	Control.focus();

	return false;

	}





Control=document.frmAgenda.tblagen_descripcion;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar la descripcion de la agenda");

	Control.focus();

	return false;

	}



Control=document.frmAgenda.tblagen_ciudad ;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar el nombre de una ciudad ");

	Control.focus();

	return false;

	}



Control=document.frmAgenda.tblagen_lugar;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar el lugar de la agenda");

	Control.focus();

	return false;

	}



Control=document.frmAgenda.tblagen_fecreunion;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar la fecha de la reunion");

	Control.focus();

	return false;

	}

document.frmAgenda.submit();

return true;



}





function validarProveedores() {

var Control;

var Dato;

var Control1;

var Dato1;

Control=document.FrmProveedores.tblprov_nombre;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar el nombre del proveedor");

	Control.focus();

	return false;

	}



Control=document.FrmProveedores.tblprov_descripcion;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe ingresar un descripcion del proveedor");

	Control.focus();

	return false;

	}

/*Control=document.FrmProveedores.tblpara_pais4;

Control=document.FrmProveedores.tblprov_ciudad;

Control=document.FrmProveedores.tblprov_telefono;

Control=document.FrmProveedores.tblprov_contacto;

Control=document.FrmProveedores.tblprov_mail;

Control=document.FrmProveedores.tblprov_imagen;

*/



/*

Control=document.FrmProveedores.tblcont_cont;

Dato = strTrim(Control.value,TRIM_BOTH);

if (Dato.length == 0) {

	alert("Debe Seleccionar un contenido asociado");

	Control.focus();

	return false;

	}*/



Control=document.FrmProveedores.tblprov_imagen;

Dato = strTrim(Control.value,TRIM_BOTH);

Control1=document.FrmProveedores.bkprov_imagen;

Dato1 = strTrim(Control.value,TRIM_BOTH);



if (Dato.length ==0 && Dato1.length==0) {

	alert("Debe Seleccionar ingresar una imagen a asociar");

	Control.focus();

	return false;

	}



document.FrmProveedores.submit();

return true;



}





function ValidarEmails() {

	var Control;

    var Dato;

    var Control1;

    var Dato1;

	Control=document.form1.email;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length != 0) {

			if (!ValidarEmail(Control,"Direccion de correo mal ingresada")) {	Control.focus();

				return false;   

		   } 

		}

	  

	//document.form1.submit();

	return true;

}





function validarSeccionH() {

	var Control;

	var Dato;



	Control=document.frmSeccionH.tblsech_nombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la sección");

		Control.focus();

		return false;

	}

	

	Control=document.frmSeccionH.tblsech_desc;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la descripción de la sección");

		Control.focus();

		return false;

	}



	Control=document.frmSeccionH.tblsech_orden;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el número de orden de la sección");

		Control.focus();

		return false;

	}



	document.frmSeccionH.submit();

	return true;

}





function validarEncuesta() {

	var Control;

	var Dato;

	

	Control=document.frmEncuestas.tblencu_titulo;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar un título para la encuesta");

		Control.focus();

		return false;

	}



	Control=document.frmEncuestas.tblencu_pregunta;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una pregunta para la encuesta");

		Control.focus();

		return false;

	}



	Control=document.frmEncuestas.tblencu_resp1;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una posible respuesta para la encuesta");

		Control.focus();

		return false;

	}



	Control=document.frmEncuestas.tblencu_resp2;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una segunda opción de respuesta para la encuesta");

		Control.focus();

		return false;

	}



	document.frmEncuestas.submit();

	return true;

}





function validarImagen() {

	Control=document.frmImagen.tblimag_nombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la imagen");

		Control.focus();

		return false;

	}



	Control=document.frmImagen.tblimag_descr;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la descripción de la imágen");

		Control.focus();

		return false;

	}	



	Control = document.frmImagen.tblimag_imagen;

	Dato = strTrim(Control.value,TRIM_BOTH);

	Control1 = document.frmImagen.imagen;

	Dato1 = strTrim(Control1.value,TRIM_BOTH);

	

	if (Dato.length == 0 && Dato1.length==0) {

		alert("Debe ingresar una fotografía como imágen de la fecha");

		Control.focus();

		return false;

	}



	document.frmImagen.submit();

	return true;

}





function setPointer(theRow, thePointerColor) {

    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {

        return false;

    }

    if (typeof(document.getElementsByTagName) != 'undefined') {

        var theCells = theRow.getElementsByTagName('td');

    }

    else if (typeof(theRow.cells) != 'undefined') {

        var theCells = theRow.cells;

    }

    else {

        return false;

    }

    var rowCellsCnt  = theCells.length;

    for (var c = 0; c < rowCellsCnt; c++) {

        theCells[c].style.backgroundColor = thePointerColor;

    }

    return true;

} // end of the 'setPointer()' function





function CheckKeys() {

	if (( event.keyCode >= 97 && event.keyCode <= 122) || (event.keyCode >=65 && event.keyCode <=90)) {

		event.keyCode=0;

	}

}





function puntitos(donde,caracter) {

	var decimales = false;

		dec = new Number(0)

			

		if (dec != 0) {decimales = true}

	

	pat = /[\*,\+,\(,\),\?,\\,\$,\[,\],\^]/

	valor = donde.value

	largo = valor.length

	crtr = true

	if (isNaN(caracter) || pat.test(caracter) == true) {

		if (pat.test(caracter)==true)  {caracter = "\\" + caracter}

		carcter = new RegExp(caracter,"g")

		valor = valor.replace(carcter,"")

		donde.value = valor

		crtr = false

		}

	else {

		var nums = new Array()

		cont = 0

		for(m=0;m<largo;m++) {

			if (valor.charAt(m) == "." || valor.charAt(m) == " ") {continue;}

			else{

				nums[cont] = valor.charAt(m)

				cont++

				}

			

			}

		}

	if (decimales == true) {

		ctdd = eval(1 + dec);

		nmrs = 1

		}

	else {

		ctdd = 1; nmrs = 3

		}

	var cad1="",cad2="",cad3="",tres=0

	if (largo > nmrs && crtr == true) {

		for (k=nums.length-ctdd;k>=0;k--) {

			cad1 = nums[k]

			cad2 = cad1 + cad2

			tres++

			if ((tres%3) == 0) {

				if (k!=0) {

					cad2 = "." + cad2

					}

				}

			}

		 donde.value = cad2

		}

	donde.focus()

}	





//TERMINMMA IMPRESION

function nuevoAjax() {

  var xmlhttp=false;

  try {

   // Creación del objeto ajax para navegadores diferentes a Explorer 

   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

  } catch (e) {

   // o bien 

   try {

     // Creación del objet ajax para Explorer 

     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) {

     xmlhttp = false;

   } 

  } 

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {

   xmlhttp = new XMLHttpRequest();

  } 

  return xmlhttp;

} 





function ValidarCliente(form) {

  if (form1.tipoId.value == "")

  {alert("Ingrese el tipo de documento"); form1.tipoId.focus(); return; }

  if (form1.identificacion.value == "")

  {alert("Ingrese el número de identificación"); form1.identificacion.focus(); return; }

  

  if (form1.tipoId.value!='NIT') {

	  if (form1.nombre.value == "")

	  	{alert("Ingrese el nombre"); form1.nombre.focus(); return; }

  } else {

  	 if (form1.nombre.value == "")

	  	{alert("Ingrese la razón social"); form1.nombre.focus(); return; }

  }

  

  form.submit();

}





function ValidarUsuario(form) { 

	if (form.user.value == "") {alert("Ingrese el nombre de usuario"); form.user.focus(); return; }

	

	if (form.pass.value == "") {alert("Ingrese la contraseña"); form.pass.focus(); return; }

   

	form.submit();

}





function ValidarNuevaFoto(form) {

	var permitida;

	var extension;

	var mierror;

	if (strTrim(fotos.foto.value, TRIM_BOTH) == "") {alert("Escoja una foto a guardar"); fotos.foto.focus(); return; }

	if (strTrim(fotos.nombre.value, TRIM_BOTH) == "") {alert("Escriba una breve descripción para la foto"); fotos.nombre.focus(); return; }

	if (strTrim(fotos.seccion.value, TRIM_BOTH) == "") {alert("Escoja la sección del alojamiento"); fotos.seccion.focus(); return; }

	

	

	extensiones_permitidas = new Array(".gif", ".jpg", ".jpeg", ".pjpeg");

   mierror = "";

   if (!fotos.foto.value) {

      mierror = "No has seleccionado ningún archivo.";

   } else {

      extension = (fotos.foto.value.substring(fotos.foto.value.lastIndexOf("."))).toLowerCase();

     permitida = false;

      for (var i = 0; i < extensiones_permitidas.length; i++) {

         if (extensiones_permitidas[i] == extension) {

         permitida = true;

         break;

         } 

      } 

      if (!permitida) {

         mierror = "Comprueba la extensión de los archivos a subir. \nSólo se pueden subir archivos con extensiones: " + extensiones_permitidas.join();

         alert (mierror);

		 } else {

         fotos.submit();

       } 

   } 

}



function ValidarNuevaFotoAlo(form) {

	var permitida;

	var extension;

	var mierror;
	
  
	if (strTrim(document.fotos.foto.value, TRIM_BOTH) == "") {alert("Escoja una foto a guardar"); document.fotos.foto.focus(); return; }

	if (strTrim(document.fotos.nombre.value, TRIM_BOTH) == "") {alert("Escriba una breve descripción para la foto"); document.fotos.nombre.focus(); return; }

	if (strTrim(document.fotos.seccion.value, TRIM_BOTH) == "") {alert("Escoja la sección del alojamiento"); document.fotos.seccion.focus(); return; }

	

	

	extensiones_permitidas = new Array(".gif", ".jpg", ".jpeg", ".pjpeg");

   mierror = "";

   if (!document.fotos.foto.value) {

      mierror = "No has seleccionado ningún archivo.";

   } else {

      extension = (document.fotos.foto.value.substring(document.fotos.foto.value.lastIndexOf("."))).toLowerCase();

     permitida = false;

      for (var i = 0; i < extensiones_permitidas.length; i++) {

         if (extensiones_permitidas[i] == extension) {

         permitida = true;

         break;

         } 

      } 

      if (!permitida) {

         mierror = "Comprueba la extensión de los archivos a subir. \nSólo se pueden subir archivos con extensiones: " + extensiones_permitidas.join();

         alert (mierror);

		 } else {
			 
			 if (cuenta == 0)
				{
				cuenta++;
				document.fotos.submit();
				alert("Su foto esta siendo cargada");
				return true;
				}
				else
				{
				alert("El formulario ya está siendo enviado, por favor aguarde un instante.");
				return false;
				}

         

       } 

   } 

}





function validarSeguimiento(form) { 

	

	if (form.actividad.value == "") {alert("Ingrese la actividad"); form.actividad.focus(); return; }

	

	if (form.fecha.value == "") {alert("Ingrese la fecha"); form.fecha.focus(); return; }

	

	if (form.hora.value == "") {alert("Ingrese la hora"); form.hora.focus(); return; }

	

	if (form.final.value == "S") {

		if (form.respuesta.value == "") {alert("Ingrese la respuesta"); form.respuesta.focus(); return; }

	}

   

	form.submit();

}





function validar_Registrar_casa(form) { 

	/*if (confirmacion.tblnoche.value == "") {alert("Ingrese el precio noche casa"); confirmacion.tblnoche.focus(); return; }

	if (confirmacion.tblfin_sema.value == "") {alert("Ingrese el precio fin de semana casa"); confirmacion.tblfin_sema.focus(); return; }

	

	if (confirmacion.tblnochePer.value == "") {alert("Ingrese el precio noche o dia por persona"); confirmacion.tblnochePer.focus(); return; }

	if (confirmacion.tblfin_semaPer.value == "") {alert("Ingrese el precio fin de semana por persona"); confirmacion.tblfin_semaPer.focus(); return; }

	

	if (confirmacion.tblhora_24.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 24 horas"); confirmacion.tblhora_24.focus(); return; }

	if (confirmacion.tblhora_48.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 48 horas"); confirmacion.tblhora_48.focus(); return; }

	if (confirmacion.tblhora_72.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 72 horas"); confirmacion.tblhora_72.focus(); return; }

	

	if (confirmacion.tblpregunta_secreta.value == "") {alert("Ingrese la pregunta secreta para los visitantes que vayan a opinar sobre el alojamiento"); confirmacion.tblpregunta_secreta.focus(); return; }

	if (confirmacion.tblrespuesta_secreta.value == "") {alert("Ingrese la respuesta a la pregunta secreta"); confirmacion.tblrespuesta_secreta.focus(); return; }
*/
/*if (document.confirmacion.aux4.value== "") {
alert("indique la distribucion de su alojamiento");location.href = '#distribucion'; return;
}*/

if (document.confirmacion.tblruta.value == "")
{ alert("Por favor ingrese como llegar"); document.confirmacion.tblruta.focus(); return; }
if (document.confirmacion.tbllugares_inte.value == "")
{ alert("Por favor ingrese lugares de interes"); document.confirmacion.tbllugares_inte.focus(); return; }
if (document.confirmacion.tblactividad.value == "")
{ alert("ingrese las actividades que se ofrecen en el entorno."); document.confirmacion.tblactividad.focus(); return; }
if (document.confirmacion.tblcomentario_prop.value == "")
{ alert("ingrese texto (lo que dice el propietario)"); document.confirmacion.tblcomentario_prop.focus(); return; }
	

	            document.confirmacion.submit();
	 

	

	

}

function validar_Registrar_casaAdmin(form) { 

	/*if (confirmacion.tblnoche.value == "") {alert("Ingrese el precio noche casa"); confirmacion.tblnoche.focus(); return; }

	if (confirmacion.tblfin_sema.value == "") {alert("Ingrese el precio fin de semana casa"); confirmacion.tblfin_sema.focus(); return; }

	

	if (confirmacion.tblnochePer.value == "") {alert("Ingrese el precio noche o dia por persona"); confirmacion.tblnochePer.focus(); return; }

	if (confirmacion.tblfin_semaPer.value == "") {alert("Ingrese el precio fin de semana por persona"); confirmacion.tblfin_semaPer.focus(); return; }

	

	if (confirmacion.tblhora_24.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 24 horas"); confirmacion.tblhora_24.focus(); return; }

	if (confirmacion.tblhora_48.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 48 horas"); confirmacion.tblhora_48.focus(); return; }

	if (confirmacion.tblhora_72.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 72 horas"); confirmacion.tblhora_72.focus(); return; }

	

	if (confirmacion.tblpregunta_secreta.value == "") {alert("Ingrese la pregunta secreta para los visitantes que vayan a opinar sobre el alojamiento"); confirmacion.tblpregunta_secreta.focus(); return; }

	if (confirmacion.tblrespuesta_secreta.value == "") {alert("Ingrese la respuesta a la pregunta secreta"); confirmacion.tblrespuesta_secreta.focus(); return; }
*/
/*if (confirmacion.aux4.value== "") {
alert("indique la distribucion de su alojamiento");location.href = '#distribucion'; return;
}

if (confirmacion.tblruta.value == "")
{ alert("Por favor ingrese como llegar"); confirmacion.tblruta.focus(); return; }
if (confirmacion.tbllugares_inte.value == "")
{ alert("Por favor ingrese lugares de interes"); confirmacion.tbllugares_inte.focus(); return; }
if (confirmacion.tblactividad.value == "")
{ alert("ingrese las actividades que se ofrecen en el entorno."); confirmacion.tblactividad.focus(); return; }
if (confirmacion.tblcomentario_prop.value == "")
{ alert("ingrese texto (lo que dice el propietario)"); confirmacion.tblcomentario_prop.focus(); return; }*/
	

	            confirmacion.submit();
	 

	

	

}

function validar_Registrar_casa_editar(form) { 

	/*if (confirmacion.tblnoche.value == "") {alert("Ingrese el precio noche casa"); confirmacion.tblnoche.focus(); return; }

	if (confirmacion.tblfin_sema.value == "") {alert("Ingrese el precio fin de semana casa"); confirmacion.tblfin_sema.focus(); return; }

	

	if (confirmacion.tblnochePer.value == "") {alert("Ingrese el precio noche o dia por persona"); confirmacion.tblnochePer.focus(); return; }

	if (confirmacion.tblfin_semaPer.value == "") {alert("Ingrese el precio fin de semana por persona"); confirmacion.tblfin_semaPer.focus(); return; }

	

	if (confirmacion.tblhora_24.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 24 horas"); confirmacion.tblhora_24.focus(); return; }

	if (confirmacion.tblhora_48.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 48 horas"); confirmacion.tblhora_48.focus(); return; }

	if (confirmacion.tblhora_72.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 72 horas"); confirmacion.tblhora_72.focus(); return; }

	

	if (confirmacion.tblpregunta_secreta.value == "") {alert("Ingrese la pregunta secreta para los visitantes que vayan a opinar sobre el alojamiento"); confirmacion.tblpregunta_secreta.focus(); return; }

	if (confirmacion.tblrespuesta_secreta.value == "") {alert("Ingrese la respuesta a la pregunta secreta"); confirmacion.tblrespuesta_secreta.focus(); return; }
*/
/*if (confirmacion.aux4.value== "") {
alert("indique la distribucion de su alojamiento");location.href = '#distribucion'; return;
}*/

if (confirmacion.tblruta.value == "")
{ alert("Por favor ingrese como llegar"); confirmacion.tblruta.focus(); return; }
if (confirmacion.tbllugares_inte.value == "")
{ alert("Por favor ingrese lugares de interes"); confirmacion.tbllugares_inte.focus(); return; }
if (confirmacion.tblactividad.value == "")
{ alert("ingrese las actividades que se ofrecen en el entorno."); confirmacion.tblactividad.focus(); return; }
if (confirmacion.tblcomentario_prop.value == "")
{ alert("ingrese texto (lo que dice el propietario)"); confirmacion.tblcomentario_prop.focus(); return; }
	

	            confirmacion.submit();
	 

	

	

}


function validar_Registrar_casa2(form) { 

	/*if (confirmacion.tblnoche.value == "") {alert("Ingrese el precio noche casa"); confirmacion.tblnoche.focus(); return; }

	if (confirmacion.tblfin_sema.value == "") {alert("Ingrese el precio fin de semana casa"); confirmacion.tblfin_sema.focus(); return; }

	

	if (confirmacion.tblnochePer.value == "") {alert("Ingrese el precio noche o dia por persona"); confirmacion.tblnochePer.focus(); return; }

	if (confirmacion.tblfin_semaPer.value == "") {alert("Ingrese el precio fin de semana por persona"); confirmacion.tblfin_semaPer.focus(); return; }

	

	if (confirmacion.tblhora_24.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 24 horas"); confirmacion.tblhora_24.focus(); return; }

	if (confirmacion.tblhora_48.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 48 horas"); confirmacion.tblhora_48.focus(); return; }

	if (confirmacion.tblhora_72.value == "") {alert("Ingrese la clave para los usuarios que puedan reservar en 72 horas"); confirmacion.tblhora_72.focus(); return; }

	

	if (confirmacion.tblpregunta_secreta.value == "") {alert("Ingrese la pregunta secreta para los visitantes que vayan a opinar sobre el alojamiento"); confirmacion.tblpregunta_secreta.focus(); return; }

	if (confirmacion.tblrespuesta_secreta.value == "") {alert("Ingrese la respuesta a la pregunta secreta"); confirmacion.tblrespuesta_secreta.focus(); return; }
*/

confirmacion.submit();


	

	

}




function nuevoAjax() {

  var xmlhttp=false;

  try {

   // Creación del objeto ajax para navegadores diferentes a Explorer 

   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

  } catch (e) {

   // o bien 

   try {

     // Creación del objet ajax para Explorer 

     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) {

     xmlhttp = false;

   } 

  } 

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {

   xmlhttp = new XMLHttpRequest();

  } 

  return xmlhttp;

}

/*

function nuevoAjax() {

  var xmlhttp=false;

  try {

   // Creación del objeto ajax para navegadores diferentes a Explorer 

   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

  } catch (e) {

   // o bien 

   try {

     // Creación del objet ajax para Explorer 

     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) {

     xmlhttp = false;

   } 

  } 

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {

   xmlhttp = new XMLHttpRequest();

  } 

  return xmlhttp;

} 

*/





function cargarPais() {

	var d2, contenedor2;

	contenedor2 = document.getElementById('contenedor2');

	d2 = document.confirmacion.continente.options[document.confirmacion.continente.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarPais.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor2.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function cargarPaisRuta() {

	var d2, contenedor2;

	contenedor2 = document.getElementById('contenedor2');

	d2 = document.confirmacion.continente.options[document.confirmacion.continente.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarPaisRuta.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor2.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarPaisFiesta() {

	var d2, contenedor2;

	contenedor2 = document.getElementById('contenedor2');

	d2 = document.confirmacion.continente.options[document.confirmacion.continente.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarPaisFiesta.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor2.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarPaisFiesta2() {

	var d2, contenedor2;

	contenedor2 = document.getElementById('contenedor2');

	d2 = document.confirmacion.continente.options[document.confirmacion.continente.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../../funciones/cargarPaisFiesta2.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor2.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function cargarRegion() {

	var d2,region;

	region = document.getElementById('region');

	d2 = document.confirmacion.pais.options[document.confirmacion.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarRegion.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   region.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}


function cargarRegionFiesta() {

	var d2,region;

	region = document.getElementById('region');

	d2 = document.confirmacion.pais.options[document.confirmacion.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarRegionPlaya.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   region.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarRegionFiesta2() {

	var d2,region;

	region = document.getElementById('region');

	d2 = document.confirmacion.pais.options[document.confirmacion.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../../funciones/cargarRegionPlaya2.php?edo="+d2, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   region.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}




function cargarProvincia() {

	var d1, contenedor;

	contenedor = document.getElementById('contenedor');

	d1 = document.confirmacion.pais.options[document.confirmacion.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarProvincia.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 





function cargarProvincia2() {

	var d1, contenedor;

	contenedor = document.getElementById('contenedor');

	d1 = document.confirmacion.region.options[document.confirmacion.region.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarProvincia.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 

function cargarProvinciaPlaya() {

	var d1, contenedor;

	contenedor = document.getElementById('contenedor');

	d1 = document.confirmacion.region.options[document.confirmacion.region.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarProvinciaPlaya.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 


function cargarProvinciaPlaya2() {

	var d1, contenedor;

	contenedor = document.getElementById('contenedor');

	d1 = document.confirmacion.region.options[document.confirmacion.region.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../../funciones/cargarProvinciaPlaya2.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 





function cargarPoblacion() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.tblprovincia.options[document.confirmacion.tblprovincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarPoblacionGrande() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.tblprovincia.options[document.confirmacion.tblprovincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarpGrande.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}


function cargarPoblacionPrincipal() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarpPrincipal.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}


function cargarPoblacionPropietario() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarPoblacionPropietario2() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarPoblacionPropietario22() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.tblprovincia.options[document.confirmacion.tblprovincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}


function cargarPoblacionNacio() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor8');

	d1 = document.confirmacion.tblprovincia_nacio.options[document.confirmacion.tblprovincia_nacio.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarpNacio.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function cargarPoblacionRR() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.form1.tblprovincia.options[document.form1.tblprovincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}


function cargarPoblacionEsquis() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarpob.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function cargarPoblacionEsquis3() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../../funciones/cargarpob.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}




function cargarPoblacionEsquis2() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function cargarPoblacionR() {

	var d1, contenedor3;

	contenedor3 = document.getElementById('contenedor3');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarp.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor3.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function cargarPais11() {

	var d2, contenedor2;

	contenedor2 = document.getElementById('contenedor2');

	d2 = document.formularioindex.continente.options[document.formularioindex.continente.selectedIndex].value;

	if (d2 == 'par1') {

		location.href = '../funciones/cerrar_session.php?par=1';

	} else {

		ajax = nuevoAjax();

		ajax.open("GET","../funciones/cargarPais11.php?edo="+d2, true);

		ajax.onreadystatechange = function() {

			if (ajax.readyState == 4) {

			   contenedor2.innerHTML = ajax.responseText 

			} 

		} 

		ajax.send(null)

	}

}





function cargarProvincia11() {

	var d1, contenedor;

	contenedor = document.getElementById('contenedor');

	d1 = document.formularioindex.pais.options[document.formularioindex.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarProvincia11.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 


function cargarProvincia123() {

	var d1, contenedor;

	contenedor = document.getElementById('contenedor');

	d1 = document.formularioindex.pais.options[document.formularioindex.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarProvincia123.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 





function cargarPueblo_Actividades() {

	var d1, contenedor_pueblo;

	contenedor_pueblo= document.getElementById('contenedor_pueblo');

	d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET","../funciones/cargarPueblo_Actividades.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor_pueblo.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

} 





function mostrarPoblacion() {

	var d1;

	d1 = document.formularioindex.provincia.options[document.formularioindex.provincia.selectedIndex].value;

	location.href("../vistas/vistapueblo.php?ver=provincia&pueblo="+d1);

} 





function cargarValor() {

	var d1, contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	d1 = document.confirmacion.tblpropietario.options[document.confirmacion.tblpropietario.selectedIndex].value;

	if (d1 == 'agencia')

		contenedor4.innerHTML = 'Nombre de la Agencia: <input name="tblnombre_agen" type="text" maxlength="100">';

	else

		contenedor4.innerHTML = '&nbsp;';

}





function cargarResultados (poblaciones, areas, provincias, inmuebles, oferta, pagina, sw) {

	var d1, resultados,oferta,inmueble,provincia,area;

	oferta = document.confirmacion.oferta.options[confirmacion.oferta.selectedIndex].value;

	if (oferta == "") {

		alert("Debe seleccionar por lo menos un tipo de oferta para poder realizar la búsqueda."); 

		confirmacion.oferta.focus(); return; 

	} else {

		resultados = document.getElementById('resultados');

		if (sw == "0") {

			d1 = document.confirmacion.provincia.options[document.confirmacion.provincia.selectedIndex].value;

			inmueble = document.confirmacion.inmueble.options[confirmacion.inmueble.selectedIndex].value;

			area = document.confirmacion.area.options[confirmacion.area.selectedIndex].value;

			poblacion_es = document.confirmacion.tblpoblacion.options[confirmacion.tblpoblacion.selectedIndex].value;

		} else {

			d1 = provincias;

			inmueble = inmuebles;

			area = areas;

			poblacion_es = poblaciones;

		}

			

		ajax = nuevoAjax();

		ajax.open("GET", "../funciones/cargarResultado.php?poblacion_es="+poblacion_es+"&area="+area+"&provincia="+d1+"&inmueble="+inmueble+"&oferta="+oferta+"&pagina="+pagina, true);

		ajax.onreadystatechange = function() {

			if (ajax.readyState == 4) {

			   resultados.innerHTML = ajax.responseText 

			} 

		} 

		ajax.send(null)

	}

}





function cargarDetalles(id) {

	var d1, contenedor4, pr,l;

	contenedor4 = document.getElementById('capa2');

	contenedor4.innerHTML = "";

	ajax = nuevoAjax();

	ajax.open("GET", "../inmobiliaria/cargarDetalles.php?id="+id, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

	change('capa1',0);

	change('capa2',1);

	change('capa3',0);

}

function cargarDetalle(id) {

 location.href='../funciones/vista_inmueble.php?id='+id;

}

function cargarFormsolicitudes(id) {

 location.href='../funciones/formsolicitud.php?id='+id;

}





function cargarFormsolicitud(id) {

	var d1, contenedor4, pr,l;

	contenedor4 = document.getElementById('capa3');

	contenedor4.innerHTML = "";

	ajax = nuevoAjax();

	ajax.open("GET", "../inmobiliaria/formsolicitud.php?id="+id, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

	change('capa1',0);

	change('capa2',0);

	change('capa3',1);

}





function cargarValorr() {

	var d1, contenedor4,oferta;

	var contenedor4444,contenedor444, contenedor44;



	d1 = document.confirmacion.tbltipoinmueble.options[document.confirmacion.tbltipoinmueble.selectedIndex].value;

	oferta = document.confirmacion.tbltipooferta.options[document.confirmacion.tbltipooferta.selectedIndex].value;



	if(document.confirmacion.tbltipooferta.options[document.confirmacion.tbltipooferta.selectedIndex].value != ""){

		contenedor4 = document.getElementById('contenedor4');

		ajax = nuevoAjax();

		ajax.open("GET", "../funciones/procesos12.php?edo="+d1+"&oferta="+oferta, true);

		ajax.onreadystatechange = function() {

			if (ajax.readyState == 4) {

			   contenedor4.innerHTML = ajax.responseText 

			} 

		} 

		ajax.send(null)

		contenedor44 = document.getElementById('contenedor44');

		ajax2 = nuevoAjax();

		ajax2.open("GET", "../funciones/cargarCaract.php?edo="+d1+"&oferta="+oferta, true);

		ajax2.onreadystatechange = function() {

			if (ajax2.readyState == 4) {

			   contenedor44.innerHTML = ajax2.responseText 

			} 

		} 

		ajax2.send(null)

		contenedor444 = document.getElementById('contenedor444');

		ajax24 = nuevoAjax();

		ajax24.open("GET", "../funciones/cargarCalid.php?edo="+d1+"&oferta="+oferta, true);

		ajax24.onreadystatechange = function() {

			if (ajax24.readyState == 4) {

			   contenedor444.innerHTML = ajax24.responseText 

			} 

		} 

		ajax24.send(null)

		contenedor4444 = document.getElementById('contenedor4444');

		ajax244 = nuevoAjax();

		ajax244.open("GET", "../funciones/cargarEntorno.php?edo="+d1+"&oferta="+oferta, true);

		ajax244.onreadystatechange = function() {

			if (ajax244.readyState == 4) {

			   contenedor4444.innerHTML = ajax244.responseText 

			} 

		} 

		ajax244.send(null)

	}else{

		alert("Debe seleccionar el tipo de oferta");

	}

}





function comparaContrasena(form) {

	if (form.tblyyy.value!=form.confContrasena.value) {

		alert("No coincide la contraseña, vuelva a ingresar la información");

		form.tblyyy.value="";

		form.confContrasena.value="";

		form.tblyyy.focus();return

	}

}





function comparaCorreo(form) {

  if (form.tblcorreo.value!=form.confCorreo.value) {

		alert("No coincide el correo electrónico, vuelva a ingresar la información");

		form.tblcorreo.value="";

		form.confCorreo.value="";

		form.tblcorreo.focus();return

	}

}

function auxilioA(id){
	
	document.form10.id.value=id;
	
	document.form10.aux.value="1";

}
function auxilio2(id){
	document.form2.id.value=id;
	
	document.form2.aux.value="1";
}
function auxilio3(id){
	document.form3.id.value=id;
	
	document.form3.aux.value="1";
}
function auxilio4(id){
	document.form4.id.value=id;
	document.form4.aux.value="1";
}
function auxilio5(id,tipo){
	document.form5.id.value=id;
	document.radios5.tip.value=tipo;
	document.form5.aux.value="1";
}
function auxilio6(id){
	document.form6.id.value=id;
	document.form6.aux.value="1";
}
function auxilio7(id){
	document.form7.id.value=id;
	document.form7.aux.value="1";
}


//panel de usuario

//alojamiento
function opinion(){
if(document.form10.aux.value=="1"){
	
window.parent.location = "../vistas/registrar_opinion.php?ids="+document.form10.id.value;
}else{
if(document.form10.f.value!=""){
window.parent.location = "../vistas/registrar_opinion.php?ids="+document.form10.f.value;
}else{
alert("no hay alojamiento");
}

}

}
function favorito(){

if(document.form10.f.value!=""){
window.parent.location = "../vistas/confirmacion_cuaderno.php?id_aloj="+document.form10.f.value;
}else{
alert("no hay alojamiento");
}

}
function ver(){
if(document.form10.aux.value=="1"){
window.parent.location = "../vistas/vistaalojamiento.php?codigo="+document.form10.id.value;
}else{
if(document.form10.f.value!=""){
window.parent.location = "../vistas/vistaalojamiento.php?codigo="+document.form10.f.value;
}else{
alert("no hay alojamiento");
}

}

}

function foro(){
if(document.form10.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form10.id.value+"&tabla=alojamiento";
}else{
if(document.form10.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form10.f.value+"&tabla=alojamiento";
}else{
alert("no hay alojamiento");
}

}

}


function getUrl123() {
if(document.form10.aux.value=="1"){

       window.open("../vistas/eventos/registro.php?ids="+document.form10.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form10.f.value!=""){

       window.open("../vistas/eventos/registro.php?ids="+document.form10.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay alojamiento");
}

}

	
 

}



function opinionActividad(){
if(document.form2.aux.value=="1"){

window.parent.location = "../turismo-activo/registrar_opinion.php?ids="+document.form2.id.value;
}else{
if(document.form2.f.value!=""){
window.parent.location = "../turismo-activo/registrar_opinion.php?ids="+document.form2.f.value;
}else{
alert("no hay Actividad");
}

}

}
function favoritoActividad(){

if(document.form2.f.value!=""){
window.parent.location = "../turismo-activo/confirmacion_cuaderno.php?id_aloj="+document.form2.f.value;
}else{
alert("no hay Actividad");
}



}
function verActividad(){
if(document.form2.aux.value=="1"){
window.parent.location = "../turismo-activo/vista_empresa.php?codigo="+document.form2.id.value;
}else{
if(document.form2.f.value!=""){
window.parent.location = "../turismo-activo/vista_empresa.php?codigo="+document.form2.f.value;
}else{
alert("no hay Actividad");
}

}

}

function foroActividad(){
if(document.form2.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form2.id.value+"&tabla=empresa";
}else{
if(document.form2.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form2.f.value+"&tabla=empresa";
}else{
alert("no hay Actividad");
}

}

}


function getUrlActividad() {
if(document.form2.aux.value=="1"){

       window.open("../turismo-activo/eventos/registro.php?ids="+document.form2.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form2.f.value!=""){

       window.open("../turismo-activo/eventos/registro.php?ids="+document.form2.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay Actividad");
}

}

	
 

}

//tiendas

function opinionTienda(){
if(document.form3.aux.value=="1"){
window.parent.location = "../tienda/registrar_opinion.php?ids="+document.form3.id.value;
}else{
if(document.form3.f.value!=""){
window.parent.location = "../tienda/registrar_opinion.php?ids="+document.form3.f.value;
}else{
alert("no hay Tienda");
}

}

}
function favoritoTienda(){

if(document.form3.f.value!=""){
window.parent.location = "../tienda/confirmacion_cuaderno.php?id_aloj="+document.form3.f.value;
}else{
alert("no hay Tienda");
}

}
function verTienda(){
if(document.form3.aux.value=="1"){
window.parent.location = "../tienda/vista_tienda.php?codigo="+document.form3.id.value;
}else{
if(document.form3.f.value!=""){
window.parent.location = "../tienda/vista_tienda.php?codigo="+document.form3.f.value;
}else{
alert("no hay Tienda");
}

}

}

function foroTienda(){
if(document.form3.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form3.id.value+"&tabla=tienda";
}else{
if(document.form3.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form3.f.value+"&tabla=tienda";
}else{
alert("no hay Tienda");
}

}

}


function getUrlTiendaEvento() {
if(document.form3.aux.value=="1"){

       window.open("../tienda/eventos/registro.php?ids="+document.form3.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form3.f.value!=""){

       window.open("../tienda/eventos/registro.php?ids="+document.form3.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay Tienda");
}

}

	
 

}


//playas
function opinionPlaya(){
if(document.form4.aux.value=="1"){
window.parent.location = "../playas/registrar_opinion.php?ids="+document.form4.id.value;
}else{
if(document.form4.f.value!=""){
window.parent.location = "../playas/registrar_opinion.php?ids="+document.form4.f.value;
}else{
alert("no hay playa");
}

}

}
function favoritoPlaya(){

if(document.form4.f.value!=""){
window.parent.location = "../playas/confirmacion_cuaderno.php?id_aloj="+document.form4.f.value;
}else{
alert("no hay Playa");
}


}
function verPlaya(){
if(document.form4.aux.value=="1"){
window.parent.location = "../playas/vistaplaya.php?codigo="+document.form4.id.value;
}else{
if(document.form4.f.value!=""){
window.parent.location = "../playas/vistaplaya.php?codigo="+document.form4.f.value;
}else{
alert("no hay Playa");
}

}

}

function foroPlaya(){
if(document.form4.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form4.id.value+"&tabla=playa";
}else{
if(document.form4.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form4.f.value+"&tabla=playa";
}else{
alert("no hay Playa");
}

}

}


function getUrlPlaya() {
if(document.form4.aux.value=="1"){

       window.open("../playas/eventos/registro.php?ids="+document.form4.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form4.f.value!=""){

       window.open("../playas/eventos/registro.php?ids="+document.form4.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay Playa");
}

}

	
 

}

//fiesta

function opinionFiesta(){
if(document.form5.aux.value=="1"){
window.parent.location = "../fechas_calientes/registrar_opinion.php?ids="+document.form5.id.value;
}else{
if(document.form5.f.value!=""){
window.parent.location = "../fechas_calientes/registrar_opinion.php?ids="+document.form5.f.value;
}else{
alert("no hay fiesta");
}

}

}
function favoritoFiesta(){

if(document.form5.f.value!=""){
window.parent.location = "../fechas_calientes/confirmacion_cuaderno.php?id_aloj="+document.form5.f.value;
}else{
alert("no hay Fiesta");
}


}
function verFiesta(){
if(document.form5.aux.value=="1"){
window.parent.location = "../fechas_calientes/ver_evento.php?var="+document.form5.id.value+"&v="+document.radios5.tip.value;
}else{
if(document.form5.f.value!=""){
window.parent.location = "../fechas_calientes/ver_evento.php?var="+document.form5.f.value;
}else{
alert("no hay Fiesta");
}

}

}

function foroFiesta(){
if(document.form5.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form5.id.value+"&tabla=fiesta";
}else{
if(document.form5.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form5.f.value+"&tabla=alojamiento";
}else{
alert("no hay Fiesta");
}

}

}


function getUrlFiesta() {
if(document.form5.aux.value=="1"){

       window.open("../fechas_calientes/eventos/registro.php?ids="+document.form5.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form5.f.value!=""){

       window.open("../fechas_calientes/eventos/registro.php?ids="+document.form5.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay Fiesta");
}

}

	
 

}

function opinionEsqui(){
if(document.form7.aux.value=="1"){
window.parent.location = "../esqui/registrar_opinion.php?ids="+document.form7.id.value;
}else{
if(document.form7.f.value!=""){
window.parent.location = "../esqui/registrar_opinion.php?ids="+document.form7.f.value;
}else{
alert("no hay Esqui");
}

}

}
function favoritoEsqui(){

if(document.form7.f.value!=""){
window.parent.location = "../esqui/confirmacion_cuaderno.php?id_aloj="+document.form7.f.value;
}else{
alert("no hay Esqui");
}


}
function verEsqui(){
if(document.form7.aux.value=="1"){
window.parent.location = "../esqui/vista_estacion_esqui.php?id="+document.form7.id.value;
}else{
if(document.form7.f.value!=""){
window.parent.location = "../esqui/vista_estacion_esqui.php?id="+document.form7.f.value;
}else{
alert("no hay Esqui");
}

}

}

function foroEsqui(){
if(document.form7.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form7.id.value+"&tabla=esqui";
}else{
if(document.form7.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form7.f.value+"&tabla=alojamiento";
}else{
alert("no hay Esqui");
}

}

}


function getUrlEsqui() {
if(document.form7.aux.value=="1"){

       window.open("../esqui/eventos/registro.php?ids="+document.form7.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form7.f.value!=""){

       window.open("../esqui/eventos/registro.php?ids="+document.form7.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay Esqui");
}

}

	
 

}

//rutas

function opinionRuta(){
if(document.form6.aux.value=="1"){
window.parent.location = "../rutas/registrar_opinion.php?ids="+document.form6.id.value;
}else{
if(document.form6.f.value!=""){
window.parent.location = "../rutas/registrar_opinion.php?ids="+document.form6.f.value;
}else{
alert("no hay rutas");
}

}

}
function favoritoRuta(){

if(document.form6.f.value!=""){
window.parent.location = "../rutas/confirmacion_cuaderno.php?id_aloj="+document.form6.f.value;
}else{
alert("no hay Rutas");
}


}
function verRuta(){
if(document.form6.aux.value=="1"){
window.parent.location = "../rutas/vistaruta.php?ruta="+document.form6.id.value;
}else{
if(document.form6.f.value!=""){
window.parent.location = "../rutas/vistaruta.php?ruta="+document.form6.f.value;
}else{
alert("no hay Rutas");
}

}

}

function foroRuta(){
if(document.form6.aux.value=="1"){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form6.id.value+"&tabla=ruta";
}else{
if(document.form6.f.value!=""){
window.parent.location = "../foro_aspirantes/principal.php?otro_id="+document.form6.f.value+"&tabla=alojamiento";
}else{
alert("no hay Rutas");
}

}

}


function getUrlRuta() {
if(document.form6.aux.value=="1"){

       window.open("../rutas/eventos/registro.php?ids="+document.form6.id.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
if(document.form6.f.value!=""){

       window.open("../rutas/eventos/registro.php?ids="+document.form6.f.value,"ventana1","width=720,height=500,scrollbars=YES");
}else{
alert("no hay Rutas");
}

}

	
 

}








function validarRegistro(accion) {

	var Control;

	var Dato;

	var  Control2;
	
	Control=document.confirmacion.tbldni;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su dni");

		Control.focus();

		return false;

	}


	Control=document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre");

		Control.focus();

		return false;

	}

	Control=document.confirmacion.tblapellido1;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su primer apellido");

		Control.focus();

		return false;

	}

	Control=document.confirmacion.tblcorreo;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una dirección de correo válida");

		Control.focus();

		return false;

	}

	if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

		Control.focus();

		return false;   

	}

	

	Control2=document.confirmacion.confCorreo;

	if (Control.value!=Control2.value) {

		alert("No coincide el correo electronico, vuelva a ingresar la información");

		Control2.focus();

		return false;

	}

	Control=document.confirmacion.tblxxx;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre de usuario");

		Control.focus();

		return false;

	}

	
	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el teléfono");

		Control.focus();

		return false;

	}
	
	Control=document.confirmacion.tblmovil;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su movil");

		Control.focus();

		return false;

	}
	Control=document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su provincia");

		Control.focus();

		return false;

	}
	Control=document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su poblacion");

		Control.focus();

		return false;

	}


	Control=document.confirmacion.tbldireccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su direccion");

		Control.focus();

		return false;

	}
Control=document.confirmacion.tblcodigo_post;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su codigo postal");

		Control.focus();

		return false;

	}


	if (accion!=2) {

	var marcado = "no";

			with (document.confirmacion) {

				for ( var i = 0; i < acepto.length; i++ ) {

					if ( acepto[i].checked ) {

						marcado = "si"

						if (acepto[i].value=="S")

							document.confirmacion.submit();

						else{

							alert("Debe de pinchar en los botones estoy de acuerdo o bien no estoy de acuerdo");

							location.href="../index.php";

						}

					}

				}

		

				if ( marcado == "no" ) {

					alert("Debe de pinchar en los botones estoy de acuerdo o bien no estoy de acuerdo" );

					document.confirmacion.tblencuesta.focus();return;

				}

	}

	return true;

  } else {

  document.confirmacion.submit(); 

  }

}

function validarRegistro123(accion) {

	var Control;

	var Dato;

	var  Control2;

	Control=document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre");

		Control.focus();

		return false;

	}
	



	Control=document.confirmacion.tblapellido1;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su primer apellido");

		Control.focus();

		return false;

	}
	
	Control=document.confirmacion.tbldni;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su DNI");

		Control.focus();

		return false;

	}


	Control=document.confirmacion.tblcorreo;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una dirección de correo válida");

		Control.focus();

		return false;

	}

	if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

		Control.focus();

		return false;   

	}

	

	Control2=document.confirmacion.confCorreo;

	if (Control.value!=Control2.value) {

		alert("No coincide el correo electronico, vuelva a ingresar la información");

		Control2.focus();

		return false;

	}

	Control=document.confirmacion.tblxxx;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre de usuario");

		Control.focus();

		return false;

	}

	
	

	

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el teléfono");

		Control.focus();

		return false;

	}
	
	Control=document.confirmacion.tblmovil;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su movil");

		Control.focus();

		return false;

	}

Control=document.confirmacion.tblprovincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la provincia");

		Control.focus();

		return false;

	}

Control=document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar poblacion");

		Control.focus();

		return false;

	}
	Control=document.confirmacion.tbldireccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su direccion");

		Control.focus();

		return false;

	}


Control=document.confirmacion.tblcodigo_post;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su codigo postal");

		Control.focus();

		return false;

	}



	Control=document.confirmacion.tblprovincia_nacio;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar provincia donde nacio");

		Control.focus();

		return false;

	}
	Control=document.confirmacion.tblpoblacion_nacio;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar poblacion donde nacio");

		Control.focus();

		return false;

	}

if (accion!=2) {

	var marcado = "no";

			with (document.confirmacion) {

				for ( var i = 0; i < acepto.length; i++ ) {

					if ( acepto[i].checked ) {

						marcado = "si"

						if (acepto[i].value=="S")

							document.confirmacion.submit();

						else{

							alert("Para registrarse debe aceptar nuestras políticas de servicio");

							location.href="../index.php";

						}

					}

				}

		

				if ( marcado == "no" ) {

					alert("Debe aceptar o negar las políticas de vendeturbaco.com" );

					document.confirmacion.tblencuesta.focus();return;

				}

	}

	return true;

  } else {

  document.confirmacion.submit(); 

  }




}



function validarRegistro1234(accion) {

	var Control;

	var Dato;

	var  Control2;

	Control=document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre");

		Control.focus();

		return false;

	}
	



	Control=document.confirmacion.tblapellido1;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su primer apellido");

		Control.focus();

		return false;

	}
	
	Control=document.confirmacion.tbldni;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su DNI");

		Control.focus();

		return false;

	}


	Control=document.confirmacion.tblcorreo;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una dirección de correo válida");

		Control.focus();

		return false;

	}

	if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

		Control.focus();

		return false;   

	}

	

	Control2=document.confirmacion.confCorreo;

	if (Control.value!=Control2.value) {

		alert("No coincide el correo electronico, vuelva a ingresar la información");

		Control2.focus();

		return false;

	}

	Control=document.confirmacion.tblxxx;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre de usuario");

		Control.focus();

		return false;

	}

	
	

	

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el teléfono");

		Control.focus();

		return false;

	}
	
	Control=document.confirmacion.tblmovil;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su movil");

		Control.focus();

		return false;

	}

Control=document.confirmacion.tblprovincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la provincia");

		Control.focus();

		return false;

	}

Control=document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar poblacion");

		Control.focus();

		return false;

	}
	Control=document.confirmacion.tbldireccion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su direccion");

		Control.focus();

		return false;

	}


Control=document.confirmacion.tblcodigo_post;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su codigo postal");

		Control.focus();

		return false;

	}



	Control=document.confirmacion.tblprovincia_nacio;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar provincia donde nacio");

		Control.focus();

		return false;

	}
	Control=document.confirmacion.tblpoblacion_nacio;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar poblacion donde nacio");

		Control.focus();

		return false;

	}



 
  document.confirmacion.submit(); 

 




}



function validarRegistro2() {

	var Control;

	var Dato;

	var  Control2;

	Control=document.confirmacion.tblnombre;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre");

		Control.focus();

		return false;

	}

	Control=document.confirmacion.tblapellido1;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su primer apellido");

		Control.focus();

		return false;

	}

	Control=document.confirmacion.tblcorreo;

	Dato = strTrim(Control.value,TRIM_BOTH);

/*	if (Dato.length == 0) {

		alert("Debe ingresar una dirección de correo válida");

		Control.focus();

		return false;

	}

	if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

		Control.focus();

		return false;   

	}

	

	Control2=document.confirmacion.confCorreo;

	if (Control.value!=Control2.value) {

		alert("No coincide el correo electronico, vuelva a ingresar la información");

		Control2.focus();

		return false;

	}

	*/Control=document.confirmacion.tblxxx;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su nombre de usuario");

		Control.focus();

		return false;

	}

	Control=document.confirmacion.tblyyy;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar una contraseña");

		Control.focus();

		return false;

	}

	

	Control2=document.confirmacion.confContrasena;

	if (Control.value!=Control2.value) {

		alert("No coincide la contraseña");

		Contro2.focus();

		return false;

	}

	Control = document.confirmacion.tbltelefono;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el teléfono");

		Control.focus();

		return false;

	}

confirmacion.submit();

}




function borrarFotoProveedor(id, codigo, catalogo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../tienda/borrar_foto_proveedor.php?id="+id+"&codigo="+codigo+"&catalogo="+catalogo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFoto(id,codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../alojamiento/borrar_foto.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoAdmin(id,codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../alojamiento/borrar_foto5.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function cargarCapacidad() {

	var d1, capacidad;

	ajax = nuevoAjax();

	capacidad= document.getElementById('capacidad');

	with (document.confirmacion) {

		for ( var i = 0; i < cap.length; i++ ) {

				if ( cap[i].checked ) {

					d1=document.confirmacion.cap[i].value;

				}

		}

	}

	

	if (d1 == 'I') {

		capacidad.innerHTML = "<strong>Entre</strong>&nbsp;<input name='tblcapacidadde' type='text' size='3' maxlength='3' onKeyPress='CheckKeys()'>&nbsp;&nbsp;<strong>y</strong>&nbsp;<input name='tblcapacidada' type='text' size='3' maxlength='3' onKeyPress='CheckKeys()'>";

	} else {

		capacidad.innerHTML = "<strong></strong><input name='tblcapacidadde' type='text' size='3' maxlength='3' onKeyPress='CheckKeys()'>";

	}

/*

	ajax.open("GET","../funciones/cargarCapacidad.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   capacidad.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)	

*/

}





function editarAlojamiento(codigo) {

	if (confirm("Desea editar su alojamiento?"))

		location.href = "../alojamiento/registrarCasa_editar.php?codigo="+codigo;

}





function editarEmpresa(codigo) {

	if (confirm("Desea editar su Empresa?"))

		location.href = "../Empresas/registrar_empresa_editar.php?codigo="+codigo;

}





function editarTienda(codigo) {

	if (confirm("Desea editar su Tienda?"))

		location.href = "../tienda/registrar_tienda_editar.php?codigo="+codigo;

}





function cambio(idCapa) {

	if (document.layers) capa = eval("document." + idCapa);

	if (document.all) capa = eval(idCapa + ".style");

	if (document.getElementById) capa = eval('document.getElementById("' + idCapa + '").style');

	

	if ((capa.visibility == "hidden") || (capa.visibility == "hide")) {

		capa.visibility = (document.layers) ? "show" : "visible" ;

	} else {

		capa.visibility = (document.layers) ? "hide" : "hidden" ;

	}

}





function change(idCapa,id) {

	if (document.layers) capa = eval("document." + idCapa);

	if (document.all) capa = eval(idCapa + ".style");

	if (document.getElementById) capa = eval('document.getElementById("' + idCapa + '").style');

	

	if (id == 1) {

		capa.display = "block";

	} else {

		capa.display = "none";

	}

	/*if (capa.display == "none") {

		capa.display = "block";

	} else {

		capa.display = "none";

	}*/

}





function cambio2(idCapa) {

	if (document.layers) capa = eval("document." + idCapa);

	if (document.all) capa = eval(idCapa + ".style");

	if (document.getElementById) capa = eval('document.getElementById("' + idCapa + '").style');

	

	if (capa.display == "none") {

		capa.display = "block";

	} else {

		capa.display = "none";

	}

}





function validarForm(form, capa1, capa2) {

	if (typeof confirmacion.tblnombre_agen != "undefined" && strTrim(confirmacion.tblnombre_agen.value, TRIM_BOTH) == "") {alert("Escriba el nombre de la agencia."); confirmacion.tblnombre_agen.value = ""; confirmacion.tblnombre_agen.focus(); return; }

	

	/*if (strTrim(confirmacion.tbldistancia.value, TRIM_BOTH) == "") {alert("Ingrese la distancia del alojamiento para llegar a la playa, esquí, ambiente rural o urbano."); confirmacion.tbldistancia.focus(); return; }*/

	

	if (strTrim(confirmacion.tblnombre_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el nombre del alojamiento."); confirmacion.tblnombre_aloj.focus(); return; }
	
	if (strTrim(confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo minimo de alquiler."); confirmacion.tbltiempo_mini.focus(); return; }


	

	if (strTrim(confirmacion.tbltipo_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el tipo de alojamiento."); confirmacion.tbltipo_aloj.value = ""; confirmacion.tbltipo_aloj.focus(); return; }

	

	if (typeof confirmacion.tblhomologada != "undefined" && confirmacion.tblhomologada.options[confirmacion.tblhomologada.selectedIndex].value == "Homologada" && strTrim(confirmacion.tblnumero_homo.value, TRIM_BOTH) == "") {alert("Escriba el número de homologación."); confirmacion.tblnumero_homo.value = ""; confirmacion.tblnumero_homo.focus(); return; }

	

	if (strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH) == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidadde.value = ""; confirmacion.tblcapacidadde.focus(); return; }

	

	if (typeof confirmacion.tblcapacidada != "undefined") {

		cap2 = strTrim(confirmacion.tblcapacidada.value, TRIM_BOTH);

		if (cap2 == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidada.value = ""; confirmacion.tblcapacidada.focus(); return; }

		else {

			cap1 = strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH);

			if (parseInt(cap1) > parseInt(cap2)) {aux = cap2; confirmacion.tblcapacidada.value = cap1; confirmacion.tblcapacidadde.value= aux; }

			else if (parseInt(cap1) == parseInt(cap2)) {

			}

		}

	}

	

	if (strTrim(confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo mínimo de alquiler por días."); confirmacion.tbltiempo_mini.value = ""; confirmacion.tbltiempo_mini.focus(); return; }

	

	//if (strTrim(confirmacion.tbldetalle.value, TRIM_BOTH) == "") {alert("Ingrese el detalle."); confirmacion.tbldetalle.value = ""; confirmacion.tbldetalle.focus(); return; }

	

	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {alert("Escoja la provincia."); confirmacion.provincia.focus(); return; }

	

	/*if (strTrim(confirmacion.tblpoblacion.value, TRIM_BOTH) == "") {alert("Escoja el pueblo."); confirmacion.tblpoblacion.focus(); return; }

	*/

	if (strTrim(confirmacion.tbldireccion.value, TRIM_BOTH) == "") {alert("Ingrese la dirección."); confirmacion.tbldireccion.focus(); return; }

	

	if (strTrim(confirmacion.tblprefijo1.value, TRIM_BOTH) == "") {alert("Ingrese el prefijo No. 1.");  confirmacion.tblprefijo1.focus(); return; }

	if (strTrim(confirmacion.tbltelefono1.value, TRIM_BOTH) == "") {alert("Ingrese el Teléfono No. 1.");  confirmacion.tbltelefono1.focus(); return; }

	

//aqui

				
//aca

	

	

	Control=document.confirmacion.tblemail;

	Dato = strTrim(Control.value, TRIM_BOTH);

	/*if (!ValidarEmail(Control,"Dirección de correo mal ingresada.")) {	

		Control.focus();

		return;   

	}*/

		

 cambio2(capa1);

 cambio2(capa2);

 location.href = '#distribucion';

}

function validarForm10(form, capa1, capa2) {

	if (typeof document.confirmacion.tblnombre_agen != "undefined" && strTrim(document.confirmacion.tblnombre_agen.value, TRIM_BOTH) == "") {alert("Escriba el nombre de la agencia."); document.confirmacion.tblnombre_agen.value = ""; document.confirmacion.tblnombre_agen.focus(); return; }

	

	/*if (strTrim(confirmacion.tbldistancia.value, TRIM_BOTH) == "") {alert("Ingrese la distancia del alojamiento para llegar a la playa, esquí, ambiente rural o urbano."); confirmacion.tbldistancia.focus(); return; }*/

	

	/*if (strTrim(confirmacion.tblnombre_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el nombre del alojamiento."); confirmacion.tblnombre_aloj.focus(); return; }*/
	
	  if (document.confirmacion.tbldetalle.value == "")
{ alert("Por favor ingrese texto corto"); document.confirmacion.tbldetalle.focus(); return; }

	
	if (strTrim(document.confirmacion.tblpropietario.value, TRIM_BOTH) == "") {alert("Ingrese quien autoriza."); document.confirmacion.tblpropietario.focus(); return; }
	
	if (strTrim(document.confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo minimo de alquiler."); document.confirmacion.tbltiempo_mini.focus(); return; }


	

	if (strTrim(document.confirmacion.tbltipo_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el tipo de alojamiento."); confirmacion.tbltipo_aloj.value = ""; document.confirmacion.tbltipo_aloj.focus(); return; }

	

	if (typeof document.confirmacion.tblhomologada != "undefined" && document.confirmacion.tblhomologada.options[document.confirmacion.tblhomologada.selectedIndex].value == "Homologada" && strTrim(document.confirmacion.tblnumero_homo.value, TRIM_BOTH) == "") {alert("Escriba el número de homologación."); document.confirmacion.tblnumero_homo.value = ""; document.confirmacion.tblnumero_homo.focus(); return; }

	
/*
	if (strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH) == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidadde.value = ""; confirmacion.tblcapacidadde.focus(); return; }

	*/

	/*if (typeof confirmacion.tblcapacidada != "undefined") {

		cap2 = strTrim(confirmacion.tblcapacidada.value, TRIM_BOTH);

		if (cap2 == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidada.value = ""; confirmacion.tblcapacidada.focus(); return; }

		else {

			cap1 = strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH);

			if (parseInt(cap1) > parseInt(cap2)) {aux = cap2; confirmacion.tblcapacidada.value = cap1; confirmacion.tblcapacidadde.value= aux; }

			else if (parseInt(cap1) == parseInt(cap2)) {

			}

		}

	}
*/
	

	if (strTrim(document.confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo mínimo de alquiler por días."); document.confirmacion.tbltiempo_mini.value = ""; document.confirmacion.tbltiempo_mini.focus(); return; }

	

	//if (strTrim(confirmacion.tbldetalle.value, TRIM_BOTH) == "") {alert("Ingrese el detalle."); confirmacion.tbldetalle.value = ""; confirmacion.tbldetalle.focus(); return; }

	

	if (strTrim(document.confirmacion.provincia.value, TRIM_BOTH) == "") {alert("Escoja la provincia."); document.confirmacion.provincia.focus(); return; }

	

	if (strTrim(document.confirmacion.tblpoblacion.value, TRIM_BOTH) == "") {alert("Escoja poblacion."); document.confirmacion.tblpoblacion.focus(); return; }

	

	if (strTrim(document.confirmacion.tbldireccion.value, TRIM_BOTH) == "") {alert("Ingrese la dirección."); document.confirmacion.tbldireccion.focus(); return; }

if (strTrim(document.confirmacion.tblcodigo_post.value, TRIM_BOTH) == "") {alert("Ingrese el codigo postal."); document.confirmacion.tblcodigo_post.focus(); return; }

	

	if (strTrim(document.confirmacion.tblprefijo1.value, TRIM_BOTH) == "") {alert("Ingrese el prefijo Pais.");  document.confirmacion.tblprefijo1.focus(); return; }

	if (strTrim(document.confirmacion.tbltelefono1.value, TRIM_BOTH) == "") {alert("Ingrese el Teléfono  Fijo");  document.confirmacion.tbltelefono1.focus(); return; }

//aqui

			

	Control=document.confirmacion.tblemail;

	Dato = strTrim(Control.value, TRIM_BOTH);
	
	

	/*if (!ValidarEmail(Control,"Dirección de correo mal ingresada.")) {	

		Control.focus();

		return;   

	}*/
if (document.confirmacion.aux.value== "") {alert("No ha ingresado precios");
document.confirmacion.tblprefijo1.focus();document.confirmacion.aux.value="ya";
window.open("temporada.php","miventana","width=1000,height=1000,menubar=yes");
return;
}
		
	
if (document.confirmacion.aux2.value== "") {alert("No a hubicado la posicion de su alojamiento para orientar a sus clientes");
document.confirmacion.tblprefijo1.focus();document.confirmacion.aux2.value="ya";getUrlGoogle('../alojamiento/conectarMapa.php?gp='+document.confirmacion.provincia.value+''); return; }


if (document.confirmacion.aux3.value== "") {
alert("escoja caracteristicas");document.confirmacion.tblmas_contacto.focus(); return;
}

if (strTrim(document.confirmacion.tbltelefono2.value, TRIM_BOTH) == "") {
		
if(confirm('El movil es necesario para el funcionamiento del sistema de reserva')){
	 document.confirmacion.tbltelefono2.focus(); return;
}
}



 cambio2(capa1);

 cambio2(capa2);

 location.href = '#distribucion';

}

function validarFormAdmin(form, capa1, capa2) {

	/*if (typeof confirmacion.tblnombre_agen != "undefined" && strTrim(confirmacion.tblnombre_agen.value, TRIM_BOTH) == "") {alert("Escriba el nombre de la agencia."); confirmacion.tblnombre_agen.value = ""; confirmacion.tblnombre_agen.focus(); return; }*/

	

	/*if (strTrim(confirmacion.tbldistancia.value, TRIM_BOTH) == "") {alert("Ingrese la distancia del alojamiento para llegar a la playa, esquí, ambiente rural o urbano."); confirmacion.tbldistancia.focus(); return; }*/

	

	/*if (strTrim(confirmacion.tblnombre_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el nombre del alojamiento."); confirmacion.tblnombre_aloj.focus(); return; }*/
	
	/*  if (confirmacion.tbldetalle.value == "")
{ alert("Por favor ingrese texto corto"); confirmacion.tbldetalle.focus(); return; }

	
	if (strTrim(confirmacion.tblpropietario.value, TRIM_BOTH) == "") {alert("Ingrese quien autoriza."); confirmacion.tblpropietario.focus(); return; }
	
	if (strTrim(confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo minimo de alquiler."); confirmacion.tbltiempo_mini.focus(); return; }


	

	if (strTrim(confirmacion.tbltipo_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el tipo de alojamiento."); confirmacion.tbltipo_aloj.value = ""; confirmacion.tbltipo_aloj.focus(); return; }

	

	if (typeof confirmacion.tblhomologada != "undefined" && confirmacion.tblhomologada.options[confirmacion.tblhomologada.selectedIndex].value == "Homologada" && strTrim(confirmacion.tblnumero_homo.value, TRIM_BOTH) == "") {alert("Escriba el número de homologación."); confirmacion.tblnumero_homo.value = ""; confirmacion.tblnumero_homo.focus(); return; }

	

	if (strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH) == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidadde.value = ""; confirmacion.tblcapacidadde.focus(); return; }

	

	if (typeof confirmacion.tblcapacidada != "undefined") {

		cap2 = strTrim(confirmacion.tblcapacidada.value, TRIM_BOTH);

		if (cap2 == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidada.value = ""; confirmacion.tblcapacidada.focus(); return; }

		else {

			cap1 = strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH);

			if (parseInt(cap1) > parseInt(cap2)) {aux = cap2; confirmacion.tblcapacidada.value = cap1; confirmacion.tblcapacidadde.value= aux; }

			else if (parseInt(cap1) == parseInt(cap2)) {

			}

		}

	}

	

	if (strTrim(confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo mínimo de alquiler por días."); confirmacion.tbltiempo_mini.value = ""; confirmacion.tbltiempo_mini.focus(); return; }

	

	//if (strTrim(confirmacion.tbldetalle.value, TRIM_BOTH) == "") {alert("Ingrese el detalle."); confirmacion.tbldetalle.value = ""; confirmacion.tbldetalle.focus(); return; }

	

	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {alert("Escoja la provincia."); confirmacion.provincia.focus(); return; }

	

	if (strTrim(confirmacion.tblpoblacion.value, TRIM_BOTH) == "") {alert("Escoja poblacion."); confirmacion.tblpoblacion.focus(); return; }

	

	if (strTrim(confirmacion.tbldireccion.value, TRIM_BOTH) == "") {alert("Ingrese la dirección."); confirmacion.tbldireccion.focus(); return; }

if (strTrim(confirmacion.tblcodigo_post.value, TRIM_BOTH) == "") {alert("Ingrese el codigo postal."); confirmacion.tblcodigo_post.focus(); return; }

	

	if (strTrim(confirmacion.tblprefijo1.value, TRIM_BOTH) == "") {alert("Ingrese el prefijo Pais.");  confirmacion.tblprefijo1.focus(); return; }

	if (strTrim(confirmacion.tbltelefono1.value, TRIM_BOTH) == "") {alert("Ingrese el Teléfono  Fijo");  confirmacion.tbltelefono1.focus(); return; }

//aqui

			

	Control=document.confirmacion.tblemail;

	Dato = strTrim(Control.value, TRIM_BOTH);
	
	

	/*if (!ValidarEmail(Control,"Dirección de correo mal ingresada.")) {	

		Control.focus();

		return;   

	}*/
/*if (confirmacion.aux.value== "") {alert("No ha ingresado precios");
confirmacion.tblprefijo1.focus();document.confirmacion.aux.value="ya";
window.open("temporada.php","miventana","width=1000,height=1000,menubar=yes");
return;
}
		
	
if (confirmacion.aux2.value== "") {alert("No a hubicado la posicion de su alojamiento para orientar a sus clientes");
confirmacion.tblprefijo1.focus();document.confirmacion.aux2.value="ya";getUrl('http://www.vendeturbaco.com/alojamiento/conectarMapa2.php?gp='+document.confirmacion.provincia.value+''); return; }


if (confirmacion.aux3.value== "") {
alert("escoja caracteristicas");confirmacion.tblmas_contacto.focus(); return;
}

if (strTrim(confirmacion.tbltelefono2.value, TRIM_BOTH) == "") {
		
if(confirm('El movil es necesario para el funcionamiento del sistema de reserva')){
	 confirmacion.tbltelefono2.focus(); return;
}
}

*/

 cambio2(capa1);

 cambio2(capa2);

 location.href = '#distribucion';

}


function validarForm_edit(form, capa1, capa2) {

	if (typeof confirmacion.tblnombre_agen != "undefined" && strTrim(confirmacion.tblnombre_agen.value, TRIM_BOTH) == "") {alert("Escriba el nombre de la agencia."); confirmacion.tblnombre_agen.value = ""; confirmacion.tblnombre_agen.focus(); return; }

	

	/*if (strTrim(confirmacion.tbldistancia.value, TRIM_BOTH) == "") {alert("Ingrese la distancia del alojamiento para llegar a la playa, esquí, ambiente rural o urbano."); confirmacion.tbldistancia.focus(); return; }*/

	

	/*if (strTrim(confirmacion.tblnombre_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el nombre del alojamiento."); confirmacion.tblnombre_aloj.focus(); return; }*/
	
	  if (confirmacion.tbldetalle.value == "")
{ alert("Por favor ingrese texto corto"); confirmacion.tbldetalle.focus(); return; }

	
	if (strTrim(confirmacion.tblpropietario.value, TRIM_BOTH) == "") {alert("Ingrese quien autoriza."); confirmacion.tblpropietario.focus(); return; }
	
	if (strTrim(confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo minimo de alquiler."); confirmacion.tbltiempo_mini.focus(); return; }


	

	if (strTrim(confirmacion.tbltipo_aloj.value, TRIM_BOTH) == "") {alert("Ingrese el tipo de alojamiento."); confirmacion.tbltipo_aloj.value = ""; confirmacion.tbltipo_aloj.focus(); return; }

	

	if (typeof confirmacion.tblhomologada != "undefined" && confirmacion.tblhomologada.options[confirmacion.tblhomologada.selectedIndex].value == "Homologada" && strTrim(confirmacion.tblnumero_homo.value, TRIM_BOTH) == "") {alert("Escriba el número de homologación."); confirmacion.tblnumero_homo.value = ""; confirmacion.tblnumero_homo.focus(); return; }

	

	if (strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH) == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidadde.value = ""; confirmacion.tblcapacidadde.focus(); return; }

	

	if (typeof confirmacion.tblcapacidada != "undefined") {

		cap2 = strTrim(confirmacion.tblcapacidada.value, TRIM_BOTH);

		if (cap2 == "") {alert("Ingrese la capacidad por personas."); confirmacion.tblcapacidada.value = ""; confirmacion.tblcapacidada.focus(); return; }

		else {

			cap1 = strTrim(confirmacion.tblcapacidadde.value, TRIM_BOTH);

			if (parseInt(cap1) > parseInt(cap2)) {aux = cap2; confirmacion.tblcapacidada.value = cap1; confirmacion.tblcapacidadde.value= aux; }

			else if (parseInt(cap1) == parseInt(cap2)) {

			}

		}

	}

	

	if (strTrim(confirmacion.tbltiempo_mini.value, TRIM_BOTH) == "") {alert("Ingrese el tiempo mínimo de alquiler por días."); confirmacion.tbltiempo_mini.value = ""; confirmacion.tbltiempo_mini.focus(); return; }

	

	//if (strTrim(confirmacion.tbldetalle.value, TRIM_BOTH) == "") {alert("Ingrese el detalle."); confirmacion.tbldetalle.value = ""; confirmacion.tbldetalle.focus(); return; }

	

	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {alert("Escoja la provincia."); confirmacion.provincia.focus(); return; }

	

	if (strTrim(confirmacion.tblpoblacion.value, TRIM_BOTH) == "") {alert("Escoja poblacion."); confirmacion.tblpoblacion.focus(); return; }

	

	if (strTrim(confirmacion.tbldireccion.value, TRIM_BOTH) == "") {alert("Ingrese la dirección."); confirmacion.tbldireccion.focus(); return; }

if (strTrim(confirmacion.tblcodigo_post.value, TRIM_BOTH) == "") {alert("Ingrese el codigo postal."); confirmacion.tblcodigo_post.focus(); return; }

	

	if (strTrim(confirmacion.tblprefijo1.value, TRIM_BOTH) == "") {alert("Ingrese el prefijo Pais.");  confirmacion.tblprefijo1.focus(); return; }

	if (strTrim(confirmacion.tbltelefono1.value, TRIM_BOTH) == "") {alert("Ingrese el Teléfono  Fijo");  confirmacion.tbltelefono1.focus(); return; }

//aqui

			

	Control=document.confirmacion.tblemail;

	Dato = strTrim(Control.value, TRIM_BOTH);
	
	

	/*if (!ValidarEmail(Control,"Dirección de correo mal ingresada.")) {	

		Control.focus();

		return;   

	}*/

		
	



/*if (confirmacion.aux3.value== "") {
alert("escoja caracteristicas");confirmacion.tblmas_contacto.focus(); return;
}*/

if (strTrim(confirmacion.tbltelefono2.value, TRIM_BOTH) == "") {
		
if(confirm('El movil es necesario para el funcionamiento del sistema de reserva')){
	 confirmacion.tbltelefono2.focus(); return;
}
}



 cambio2(capa1);

 cambio2(capa2);

 location.href = '#distribucion';

}





function validarTipoAlojamiento() {

	var d1, otrocontenedor;

	
	d1 = document.confirmacion.tbltipo_aloj.options[document.confirmacion.tbltipo_aloj.selectedIndex].value;

	otrocontenedor = document.getElementById('otrocontenedor8');

	

		ajax = nuevoAjax();

		ajax.open("GET", "../funciones/casarural.php?edo="+d1, true);

		ajax.onreadystatechange = function() {

			if (ajax.readyState == 4) {

			   otrocontenedor.innerHTML = ajax.responseText 

			} 

		} 

		ajax.send(null)

	

}





function cargarNombreHomologada() {

	var d1, contenedor6;

	contenedor6 = document.getElementById('contenedor6');

	d1 = document.confirmacion.tblhomologada.options[document.confirmacion.tblhomologada.selectedIndex].value;

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/homologacion.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor6.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function imagenVistaPuebloAjax() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit,anuncio,buscador;

	vista= document.getElementById('vista');
	
	
	tit2= document.getElementById('tit2');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');
	anuncio= document.getElementById('anuncio');

	vista3= document.getElementById('vista3');

//	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
	buscador= document.getElementById('vistaB');

	d1 = document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
ajax993=nuevoAjax();
ajax898=nuevoAjax();

ajax898.open("GET", "../funciones/nombreBuscador.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

	
ajax993.open("GET", "../funciones/anuncioProvincia.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	ajax2.open("GET", "../funciones/VistaPuebloAjax2.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	

	ajax3.open("GET", "../funciones/vistapueblo3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
/*
	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	*/

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	ajax7.open("GET","../funciones/titulo3.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	


}

function imagenVistaPuebloAjaxEstrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit, buscador;

	vista= document.getElementById('vista');
	
	tit2= document.getElementById('tit2');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');

	vista3= document.getElementById('vista3');

	//vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
	buscador= document.getElementById('vistaB');

	d1 = document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	ajax898=nuevoAjax();

	ajax898.open("GET", "../funciones/nombreBuscadorEstrellas.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	ajax2.open("GET", "../funciones/VistaPuebloAjax2Estrellas.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	

	ajax3.open("GET", "../funciones/vistapueblo3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	/*

	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	*/

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionEstrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	ajax7.open("GET","../funciones/titulo3Estrellas.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	


}

function imagenVistaPuebloAjaxEstrellasDespedida() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit, buscador;

	vista= document.getElementById('vista');
	
	tit2= document.getElementById('tit2');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
	buscador= document.getElementById('vistaB');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();

	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	ajax2.open("GET", "../funciones/VistaPuebloAjax2EstrellasDespedida.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	

	ajax3.open("GET", "../funciones/vistapueblo3EstrellasDespedida.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjaxDespedida.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionEstrellasDespedida.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	ajax7.open("GET","../funciones/titulo3EstrellasDespedida.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloEstrellasDespedida.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	


}



function imagenVistaPuebloAjaxDespedida() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit, busqueda;

	vista= document.getElementById('vista');
	
	tit2= document.getElementById('tit2');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');

	vista3= document.getElementById('vista3');

	//vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
	buscador= document.getElementById('vistaB');

	d1 = document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	
	ajax898=nuevoAjax();

	ajax898.open("GET", "../funciones/nombreBuscadorDespedida.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)


	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	ajax2.open("GET", "../funciones/VistaPuebloAjax2Despedida.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	

	ajax3.open("GET", "../funciones/vistapueblo3Despedida.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
/*
	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	
*/
	ajax5.open("GET", "../funciones/VistaActividadAjaxDespedida.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionDespedida.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	ajax7.open("GET","../funciones/titulo3Despedida.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	


}
function alojamientosL() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit, libre;

	vista= document.getElementById('vista');
	
	tit2= document.getElementById('tit2');
	libre= document.getElementById('libre');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
	
d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;
}
	
	d2 = document.formularioProvincia.fechaI.value;
	d3 = document.formularioProvincia.fechaF.value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	ajax9=nuevoAjax();

	

	/*ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	ajax9.open("GET", "../funciones/alojamientosLibres.php?edo="+d1, true);

	ajax9.onreadystatechange = function() {

		if (ajax9.readyState == 4) {

		   libre.innerHTML = ajax9.responseText 

		}

	} 

	ajax9.send(null)


	

	/*ajax2.open("GET", "../funciones/VistaPuebloAjax2.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	*/

	/*ajax3.open("GET", "../funciones/vistapueblo3Libre.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
/*
	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	
*/
	

	

	/*ajax6.open("GET","../funciones/cargarPoblacionLibre.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	/*ajax7.open("GET","../funciones/titulo3.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

*/
ajax9.open("GET", "../funciones/alojamientosLibres.php?edo="+d1+"&fechai="+d2+"&fechaf="+d3, true);

	ajax9.onreadystatechange = function() {

		if (ajax9.readyState == 4) {

		   libre.innerHTML = ajax9.responseText 

		}

	} 

	ajax9.send(null)

}
function alojamientosL2() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit, libre;

	vista= document.getElementById('vista');
	
	tit2= document.getElementById('tit2');
	libre= document.getElementById('libre');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
	
d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;
}
	
	d2 = "todos";
	d3 = document.formularioProvincia.fechaF.value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	ajax9=nuevoAjax();

	

	/*ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	ajax9.open("GET", "../funciones/alojamientosLibres.php?edo="+d1, true);

	ajax9.onreadystatechange = function() {

		if (ajax9.readyState == 4) {

		   libre.innerHTML = ajax9.responseText 

		}

	} 

	ajax9.send(null)


	

	/*ajax2.open("GET", "../funciones/VistaPuebloAjax2.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	*/

	/*ajax3.open("GET", "../funciones/vistapueblo3Libre.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
/*
	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	
*/
	

	

	/*ajax6.open("GET","../funciones/cargarPoblacionLibre.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	/*ajax7.open("GET","../funciones/titulo3.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

*/
ajax9.open("GET", "../funciones/alojamientosLibres.php?edo="+d1+"&fechai="+d2+"&fechaf="+d3, true);

	ajax9.onreadystatechange = function() {

		if (ajax9.readyState == 4) {

		   libre.innerHTML = ajax9.responseText 

		}

	} 

	ajax9.send(null)

}




function imagenVistaPuebloAjaxLibre() {

	var d1,vista,vista2,vista3,vista4,actividad,combo, tit2,tit, libre;

	vista= document.getElementById('vista');
	
	tit2= document.getElementById('tit2');
	libre= document.getElementById('libre');
	tit= document.getElementById('tit');
	
	vista2= document.getElementById('vista2');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	ajax9=nuevoAjax();

	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	/*ajax9.open("GET", "../funciones/alojamientosLibres.php?edo="+d1, true);

	ajax9.onreadystatechange = function() {

		if (ajax9.readyState == 4) {

		   libre.innerHTML = ajax9.responseText 

		}

	} 

	ajax9.send(null)
*/

	

	/*ajax2.open("GET", "../funciones/VistaPuebloAjax2.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	*/

	ajax3.open("GET", "../funciones/vistapueblo3Libre.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
/*
	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	
*/
	

	

	ajax6.open("GET","../funciones/cargarPoblacionLibre.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	
	/*ajax7.open("GET","../funciones/titulo3.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

*/
}


function imagenVistaPuebloAjax6() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,ac1,ac2,ac3,tit2,tit, anuncio,buscador;

	anuncio= document.getElementById('anuncio');
	vista= document.getElementById('vista');
	tit2= document.getElementById('tit2');
	
	tit= document.getElementById('tit');

	vista2= document.getElementById('act1');
	ac1= document.getElementById('act2');
	ac2= document.getElementById('act3');
	ac3= document.getElementById('act4');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
buscador= document.getElementById('vistaB');
	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	ajax9=nuevoAjax();
	ajax10=nuevoAjax();
	ajax900=nuevoAjax();
	ajax800=nuevoAjax();
	ajax993=nuevoAjax();
	ajax898=nuevoAjax();

ajax898.open("GET", "../funciones/nombreBuscadorActividad.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

ajax993.open("GET", "../funciones/anuncioProvincia.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)

	

ajax800.open("GET", "../funciones/titulo.php?edo="+d1, true);

	ajax800.onreadystatechange=function() {

		if (ajax800.readyState==4) {

		   tit.innerHTML = ajax800.responseText;

		} 

	} 

	ajax800.send(null)
	

	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	
ajax2.open("GET", "../funciones/aire.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)
	
	
	ajax7.open("GET", "../funciones/agua.php?edo="+d1, true);

	ajax7.onreadystatechange=function() {

		if (ajax7.readyState==4) {

		   ac1.innerHTML = ajax7.responseText 

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tierra.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   ac2.innerHTML = ajax8.responseText 

		} 

	} 

	ajax8.send(null)
	
	ajax9.open("GET", "../funciones/varios.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   ac3.innerHTML = ajax9.responseText 

		} 

	} 

	ajax9.send(null)
	
	ajax10.open("GET", "../funciones/titulo2.php?edo="+d1, true);

	ajax10.onreadystatechange=function() {

		if (ajax10.readyState==4) {

		   tit2.innerHTML = ajax10.responseText 

		} 

	} 

	ajax10.send(null)
	

	
	

	ajax3.open("GET", "../funciones/vista3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/vistaActividad.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion7.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}

function imagenVistaPuebloAjax6Estrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,ac1,ac2,ac3,tit2;

	vista= document.getElementById('vista');
	tit2= document.getElementById('tit2');

	vista2= document.getElementById('act1');
	ac1= document.getElementById('act2');
	ac2= document.getElementById('act3');
	ac3= document.getElementById('act4');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	ajax7=nuevoAjax();
	ajax8=nuevoAjax();
	ajax9=nuevoAjax();
	ajax10=nuevoAjax();
	
	

	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	
ajax2.open("GET", "../funciones/aireEstrellas.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)
	
	
	ajax7.open("GET", "../funciones/aguaEstrellas.php?edo="+d1, true);

	ajax7.onreadystatechange=function() {

		if (ajax7.readyState==4) {

		   ac1.innerHTML = ajax7.responseText 

		} 

	} 

	ajax7.send(null)
	
	ajax8.open("GET", "../funciones/tierraEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   ac2.innerHTML = ajax8.responseText 

		} 

	} 

	ajax8.send(null)
	
	ajax9.open("GET", "../funciones/variosEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   ac3.innerHTML = ajax9.responseText 

		} 

	} 

	ajax9.send(null)
	
	ajax10.open("GET", "../funciones/titulo2Estrellas.php?edo="+d1, true);

	ajax10.onreadystatechange=function() {

		if (ajax10.readyState==4) {

		   tit2.innerHTML = ajax10.responseText 

		} 

	} 

	ajax10.send(null)
	

	
	

	ajax3.open("GET", "../funciones/vista3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/vistaActividad.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion7Estrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}



function imagenVistaPuebloAjax50() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas,buscador, anuncio;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');
	anuncio= document.getElementById('anuncio');

	combo=document.getElementById('combo');
buscador= document.getElementById('vistaB');
	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();
ajax898=nuevoAjax();
ajax993=nuevoAjax();

ajax993.open("GET", "../funciones/anuncioProvincia.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)

ajax898.open("GET", "../funciones/nombreBuscadorRuta.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

ajax9.open("GET", "../funciones/vertodasRuta.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjaxRuta.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Ruta.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionRuta.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}

function imagenVistaPuebloAjax50Estrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasRutaEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjaxRuta.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3RutaEstrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionRutaEstrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}


function mostrarFiesta() {

	var d1,vista,vista2,vista3,vista4,actividad,combo3,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo3=document.getElementById('combo3');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasFiesta.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Fiesta.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionFiesta.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo3.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}

function mostrarFiestaEstrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo3,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo3=document.getElementById('combo3');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasFiestaEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3FiestaEstrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacionFiestaEstrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo3.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}


function imagenVistaPuebloAjaxFiesta() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas,buscador;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
buscador= document.getElementById('vistaB');
	d1 = document.formularioProvincia.pais.options[document.formularioProvincia.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();
ajax898=nuevoAjax();

ajax898.open("GET", "../funciones/nombreBuscador.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

ajax9.open("GET", "../funciones/vertodasFiesta2.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloFiesta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	/*ajax.open("GET", "../funciones/VistaPuebloAjaxFiesta.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)*/

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Fiesta2.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarRegionFiesta.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}


function imagenVistaPuebloAjaxFiestaEstrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.pais.options[document.formularioProvincia.pais.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasFiesta2Estrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	/*ajax.open("GET", "../funciones/VistaPuebloAjaxFiesta.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)*/

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Fiesta2Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarRegionFiestaEstrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}


function poblacionFiesta() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	

	d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasFiesta.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Fiesta.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	
}


function poblacionFiestaEstrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	

	d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasFiestaEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3FiestaEstrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	
}


function imagenVistaPuebloAjax5() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas, anuncio,buscador;

	vista= document.getElementById('vista');
	anuncio= document.getElementById('anuncio');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');
buscador= document.getElementById('vistaB');
	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();
	ajax993=nuevoAjax();
	ajax898=nuevoAjax();

ajax898.open("GET", "../funciones/nombreBuscadorTienda.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

ajax993.open("GET", "../funciones/anuncioProvincia.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)

ajax9.open("GET", "../funciones/vertodas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/titulo.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion6.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}




function imagenVistaPuebloAjax5Estrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,tit, vertodas;

	vista= document.getElementById('vista');

	tit=document.getElementById('tit');
	
	vertodas=document.getElementById('vertodas');

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();
	
	ajax8=nuevoAjax();
	
	ajax9=nuevoAjax();

ajax9.open("GET", "../funciones/vertodasEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	

	ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3EstrellasTienda.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion6Estrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}



function imagenVistaPuebloAjax11() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,playas,vertodas,tit,buscador;

	

	buscador= document.getElementById('vistaB');

	vista3= document.getElementById('vista3');
	
tit= document.getElementById('tit');
	

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();

	ajax8=nuevoAjax();
	
	if(d1=="101001001"){
var so = new SWFObject("../../flash/esquiAlmeria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001002"){
var so = new SWFObject("../../flash/esquiCadiz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001003"){
var so = new SWFObject("../../flash/esquiCordoba.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001004"){
var so = new SWFObject("../../flash/playasGranada.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001005"){
var so = new SWFObject("../../flash/esquiHuelva.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001006"){
var so = new SWFObject("../../flash/esquiJaen.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001007"){
var so = new SWFObject("../../flash/esquiMalaga.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001008"){
var so = new SWFObject("../../flash/esquiSevilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002001"){
var so = new SWFObject("../../flash/playasHuesca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002002"){
var so = new SWFObject("../../flash/playasTeruel.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002003"){
var so = new SWFObject("../../flash/esquiZaragoza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101003001"){
var so = new SWFObject("../../flash/esquiAsturias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005001"){
var so = new SWFObject("../../flash/esquiAlava.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005002"){
var so = new SWFObject("../../flash/esquiGipuscoa.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005003"){
var so = new SWFObject("../../flash/esquiVizcaya.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101007001"){
var so = new SWFObject("../../flash/playaCantabria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008001"){
var so = new SWFObject("../../flash/playasBarcelona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008002"){
var so = new SWFObject("../../flash/playasGerona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008003"){
var so = new SWFObject("../../flash/playasLerida.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008004"){
var so = new SWFObject("../../flash/esquiTarragona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009001"){
var so = new SWFObject("../../flash/esquiAlbacete.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009002"){
var so = new SWFObject("../../flash/esquiCiudadReal.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009003"){
var so = new SWFObject("../../flash/esquiCuenca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009004"){
var so = new SWFObject("../../flash/esquiGuadalajara.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009005"){
var so = new SWFObject("../../flash/esquiToledo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010001"){
var so = new SWFObject("../../flash/esquiAvila.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010002"){
var so = new SWFObject("../../flash/esquiBurgos.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010003"){
var so = new SWFObject("../../flash/playasLeon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010004"){
var so = new SWFObject("../../flash/esquiPalencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010005"){
var so = new SWFObject("../../flash/playasSalamanca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010006"){
var so = new SWFObject("../../flash/playasSegovia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010007"){
var so = new SWFObject("../../flash/esquiSoria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010008"){
var so = new SWFObject("../../flash/esquiValladolid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010009"){
var so = new SWFObject("../../flash/esquiZamora.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011001"){
var so = new SWFObject("../../flash/esquiBajadoz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011002"){
var so = new SWFObject("../../flash/esquiCaceres.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012001"){
var so = new SWFObject("../../flash/esquiCoruña.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012002"){
var so = new SWFObject("../../flash/esquiLugo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012003"){
var so = new SWFObject("../../flash/esquiOurense.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012004"){
var so = new SWFObject("../../flash/esquiPontevedra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101013001"){
var so = new SWFObject("../../flash/playasRioja.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101014001"){
var so = new SWFObject("../../flash/esquiMadrid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101015001"){
var so = new SWFObject("../../flash/esquiMurcia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101016001"){
var so = new SWFObject("../../flash/playasNavarra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017001"){
var so = new SWFObject("../../flash/esquiAlicante.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017002"){
var so = new SWFObject("../../flash/esquiCastellon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101017003"){
var so = new SWFObject("../../flash/playasValencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101018001"){
var so = new SWFObject("../../flash/esquiCeuta.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101019001"){
var so = new SWFObject("../../flash/esquiMelilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101023001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101024001"){
var so = new SWFObject("../../flash/esquiHierro.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101025001"){
var so = new SWFObject("../../flash/esquiPalma.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101026001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101027001"){
var so = new SWFObject("../../flash/esquiTenerife.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101028001"){
var so = new SWFObject("../../flash/esquiCanarias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101029001"){
var so = new SWFObject("../../flash/esquiFuerteventura.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101030001"){
var so = new SWFObject("../../flash/esquiLanzarote.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101031001"){
var so = new SWFObject("../../flash/esquiFormentera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101032001"){
var so = new SWFObject("../../flash/esquiIbiza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101033001"){
var so = new SWFObject("../../flash/esquiMallorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101034001"){
var so = new SWFObject("../../flash/esquiMenorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}

	ajax898=nuevoAjax();

ajax898.open("GET", "../funciones/nombreBuscadorPlaya.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)

	ajax8.open("GET", "../funciones/titulo.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)


	vertodas= document.getElementById('vertodas');

	ajax25 = nuevoAjax();

	ajax25.open("GET", "../funciones/vertodasplayas.php?edo="+d1, true);

	ajax25.onreadystatechange = function() {

		if (ajax25.readyState == 4) {

		   vertodas.innerHTML = ajax25.responseText 

		} 

	} 

	ajax25.send(null)


	
	

	ajax3.open("GET", "../funciones/VistaPlaya3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion20.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}


function imagenVistaPuebloAjax11Estrellas() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,playas,vertodas;

	

	

	vista3= document.getElementById('vista3');
	

	

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();

	

	if(d1=="101001001"){
var so = new SWFObject("../../flash/esquiAlmeria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001002"){
var so = new SWFObject("../../flash/esquiCadiz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001003"){
var so = new SWFObject("../../flash/esquiCordoba.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001004"){
var so = new SWFObject("../../flash/playasGranada.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001005"){
var so = new SWFObject("../../flash/esquiHuelva.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001006"){
var so = new SWFObject("../../flash/esquiJaen.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001007"){
var so = new SWFObject("../../flash/esquiMalaga.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001008"){
var so = new SWFObject("../../flash/esquiSevilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002001"){
var so = new SWFObject("../../flash/playasHuesca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002002"){
var so = new SWFObject("../../flash/playasTeruel.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002003"){
var so = new SWFObject("../../flash/esquiZaragoza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101003001"){
var so = new SWFObject("../../flash/esquiAsturias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005001"){
var so = new SWFObject("../../flash/esquiAlava.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005002"){
var so = new SWFObject("../../flash/esquiGipuscoa.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005003"){
var so = new SWFObject("../../flash/esquiVizcaya.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101007001"){
var so = new SWFObject("../../flash/playaCantabria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008001"){
var so = new SWFObject("../../flash/playasBarcelona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008002"){
var so = new SWFObject("../../flash/playasGerona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008003"){
var so = new SWFObject("../../flash/playasLerida.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008004"){
var so = new SWFObject("../../flash/esquiTarragona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009001"){
var so = new SWFObject("../../flash/esquiAlbacete.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009002"){
var so = new SWFObject("../../flash/esquiCiudadReal.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009003"){
var so = new SWFObject("../../flash/esquiCuenca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009004"){
var so = new SWFObject("../../flash/esquiGuadalajara.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009005"){
var so = new SWFObject("../../flash/esquiToledo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010001"){
var so = new SWFObject("../../flash/esquiAvila.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010002"){
var so = new SWFObject("../../flash/esquiBurgos.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010003"){
var so = new SWFObject("../../flash/playasLeon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010004"){
var so = new SWFObject("../../flash/esquiPalencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010005"){
var so = new SWFObject("../../flash/playasSalamanca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010006"){
var so = new SWFObject("../../flash/playasSegovia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010007"){
var so = new SWFObject("../../flash/esquiSoria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010008"){
var so = new SWFObject("../../flash/esquiValladolid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010009"){
var so = new SWFObject("../../flash/esquiZamora.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011001"){
var so = new SWFObject("../../flash/esquiBajadoz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011002"){
var so = new SWFObject("../../flash/esquiCaceres.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012001"){
var so = new SWFObject("../../flash/esquiCoruña.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012002"){
var so = new SWFObject("../../flash/esquiLugo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012003"){
var so = new SWFObject("../../flash/esquiOurense.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012004"){
var so = new SWFObject("../../flash/esquiPontevedra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101013001"){
var so = new SWFObject("../../flash/playasRioja.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101014001"){
var so = new SWFObject("../../flash/esquiMadrid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101015001"){
var so = new SWFObject("../../flash/esquiMurcia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101016001"){
var so = new SWFObject("../../flash/playasNavarra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017001"){
var so = new SWFObject("../../flash/esquiAlicante.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017002"){
var so = new SWFObject("../../flash/esquiCastellon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101017003"){
var so = new SWFObject("../../flash/playasValencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101018001"){
var so = new SWFObject("../../flash/esquiCeuta.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101019001"){
var so = new SWFObject("../../flash/esquiMelilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101023001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101024001"){
var so = new SWFObject("../../flash/esquiHierro.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101025001"){
var so = new SWFObject("../../flash/esquiPalma.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101026001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101027001"){
var so = new SWFObject("../../flash/esquiTenerife.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101028001"){
var so = new SWFObject("../../flash/esquiCanarias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101029001"){
var so = new SWFObject("../../flash/esquiFuerteventura.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101030001"){
var so = new SWFObject("../../flash/esquiLanzarote.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101031001"){
var so = new SWFObject("../../flash/esquiFormentera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101032001"){
var so = new SWFObject("../../flash/esquiIbiza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101033001"){
var so = new SWFObject("../../flash/esquiMallorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101034001"){
var so = new SWFObject("../../flash/esquiMenorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
	

	vertodas= document.getElementById('vertodas');

	ajax25 = nuevoAjax();

	ajax25.open("GET", "../funciones/vertodasplayasEstrellas.php?edo="+d1, true);

	ajax25.onreadystatechange = function() {

		if (ajax25.readyState == 4) {

		   vertodas.innerHTML = ajax25.responseText 

		} 

	} 

	ajax25.send(null)


	
	

	ajax3.open("GET", "../funciones/VistaPlaya3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion20Estrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}


function imagenVistaPuebloAjax8() {

	var d1,vista,vista2,vista3,vista4,actividad,combo,buscador;

	vista= document.getElementById('vista');
buscador= document.getElementById('vistaB');
	

	vista3= document.getElementById('vista3');

	vista4= document.getElementById('vista4');

	actividad=document.getElementById('actividad');

	combo=document.getElementById('combo');

	d1 = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax3=nuevoAjax();

	ajax4=nuevoAjax();

	ajax5=nuevoAjax();

	ajax6=nuevoAjax();

	ajax898=nuevoAjax();

ajax898.open("GET", "../funciones/nombreBuscador.php?edo="+d1, true);

	ajax898.onreadystatechange = function() {

		if (ajax898.readyState == 4) {

		   buscador.innerHTML = ajax898.responseText 

		}

	} 

	ajax898.send(null)


	ajax.open("GET", "../funciones/VistaPuebloBar.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	

	

	
	

	ajax3.open("GET", "../funciones/VistaPuebloBar3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	

	
	

	ajax5.open("GET", "../funciones/VistaActividadBar.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)

	

	

	

	ajax6.open("GET","../funciones/cargarPoblacion9.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
}




function imagenVistaPueblo1Ajax() {

var d1,vista2,vista3,vista4,actividad,tit2,vista,tit,anuncio;

vista2= document.getElementById('vista2');

tit2= document.getElementById('tit2');

tit= document.getElementById('tit');
anuncio= document.getElementById('anuncio');
vista= document.getElementById('vista');
vista3= document.getElementById('vista3');

vista4= document.getElementById('vista4');

actividad=document.getElementById('actividad');

d1 = document.ubicacion.tblpoblacion.options[document.ubicacion.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value
}
ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();

ajax=nuevoAjax();

ajax99=nuevoAjax();

ajax992=nuevoAjax();

ajax993=nuevoAjax();




ajax99.open("GET", "../funciones/cargando.php?edo="+d1, true);

	ajax99.onreadystatechange = function() {

		if (ajax99.readyState == 4) {

		   vista.innerHTML = ajax99.responseText 

		}

	} 

	ajax99.send(null)
	
/*	ajax992.open("GET", "../funciones/cargando2.php?edo="+d1, true);

	ajax992.onreadystatechange = function() {

		if (ajax992.readyState == 4) {

		   vista.innerHTML = ajax992.responseText 

		}

	} 

	ajax992.send(null)*/
ajax993.open("GET", "../funciones/anuncio.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)

ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)



ajax7.open("GET","../funciones/titulo3.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)



    ajax2.open("GET", "../funciones/VistaPuebloAjax2.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	
ajax3.open("GET", "../funciones/vistapueblo3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
	

	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}


function imagenVistaPueblo1AjaxLibre() {

var d1,vista2,vista3,vista4,actividad,tit2,vista,tit,libre;

vista2= document.getElementById('vista2');

//tit2= document.getElementById('tit2');
libre= document.getElementById('libre');
//tit= document.getElementById('tit');
vista= document.getElementById('vista');
vista3= document.getElementById('vista3');

//vista4= document.getElementById('vista4');

actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}
ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();

ajax=nuevoAjax();

ajax99=nuevoAjax();

ajax992=nuevoAjax();
ajax9=nuevoAjax();


/*ajax9.open("GET", "../funciones/alojamientosLibres.php?edo="+d1, true);

	ajax9.onreadystatechange = function() {

		if (ajax9.readyState == 4) {

		   libre.innerHTML = ajax9.responseText 

		}

	} 

	ajax9.send(null)*/


ajax99.open("GET", "../funciones/cargando.php?edo="+d1, true);

	ajax99.onreadystatechange = function() {

		if (ajax99.readyState == 4) {

		   vista.innerHTML = ajax99.responseText 

		}

	} 

	ajax99.send(null)
	
/*	ajax992.open("GET", "../funciones/cargando2.php?edo="+d1, true);

	ajax992.onreadystatechange = function() {

		if (ajax992.readyState == 4) {

		   vista.innerHTML = ajax992.responseText 

		}

	} 

	ajax992.send(null)*/


/*ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)*/
	

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)



/*ajax7.open("GET","../funciones/titulo3.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)*/



   /* ajax2.open("GET", "../funciones/VistaPuebloAjax2.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)*/

	
ajax3.open("GET", "../funciones/vistapueblo3Libre.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
	

	/*ajax4.open("GET", "../funciones/vistapueblo4Libre.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)*/

	

/*	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	*/

}

function imagenVistaPueblo1AjaxDespedida() {

var d1,vista2,vista3,vista4,actividad,tit2,vista,tit;

vista2= document.getElementById('vista2');

tit2= document.getElementById('tit2');
tit= document.getElementById('tit');
vista= document.getElementById('vista');
vista3= document.getElementById('vista3');

vista4= document.getElementById('vista4');

actividad=document.getElementById('actividad');

d1 = document.ubicacion.tblpoblacion.options[document.ubicacion.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value
}
ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();

ajax=nuevoAjax();

ajax99=nuevoAjax();

ajax992=nuevoAjax();

ajax99.open("GET", "../funciones/cargando.php?edo="+d1, true);

	ajax99.onreadystatechange = function() {

		if (ajax99.readyState == 4) {

		   vista.innerHTML = ajax99.responseText 

		}

	} 

	ajax99.send(null)
	
/*	ajax992.open("GET", "../funciones/cargando2.php?edo="+d1, true);

	ajax992.onreadystatechange = function() {

		if (ajax992.readyState == 4) {

		   vista.innerHTML = ajax992.responseText 

		}

	} 

	ajax992.send(null)*/


ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)



ajax7.open("GET","../funciones/titulo3Despedida.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)



    ajax2.open("GET", "../funciones/VistaPuebloAjax2Despedida.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	
ajax3.open("GET", "../funciones/vistapueblo3Despedida.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
	

	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjaxDespedida.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1AjaxEstrellas() {

var d1,vista2,vista3,vista4,actividad,tit2,vista,tit;

vista2= document.getElementById('vista2');

tit2= document.getElementById('tit2');
tit= document.getElementById('tit');
vista= document.getElementById('vista');
vista3= document.getElementById('vista3');

vista4= document.getElementById('vista4');

actividad=document.getElementById('actividad');

d1 = document.ubicacion.tblpoblacion.options[document.ubicacion.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value
}
ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();

ajax=nuevoAjax();

ajax99=nuevoAjax();

ajax992=nuevoAjax();

ajax99.open("GET", "../funciones/cargando.php?edo="+d1, true);

	ajax99.onreadystatechange = function() {

		if (ajax99.readyState == 4) {

		   vista.innerHTML = ajax99.responseText 

		}

	} 

	ajax99.send(null)
	
/*	ajax992.open("GET", "../funciones/cargando2.php?edo="+d1, true);

	ajax992.onreadystatechange = function() {

		if (ajax992.readyState == 4) {

		   vista.innerHTML = ajax992.responseText 

		}

	} 

	ajax992.send(null)*/


ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)



ajax7.open("GET","../funciones/titulo3Estrellas.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)



    ajax2.open("GET", "../funciones/VistaPuebloAjax2Estrellas.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	
ajax3.open("GET", "../funciones/vistapueblo3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
	

	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}
function imagenVistaPueblo1AjaxEstrellasDespedida() {

var d1,vista2,vista3,vista4,actividad,tit2,vista,tit;

vista2= document.getElementById('vista2');

tit2= document.getElementById('tit2');
tit= document.getElementById('tit');
vista= document.getElementById('vista');
vista3= document.getElementById('vista3');

vista4= document.getElementById('vista4');

actividad=document.getElementById('actividad');

d1 = document.ubicacion.tblpoblacion.options[document.ubicacion.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.ubicacion.provincia.options[document.ubicacion.provincia.selectedIndex].value
}
ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();

ajax=nuevoAjax();

ajax99=nuevoAjax();

ajax992=nuevoAjax();

ajax99.open("GET", "../funciones/cargando.php?edo="+d1, true);

	ajax99.onreadystatechange = function() {

		if (ajax99.readyState == 4) {

		   vista.innerHTML = ajax99.responseText 

		}

	} 

	ajax99.send(null)
	
/*	ajax992.open("GET", "../funciones/cargando2.php?edo="+d1, true);

	ajax992.onreadystatechange = function() {

		if (ajax992.readyState == 4) {

		   vista.innerHTML = ajax992.responseText 

		}

	} 

	ajax992.send(null)*/


ajax8.open("GET", "../funciones/tituloEstrellasDespedida.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)



ajax7.open("GET","../funciones/titulo3EstrellasDespedida.php?edo="+d1, true);	

	ajax7.onreadystatechange=function() {		  

		if (ajax7.readyState==4) {

		   tit2.innerHTML = ajax7.responseText; 		   

		} 

	} 

	ajax7.send(null)



    ajax2.open("GET", "../funciones/VistaPuebloAjax2EstrellasDespedida.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   vista2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	
ajax3.open("GET", "../funciones/vistapueblo3EstrellasDespedida.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	
	

	ajax4.open("GET", "../funciones/vistapueblo4.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   vista4.innerHTML = ajax4.responseText;

		} 

	} 

	ajax4.send(null)

	

	ajax5.open("GET", "../funciones/VistaActividadAjaxDespedida.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}


function imagenVistaPueblo1Ajax7() {
var d1,vista2,vista3,vista4,actividad,ac1,ac2,ac3,ac4,tit,tit2,vista,anuncio;

ac1= document.getElementById('act1');
anuncio= document.getElementById('anuncio');
ac2= document.getElementById('act2');
vista3=document.getElementById('vista3');
vista=document.getElementById('vista');
tit=document.getElementById('tit');
tit2=document.getElementById('tit2');
ac3= document.getElementById('act3');
ac4= document.getElementById('act4');




actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax6=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();
ajax9=nuevoAjax();
ajax993=nuevoAjax();
ajax993.open("GET", "../funciones/anuncio.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)




    ajax2.open("GET", "../funciones/aguapueblo.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   ac2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	

	ajax3.open("GET", "../funciones/airepueblo.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   ac1.innerHTML = ajax3.responseText 

		} 

	} 

	ajax3.send(null)
	
	ajax4.open("GET", "../funciones/tierrapueblo.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   ac3.innerHTML = ajax4.responseText 

		} 

	} 

	ajax4.send(null)
	
	
	ajax5.open("GET", "../funciones/variospueblo.php?edo="+d1, true);

	ajax5.onreadystatechange=function() {

		if (ajax5.readyState==4) {

		   ac4.innerHTML = ajax5.responseText 

		} 

	} 

	ajax5.send(null)
	
	

	

	

	

	ajax6.open("GET", "../funciones/vistaActividad.php?edo="+d1, true); 	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   actividad.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	ajax7.open("GET", "../funciones/vista3.php?edo="+d1, true);

	ajax7.onreadystatechange=function() {

		if (ajax7.readyState==4) {

		   vista3.innerHTML = ajax7.responseText;

		} 

	} 

	ajax7.send(null)
	
	
	ajax8.open("GET", "../funciones/titulo.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	
	ajax9.open("GET", "../funciones/titulo2.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   tit2.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)



}

function imagenVistaPueblo1Ajax7Estrellas() {
var d1,vista2,vista3,vista4,actividad,ac1,ac2,ac3,ac4,tit,tit2,vista;

ac1= document.getElementById('act1');
ac2= document.getElementById('act2');
vista3=document.getElementById('vista3');
vista=document.getElementById('vista');
tit=document.getElementById('tit');
tit2=document.getElementById('tit2');
ac3= document.getElementById('act3');
ac4= document.getElementById('act4');




actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax6=nuevoAjax();

ajax7=nuevoAjax();
ajax8=nuevoAjax();
ajax9=nuevoAjax();

ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)




    ajax2.open("GET", "../funciones/aguaEstrellas.php?edo="+d1, true);

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   ac1.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

	

	ajax3.open("GET", "../funciones/aireEstrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   ac2.innerHTML = ajax3.responseText 

		} 

	} 

	ajax3.send(null)
	
	ajax4.open("GET", "../funciones/tierraEstrellas.php?edo="+d1, true);

	ajax4.onreadystatechange=function() {

		if (ajax4.readyState==4) {

		   ac3.innerHTML = ajax4.responseText 

		} 

	} 

	ajax4.send(null)
	
	
	ajax5.open("GET", "../funciones/variosEstrellas.php?edo="+d1, true);

	ajax5.onreadystatechange=function() {

		if (ajax5.readyState==4) {

		   ac4.innerHTML = ajax5.responseText 

		} 

	} 

	ajax5.send(null)
	
	

	

	

	

	ajax6.open("GET", "../funciones/vistaActividad.php?edo="+d1, true); 	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   actividad.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)
	
	
	ajax7.open("GET", "../funciones/vista3Estrellas.php?edo="+d1, true);

	ajax7.onreadystatechange=function() {

		if (ajax7.readyState==4) {

		   vista3.innerHTML = ajax7.responseText;

		} 

	} 

	ajax7.send(null)
	
	
	ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
	
	ajax9.open("GET", "../funciones/titulo2Estrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   tit2.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)



}



function imagenVistaPueblo1Ajax6() {

var d1,vista2,vista3,vista4,actividad,tit,vertodas,vista,anuncio;
anuncio= document.getElementById('anuncio');
vista3= document.getElementById('vista3');
vista= document.getElementById('vista');
vertodas=document.getElementById('vertodas');


tit=document.getElementById('tit');
actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();
ajax8=nuevoAjax();
ajax9=nuevoAjax();
ajax=nuevoAjax();
ajax993=nuevoAjax();
ajax993.open("GET", "../funciones/anuncio.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)
ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

ajax9.open("GET", "../funciones/vertodas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)

ajax8.open("GET", "../funciones/titulo.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
    

	

	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1Ajax6Estrellas() {

var d1,vista2,vista3,vista4,actividad,tit,vertodas,vista;
vista3= document.getElementById('vista3');
vista= document.getElementById('vista');
vertodas=document.getElementById('vertodas');


tit=document.getElementById('tit');
actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();
ajax8=nuevoAjax();
ajax9=nuevoAjax();
ajax=nuevoAjax();
ajax.open("GET", "../funciones/VistaPuebloAjax.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

ajax9.open("GET", "../funciones/vertodasEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)

ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
    

	

	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3EstrellasTienda.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1Ajax50() {

var d1,vista2,vista3,vista4,actividad,tit,vertodas, anuncio;
vista3= document.getElementById('vista3');

vertodas=document.getElementById('vertodas');

anuncio=document.getElementById('anuncio');

tit=document.getElementById('tit');
actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();
ajax8=nuevoAjax();
ajax9=nuevoAjax();
ajax993=nuevoAjax();
ajax993.open("GET", "../funciones/anuncio.php?edo="+d1, true);

	ajax993.onreadystatechange = function() {

		if (ajax993.readyState == 4) {

		   anuncio.innerHTML = ajax993.responseText 

		}

	} 

	ajax993.send(null)
ajax9.open("GET", "../funciones/vertodasRuta.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)

ajax8.open("GET", "../funciones/tituloRuta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
    

	

	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Ruta.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1Ajax50Estrellas() {

var d1,vista2,vista3,vista4,actividad,tit,vertodas;
vista3= document.getElementById('vista3');

vertodas=document.getElementById('vertodas');


tit=document.getElementById('tit');
actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();
ajax8=nuevoAjax();
ajax9=nuevoAjax();


ajax9.open("GET", "../funciones/vertodasRutaEstrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)

ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
    

	

	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3RutaEstrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}


function imagenVistaPueblo1Ajax20() {

var d1,vista2,vista3,vista4,actividad,tit,vertodas;
vista3= document.getElementById('vista3');




tit=document.getElementById('tit');
actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();
ajax8=nuevoAjax();

ajax25=nuevoAjax();
vertodas= document.getElementById('vertodas');

	ajax25 = nuevoAjax();

	ajax25.open("GET", "../funciones/vertodasplayas.php?edo="+d1, true);

	ajax25.onreadystatechange = function() {

		if (ajax25.readyState == 4) {

		   vertodas.innerHTML = ajax25.responseText 

		} 

	} 

	ajax25.send(null)

ajax8.open("GET", "../funciones/titulo.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
    

	

	

	ajax3.open("GET", "../funciones/VistaPlaya3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1Ajax20Estrellas() {

var d1,vista2,vista3,vista4,actividad,tit,vertodas;
vista3= document.getElementById('vista3');




tit=document.getElementById('tit');
actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();
ajax8=nuevoAjax();

ajax25=nuevoAjax();
vertodas= document.getElementById('vertodas');

	ajax25 = nuevoAjax();

	ajax25.open("GET", "../funciones/vertodasplayasEstrellas.php?edo="+d1, true);

	ajax25.onreadystatechange = function() {

		if (ajax25.readyState == 4) {

		   vertodas.innerHTML = ajax25.responseText 

		} 

	} 

	ajax25.send(null)

ajax8.open("GET", "../funciones/tituloEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	
    

	

	

	ajax3.open("GET", "../funciones/VistaPlaya3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}



function imagenVistaPueblo1Ajax9() {

var d1,vista2,vista3,vista4,actividad;






actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblpoblacion.options[document.formularioProvincia.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();



    

	

	

	

	

	

	ajax5.open("GET", "../funciones/VistaActividadBar.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1AjaxEsqui() {

var d1,vista2,vista3,vista4,actividad,estaciones,vertodas,tit;



vista3=document.getElementById('vista3');

tit=document.getElementById('tit');
vertodas=document.getElementById('vertodas');
actividad=document.getElementById('actividad');

d1 = document.formularioSistema.tblpoblacion.options[document.formularioSistema.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioSistema.provincia.options[document.formularioSistema.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax9=nuevoAjax();
ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsqui.php?edo="+d1, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)
	


ajax9.open("GET", "../funciones/vertodasFiesta.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	

    

	

	ajax3.open("GET", "../funciones/VistaEsqui3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	
estaciones = document.getElementById('esqui');

	ajax77 = nuevoAjax();

	ajax77.open("GET", "../funciones/estaciones_esqui.php?sistema="+d1, true);

	ajax77.onreadystatechange = function() {

		if (ajax77.readyState == 4) {

		   estaciones.innerHTML = ajax77.responseText 

		} 

	} 

	ajax77.send(null)

	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1AjaxEsquiEstrellas() {

var d1,vista2,vista3,vista4,actividad,estaciones,vertodas,tit;



vista3=document.getElementById('vista3');

tit=document.getElementById('tit');
vertodas=document.getElementById('vertodas');
actividad=document.getElementById('actividad');

d1 = document.formularioSistema.tblpoblacion.options[document.formularioSistema.tblpoblacion.selectedIndex].value;
if(d1==""){
	d1=document.formularioSistema.provincia.options[document.formularioSistema.provincia.selectedIndex].value
}

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax9=nuevoAjax();
ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsquiEstrellas.php?edo="+d1, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)
	


ajax9.open("GET", "../funciones/vertodasFiesta.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)
	

    

	

	ajax3.open("GET", "../funciones/VistaEsqui3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	
estaciones = document.getElementById('esqui');

	ajax77 = nuevoAjax();

	ajax77.open("GET", "../funciones/estaciones_esquiEstrellas.php?sistema="+d1, true);

	ajax77.onreadystatechange = function() {

		if (ajax77.readyState == 4) {

		   estaciones.innerHTML = ajax77.responseText 

		} 

	} 

	ajax77.send(null)

	

	

	ajax5.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1AjaxFiesta() {

var d1,vista2,vista3,vista4,actividad,estaciones,combo2,vista,vertodas,tit,combo3;


combo2=document.getElementById('combo2');
combo3=document.getElementById('combo3');
tit=document.getElementById('tit');
vista=document.getElementById('vista');
vista3=document.getElementById('vista3');
vertodas=document.getElementById('vertodas');

actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblregion.options[document.formularioProvincia.tblregion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.pais.options[document.formularioProvincia.pais.selectedIndex].value
}
ajax=nuevoAjax();

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax6=nuevoAjax();

ajax9=nuevoAjax();
ajax8=nuevoAjax();
ajax11=nuevoAjax();

if(d1=="101001"){
var so = new SWFObject("andalucia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101002"){
var so = new SWFObject("aragon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101003"){
var so = new SWFObject("asturias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101004"){
var so = new SWFObject("beleares.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101005"){
var so = new SWFObject("vasco.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101006"){
var so = new SWFObject("canarias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101007"){
var so = new SWFObject("cantabria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101008"){
var so = new SWFObject("cataluña.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101009"){
var so = new SWFObject("castillalamancha.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101010"){
var so = new SWFObject("castilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101011"){
var so = new SWFObject("extremadura.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101012"){
var so = new SWFObject("galicia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101013"){
var so = new SWFObject("rioja.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101014"){
var so = new SWFObject("madrid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101015"){
var so = new SWFObject("rutas.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101016"){
var so = new SWFObject("navarra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101017"){
var so = new SWFObject("valencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101018"){
var so = new SWFObject("rutas.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101019"){
var so = new SWFObject("rutas.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
ajax11.open("GET", "../funciones/cargarPoblacionEsqui2.php?edo="+d1, true);

	ajax11.onreadystatechange=function() {

		if (ajax11.readyState==4) {

		   combo3.innerHTML = ajax11.responseText;

		} 

	} 

	ajax11.send(null)
	
ajax8.open("GET", "../funciones/tituloFiesta.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

ajax9.open("GET", "../funciones/vertodasFiesta2.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)



/*ajax.open("GET", "../funciones/VistaPuebloAjaxFiesta.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	*/

    ajax6.open("GET","../funciones/cargarProvinciaFiesta.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo2.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)

	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Fiesta2.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}

function imagenVistaPueblo1AjaxFiestaEstrellas() {

var d1,vista2,vista3,vista4,actividad,estaciones,combo2,vista,vertodas,tit,combo3;


combo2=document.getElementById('combo2');
combo3=document.getElementById('combo3');
tit=document.getElementById('tit');
vista=document.getElementById('vista');
vista3=document.getElementById('vista3');
vertodas=document.getElementById('vertodas');

actividad=document.getElementById('actividad');

d1 = document.formularioProvincia.tblregion.options[document.formularioProvincia.tblregion.selectedIndex].value;
if(d1==""){
	d1=document.formularioProvincia.pais.options[document.formularioProvincia.pais.selectedIndex].value
}
ajax=nuevoAjax();

ajax2=nuevoAjax();

ajax3=nuevoAjax();

ajax4=nuevoAjax();

ajax5=nuevoAjax();

ajax6=nuevoAjax();

ajax9=nuevoAjax();
ajax8=nuevoAjax();
ajax11=nuevoAjax();

if(d1=="101001"){
var so = new SWFObject("andalucia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101002"){
var so = new SWFObject("aragon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101003"){
var so = new SWFObject("asturias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101004"){
var so = new SWFObject("beleares.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101005"){
var so = new SWFObject("vasco.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101006"){
var so = new SWFObject("canarias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101007"){
var so = new SWFObject("cantabria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101008"){
var so = new SWFObject("cataluña.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101009"){
var so = new SWFObject("castillalamancha.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101010"){
var so = new SWFObject("castilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101011"){
var so = new SWFObject("extremadura.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101012"){
var so = new SWFObject("galicia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101013"){
var so = new SWFObject("rioja.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101014"){
var so = new SWFObject("madrid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101015"){
var so = new SWFObject("rutas.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101016"){
var so = new SWFObject("navarra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101017"){
var so = new SWFObject("valencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101018"){
var so = new SWFObject("rutas.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
if(d1=="101019"){
var so = new SWFObject("rutas.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("vista");
}
ajax11.open("GET", "../funciones/cargarPoblacionFiesta.php?edo="+d1, true);

	ajax11.onreadystatechange=function() {

		if (ajax11.readyState==4) {

		   combo3.innerHTML = ajax11.responseText;

		} 

	} 

	ajax11.send(null)
	
ajax8.open("GET", "../funciones/tituloFiestaEstrellas.php?edo="+d1, true);

	ajax8.onreadystatechange=function() {

		if (ajax8.readyState==4) {

		   tit.innerHTML = ajax8.responseText;

		} 

	} 

	ajax8.send(null)
	

ajax9.open("GET", "../funciones/vertodasFiesta2Estrellas.php?edo="+d1, true);

	ajax9.onreadystatechange=function() {

		if (ajax9.readyState==4) {

		   vertodas.innerHTML = ajax9.responseText;

		} 

	} 

	ajax9.send(null)



/*ajax.open("GET", "../funciones/VistaPuebloAjaxFiesta.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   vista.innerHTML = ajax.responseText 

		}

	} 

	ajax.send(null)

	*/

    ajax6.open("GET","../funciones/cargarProvinciaFiestaEstrellas.php?edo="+d1, true);	

	ajax6.onreadystatechange=function() {		  

		if (ajax6.readyState==4) {

		   combo2.innerHTML = ajax6.responseText; 		   

		} 

	} 

	ajax6.send(null)

	

	ajax3.open("GET", "../funciones/VistaPuebloAjax3Fiesta2Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)


	

	

	

	ajax5.open("GET", "../funciones/VistaActividadAjaxFiesta.php?edo="+d1, true); 	

	ajax5.onreadystatechange=function() {		  

		if (ajax5.readyState==4) {

		   actividad.innerHTML = ajax5.responseText; 		   

		} 

	} 

	ajax5.send(null)	

}



function mostrarBares(d1) {

	var ver,ver2;

	ver = document.getElementById('ver');

	ver2 = document.getElementById('ver2');

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax.open("GET", "../funciones/mostrarBares.php?edo="+encodeURIComponent(d1), true);

	ajax2.open("GET", "../funciones/mostrarBaresMenu.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   ver.innerHTML = ajax.responseText;

		   unescape(ver.innerHTML);

		} 

	} 

	ajax.send(null)

	

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   ver2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

}





function mostrarRestaurantes(d1) {

	var ver,ver2;

	ver = document.getElementById('ver');

	ver2 = document.getElementById('ver2');

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax.open("GET", "../funciones/mostrarRestaurantes.php?edo="+encodeURIComponent(d1), true);

	ajax2.open("GET", "../funciones/mostrarRestaurantesMenu.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   ver.innerHTML = ajax.responseText;

		   unescape(ver.innerHTML);

		} 

	} 

	ajax.send(null)

	

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   ver2.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

}





function mostrarFechasBuscar(d1) {

	var fecha,fecha1;

	fecha = document.getElementById('fecha');

	fecha1 = document.getElementById('fecha1');

	ajax = nuevoAjax();

	ajax2=nuevoAjax();

	ajax.open("GET", "../funciones/mostrarFechasBuscar.php?edo="+encodeURIComponent(d1), true);

	ajax2.open("GET", "../funciones/mostrarFechasBuscarMenu.php?edo="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   fecha.innerHTML = ajax.responseText;

		   unescape(ver.innerHTML);

		} 

	} 

	ajax.send(null)

	

	ajax2.onreadystatechange=function() {

		if (ajax2.readyState==4) {

		   fecha1.innerHTML = ajax2.responseText 

		} 

	} 

	ajax2.send(null)

}





function cargarPaginacion(pagina) {

	var paginacion;

	paginacion = document.getElementById('paginacion');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargarPaginacion.php?pagina="+pagina, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   paginacion.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function pagos(codigo) {

location.href="../alojamiento/pagos.php?codigo="+codigo;	

}





function pagosPlan() {

	var marcado = "no";

	with (document.confirmacion) {

		for ( var i = 0; i < plan.length; i++ ) {

			if ( plan[i].checked)

				marcado = "si"

		}

		

		if (marcado=="no")

			alert("Para continuar debe escoger uno de nuestros planes");

		else

			document.confirmacion.submit();

	}

}





function pagoPlan() {

	var marcado = "no";

	with (document.confirmacion) {

	if ( plan.checked)

		marcado = "si"

		

	if (marcado=="no")

		alert("Para continuar debe escoger uno de nuestros planes");

	else

		document.confirmacion.submit();

	}

}





function masinfo() {

	var v=window.open("../alojamiento/masinfo.php", "yyy", "toolbar=no scrollbars=yes, menubar=no, location=no, resizable=no");

	v.resizeTo(750,300);

	v.moveTo(100,150);

 }





function vistas(id) {

 location.href='../funciones/visitas.php?codigo='+id;

}

function vistasGrande(id) {

 location.href='../funciones/visitasGrande.php?codigo='+id;

}

function vistasEstrellas(id) {

 location.href='../funciones/visitasEstrellas.php?codigo='+id;

}


function vistasDespedida(id) {

 location.href='../funciones/visitasDespedida.php?codigo='+id;

}
function vistasEstrella(id) {

 location.href='../funciones/visitasEstrella.php?codigo='+id;

}
function vistasEmpresa(id) {

 location.href='../funciones/visitasEmpresa.php?codigo='+id;

}
function vistasTienda(id) {

 location.href='../funciones/visitasTienda.php?codigo='+id;

}
function vistasRutas(id,pueblo) {

 location.href='../funciones/visitasRutas.php?codigo='+id+'&pueblo='+pueblo;

}
function vistasPlayas(id) {

 location.href='../funciones/visitasPlayas.php?codigo='+id;

}
function vistasEsqui(id) {

 location.href='../funciones/visitasEsqui.php?codigo='+id;

}
function vistasFiesta(id,tipo) {

 location.href='../funciones/visitasFiesta.php?codigo='+id+'&tipo='+tipo;

}

function vistasRest(id,tipo) {

 location.href='../funciones/visitasRest.php?codigo='+id;

}



function poppupFoto(id) {

	var v = window.open("../alojamiento/popupFoto.php?id="+id, "yyy", "toolbar=no scrollbars=no, menubar=no, location=no, resizable=no");

	v.resizeTo(230,230);

	v.moveTo(300,200);

 }	





function cargarUsuarioAlojamiento(digitador,usuario,codigo) {

	ajax = nuevoAjax();

	ajax.open("GET", "usuario_alojamiento.php?digitador="+digitador+"&usuario="+usuario+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		  ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function comprueba_extension(formulario, archivo) {

   extensiones_permitidas = new Array(".gif", ".jpg", ".jpeg", ".pjpeg");

   mierror = "";

   if (!archivo) {

      mierror = "No has seleccionado ningún archivo.";

   } else {

      //recupero la extensión de este nombre de archivo 

      extension = (archivo.substring(archivo.lastIndexOf("."))).toLowerCase();

      //compruebo si la extensión está entre las permitidas 

      permitida = false;

      for (var i = 0; i < extensiones_permitidas.length; i++) {

         if (extensiones_permitidas[i] == extension) {

         permitida = true;

         break;

         } 

      } 

      if (!permitida) {

         mierror = "Comprueba la extensión de los archivos a subir. \nSólo se pueden subir archivos con extensiones: " + extensiones_permitidas.join();

       } else {

         return true;

       } 

   } 

   //si estoy aqui es que no se ha podido submitir 

   alert (mierror);

   return false;

}





function envioAmigo() {

	//guardo la referencia de la ventana para poder utilizarla luego 

	ventana_secundaria = window.open("../mail/enviaramigo.htm","miventan","width=650,height=160,menubar=no")

} 





function contactar() {

	//guardo la referencia de la ventana para poder utilizarla luego 

	ventana_secundaria = window.open("../mail/contactenos.htm","miventana","width=460,height=350,menubar=no")

} 





function imprimirVentana() {

	version = parseInt(navigator.appVersion);

	if (version >= 4)

		window.print();

}





function buscarCasasTop(lugar) {

	var topcasas;

	topcasas = document.getElementById('topcasas');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargarCasasTop.php?lugar="+lugar, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   topcasas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function buscarEmpresasTop(lugar) {

	var topcasas;

	topcasas = document.getElementById('topcasas');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargarEmpresasTop.php?lugar="+lugar, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   topcasas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function buscarTiendaTop(lugar) {

	var topcasas;

	topcasas = document.getElementById('topcasas');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargaTiendaTop.php?lugar="+lugar, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   topcasas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function buscarEsquiTop(lugar) {

	var topcasas;

	topcasas = document.getElementById('topcasas');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargaEsquiTop.php?lugar="+lugar, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   topcasas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function buscarRutasTop(lugar) {

	var topcasas;

	topcasas = document.getElementById('topcasas');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargaRutasTop.php?lugar="+lugar, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   topcasas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function buscarPlayasTop(lugar) {

	var topcasas;

	topcasas = document.getElementById('topcasas');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargaPlayasTop.php?lugar="+lugar, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   topcasas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function validarBuscador (texto) {

	var texto = strTrim(texto, TRIM_BOTH);

	if (!validarLongitud(texto, 1)) {

		alert("Escriba mínimo 3 letras para mejorar su búsqueda.");

		return false;

	} else {

		return true;

	}

}





function validarLongitud (texto, lon) {

	if (texto.length < lon)

		return false;

	else

		return true;

}





function mostrarplaya(codigo) {

	var playas, xx, alojamiento, tops,tiendas;



	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreProvincia.php?provincias="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)
*/
	

	playas = document.getElementById('playas');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/playaprovincia.php?provincias="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   playas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

		/*

	alojamiento = document.getElementById('alojamiento');

	ajax3 = nuevoAjax();

	ajax3.open("GET", "../funciones/verAlojamientos.php?provincias="+codigo, true);

	ajax3.onreadystatechange = function() {

		if (ajax3.readyState == 4) {

		   alojamiento.innerHTML = ajax3.responseText 

		} 

	} 

	ajax3.send(null);

	

	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarPlayasTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	

	tiendas = document.getElementById('tiendas');

	ajaxt = nuevoAjax();

	ajaxt.open("GET", "../funciones/verTiendas.php?provincias="+codigo, true);

	ajaxt.onreadystatechange = function() {

		if (ajaxt.readyState == 4) {

		   tiendas.innerHTML = ajaxt.responseText 

		} 

	} 

	ajaxt.send(null);*/

}





/*

function mostrarplaya(codigo) {

	var playas, xx, alojamiento, tops,tiendas;

	//codigo = document.formularioProvincia.provincia.options[document.formularioProvincia.provincia.selectedIndex].value;

	xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreProvincia.php?provincias="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	

	playas = document.getElementById('playas');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/playaprovincia.php?provincias="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   playas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

		

	alojamiento = document.getElementById('alojamiento');

	ajax3 = nuevoAjax();

	ajax3.open("GET", "../funciones/verAlojamientos.php?provincias="+codigo, true);

	ajax3.onreadystatechange = function() {

		if (ajax3.readyState == 4) {

		   alojamiento.innerHTML = ajax3.responseText 

		} 

	} 

	ajax3.send(null);

	

	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarPlayasTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	

	tiendas = document.getElementById('tiendas');

	ajaxt = nuevoAjax();

	ajaxt.open("GET", "../funciones/verTiendas.php?provincias="+codigo, true);

	ajaxt.onreadystatechange = function() {

		if (ajaxt.readyState == 4) {

		   tiendas.innerHTML = ajaxt.responseText 

		} 

	} 

	ajaxt.send(null);

}

*/





function mostraresquiEstrellas(codigo) {

	var estaciones, xx, tops,combo33,vista3,combo456,actividad,tit;

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	*/
	if(codigo!="101"){
		
		if(codigo=="1"){
var so = new SWFObject("../../flash/pirineoAragones.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
		if(codigo=="2"){
var so = new SWFObject("../../flash/pirineoNavarro.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="3"){
var so = new SWFObject("../../flash/pirineoCatalan.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="4"){
var so = new SWFObject("../../flash/cordilleraCantabrica.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="5"){
var so = new SWFObject("../../flash/sistemaCentral.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="6"){
var so = new SWFObject("../../flash/SistemaIberico.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="7"){
var so = new SWFObject("../../flash/sistemaPenibetico.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="8"){
var so = new SWFObject("../../flash/serraDaEstrela.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="9"){
var so = new SWFObject("../../flash/pirineoAndorrano.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
	tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsquiEstrellas.php?edo="+codigo, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)

	
	combo456 = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui2.php?edo="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo456.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

	vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaSistema3Estrellas.php?edo="+codigo, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjaxEsqui.php?edo="+codigo, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esquiEstrellas.php?sistema="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo33 = document.getElementById('combo3');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarProvEstrellas.php?sistema="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo33.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/
}else{
	paisEsquiEstrellas(codigo);	
	}
	

}


function mostraresqui(codigo) {

	var estaciones, xx, tops,combo33,vista3,combo456,actividad,tit;

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)
	

	*/
	if(codigo!="101"){
		
		if(codigo=="1"){
var so = new SWFObject("../../flash/pirineoAragones.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
		if(codigo=="2"){
var so = new SWFObject("../../flash/pirineoNavarro.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="3"){
var so = new SWFObject("../../flash/pirineoCatalan.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="4"){
var so = new SWFObject("../../flash/cordilleraCantabrica.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="5"){
var so = new SWFObject("../../flash/sistemaCentral.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="6"){
var so = new SWFObject("../../flash/SistemaIberico.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="7"){
var so = new SWFObject("../../flash/sistemaPenibetico.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="8"){
var so = new SWFObject("../../flash/serraDaEstrela.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(codigo=="9"){
var so = new SWFObject("../../flash/pirineoAndorrano.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
	tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsqui.php?edo="+codigo, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)

	
	combo456 = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui2.php?edo="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo456.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

	vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaSistema3.php?edo="+codigo, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)
	
if(codigo!="9"){
	actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjaxEsqui.php?edo="+codigo, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)
}else{
	
	actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/andorra.php?edo="+codigo, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)
}
	

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esqui.php?sistema="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo33 = document.getElementById('combo3');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarProv.php?sistema="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo33.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	
	}else{
	paisEsqui(codigo);	
	}
}

function paisEsqui(codigo) {

	var estaciones, xx, tops,combo33,vista3,combo456,actividad,tit;

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)
	

	*/
	
var so = new SWFObject("../../flash/esqui.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");

	
	tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsquiPais.php?edo="+codigo, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)

	
	combo456 = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui2.php?edo="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo456.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

	vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaSistema3Pais.php?edo="+codigo, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+codigo, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esqui.php?sistema="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo33 = document.getElementById('combo3');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarProvPais.php?sistema="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo33.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	
	
}

function paisEsquiEstrellas(codigo) {

	var estaciones, xx, tops,combo33,vista3,combo456,actividad,tit;

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)
	

	*/
	
var so = new SWFObject("../../flash/esqui.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");

	
	tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsquiPais.php?edo="+codigo, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)

	
	combo456 = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui2.php?edo="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo456.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

	vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaSistema3PaisEstrellas.php?edo="+codigo, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)

	actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+codigo, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esquiEstrellas.php?sistema="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo33 = document.getElementById('combo3');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarProvPaisEstrellas.php?sistema="+codigo, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo33.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	
	
}



function esquiajaxEstrellas() {

	var estaciones, xx, tops,combo,d1,actividad,vista3,tit;
	d1 = document.formularioSistema.provincia.options[document.formularioSistema.provincia.selectedIndex].value;
if(d1==""){
	d1=document.formularioSistema.region.options[document.formularioSistema.region.selectedIndex].value
}
	



	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	
	
*/
if(d1=="101001001"){
var so = new SWFObject("../../flash/esquiAlmeria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001002"){
var so = new SWFObject("../../flash/esquiCadiz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001003"){
var so = new SWFObject("../../flash/esquiCordoba.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001004"){
var so = new SWFObject("../../flash/esquiGranada.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001005"){
var so = new SWFObject("../../flash/esquiHuelva.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001006"){
var so = new SWFObject("../../flash/esquiJaen.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001007"){
var so = new SWFObject("../../flash/esquiMalaga.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001008"){
var so = new SWFObject("../../flash/esquiSevilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002001"){
var so = new SWFObject("../../flash/esquiHuesca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002002"){
var so = new SWFObject("../../flash/esquiTeruel.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002003"){
var so = new SWFObject("../../flash/esquiZaragoza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101003001"){
var so = new SWFObject("../../flash/esquiAsturias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005001"){
var so = new SWFObject("../../flash/esquiAlava.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005002"){
var so = new SWFObject("../../flash/esquiGipuscoa.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005003"){
var so = new SWFObject("../../flash/esquiVizcaya.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101007001"){
var so = new SWFObject("../../flash/esquiCantabria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008001"){
var so = new SWFObject("../../flash/esquiBarcelona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008002"){
var so = new SWFObject("../../flash/esquiGerona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008003"){
var so = new SWFObject("../../flash/esquiLerida.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008004"){
var so = new SWFObject("../../flash/esquiTarragona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009001"){
var so = new SWFObject("../../flash/esquiAlbacete.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009002"){
var so = new SWFObject("../../flash/esquiCiudadReal.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009003"){
var so = new SWFObject("../../flash/esquiCuenca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009004"){
var so = new SWFObject("../../flash/esquiGuadalajara.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009005"){
var so = new SWFObject("../../flash/esquiToledo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010001"){
var so = new SWFObject("../../flash/esquiAvila.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010002"){
var so = new SWFObject("../../flash/esquiBurgos.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010003"){
var so = new SWFObject("../../flash/esquiLeon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010004"){
var so = new SWFObject("../../flash/esquiPalencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010005"){
var so = new SWFObject("../../flash/esquiSalamanca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010006"){
var so = new SWFObject("../../flash/esquiSegovia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010007"){
var so = new SWFObject("../../flash/esquiSoria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010008"){
var so = new SWFObject("../../flash/esquiValladolid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010009"){
var so = new SWFObject("../../flash/esquiZamora.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011001"){
var so = new SWFObject("../../flash/esquiBajadoz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011002"){
var so = new SWFObject("../../flash/esquiCaceres.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012001"){
var so = new SWFObject("../../flash/esquiCoruña.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012002"){
var so = new SWFObject("../../flash/esquiLugo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012003"){
var so = new SWFObject("../../flash/esquiOurense.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012004"){
var so = new SWFObject("../../flash/esquiPontevedra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101013001"){
var so = new SWFObject("../../flash/esquiRioja.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101014001"){
var so = new SWFObject("../../flash/esquiMadrid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101015001"){
var so = new SWFObject("../../flash/esquiMurcia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101016001"){
var so = new SWFObject("../../flash/esquiNavarra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017001"){
var so = new SWFObject("../../flash/esquiAlicante.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017002"){
var so = new SWFObject("../../flash/esquiCastellon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101017003"){
var so = new SWFObject("../../flash/esquiValencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101018001"){
var so = new SWFObject("../../flash/esquiCeuta.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101019001"){
var so = new SWFObject("../../flash/esquiMelilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101023001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101024001"){
var so = new SWFObject("../../flash/esquiHierro.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101025001"){
var so = new SWFObject("../../flash/esquiPalma.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101026001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101027001"){
var so = new SWFObject("../../flash/esquiTenerife.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101028001"){
var so = new SWFObject("../../flash/esquiCanarias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101029001"){
var so = new SWFObject("../../flash/esquiFuerteventura.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101030001"){
var so = new SWFObject("../../flash/esquiLanzarote.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101031001"){
var so = new SWFObject("../../flash/esquiFormentera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101032001"){
var so = new SWFObject("../../flash/esquiIbiza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101033001"){
var so = new SWFObject("../../flash/esquiMallorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101034001"){
var so = new SWFObject("../../flash/esquiMenorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}

tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsquiEstrellas.php?edo="+d1, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)


vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaEsqui3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)
actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esquiEstrellas.php?sistema="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsquiEstrellas.php?edo="+d1, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	

}
function esquiajaxMapa(d1) {

	var estaciones, xx, tops,combo,d1,actividad,vista3,tit;
	
	

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	
	
*/
tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsqui.php?edo="+d1, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)


vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaEsqui3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)
actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esqui.php?sistema="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui.php?edo="+d1, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	

}
function esquiajaxMapaEstrellas(d1) {

	var estaciones, xx, tops,combo,d1,actividad,vista3,tit;
	
	

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	
	
*/
tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsquiEstrellas.php?edo="+d1, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)


vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaEsqui3Estrellas.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)
actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esquiEstrellas.php?sistema="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsquiEstrellas.php?edo="+d1, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	

}


function esquiajax() {

	var estaciones, xx, tops,combo,d1,actividad,vista3,tit;
	
	d1 = document.formularioSistema.provincia.options[document.formularioSistema.provincia.selectedIndex].value;
if(d1==""){
	d1=document.formularioSistema.region.options[document.formularioSistema.region.selectedIndex].value
}

	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	
	
*/
if(d1=="101001001"){
var so = new SWFObject("../../flash/esquiAlmeria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001002"){
var so = new SWFObject("../../flash/esquiCadiz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001003"){
var so = new SWFObject("../../flash/esquiCordoba.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001004"){
var so = new SWFObject("../../flash/esquiGranada.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001005"){
var so = new SWFObject("../../flash/esquiHuelva.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001006"){
var so = new SWFObject("../../flash/esquiJaen.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001007"){
var so = new SWFObject("../../flash/esquiMalaga.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101001008"){
var so = new SWFObject("../../flash/esquiSevilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002001"){
var so = new SWFObject("../../flash/esquiHuesca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002002"){
var so = new SWFObject("../../flash/esquiTeruel.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101002003"){
var so = new SWFObject("../../flash/esquiZaragoza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101003001"){
var so = new SWFObject("../../flash/esquiAsturias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005001"){
var so = new SWFObject("../../flash/esquiAlava.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005002"){
var so = new SWFObject("../../flash/esquiGipuscoa.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101005003"){
var so = new SWFObject("../../flash/esquiVizcaya.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101007001"){
var so = new SWFObject("../../flash/esquiCantabria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008001"){
var so = new SWFObject("../../flash/esquiBarcelona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008002"){
var so = new SWFObject("../../flash/esquiGerona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008003"){
var so = new SWFObject("../../flash/esquiLerida.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101008004"){
var so = new SWFObject("../../flash/esquiTarragona.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009001"){
var so = new SWFObject("../../flash/esquiAlbacete.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009002"){
var so = new SWFObject("../../flash/esquiCiudadReal.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009003"){
var so = new SWFObject("../../flash/esquiCuenca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009004"){
var so = new SWFObject("../../flash/esquiGuadalajara.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101009005"){
var so = new SWFObject("../../flash/esquiToledo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010001"){
var so = new SWFObject("../../flash/esquiAvila.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010002"){
var so = new SWFObject("../../flash/esquiBurgos.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010003"){
var so = new SWFObject("../../flash/esquiLeon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010004"){
var so = new SWFObject("../../flash/esquiPalencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010005"){
var so = new SWFObject("../../flash/esquiSalamanca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010006"){
var so = new SWFObject("../../flash/esquiSegovia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010007"){
var so = new SWFObject("../../flash/esquiSoria.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010008"){
var so = new SWFObject("../../flash/esquiValladolid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101010009"){
var so = new SWFObject("../../flash/esquiZamora.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011001"){
var so = new SWFObject("../../flash/esquiBajadoz.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101011002"){
var so = new SWFObject("../../flash/esquiCaceres.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012001"){
var so = new SWFObject("../../flash/esquiCoruña.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012002"){
var so = new SWFObject("../../flash/esquiLugo.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012003"){
var so = new SWFObject("../../flash/esquiOurense.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101012004"){
var so = new SWFObject("../../flash/esquiPontevedra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101013001"){
var so = new SWFObject("../../flash/esquiRioja.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101014001"){
var so = new SWFObject("../../flash/esquiMadrid.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101015001"){
var so = new SWFObject("../../flash/esquiMurcia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101016001"){
var so = new SWFObject("../../flash/esquiNavarra.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017001"){
var so = new SWFObject("../../flash/esquiAlicante.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101017002"){
var so = new SWFObject("../../flash/esquiCastellon.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101017003"){
var so = new SWFObject("../../flash/esquiValencia.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101018001"){
var so = new SWFObject("../../flash/esquiCeuta.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101019001"){
var so = new SWFObject("../../flash/esquiMelilla.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101023001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101024001"){
var so = new SWFObject("../../flash/esquiHierro.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}if(d1=="101025001"){
var so = new SWFObject("../../flash/esquiPalma.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101026001"){
var so = new SWFObject("../../flash/esquiGomera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101027001"){
var so = new SWFObject("../../flash/esquiTenerife.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101028001"){
var so = new SWFObject("../../flash/esquiCanarias.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101029001"){
var so = new SWFObject("../../flash/esquiFuerteventura.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101030001"){
var so = new SWFObject("../../flash/esquiLanzarote.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101031001"){
var so = new SWFObject("../../flash/esquiFormentera.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101032001"){
var so = new SWFObject("../../flash/esquiIbiza.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101033001"){
var so = new SWFObject("../../flash/esquiMallorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
if(d1=="101034001"){
var so = new SWFObject("../../flash/esquiMenorca.swf", "mapa1", "230", "210", "7", "#FFDC93");
			so.addParam("quality", "high");
			so.addParam("SCALE", "exactfit");
			so.write("mapa");
}
tit = document.getElementById('tit');
	ajax100=nuevoAjax();



ajax100.open("GET", "../funciones/tituloEsqui.php?edo="+d1, true);

	ajax100.onreadystatechange=function() {

		if (ajax100.readyState==4) {

		   tit.innerHTML = ajax100.responseText;

		} 

	} 

	ajax100.send(null)


vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaEsqui3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)
actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esqui.php?sistema="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui.php?edo="+d1, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	

}



function esquiajax2(d1) {

	var estaciones, xx, tops,combo,d1,actividad,vista3;
	
	


	/*xx = document.getElementById('xx');

	ajaxx = nuevoAjax();

	ajaxx.open("GET", "../funciones/nombreEsqui.php?id="+codigo, true);

	ajaxx.onreadystatechange = function() {

		if (ajaxx.readyState == 4) {

		   xx.innerHTML = ajaxx.responseText 

		} 

	} 

	ajaxx.send(null)

	
	
*/
vista3 = document.getElementById('vista3');
ajax3 = nuevoAjax();
ajax3.open("GET", "../funciones/VistaEsqui3.php?edo="+d1, true);

	ajax3.onreadystatechange=function() {

		if (ajax3.readyState==4) {

		   vista3.innerHTML = ajax3.responseText;

		} 

	} 

	ajax3.send(null)
actividad = document.getElementById('actividad');
ajax15 = nuevoAjax();
ajax15.open("GET", "../funciones/VistaActividadAjax.php?edo="+d1, true); 	

	ajax15.onreadystatechange=function() {		  

		if (ajax15.readyState==4) {

		   actividad.innerHTML = ajax15.responseText; 		   

		} 

	} 

	ajax15.send(null)

	estaciones = document.getElementById('esqui');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/estaciones_esqui.php?sistema="+d1, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   estaciones.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

combo = document.getElementById('pobla');

	ajax123 = nuevoAjax();

	ajax123.open("GET", "../funciones/cargarPoblacionEsqui.php?edo="+d1, true);

	ajax123.onreadystatechange = function() {

		if (ajax123.readyState == 4) {

		   combo.innerHTML = ajax123.responseText 

		} 

	} 

	ajax123.send(null)

		
/*
	tops = document.getElementById('top');

	ajaxw = nuevoAjax();

	ajaxw.open("GET", "../funciones/cargarEsquiTop.php?provincias="+codigo, true);

	ajaxw.onreadystatechange = function() {

		if (ajaxw.readyState == 4) {

		   tops.innerHTML = ajaxw.responseText 

		} 

	} 

	ajaxw.send(null);

	*/

	

}


function Buscador (texto) {

	var texto = strTrim(texto, TRIM_BOTH);

		document.write(texto);

	if (!validarLongitud(texto, 3)) {

		alert("Escriba mínimo 3 letras para mejorar su búsqueda.");

		return false;

	} else {

		return true;

	}

}





function cargarActividad(tipo_act) {

	var act; 	

	act = document.getElementById('con_actividad');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargarActividad.php?tipo_act="+tipo_act, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   act.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}


function cargarActividad2(tipo_act) {

	var act; 	

	act = document.getElementById('con_actividad');  

	ajax = nuevoAjax();

	ajax.open("GET", "../../funciones/cargarActividad.php?tipo_act="+tipo_act, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   act.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}




function NuevaFoto(form) {

	var permitida;

	var extension;

	var mierror;

	

	if (fotos.nombre.value == "")

	{alert("Ingrese el nombre de la foto"); fotos.nombre.focus(); return; }

	

	

	extensiones_permitidas = new Array(".gif", ".jpg", ".pjpeg");

   mierror = "";

   if (!fotos.foto.value) {

      mierror = "No has seleccionado ningún archivo.";

   } else {

      extension = (fotos.foto.value.substring(fotos.foto.value.lastIndexOf("."))).toLowerCase();

     permitida = false;

      for (var i = 0; i < extensiones_permitidas.length; i++) {

         if (extensiones_permitidas[i] == extension) {

         permitida = true;

         break;

         } 

      } 

      if (!permitida) {

         mierror = "Comprueba la extensión de los archivos a subir. \nSólo se pueden subir archivos con extensiones: " + extensiones_permitidas.join();

         alert (mierror);

		 } else {
			 
			 if (cuenta == 0)
				{
				cuenta++;
				fotos.submit();
				alert("Su Foto esta siendo Cargada");
				return true;
				}
				else
				{
				alert("El formulario ya está siendo enviado, por favor aguarde un instante.");
				return false;
				}


        

       } 

   } 

  

}





function borrarFotoEmpresa(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../Empresas/borrar_foto_empresa.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoEmpresaAdmin(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../Empresas/borrar_foto_empresaAdmin.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function borrarFotoBar(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../bares/borrar_foto_bares.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function borrarFotoInmueble(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../inmobiliaria/borrar_foto_inmueble.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function borrarFotoTienda(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../tienda/borrar_foto_tienda.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoTiendaAdmin(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../tienda/borrar_foto_tiendaAdmin.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoFiesta(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../fechas_calientes/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoFiestaAdmin(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../fechas_calientes/borrar_foto_fiestaAdmin.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoEsquiAdmin(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../esqui/borrar_foto_esquiAdmin.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}



function borrarFotoEsqui(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../esqui/borrar_foto_esqui.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoPlaya(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../playas/borrar_foto_playa.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoRuta(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../rutas/borrar_foto_ruta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoEventoAloj(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../vistas/eventos/borrar_foto.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoEventoTienda(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../fechas_calientes/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoEventoEmpresa(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../turismo-activo/eventos/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoEventoPlaya(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../playas/eventos/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoEventoRuta(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../rutas/eventos/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoEventoFiesta(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../fechas_calientes/eventos/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}
function borrarFotoEventoEsqui(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../../esqui/eventos/borrar_foto_fiesta.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}

function borrarFotoRestaurante(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../restaurantes/borrar_foto_restaurante.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function borrarFotoEspectaculos(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../espectaculos/borrar_foto_espectaculos.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function borrarFotoSalud_belleza(id, codigo) {

	var contenedor4;

	contenedor4 = document.getElementById('contenedor4');

	ajax = nuevoAjax();

	ajax.open("GET", "../salud_belleza/borrar_foto_salud_belleza.php?id="+id+"&codigo="+codigo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   contenedor4.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function insertar_fila (id_tabla, num_filas, num_celdas) {

	var tabla;

	tabla = document.getElementById(id_tabla);

	//largo_tabla = tabla.getElementsByTagName("TR").length;

	for (i = 0; i < num_filas; i++) {

		fila = document.createElement("TR");

		//fila.setAttribute("id", "fila"+largo_tabla);

		//fila.setAttribute("id", "fila"+largo_tabla);

		for (i = 0; i < num_celdas; i++) {

			celda = document.createElement("TD");

			fila.appendChild(celda);

		}

		tabla.appendChild(fila);

		//largo_tabla++;

	}

}





function borrar_fila (id_tabla, num_fila) {

	var tabla;

	tabla = document.getElementById(id_tabla);

	filas = tabla.getElementsByTagName("TR");

	fila = filas.item(num_fila);

	tabla.removeChild(fila);

}





function textCounter(field, countfield, maxlimit) {

	if (field.value.length > maxlimit) // if too long...trim it!

		field.value = field.value.substring(0, maxlimit);

	else 

		countfield.value = maxlimit - field.value.length;

}





function verificarCodigo() {

	var campo, codigo, capa, capa2, prueba;

	campo = document.formulario.tblcodigo;

	codigo = strTrim(campo.value, TRIM_BOTH);

	if (codigo != '') {

		if (codigo.length < 4) {

			alert ('El código debe tener mínimo 4 números.');

		} else {

			capa = document.getElementById('verificacion');

			capa2 = document.getElementById('verificacion2');

			ajax = nuevoAjax();

			ajax.open("GET","verificacion.php?codigo="+codigo,true);

			ajax.onreadystatechange=function() {

				if (ajax.readyState==4) {

					prueba = document.getElementById('prueba');

					prueba.value = ajax.responseText;

					if (prueba.value == "1") {

					   capa.innerHTML = '<div class="style5">C&oacute;digo ya utilizado, escriba otro.</div>';

					} else {

					   capa.innerHTML = '<div class="style6">C&oacute;digo libre, puede utilizarlo.</div>';

					}

				}

			}

			ajax.send(null)

		}

	} else {

		alert("Escriba el código");

	}

	campo.focus();

}





function cambio_frame(clave) {

	//var frame = document.getElementById('prop');
	var s1=document.getElementById('s1');
	var s2=document.getElementById('s2');
	var s3=document.getElementById('s3');

	var s5=document.getElementById('s5');
	
	

	switch (clave) {

	case 1:

        s1.style.backgroundPosition="0% -42px";
		s2.style.backgroundPosition="";
		s3.style.backgroundPosition="";
		
		s5.style.backgroundPosition="";
		
		
		location.href='propietario.php';

		break;

	case 2:
	 s1.style.backgroundPosition="";
		s2.style.backgroundPosition="0% -42px";
		s3.style.backgroundPosition="";
		
		s5.style.backgroundPosition="";
		

		location.href='propietarioEmpresas.php';

		break;

	case 3:
	 s1.style.backgroundPosition="";
		s2.style.backgroundPosition="";
		s3.style.backgroundPosition="0% -42px";
		
		s5.style.backgroundPosition="";
		
		
		location.href='propietarioTiendas.php';

		break;

	case 4:
	 s1.style.backgroundPosition="";
		s2.style.backgroundPosition="";
		s3.style.backgroundPosition="";
		
		s5.style.backgroundPosition="";
		
		

		frame.src = '#';

		break;

	case 5:
	 s1.style.backgroundPosition="";
		s2.style.backgroundPosition="";
		s3.style.backgroundPosition="";
		
		s5.style.backgroundPosition="0% -42px";
		
		

		location.href='propietarioRestaurante.php';

		break;		

	case 6:
	 s1.style.backgroundPosition="";
		s2.style.backgroundPosition="";
		s3.style.backgroundPosition="";
		
		s5.style.backgroundPosition="";
		
		

		location.href='propietarioEsqui.php';

		break;	

	case 7:
	 s1.style.backgroundPosition="";
		s2.style.backgroundPosition="";
		s3.style.backgroundPosition="";
		
		s5.style.backgroundPosition="";
		
		

		location.href='propietario.php';

		break;						

	}

}





function irAPadre(pagina) {

	window.parent.location = pagina;

}





function ValidarFplaya() {

   var Control;

   var Dato;

   var Control1;

   var Dato1;

   Control = document.formulario.tblnombre;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el nombre de la playa");

		Control.focus();

		return false;

	}

   Control = document.formulario.tbldescripcion;

	Dato = strTrim(Control.value, TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar el texto detallado de la playa");

		Control.focus();

		return false;

	}      		

	return true;

}





function setAutorizacionPago () {   

	var control = document.confirmacion.tblautorizacion_pago;

	if (control.checked) {

		control.value = "S";

	} else {

		control.value = "N";

	}

}





function cargarSubtipo(id_tipo) {

	var id_tipo, subtipo; 	

	subtipo = document.getElementById('subtipo');  

	

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargarSubtipo.php?id_tipo="+id_tipo, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   subtipo.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function cerrar () {

	window.close(); 

}





function obtenerValorRadio (radio) {

	for (i = 0; i < radio.length; i++)

		if (radio[i].checked) return radio[i].value;

	return false;

}





function obtenerValorSelect (selector) {

	return selector.options[selector.selectedIndex].value;

}





function imprSelec (nombre) {

	var ficha = document.getElementById(nombre);

	var ventimp = window.open('', 'popimpr');

	ventimp.document.writeln( ficha.innerHTML );

	ventimp.document.close();

	ventimp.print();

	ventimp.close();

}





function max(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado.innerHTML = str; 

	Restante.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado.innerHTML = total 

		Restante.innerHTML = 0 

	}

}



function max2(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado2.innerHTML = str; 

	Restante2.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado2.innerHTML = total 

		Restante2.innerHTML = 0 

	}

}



function max3(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado3.innerHTML = str; 

	Restante3.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado3.innerHTML = total 

		Restante3.innerHTML = 0 

	}

}

function max4(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado4.innerHTML = str; 

	Restante4.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado4.innerHTML = total 

		Restante4.innerHTML = 0 

	}

}

function max5(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado5.innerHTML = str; 

	Restante5.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado5.innerHTML = total 

		Restante5.innerHTML = 0 

	}

}



function max6(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado6.innerHTML = str; 

	Restante6.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado6.innerHTML = total 

		Restante6.innerHTML = 0 

	}

}


function max7(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 

	Digitado7.innerHTML = str; 

	Restante7.innerHTML = total - str; 



	if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		Digitado7.innerHTML = total 

		Restante7.innerHTML = 0 

	}

}
function max8(txarea, valor) { 

	total = valor; 

	tam = txarea.value.length; 

	str = ""; 

	str = str + tam; 
if (tam > total) { 

		aux = txarea.value; 

		txarea.value = aux.substring(0, total); 

		

	}

}





function email (Script) {

	var v = window.open("personas_pendientes.php?"+Script, "yyy", "toolbar=no scrollbars=yes, menubar=no, location=no, resizable=no");

	v.resizeTo(500, 300);

	v.moveTo(100, 150);

}





function EnviarCorreos (form) {

	var EnviarCorreo = document.EnviarCorreo;

	if (confirm("Se dispone a enviar correo a los contactos seleccionados"))

		EnviarCorreo.submit();

}





function EnviarTodos () {

	if (confirm("Se dispone a enviar correo a TODOS sus contactos"))

		location.href="lista.php?n=3";

}





function setCheckboxes(the_form, do_check) {

    var elts      = (typeof(document.forms[the_form].elements['Mod[]']) != 'undefined')

                  ? document.forms[the_form].elements['Mod[]']

                  : (typeof(document.forms[the_form].elements['Mod[]']) != 'undefined')

          ? document.forms[the_form].elements['Mod[]']

          : document.forms[the_form].elements['Mod[]'];

    var elts_cnt  = (typeof(elts.length) != 'undefined')

                  ? elts.length

                  : 0;



    if (elts_cnt) {

        for (var i = 0; i < elts_cnt; i++) {

            elts[i].checked = do_check;

        } // end for

    } else {

        elts.checked        = do_check;

    } // end if... else



    return true;

}





function enviarCorreos2 () {

	var EnviarCorreo = document.EnviarCorreo;

	if (EnviarCorreo.fromname.value == "") { 

		alert("Ingrese el nombre de quien envia"); 

		EnviarCorreo.fromname.focus(); return; 

	}

	if (EnviarCorreo.fromemail.value == "") { 

		alert("Ingrese el correo de quien envia"); 

		EnviarCorreo.fromemail.focus(); return; 

	}

	if (EnviarCorreo.asunto.value == "") { 

		alert("Ingrese el asunto"); 

		EnviarCorreo.asunto.focus(); return; 

	}

	if (EnviarCorreo.mensaje.value == "") { 

		alert("Ingrese el mensaje"); 

		EnviarCorreo.mensaje.focus(); return; 

	}

	EnviarCorreo.submit();

}





function EliminarRegistro (Script) {

	if (confirm("Esta realmente seguro de eliminar el registro"))

		EjecutarScript(Script); 

}

/* Esta son las funciones nuevas que he ingresado*/





function cargarActividades(tipo_act) {

	var act; 	

	act = document.getElementById('con_actividad');  

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/cargarActividades.php?tipo_act="+tipo_act, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   act.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function autotab(thisval,fname, flen){

 

 var fieldname = eval("document.confirmacion." + fname);



 if(thisval != 9 && thisval != 16){



 if(fieldname.value.length + 1 <= flen){

  fieldname.focus();

 }else{

 

  for(x=0; x<document.confirmacion.elements.length; x++){

        if(fieldname.name == document.confirmacion.elements[x].name){

                var nextfield = x + 1;

        }

  }



          document.confirmacion.elements[nextfield].focus();



 }

 }

}



 

function verificarForm() {

	var Control;

	var Dato;

	var  Control2;

	var sw=0;

	Control=document.confirmacion.tblid_actividad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe Seleccionar una Actividad");

		Control.focus();

		sw=1;

		return;

	}

	Control=document.confirmacion.cantidad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar la cantidad de Personas");

		Control.focus();

		sw=1;

		return;

	}

	Control=document.confirmacion.dias;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar los Dias");

		Control.focus();

		sw=1;

		return;

	}

	Control=document.confirmacion.presupuesto;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Debe ingresar su Presupuesto");

		Control.focus();

		sw=1;

		return;

	}

	

	

		var consulta, id_actividad, cantidad, dias, presupuesto, nombre_actividad;	

		id_actividad = document.confirmacion.tblid_actividad.value;

		dias = document.confirmacion.dias.value;

		cantidad = document.confirmacion.cantidad.value;

		presupuesto = document.confirmacion.presupuesto.value;		

		consulta = document.getElementById('consulta');  

		ajax = nuevoAjax();

		ajax.open("GET", "../funciones/aux_oferviajeros.php?id_actividad="+id_actividad+"&cantidad="+cantidad+"&dias="+dias+"&presupuesto="+presupuesto, true);

		ajax.onreadystatechange = function() {

			if (ajax.readyState == 4) {

			   consulta.innerHTML = ajax.responseText 

			} 

		} 

		ajax.send(null)

	

		document.confirmacion.tblid_actividad.value='';

		document.confirmacion.dias.value='';

		document.confirmacion.cantidad.value='';

		document.confirmacion.presupuesto.value='';	

	

}





function BorrarActividad_oferviajeros(id) {

	var consulta;

	consulta = document.getElementById('consulta');

	ajax = nuevoAjax();

	ajax.open("GET", "../funciones/BorrarActividad_oferviajeros.php?id="+id, true);

	ajax.onreadystatechange = function() {

		if (ajax.readyState == 4) {

		   consulta.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null)

}





function valida_Aloj_oferviajero() {

   var Control;

   var Dato;

   Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione una Provincia");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione una Poblacion");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tbltipo_aloj;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione el tipo de Alojamiento");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tbldias;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Digite el Tiempo minimo");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblcapacidad;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Digite la Capacidad del Alojamiento");

		Control.focus();

		return false;

		}





   Control = document.confirmacion.tblpresupuesto;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Digite su Presupuesto");

		Control.focus();

		return false;

		}

		

   Control = document.confirmacion.tbldetalles;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Ingrese mas informacion");

		Control.focus();

		return false;

		}

}





function finalizar_oferta() {

   var Control;

   var Dato;

   Control = document.confirmacion.fecha_del_viaje;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Digite la Fecha del Viaje");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.telefono_contacto;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Ingrese un telefono de contacto");

		Control.focus();

		return false;

		}



		Control=document.confirmacion.correo_contacto;

		Dato = strTrim(Control.value,TRIM_BOTH);

/*		if (Dato.length == 0) {

			alert("Debe ingresar una dirección de correo válida");

			Control.focus();

			return false;

		}

		if (!ValidarEmail(Control,"Dirección de correo mal ingresada")) {	

			Control.focus();

			return false;   

		}

 */

}





function validar_actividad() {

   var Control;

   var Dato;

   Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione una Provincia");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione una Poblacion");

		Control.focus();

		return false;

		}



		Control=document.confirmacion.tbltipo_actividad;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Seleccione un tipo de Actividad");

			Control.focus();

			return false;

		}



		Control=document.confirmacion.tbltipo_actividad;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Seleccione un tipo de Actividad");

			Control.focus();

			return false;

		}



		Control=document.confirmacion.tblid_actividad;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Agregar por lo menos una Actividad");

			Control.focus();

			return false;

		}

 

}





function validar_restaurantes() {

   var Control;

   var Dato;

   Control = document.confirmacion.provincia;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione una Provincia");

		Control.focus();

		return false;

		}



   Control = document.confirmacion.tblpoblacion;

	Dato = strTrim(Control.value,TRIM_BOTH);

	if (Dato.length == 0) {

		alert("Seleccione una Poblacion");

		Control.focus();

		return false;

		}



		Control=document.confirmacion.Tminimo;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Digite cuantos dias va a ir al Restaurante");

			Control.focus();

			return false;

		}



		Control=document.confirmacion.Cantidad_personas;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Digite la cantidad de personas");

			Control.focus();

			return false;

		}



		Control=document.confirmacion.presupuesto;

		Dato = strTrim(Control.value,TRIM_BOTH);

		if (Dato.length == 0) {

			alert("Digite con cuanto presupuesto cuenta");

			Control.focus();

			return false;

		}

		Control=document.confirmacion.descripcion;

		Dato = strTrim(Control.value,TRIM_BOTH);		

		if (Dato.length == 0) {

			alert("Digite una pequeña descripcion de lo que desea");

			Control.focus();

			return false;

		} 

		if (Dato.length < 30) {

			alert ("Digite mas de 30 caracteres");

			Control.focus();

			return false;

		}

}

function obtenerValorSelect (selector) {

	return selector.options[selector.selectedIndex].value;

}



function getUrlGoogle(URL, form) {
	
      if (strTrim(document.confirmacion.provincia.value, TRIM_BOTH) == "") {
		  document.confirmacion.aux2.value="";
		  alert("Escoja la provincia."); document.confirmacion.provincia.focus();
	 
	  return; }
	  
       window.open(URL,"ventana1","width=720,height=500,scrollbars=YES");
 

}



function getUrlRifa(URL) {

	window.open(URL,"ventana1","width=500,height=700,scrollbars=YES");

}



function getUrlTienda(URL, form) {
	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {
		 
		  alert("Escoja la provincia."); confirmacion.provincia.focus();
	 
	  return; }


	window.open(URL,"ventana2","width=720,height=500,scrollbars=YES");

}
function getUrlPlayaRio(URL, form) {
	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {
		 
		  alert("Escoja la provincia."); confirmacion.provincia.focus();
	 
	  return; }


	window.open(URL,"ventana2","width=720,height=500,scrollbars=YES");

}


function getUrlRestaurante(URL, form) {
	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {
		
		  alert("Escoja la provincia."); confirmacion.provincia.focus();
	 
	  return; }

	window.open(URL,"ventana3","width=720,height=500,scrollbars=YES");

}



function getUrlBar(URL, form) {
	if (strTrim(confirmacion.provincia.value, TRIM_BOTH) == "") {
		  
		  alert("Escoja la provincia."); confirmacion.provincia.focus();
	 
	  return; }

	window.open(URL,"ventana4","width=720,height=500,scrollbars=YES");

}



function cargarEstrellas(){ 

	var d2,estrellas; 

	estrellas = document.getElementById('combos'); 

	d2 = document.confirmacion.tbltipo_aloj.value; 

	ajax=nuevoAjax();

	ajax.open("GET","../funciones/cargarEstrellas.php?edo="+d2,true); 

	ajax.onreadystatechange=function(){

		if (ajax.readyState==4) { 

		   estrellas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null) 

}

function servicioAereopuerto(){ 

	var d2,estrellas; 

	estrellas = document.getElementById('aereo'); 

	d2 = document.confirmacion.tbltipo.value; 

	ajax=nuevoAjax();

	ajax.open("GET","../funciones/servicioAereopuerto.php?edo="+d2,true); 

	ajax.onreadystatechange=function(){

		if (ajax.readyState==4) { 

		   estrellas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null) 

}
function cargarPrecios() {
	var d1, precio;
	ajax = nuevoAjax();
	precio= document.getElementById('pre');
	with (document.confirmacion) {
		for ( var i = 0; i < alq.length; i++ ) {
				if ( alq[i].checked ) {
					d1=document.confirmacion.alq[i].value;
				}
		}
	}
	
	if (d1 == 'I') {
		precio.innerHTML = "<tr class='formulario'><td colspan='4' align='center' class='negrita'>PRECIOS </td></tr><td class='negrita'><a href='#' onClick='abrir(),auxiliar();'>CASA COMPLETA</a></td></tr>";
	} else {
		precio.innerHTML = "<tr class='formulario'><td colspan='4' align='center' class='negrita'>PRECIOS</td></tr><td class='negrita'><a href='#' onClick='abrir2(),auxiliar();'>HABITACIONES</a></td></tr>";
	}
/*
	ajax.open("GET","../funciones/cargarCapacidad.php?edo="+d1, true);
	ajax.onreadystatechange = function() {
		if (ajax.readyState == 4) {
		   capacidad.innerHTML = ajax.responseText 
		} 
	} 
	ajax.send(null)	
*/
}

function cargarNombres3(){ 

	var d2,estrellas; 

	estrellas = document.getElementById('nombbr'); 

	d2 = document.confirmacion.tbltipo_aloj.value; 
    d3 = document.confirmacion.tblnombre_aloj.value;
	ajax=nuevoAjax();

	ajax.open("GET","../funciones/cargarNombre.php?edo="+d2+"&edo2="+d3,true); 

	ajax.onreadystatechange=function(){

		if (ajax.readyState==4) { 

		   estrellas.innerHTML = ajax.responseText 

		} 

	} 

	ajax.send(null) 

}




function enviado() {
if (cuenta == 0)
{
cuenta++;
return true;
}
else
{
alert("El formulario ya está siendo enviado, por favor aguarde un instante.");
return false;
}
}
 function isEmailAddress(theElement, nombre_del_elemento )
             {
             var s = theElement.value;
             var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
            if (s.length == 0 ) return true;
              if (filter.test(s))
            return true;
              else
             alert("Ingrese una dirección de correo válida");
            theElement.focus();
          return false;
            }
function abrirCON(URL) {


       window.open(URL,"ventana1","width=720,height=700,scrollbars=YES");
}


