
// 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 == 170) { // Aeropuerto Gran Canaria
	document.location.href = "http://www.elitecarhire.com/es/canarias/alquiler_coches_gran_canarias.htm";
} else if (opcion == 28) { // Aeropuerto Lanzarote
	document.location.href = "http://www.elitecarlanzarote.com/es/index.html";
} else if (opcion == 38) { // Alicante - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_alicante.htm";
} else if (opcion == 60) { // Alicante - Benidorm
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_benidorm.htm";
} else if (opcion == 90) { // Alicante - Denia
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_denia.htm";
} else if (opcion == 40) { // Alicante - San Juan
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_san_juan.htm";
} else if (opcion == 296) { // Alicante - Torrevieja
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_torrevieja.htm";
} else if (opcion == 41) { // Almeria - Aeropuerto
	document.location.href = "http://www.elitecaralmeria.com/es/index.html";
} else if (opcion == 155) { // Cadiz - Aeropuerto Jerez
	document.location.href = "http://www.elitecarjerez.com/es/index.html";
} else if (opcion == 83) { // Cadiz - Chiclana
	document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_chiclana.htm";
} else if (opcion == 162) { // Cadiz - La Linea
	document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_la_linea.htm";
} else if (opcion == 260) { // Cadiz - Rota
	document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_rota.htm";
} else if (opcion == 314) { // Cadiz - Sancti Petri
	document.location.href = "http://www.elitecarhire.com/es/cadiz/alquiler_coches_sancti_petri.htm";
} else if (opcion == 110) { // Gerona - Aeropuerto
	document.location.href = "http://www.elitecargirona.com/es/index.html";
} else if (opcion == 117) { // Granada - Aeropuerto
	document.location.href = "http://www.elitecargranada.com/es/index.html";
} else if (opcion == 44) { // Granada - Almunecar
	document.location.href = "http://www.elitecarhire.com/es/granada/alquiler_coches_almunecar.htm";
} else if (opcion == 118) { // Granada - Centro
	document.location.href = "http://www.elitecargranada.com/es/alquiler_coches/granada.html";
} else if (opcion == 152) { // Huelva - Isla Antilla
	document.location.href = "http://www.elitecarhire.com/es/huelva/alquiler_coches_huelva.htm";
} else if (opcion == 198) { // Islas Baleares - Aeropuerto de Mallorca
	document.location.href = "http://www.elitecarmallorca.com/es/index.html";
} else if (opcion == 128) { // Islas Baleares - Aeropuerto Ibiza
	document.location.href = "http://www.elitecarhire.com/es/ibiza/alquiler_coches_ibiza.htm";
} 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/es/index.html";
} else if (opcion == 66) { // Malaga - Cabopino
	document.location.href = "http://www.elitecarmalaga.com/es/alquiler_coches/cabopino_malaga.html";
} else if (opcion == 315) { // Malaga - Entrega en Hotel
	document.location.href = "http://www.elitecarhire.com/es/book.php?lgr_rtr=315";
} else if (opcion == 102) { // Malaga - Fuengirola
	document.location.href = "http://www.elitecarhire.com/es/malaga/alquiler_coches_fuengirola.htm";
} else if (opcion == 227) { // Malaga - Marbella
	document.location.href = "http://www.elitecarmalaga.com/es/alquiler_coches/marbella_malaga.html";
} else if (opcion == 242) { // Murcia - Aeropuerto
	document.location.href = "http://www.elitecarmurcia.com/es/index.html";
} else if (opcion == 30) { // Murcia - Aguilas
	document.location.href = "http://www.elitecarmurcia.com/es/alquiler_coches/alquiler_coches_aguilas.html";
} else if (opcion == 291) { // Santa Cruz de Tenerife - Aeropuerto Tenerife Sur
	document.location.href = "http://www.elitecarhire.com/es/canarias/alquiler_coches_tenerife.htm";
} else if (opcion == 274) { // Sevilla - Aeropuerto
	document.location.href = "http://www.elitecarsevilla.com/es/index.html";
} else if (opcion == 276) { // Sevilla - Renfe
	document.location.href = "http://www.elitecarsevilla.com/es/alquiler_coches/seville.html";
} else if (opcion == 256) { // Tarragona - Aeropuerto Reus
	document.location.href = "http://www.elitecarreus.com/es/index.html";
} else if (opcion == 299) { // Valencia - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/valencia/alquiler_coches_valencia.htm";
	
} else if (opcion == 51) { // Barcelona - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/es/barcelona/alquiler_coches_barcelona.htm";
} else if (opcion == 61) { // Bilbao - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/es/bilbao/alquiler_coches_bilbao.htm";
} else if (opcion == 268) { // Santander - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/es/cantabria/alquiler_coches_santander.htm";
} else if (opcion == 270) { // Santiago - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/es/galicia/alquiler_coches_santiago.htm";
} else if (opcion == 305) { // Vigo - Aeropuerto
	document.location.href = "http://www.elitecarhire.com/es/galicia/alquiler_coches_vigo.htm";
} else if (opcion == 154) { // Alicante - Javea
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_javea.htm";
} else if (opcion == 241) { // Alicante - moraira
	document.location.href = "http://www.elitecarhire.com/es/valencia/alquiler_coches_moraira.htm";
} else {
	document.location.href = "http://www.elitecarhire.com/es";
} // if

  

}



