
// 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 == 38) {
		document.location.href = "http://www.elitecarhire.com/es/valencia/alicante_airport_car_hire.htm";
	} else if (opcion == 60) {
		document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_benidorm.htm";
	} else if (opcion == 90) {
		document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_denia.htm";
	} else if (opcion == 40) {
		document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_san_juan.htm";
	} else if (opcion == 296) {
		document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_torrevieja.htm";
	} else if (opcion == 41) {
		document.location.href = "http://www.elitecaralmeria.com/es/index.html";
	} else if (opcion == 240) {
		document.location.href = "http://www.elitecaralmeria.com/es/alquiler_coches/almeria_mojacar.html";
	} else if (opcion == 83) {
		document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_chiclana.htm";
	} else if (opcion == 68) {
		document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_cadiz.htm";
	} else if (opcion == 155) {
		document.location.href = "http://www.elitecarjerez.com/es/index.html";
	} else if (opcion == 162) {
		document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_la_linea.htm";
	} else if (opcion == 260) {
		document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_rota.htm";
	} else if (opcion == 314) {
		document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_sancti_petri.htm";
	} else if (opcion == 282) {
		document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_sotogrande.htm";
	} else if (opcion == 110) {
		document.location.href = "http://www.elitecargirona.com/es/index.html";
	} else if (opcion == 117) {
		document.location.href = "http://www.elitecargranada.com/es/index.html";
	} else if (opcion == 44) {
		document.location.href = "http://www.elitecarhire.com/es/granada/alquiler_coches_almunecar.htm";
	} else if (opcion == 118) {
		document.location.href = "http://www.elitecargranada.com/es/alquiler_coches/granada.html";
	} else if (opcion == 152) {
	    document.location.href = "http://www.elitecarhire.com/es/huelva/alquiler_coches_huelva.htm";
	} else if (opcion == 128) {
	    document.location.href = "http://www.elitecarhire.com/es/ibiza/alquiler_coches_ibiza.htm";
	} else if (opcion == 219) {
	    document.location.href = "http://www.elitecarmallorca.com/es/alquiler_coches/mallorca.html";
	} else if (opcion == 198) {
		document.location.href = "http://www.elitecarmallorca.com/es/index.html";
	} else if (opcion == 170) {
	    document.location.href = "http://www.elitecarhire.com/es/canarias/alquiler_coches_gran_canarias.htm";
	} else if (opcion == 28) {
		document.location.href = "http://www.elitecarlanzarote.com/es/index.html";
	} else if (opcion == 196) {
		document.location.href = "http://www.elitecarmalaga.com/es/index.html";
	} else if (opcion == 66) {
		document.location.href = "http://www.elitecarmalaga.com/es/alquiler_coches/cabopino_malaga.html";
	} else if (opcion == 24) {
		document.location.href = "http://www.elitecarhire.com/es/malaga/alquiler_coches_la_costa.htm";
	} else if (opcion == 102) {
		document.location.href = "http://www.elitecarhire.com/es/malaga/alquiler_coches_fuengirola.htm";
	} else if (opcion == 315) {
	    document.location.href = "http://www.elitecarhire.com/book.php?lgr_rtr=315";
	} else if (opcion == 227) {
		document.location.href = "http://www.elitecarmalaga.com/es/alquiler_coches/marbella_malaga.html";
	} else if (opcion == 244) {
		document.location.href = "http://www.elitecarhire.com/es/malaga/alquiler_coches_nerja.htm";
	} else if (opcion == 30) {
		document.location.href = "http://www.elitecarmurcia.com/es/alquiler_coches/alquiler_coches_aguilas.html";
	} else if (opcion == 242) {
		document.location.href = "http://www.elitecarmurcia.com/es/index.html";
	} else if (opcion == 291) {
	    document.location.href = "http://www.elitecartenerife.com/es";
	} else if (opcion == 274) {
		document.location.href = "http://www.elitecarsevilla.com/es/index.html";
	} else if (opcion == 276) {
		document.location.href = "http://www.elitecarsevilla.com/es/alquiler_coches/seville.html";
	} else if (opcion == 256) {
		document.location.href = "http://www.elitecarreus.com/es/index.html";
	} else if (opcion == 299) {
		document.location.href = "http://www.elitecarhire.com/valencia/alquiler_coches_valencia.htm";
	} else {
	    document.location.href = "http://www.elitecarhire.com";
	} // if
  

}


