
// Coloca la selección "msn_ent" al valor que tenga "msn_rtr"
function ColocaMes() {

	// Lo primero se oculta el presupuesto ya antiguo
	// pero SOLO si la página no es "book.htm" 
	var path = location.pathname;
	if (path.match("book") != null) {
		DeshabilitaPresupuesto();
	}

	//alert("Selected de ent: " + document.formPresupuesto.msn_ent.options.selectedIndex + ". " +
	//      "Selected de rtr: " + document.formPresupuesto.msn_rtr.options.selectedIndex);

		document.formPresupuesto.msn_ent.options.selectedIndex =
		document.formPresupuesto.msn_rtr.options.selectedIndex;
	
	//alert("Selected de ent: " + document.formPresupuesto.msn_ent.options.selectedIndex + ". " +
	//      "Selected de rtr: " + document.formPresupuesto.msn_rtr.options.selectedIndex);

}

// Coloca la selección "lgr_ent" al valor que tenga "lgr_rtr"
function ColocaCiudad() {

	// Lo primero se oculta el presupuesto ya antiguo
	// pero SOLO si la página no es "book.htm" 
	var path = location.pathname;
	if (path.match("book") != null) {
		DeshabilitaPresupuesto();
	}

	document.formPresupuesto.lgr_ent.options.selectedIndex =
	document.formPresupuesto.lgr_rtr.options.selectedIndex;
	
}

// Vacia el contenido de "document.getElementById("Presupuesto").innerHTML=tablahtml;"
function DeshabilitaPresupuesto() {

	// Lo primero se oculta el presupuesto ya antiguo
	// pero SOLO si la página no es "book.htm" 
	var path = location.pathname;
	if (path.match("book") != null) {

		// Se oculta el formulario de reserva, por si acaso estuviera desplegado
		document.getElementById('Reserva').style.visibility = 'hidden';

		// Y lo mismo para el formulario de reserva offline
		document.getElementById('Reservaoffline').style.visibility = 'hidden';

		str = new String(document.getElementById("Presupuesto").innerHTML);
		str = str.replace("!disabled","disabled");
		document.getElementById("Presupuesto").innerHTML = str;

	}

}



// Carga la página correspondiente a la selección hecha en el combo del lugar
function CargarPagina() {

//alert(document.getElementById("lgr_rtr"));

	var opcion=document.getElementById("lgr_rtr").options[document.getElementById("lgr_rtr").selectedIndex].value;

if       (opcion == 28) { // Aeropuerto Lanzarote
	document.location.href = "http://www.elitecarlanzarote.com/de/";
} else if (opcion == 38) { // Alicante - Aeropuerto
	document.location.href = "http://www.elitecaralicante.com/de/";
} else if (opcion == 60) { // Alicante - Benidorm
	document.location.href = "http://www.elitecarhire.com/de/valencia/benidorm_mietwagen.htm";
} else if (opcion == 90) { // Alicante - Denia
	document.location.href = "http://www.elitecarhire.com/de/valencia/denia_mietwagen.htm";
} else if (opcion == 40) { // Alicante - San Juan
	document.location.href = "http://www.elitecarhire.com/de/valencia/san_juan_mietwagen.htm";
} else if (opcion == 296) { // Alicante - Torrevieja
	document.location.href = "http://www.elitecarhire.com/de/valencia/torrevieja_mietwagen.htm";
} else if (opcion == 41) { // Almeria - Aeropuerto
	document.location.href = "http://www.elitecaralmeria.com/de/";
} else if (opcion == 155) { // Cadiz - Aeropuerto Jerez
	document.location.href = "http://www.elitecarjerez.com/de/";
} else if (opcion == 83) { // Cadiz - Chiclana
	document.location.href = "http://www.elitecarhire.com/de/cadiz/chiclana_mietwagen.htm";
} else if (opcion == 162) { // Cadiz - La Linea
	document.location.href = "http://www.elitecarhire.com/de/cadiz/la_linea_mietwagen.htm";
} else if (opcion == 260) { // Cadiz - Rota
	document.location.href = "http://www.elitecarhire.com/de/cadiz/rota_mietwagen.htm";
} else if (opcion == 314) { // Cadiz - Sancti Petri
	document.location.href = "http://www.elitecarhire.com/de/cadiz/sancti_petri_mietwagen.htm";
} else if (opcion == 110) { // Gerona - Aeropuerto
	document.location.href = "http://www.elitecargirona.com/de/";
} else if (opcion == 117) { // Granada - Aeropuerto
	document.location.href = "http://www.elitecargranada.com/de/";
} else if (opcion == 44) { // Granada - Almunecar
	document.location.href = "http://www.elitecarhire.com/de/granada/almunecar_mietwagen.htm";
} else if (opcion == 118) { // Granada - Centro
	document.location.href = "http://www.elitecargranada.com/de/autovermietung/granada-mietwagen.htm";
} else if (opcion == 152) { // Huelva - Isla Antilla
	document.location.href = "http://www.elitecarhire.com/de/huelva/islantilla_mietwagen.htm";
} else if (opcion == 198) { // Islas Baleares - Aeropuerto de Mallorca
	document.location.href = "http://www.elitecarmallorca.com/de/";
} else if (opcion == 128) { // Islas Baleares - Aeropuerto Ibiza
	document.location.href = "http://www.elitecaribiza.com/de/";
} else if (opcion == 219) { // Islas Baleares - Mallorca - Paseo Maritimo
	document.location.href = "http://www.elitecarmallorca.com/es/alquiler_coches/mallorca.html";
} else if (opcion == 196) { // Malaga - Aeropuerto
	document.location.href = "http://www.elitecarmalaga.com/de/";
} else if (opcion == 66) { // Malaga - Cabopino
	document.location.href = "http://www.elitecarmalaga.com/de/autovermietung/cabopino-mietwagen.htm";
} else if (opcion == 315) { // Malaga - Entrega en Hotel
	document.location.href = "http://www.elitecarhire.com/de/book.php?lgr_rtr=315";
} else if (opcion == 102) { // Malaga - Fuengirola
	document.location.href = "http://www.elitecarmalaga.com/de/autovermietung/fuengirola-mietwagen.htm";
} else if (opcion == 227) { // Malaga - Marbella
	document.location.href = "http://www.elitecarmalaga.com/de/autovermietung/marbella-mietwagen.htm";
} else if (opcion == 242) { // Murcia - Aeropuerto
	document.location.href = "http://www.elitecarmurcia.com/de/";
} else if (opcion == 30) { // Murcia - Aguilas
	document.location.href = "http://www.elitecarhire.com/de/murcia/aguilas_mietwagen.htm";
} else if (opcion == 291) { // Santa Cruz de Tenerife - Aeropuerto Tenerife Sur
	document.location.href = "http://www.elitecartenerife.com/de/";
} else if (opcion == 274) { // Sevilla - Aeropuerto
	document.location.href = "http://www.elitecarsevilla.com/de/";
} else if (opcion == 276) { // Sevilla - Renfe
	document.location.href = "http://www.elitecarsevilla.com/de/autovermietung/sevilla-mietwagen.htm";
} else if (opcion == 256) { // Tarragona - Aeropuerto Reus
	document.location.href = "http://www.elitecarreus.com/de/";
} else if (opcion == 299) { // Valencia - Aeropuerto
	document.location.href = "http://www.elitecarvalencia.com/de/";
} else {
	document.location.href = "http://www.elitecarhire.com/de";
} // if  

}


