function muestrapestanaescapadas(pestana)
{
	document.frmDatos.comunidad.selectedIndex = 0;
	document.frmDatos.habitaciones.selectedIndex = 0;
	borracombo (document.frmDatos.area)
	document.frmDatos.area.options[0] = new Option("Selecciona Provincia","")
	borracombo (document.frmDatos.zona)
	document.frmDatos.zona.options[0] = new Option("Selecciona Localidad","")

	switch (pestana)
	{
		case 'rural':
			prov.style.visibility="visible";
			loc.style.visibility="visible";
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestrural1.gif";
			document.all.enlace.href="javascript:Nenviar(document.frmDatos.comunidad.value,document.frmDatos.area.value,document.frmDatos.zona.value,document.frmDatos.entrada.value,document.frmDatos.salida.value,document.frmDatos.nochesEstancia.value,folleto_valido,rutaxml);";
			document.all.enlaceavanzado.href="http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FFR&codwebor=ESP";
			folleto_valido = 'FR';
		break;
		case 'encanto':
			prov.style.visibility="hidden";
			loc.style.visibility="hidden";
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestencanto1.gif";
			document.all.enlace.href="javascript:Nenviar(document.frmDatos.comunidad.value,document.frmDatos.area.value,document.frmDatos.zona.value,document.frmDatos.entrada.value,document.frmDatos.salida.value,document.frmDatos.nochesEstancia.value,'HE',rutaxml);";
			document.all.enlaceavanzado.href="http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=02N&codwebor=ESP";
			folleto_valido = 'BH';
		break;
		case 'parador':
			prov.style.visibility="visible";
			loc.style.visibility="visible";
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestparador.gif";
			document.all.enlace.href="javascript:Nenviar(document.frmDatos.comunidad.value,document.frmDatos.area.value,document.frmDatos.zona.value,document.frmDatos.entrada.value,document.frmDatos.salida.value,document.frmDatos.nochesEstancia.value,folleto_valido,rutaxml);";
			document.all.enlaceavanzado.href="http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FFP&codwebor=ESP";
			folleto_valido = 'FP';
		break;
	}
	controlafechas (folleto_valido,rutaxml);
	pinta_comunidad (folleto_valido,document.frmDatos.comunidad,rutaxmlloc);
}

function muestrapestanavacaciones(pestana)
{
	switch (pestana)
	{
		case 'hotel': 
			folleto_valido = 'MC';
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pesthoteles.gif";
			MuestraCapa('hotel',1)
			MuestraCapa('avionhotel',0)
			document.all.enlace.href="javascript:Nenviar(document.frmDatos.comunidad.value,document.frmDatos.area.value,document.frmDatos.zona.value,document.frmDatos.entrada.value,document.frmDatos.salida.value,document.frmDatos.nochesEstancia.value,folleto_valido,rutaxml);";
		break;
		case 'avionhotel':
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestavionhotel.gif";
			MuestraCapa('hotel',0)
			MuestraCapa('avionhotel',1)
			document.all.enlace.href="javascript: enviaravionhotel ();";
		break;
	}
}

function muestrapestanahotelesyapartamentos(pestana)
{
	switch (pestana)
	{
		case 'nacional1': 
			folleto_valido = 'BH';
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestahotelesapartamentos.gif";
			MuestraCapa('nacional1',1)
			MuestraCapa('internacional1',0)
			//document.all.enlace.href="#";
		break;
		case 'internacional1':
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestahotelesinternacionales.gif";
			MuestraCapa('nacional1',0)
			MuestraCapa('internacional1',1)
			//document.all.enlace.href="#";
		break;
	}
}

function cambiaBuscador (folleto)
{
	if (folleto == 'SB' || folleto == 'NI' || folleto == 'PA' || folleto == 'EU' || folleto == 'PT' || folleto == 'EN' || folleto == 'CAN' || folleto == 'BAL' || folleto == 'FM')
	{
		switch (folleto)
		{
			case 'FM':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FFM&codwebor=ESP";
						break;
			case 'SB':	parent.location.href = "http://www.elcorteingles.es/viajes/VECI/saludybelleza/paginas/saludybelleza.htm";
						break;
			case 'NI':	parent.location.href = "http://www.elcorteingles.es/viajes/nieve/programas/nieve.asp";
						break;
			case 'PA':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FPA&codwebor=ESP";
						break;
			case 'EU':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=DEU&codwebor=ESP";
						break;
			case 'PT':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=VPT&codwebor=ESP";
						break;
			case 'EN':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FEN&codwebor=ESP";
						break;
			case 'BAL':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=BAL&codwebor=ESP";
						break;
			case 'CAN':	parent.location.href = "http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=CAN&codwebor=ESP";
						break;
		}
	}
	else
	{
		if (folleto == 'EF')
			folleto = 'BH'
		folleto_valido = folleto
		borracombo (document.frmDatos.comunidad)
		borracombo (document.frmDatos.area)
		borracombo (document.frmDatos.zona)
		document.frmDatos.area.options[0] = new Option("Selecciona Area","")
		document.frmDatos.zona.options[0] = new Option("Selecciona Zona","")
		controlafechas (folleto,rutaxml);
		pinta_comunidad (folleto,document.frmDatos.comunidad,rutaxmlloc);
	}
}

function muestrapestanaofertas(pestana)
{
	switch (pestana)
	{
		case 'destino': 
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestdestino.gif";
			MuestraCapa('destino',1)
			MuestraCapa('fecha',0)
			MuestraCapa('tipoviaje',0)
			document.all.enlace.href="javascript:buscaoferta(0);";
		break;
		case 'fecha':
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pestfecha.gif";
			MuestraCapa('destino',0)
			MuestraCapa('fecha',1)
			MuestraCapa('tipoviaje',0)
			document.all.enlace.href="javascript:buscaoferta(1);";
		break;
		case 'tipoviaje':
			document.all.boton.src="http://www.elcorteingles.es/tiendas_e/eci/viajes/imagenes/escapadas/pesttipoviaje.gif";
			MuestraCapa('destino',0)
			MuestraCapa('fecha',0)
			MuestraCapa('tipoviaje',1)
			document.all.enlace.href="javascript:buscaoferta(2);";
		break;
	}
}

function controla_ninos(valor)
{	
	var capa=valor.split(',');
	MuestraCapa('ninocero',0);
	MuestraCapa('ninouno',0);
	MuestraCapa('ninodos',0);
	MuestraCapa('ninotres',0);
	MuestraCapa(capa[0],1);
}

function controlaHabitaciones ()
{
	if (document.frmDatos.habitaciones.value == 2)
	{
		switch (folleto_valido)
		{
			case ('FR'):
				parent.location.href = 'http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FFR&codwebor=ESP';
				break;
			case ('BH'):
				parent.location.href = 'http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=02N&codwebor=ESP';
				break;
			case ('FP'):
				parent.location.href = 'http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=FFP&codwebor=ESP';
				break;
		}
	}
}

function controlaHbPpal ()
{
	if (document.frmDatos.habitaciones.value == 2)
		parent.location.href = 'http://www.elcorteingles.es/viajes/hoteles_apartamentos/programas/buscador.asp?copagina=NAC&codwebor=ESP';
}