function cargar(idioma) 
{		
	var lang;
	if (idioma=="S")
	{
		lang='es';
	}
	if (idioma=="E")
	{
		lang='en';
	}
	if (idioma=="D")
	{
		lang='de';
	}
	if (idioma=="P")
	{
		lang='pt';
	}	
		
		if (validaFecha()==true) 
		{
			if (validaFechaActual()==true) 
			{
				document.getElementById('buscando').style.visibility="visible";		
				var url;
				var hotel;
				var FechaEntrada;
				var FechaSalida;
				var pax;
				var nenes;
				var habitaciones;
				var regimen;
				var Epuntos;
				var tipoAlojamiento;
				
				if (document.getElementById('Id_enl')==null)
				{				 
					url="https://www.fuertehoteles.com/reservas/hotels_reservations.asp?";
				}
				else
				{
					Id_enl = document.getElementById('Id_enl').value;
					url="http://www.fuertehoteles.com/mail/news_busqueda.asp?Id_enl=" + Id_enl + "&url_destino=https://www.fuertehoteles.com/reservas/hotels_reservations.asp?";
				}
			
				tipoAlojamiento = document.getElementById('paramTipoBusqueda').value.toUpperCase();				
		 if ( (tipoAlojamiento == 'APARTAMENTO') || (tipoAlojamiento == 'APARTAMENTOS') || (tipoAlojamiento == 'apartamento') || (tipoAlojamiento == 'apartamentos') ) 
			{
				hotel = document.getElementById('hotel').value;
				FechaEntrada = document.getElementById('FechaEntradaApartamento').value;
				FechaSalida = document.getElementById('FechaSalidaApartamento').value;
				pax = document.getElementById('n_paxApartamento').value;
				nenes = document.getElementById('nenesApartamento').value;
				habitaciones = document.getElementById('cantidadApartamento').value;
				
				document.getElementById('nenesApartamento').style.visibility = "hidden";
				document.getElementById('n_paxApartamento').style.visibility = "hidden";	
				document.getElementById('cantidadApartamento').style.visibility = "hidden";	
				url=url + "Estado=Buscando&Hotel=" + hotel + "&FechaEntrada=" + FechaEntrada + "&FechaSalida=" + FechaSalida + "&N_pax=" + pax + "&N_Nenes=" + nenes + "&N_hab=" + habitaciones +  "&Regimen=&lang=" + lang;
			} 
			else 
			{
				hotel = document.getElementById('hotel').value;
				FechaEntrada = document.getElementById('FechaEntrada').value;
				FechaSalida = document.getElementById('FechaSalida').value;
				pax = document.getElementById('n_pax').value;
				nenes = document.getElementById('nenes').value;
				habitaciones = document.getElementById('cantidad').value;
				regimen = document.getElementById('regimen').value;
				
				document.getElementById('hotel').style.visibility = "hidden";
				document.getElementById('cantidad').style.visibility = "hidden";
				document.getElementById('regimen').style.visibility = "hidden";
				document.getElementById('nenes').style.visibility = "hidden";
				document.getElementById('n_pax').style.visibility = "hidden";	
				
				//Inicio Parche para poder buscar sólo alojamiento
				//Hay que revisar esto con MALF, el buscador no devuelve todos los productos menos los negativos
				if (hotel == '30')
				{
					regimen = 'DL,DF,' + regimen;
				}
				//Fin  				
				
				if ( document.getElementById('UtilizarPuntos'))
				{
					if (document.getElementById('UtilizarPuntos').checked) 
					{
						Epuntos = 'True';
					} 
					else 
					{
						Epuntos = 'False'
					}
				} 
				else 
				{
					Epuntos ='False';
				}
				url=url + "Estado=Buscando&Hotel=" + hotel + "&FechaEntrada=" + FechaEntrada + "&FechaSalida=" + FechaSalida + "&N_pax=" + pax + "&N_Nenes=" + nenes + "&N_hab=" + habitaciones + "&Regimen=" + regimen + "&Epuntos=" + Epuntos + "&lang="  + lang
			} 			
			window.location.href=(url);
		}
	}
				
				
				
		if (validaFecha() == false) {
			if (idioma=="S")
			{
				alert("La fecha de salida debe ser mayor que la de entrada");
			}
			if (idioma=="E")
			{
				alert("The check-out date must be later than check-in date");
			}
			if (idioma=="D")
			{
				alert("The check-out date must be later than check-in date");
			}
			if (idioma=="P")
			{
				alert("La fecha de salida debe ser mayor que la de entrada");
			}
		}
	 
		if (validaFechaActual() == false) {
			if (idioma=="S")
			{
				alert("La fecha de entrada no puede ser menor que la actual");
			}
			if (idioma=="E")
			{
				alert("Check-in cannot be previus to the present date");
			}
			if (idioma=="D")
			{
				alert("Check-in cannot be previus to the present date");
			}
			if (idioma=="P")
			{
				alert("La fecha de entrada no puede ser menor que la actual");
			}
		}	 
	}
	
	
	 
	function busqueda(tipo) {
	if ( (tipo == 'HOTEL') || (tipo == '') ) {
		document.getElementById('paramTipoBusqueda').value = tipo ;
	} else if(tipo == 'APARTAMENTO') {
		document.getElementById('paramTipoBusqueda').value = tipo ;
	} else {
		document.getElementById('paramTipoBusqueda').value = 'HOTEL';
	}
	}

	