
// Rellena el contenido del combo de vehículos, en función de la oficina seleccionada
function ColocaLugar() {

	// Si se ha elegido una página de Málaga, poner sus vehículos, y
	// los lugares de entrega sólamente de Málaga
	// Si se ha elegido Lanzarote, poner sus vehículos, y de lugar de
	// entrega sólamente Lanzarote
	
	document.formPresupuesto.vhc.options.length=0;
	
	while (document.formPresupuesto.vhc.hasChildNodes()) {
        document.formPresupuesto.vhc.removeChild(document.formPresupuesto.vhc.firstChild);
    }
	
	if ((document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "5") ||
		(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "1") ||
		(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "3") ||
		(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "201") ||
		(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "202") ||
		(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "205") ||
		(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "100")
		) {
		// Málaga
		
/*	'A'=>'Ch. Matiz or similar',
	'B'=>'Kia Picanto, Ford Ka or similar',
	'C'=>'S.Ibiza, F.Fiesta, O.Corsa or similar',
	'D'=>'S.Cordoba, T.Corolla or similar',
	'E'=>'F.Focus, S.Leon, R.Megane, K.Cerato or similar',
	'F'=>'F.Mondeo, N.Primera or similar',
	'Z'=>'F.Tourneo Connect, O.Combo or similar',
	'G'=>'F.Focus SW, O.Astra SW or similar',
	'H'=>'S.Altea XL, O.Meriva, C.Picasso or similar',
	'I'=>'7 Seater S.Alhambra, F.Galaxy or similar',
	'I1'=>'7 Seater O.Zafira or similar',
	'K'=>'9 Seater N.Primastar, F.Transit or similar',
	'L'=>'7 Seater AUTOMATIC S.Alhambra or similar',
	'N'=>'AUTOMATIC S.Ibiza, O.Corsa or similar',
	'O'=>'AUTOMATIC F.Focus, S.Leon, R.Megane or similar',
	'P'=>'AUTOMATIC Mercedes "A" or similar',
	'P1'=>'CONVERTIBLE P.307, R.Megane, O.Astra or similar',
	'R'=>'Audi A4, BMW 320, Audi A3 AUTOMATIC or similar',
	'S'=>'Audi A4 Aut, BMW 320 AUTOMATIC or similar',
	'T'=>'AUTOMATIC Mercedes CLK Cabrio, A6, BMW 5 Series or similar',
	'U'=>'AUTOMATIC A8, Q7, BMW X5, VW.Touareg V10, Merc.CLS or similar',
	'W'=>'AUTOMATIC BMW 6 Series, P.Cayenne, P.Carrera, Merc.S320 or similar'
*/		// Vehículos
		// Vehículos
		document.formPresupuesto.vhc.options[0]= new Option("Wählen Sie bitte ein Fahrzeug aus...", "0", true, false);
		//BEGIN JOSE L. C. P. 15-03-10
		document.formPresupuesto.vhc.options[0].style.color = "black";
		document.formPresupuesto.vhc.options[0].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[0].style.textAlign = "center";
		document.formPresupuesto.vhc.options[0].style.fontWeight = "bolder";
				//BEGIN MSOLER-RPUGA 29/01/10
		//Añadimos una nueva opcion con codigo 99 para todos los vehiculos
		document.formPresupuesto.vhc.options[1]=new Option("Alle Fahrzeuge", "99", false, false);
		//END MSOLER-RPUGA 29/01/10

		grupo = document.createElement('optgroup');
		grupo.label = "Kleinwagen";
		grupo.style.color = "black";
		grupo.style.backgroundColor = "#E2B913";
		grupo.style.textAlign = "center";
		grupo.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo);	
		/*document.formPresupuesto.vhc.options[2]= new Option(":::::Standartwagen:::::","0",true,false);
		document.formPresupuesto.vhc.options[2].style.color = "black";
		document.formPresupuesto.vhc.options[2].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[2].style.textAlign = "center";
		document.formPresupuesto.vhc.options[2].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[2]= new Option("Ch. Matiz oder ähnlich", "A", false, false);
		document.formPresupuesto.vhc.options[2].style.backgroundColor = "#FFFFFF";
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_1 = document.createElement('optgroup');
		grupo_1.label = "Mittelklassewagen";
		grupo_1.style.color = "black";
		grupo_1.style.backgroundColor = "#E2B913";
		grupo_1.style.textAlign = "center";
		grupo_1.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_1);
		/*document.formPresupuesto.vhc.options[4]=new Option(":::::Mittelklassewagen:::::","0",true,false);
		document.formPresupuesto.vhc.options[4].style.color = "black";
		document.formPresupuesto.vhc.options[4].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[4].style.textAlign = "center";
		document.formPresupuesto.vhc.options[4].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[3]= new Option("Kia Picanto, Ford Ka oder ähnlich", "B", false, false);
		document.formPresupuesto.vhc.options[3].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[4]= new Option("S.Ibiza, F.Fiesta, O.Corsa oder ähnlich", "C", false, false);
		document.formPresupuesto.vhc.options[4].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[5]= new Option("S.Cordoba, T.Corolla oder ähnlich", "D", false, false);
		document.formPresupuesto.vhc.options[5].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[6]= new Option("F.Focus, S.Leon, oder ähnlich", "E", false, false);
		document.formPresupuesto.vhc.options[6].style.backgroundColor = "#FFFFFF";
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_2 = document.createElement('optgroup');
		grupo_2.label = "Executive";
		grupo_2.style.color = "black";
		grupo_2.style.backgroundColor = "#E2B913";
		grupo_2.style.textAlign = "center";
		grupo_2.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_2);
		/*document.formPresupuesto.vhc.options[9]=new Option(":::::Executive:::",true,false);
		document.formPresupuesto.vhc.options[9].style.color = "black";
		document.formPresupuesto.vhc.options[9].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[9].style.textAlign = "center";
		document.formPresupuesto.vhc.options[9].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		
		document.formPresupuesto.vhc.options[7]= new Option("F.Mondeo, N.Primera oder ähnlich", "F", false, false);
		document.formPresupuesto.vhc.options[7].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[8]= new Option("Volkswagen Golf oder ähnlich", "F1", false, false);
		document.formPresupuesto.vhc.options[8].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[9]= new Option("Mini Manual oder ähnlich", "F2", false, false);
		document.formPresupuesto.vhc.options[9].style.backgroundColor = "#FFFFFF";
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_3 = document.createElement('optgroup');
		grupo_3.label = "Familienwagen";
		grupo_3.style.color = "black";
		grupo_3.style.backgroundColor = "#E2B913";
		grupo_3.style.textAlign = "center";
		grupo_3.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_3);
		/*document.formPresupuesto.vhc.options[13]=new Option(":::::Familienwagen:::::","0",true, false);
		document.formPresupuesto.vhc.options[13].style.color = "black";
		document.formPresupuesto.vhc.options[13].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[13].style.textAlign = "center";
		document.formPresupuesto.vhc.options[13].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[10]= new Option("F.Tourneo Connect, O.Combo oder ähnlich", "Z", false, false);
		document.formPresupuesto.vhc.options[10].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[11]=new Option("F.Focus SW, O.Astra SW oder ähnlich", "G", false, false);
		document.formPresupuesto.vhc.options[11].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[12]=new Option("S.Altea XL, O.Meriva, C.Picasso oder ähnlich", "H", false, false);
		document.formPresupuesto.vhc.options[12].style.backgroundColor = "#FFFFFF";
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_4 = document.createElement('optgroup');
		grupo_4.label = "Minibusse";
		grupo_4.style.color = "black";
		grupo_4.style.backgroundColor = "#E2B913";
		grupo_4.style.textAlign = "center";
		grupo_4.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_4);
		/*document.formPresupuesto.vhc.options[17]=new Option(":::::Minibusse:::::","0",true,false);
		document.formPresupuesto.vhc.options[17].style.color = "black";
		document.formPresupuesto.vhc.options[17].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[17].style.textAlign = "center";
		document.formPresupuesto.vhc.options[17].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[13]=new Option("7 Sitzer S.Alhambra, F.Galaxy oder ähnlich", "I", false, false);
		document.formPresupuesto.vhc.options[13].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[14]=new Option("7 Sitzer O.Zafira oder ähnlich", "I1", false, false);
		document.formPresupuesto.vhc.options[14].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[15]=new Option("9 Sitzer N.Primastar, F.Transit oder ähnlich", "K", false, false);
		document.formPresupuesto.vhc.options[15].style.backgroundColor = "#FFFFFF";
		
		//CAMBIOS GRUPO Q
		grupo_4_1 = document.createElement('optgroup');
		grupo_4_1.label = "Lieferwagen";
		grupo_4_1.style.color = "black";
		grupo_4_1.style.backgroundColor = "#E2B913";
		grupo_4_1.style.textAlign = "center";
		grupo_4_1.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_4_1);
		
		document.formPresupuesto.vhc.options[16]=new Option("Ford Transit 135 T350 oder ähnlich", "Q", false, false);
		document.formPresupuesto.vhc.options[16].style.backgroundColor = "#FFFFFF";
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_5 = document.createElement('optgroup');
		grupo_5.label = "Automatikwagen";
		grupo_5.style.color = "black";
		grupo_5.style.backgroundColor = "#E2B913";
		grupo_5.style.textAlign = "center";
		grupo_5.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_5);
		/*document.formPresupuesto.vhc.options[21]=new Option(":::::Automatik - Fahrzeuge:::::","0",true, false);
		document.formPresupuesto.vhc.options[21].style.color = "black";
		document.formPresupuesto.vhc.options[21].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[21].style.textAlign = "center";
		document.formPresupuesto.vhc.options[21].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[17]=new Option("AUT. 7 Sitzer S.Alhambra oder ähnlich", "L", false, false);
		document.formPresupuesto.vhc.options[17].style.backgroundColor = "#FFFFFF";

		//document.formPresupuesto.vhc.options[16]=new Option("AUT. 8 Seater Chevrolet Van Express XL or similar", "L1", false, false);
		
		document.formPresupuesto.vhc.options[18]=new Option("AUT. S.Ibiza, O.Corsa oder ähnlich", "N", false, false);
		document.formPresupuesto.vhc.options[18].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[19]=new Option("AUT. F.Focus, S.Leon, R.Megane oder ähnlich", "O", false, false);
		document.formPresupuesto.vhc.options[19].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[20]=new Option("AUT. Mercedes \"A\" oder ähnlich", "P", false, false);
		document.formPresupuesto.vhc.options[20].style.backgroundColor = "#FFFFFF";
		
		grupo_5_1 = document.createElement('optgroup');
		grupo_5_1.label = "4x4";
		grupo_5_1.style.color = "black";
		grupo_5_1.style.backgroundColor = "#E2B913";
		grupo_5_1.style.textAlign = "center";
		grupo_5_1.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_5_1);
		document.formPresupuesto.vhc.options[21]=new Option("Suzuki Jimny or similar", "D1", false, false);
		document.formPresupuesto.vhc.options[21].style.backgroundColor = "#FFFFFF";
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_6 = document.createElement('optgroup');
		grupo_6.label = "Kabrio";
		grupo_6.style.color = "black";
		grupo_6.style.backgroundColor = "#E2B913";
		grupo_6.style.textAlign = "center";
		grupo_6.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_6);
		/*document.formPresupuesto.vhc.options[26]=new Option(":::::Kabrio:::::","0",true,false);
		
		document.formPresupuesto.vhc.options[26].style.color = "black";
		document.formPresupuesto.vhc.options[26].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[26].style.textAlign = "center";
		document.formPresupuesto.vhc.options[26].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[22]=new Option("DESCAP. P.307, R.Megane, O.Astra oder ähnlich", "P1", false, false);
		document.formPresupuesto.vhc.options[22].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[23]=new Option("Mini Cabrio Manual oder ähnlich", "P2", false, false);
		document.formPresupuesto.vhc.options[23].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[24]=new Option("Mini Cooper Cabrio Automatico oder ähnlich", "R1", false, false);
		document.formPresupuesto.vhc.options[24].style.backgroundColor = "#FFFFFF";
		
		
		//BEGIN JOSE L. C. P. 15-03-10
		grupo_7 = document.createElement('optgroup');
		grupo_7.label = "Luxuswagen";
		grupo_7.style.color = "black";
		grupo_7.style.backgroundColor = "#E2B913";
		grupo_7.style.textAlign = "center";
		grupo_7.style.fontWeight = "bolder";
		document.formPresupuesto.vhc.appendChild(grupo_7);
		/*document.formPresupuesto.vhc.options[30]=new Option(":::::Luxuswagen:::::","0",true,false);
		document.formPresupuesto.vhc.options[30].style.color = "black";
		document.formPresupuesto.vhc.options[30].style.backgroundColor = "#E2B913";
		document.formPresupuesto.vhc.options[30].style.textAlign = "center";
		document.formPresupuesto.vhc.options[30].style.fontWeight="bolder";*/
		//END JOSE L. C. P. 15-03-10
		
		document.formPresupuesto.vhc.options[25]=new Option("Audi A4, BMW 320, Audi A3 AUT oder ähnlich", "R", false, false);
		document.formPresupuesto.vhc.options[25].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[26]=new Option("AUT. Audi A4, BMW 320 oder ähnlich", "S",  false, false);
		document.formPresupuesto.vhc.options[26].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[27]=new Option("Mercedes SLK 200 Cabrio oder ähnlich", "T2",  false, false);
		document.formPresupuesto.vhc.options[27].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[28]=new Option("Audi A6, BMW 5 Series oder ähnlich", "T", false, false);
		document.formPresupuesto.vhc.options[28].style.backgroundColor = "#FFFFFF";
		//Cambios 03-09-10 para añadir grupo T1
		document.formPresupuesto.vhc.options[29]=new Option("AUT. A4 Cabrio,Merc. CLK Cabrio,C70 Cabrio oder ähnlich", "T1", false, false);
		document.formPresupuesto.vhc.options[29].style.backgroundColor = "#FFFFFF";
		//Fin
		document.formPresupuesto.vhc.options[30]=new Option("AUT. Q7, A8, BMW X5, Merc.CLS oder ähnlich", "U", false, false);
		document.formPresupuesto.vhc.options[30].style.backgroundColor = "#FFFFFF";
		document.formPresupuesto.vhc.options[31]=new Option("AUT. P.Cayenne, P.Carrera, oder ähnlich", "W", false, false);
		document.formPresupuesto.vhc.options[31].style.backgroundColor = "#FFFFFF";
		

	} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "10") {
		// Lanzarote

/*	'A'=>'Ford Ka or similar',
	'B'=>'K. Picanto or similar',
	'C'=>'F.Fiesta, SMART For Four or similar',
	'E'=>'F.Focus, K.Cerato or similar',
	'G'=>'F.Focus Station Wagon or similar',
	'H'=>'O.Meriva or similar',
	'I'=>'S.Alhambra or similar',
	'X'=>'M.Colt Cabrio or similar',
	'P1'=>'P.307 Cabrio or similar',
	'T'=>'Mercedes 320 CLK Cabrio (Aut.) or similar'
*/		// Vehículos
		document.formPresupuesto.vhc.options[0]= new Option("Wählen Sie das Fahrzeug...", "0", true, false);
		document.formPresupuesto.vhc.options[1]= new Option("Ford Ka oder ähnlich", "A", false, false);
		document.formPresupuesto.vhc.options[2]= new Option("K.Picanto oder ähnlich", "B", false, false);
		document.formPresupuesto.vhc.options[3]= new Option("F.Fiesta, SMART For Four oder ähnlich", "C", false, false);
		document.formPresupuesto.vhc.options[4]= new Option("F.Focus, K.Cerato oder ähnlich", "E", false, false);
		document.formPresupuesto.vhc.options[5]= new Option("F.Focus Station Wagon oder ähnlich", "G", false, false);
		document.formPresupuesto.vhc.options[6]= new Option("O.Meriva oder ähnlich", "H", false, false);
		document.formPresupuesto.vhc.options[7]= new Option("S.Alhambra oder ähnlich", "I", false, false);
		document.formPresupuesto.vhc.options[8]= new Option("M.Colt Cabrio oder ähnlich", "X", false, false);
		document.formPresupuesto.vhc.options[9]= new Option("P.307 Cabrio oder ähnlich", "P1", false, false);
		document.formPresupuesto.vhc.options[10]=new Option("Mercedes 320 CLK Cabrio (Aut.) oder ähnlich", "T", false, false);

	} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "0") {
		// Selección vacia

		// Vehículos
		document.formPresupuesto.vhc.options[0]=new Option("wählen Sie das Fahrzeug...", "0", true, false);

	} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "200") {
		// Selección de otros destinos
		// Vehículos
		document.formPresupuesto.vhc.options[0]=new Option("Wählen Sie das Fahrzeug...", "0", true, false);
		// Lugares
		document.formPresupuesto.lgr_rtr.options.selectedIndex = 0;

		window.location = "reserva.php?other=yes";

	}	

	// Si estamos en "reserva.php", se rellena la oficina de entrega, y se borra el presupuesto
	var path = location.pathname;
	if (path.match("reserva") != null) { // Estamos en "reserva.php"
		DeshabilitaPresupuesto();

		document.formPresupuesto.lgr_ent.options.length=0;

		if ((document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "5") ||
			(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "1") ||
			(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "3") ||
			(document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "100")	) {
			// Málaga
		
			// Lugares
			document.formPresupuesto.lgr_ent.options[0]=new Option("Malaga Flughafen", "5", false, false);
			document.formPresupuesto.lgr_ent.options[1]=new Option("Marbella", "1", false, false);
			document.formPresupuesto.lgr_ent.options[2]=new Option("Málaga Übergabe im Hotel", "100", false, false);

			if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "5") {
				document.formPresupuesto.lgr_ent.options.selectedIndex = 0;
			} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "1") {
				document.formPresupuesto.lgr_ent.options.selectedIndex = 1;
			} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "100") {
				document.formPresupuesto.lgr_ent.options.selectedIndex = 2;
			}
			
		} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "10") {
			// Lanzarote

			// Lugares
			document.formPresupuesto.lgr_ent.options[0]=new Option("Lanzarote", "10", true, false);

		} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "0") {
			// Selección vacia

			// Lugares
			document.formPresupuesto.lgr_ent.options[0]=new Option("Ortsauswahl...", "0", true, false);
		}	

	} else if (path.match("marriot") != null) { // if "en marriot.php"

		if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "201") {
			document.formPresupuesto.lgr_ent.options.selectedIndex = 0;
			document.getElementById('spanlugarresidencia').style.display = 'none';
		} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "202") {
			document.formPresupuesto.lgr_ent.options.selectedIndex = 1;
			document.getElementById('spanlugarresidencia').style.display = 'none';
		} else if (document.formPresupuesto.lgr_rtr.options[document.formPresupuesto.lgr_rtr.selectedIndex].value == "205") {
			document.formPresupuesto.lgr_ent.options.selectedIndex = 2;
			document.getElementById('spanlugarresidencia').style.display = 'block';
		}

	}

}


// 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 es "reserva.htm" 
	var path = location.pathname;
	if (path.match("reserva") != null) {
		DeshabilitaPresupuesto();
	}

	document.formPresupuesto.msn_ent.value =
	document.formPresupuesto.msn_rtr.value;
	
}

// 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 "reserva.htm" 
	var path = location.pathname;
	if (path.match("reserva") != null||path.match("marriott") != null) {

		
		// Se ponen a 'none' para que no ocupen espacio
		document.getElementById('Reserva').style.display = 'none';
		document.getElementById('Reservaoffline').style.display = 'none';
		CerrarDesglosePrecio();
/*
		str = new String(document.getElementById("Presupuesto").innerHTML);
		str = str.replace("!disabled","disabled");
		document.getElementById("Presupuesto").innerHTML = str;
*/
		xmlhttp.abort();
		document.getElementById("Presupuesto").innerHTML = '<h3>Bitten klicken Sie auf \"Neue Anfrage\"</h3>';

		// NUEVO: Se oculta el campo del "supercodigo"
//		document.getElementById('codediv').style.display = 'none';

		// NUEVO: Se oculta el campo del "book and join"
//		document.getElementById('bookandjoin').style.display = 'none';

		// NUEVO: Se vacia el cuadro de los upgrades
		document.getElementById("Upgrade").innerHTML = '';
		
	}

}



// Habilita el botón "booknow", en caso de heberse adeptado las condiciones
function ClickCondiciones() {

	if (document.getElementById('accept').checked) {
		document.getElementById('booknowbutton').disabled = false;
	} else {
		document.getElementById('booknowbutton').disabled = true;
	}
}
function ClickMarriotOwner() {

	if (document.getElementById('marriot_owner').checked) {
		document.getElementById('comentariosreserva').value += "Marriott Vacation Club owner. ";
	}

}

function clearForm() {
	document.formPresupuesto.lgr_rtr.options.selectedIndex = 1;
	document.formPresupuesto.vhc.options.selectedIndex = 1;
//	document.formPresupuesto.vhc.options.selectedIndex = 0;
	//document.formPresupuesto.vhc.options.length=0;
	//document.formPresupuesto.vhc.options[0]=new Option("Wählen Sie bitte ein Fahrzeug aus...", "0", true, false);

	return true;
}

// Funciones para cambiar el color de fondo del select cuando no está seleccionado el "escoger vehiculo"
function Cambiar_Color_1(){
			document.formPresupuesto.vhc.options[0].style.backgroundColor = "#FFFFFF";
}
function Cambiar_Color_2(){
			document.formPresupuesto.vhc.options[0].style.backgroundColor = "#EAEAEA";
}

// BEGIN NOE diseño 01-10-10
// Boton cerrar desglose del precio
function CerrarDesglosePrecio(){
	document.getElementById("desglose_precio").style.display = "none";
	document.getElementById("desglose_precio_club").style.display = "none";
}
// END NOE diseño 01-10-10
