	//funcion para cambiar las imagenes del menu
	function clase1(elemento) {
	   document.getElementById(elemento).className=elemento+'2';
	}
	
	function clase2(elemento) {
	   document.getElementById(elemento).className=elemento+'1';
	}
	
	
	//funcion para cambiar las imagenes de la galeria principal
	function cambiar(){
		if (window.createPopup)
			animacion.filters[0].apply()
		document.images.animacion.src = imagenes[contador].src;
		if (window.createPopup)
			animacion.filters[0].play()
		contador++;
		if (contador == imagenes.length)
			contador = 0;
		setTimeout("cambiar()",intervalo)
	}
	
	//funcion que abre una ventana nueva con las caracteristicas indicadas en los argumentos
	function abrir(direccion, pantallacompleta, herramientas, direcciones, estado, barramenu, barrascroll, cambiatamano, ancho, alto, izquierda, arriba, sustituir){ 
	
		 var opciones = "fullscreen=" + pantallacompleta + 
					 ",toolbar=" + herramientas + 
					 ",location=" + direcciones + 
					 ",status=" + estado + 
					 ",menubar=" + barramenu + 
					 ",scrollbars=" + barrascroll + 
					 ",resizable=" + cambiatamano + 
					 ",width=" + ancho + 
					 ",height=" + alto + 
					 ",left=" + izquierda + 
					 ",top=" + arriba; 
					
		window.open(direccion,"ventana",opciones,sustituir); 
	}        


	// Determina si un año es bisiesto
   function es_bisiesto(anio) {
	   if (((anio % 4 == 0) && anio % 100 != 0) || anio % 400 == 0) 
		  return true;
	   return false;
   }
   
   
	//función que comprueba si una fecha es correcta
	function comprobar_fecha(dia, mes, anio) {
		if ((mes == 4 && dia > 30) || (mes == 6 && dia > 30) || (mes == 9 && dia > 30) || (mes == 11 && dia > 30)
			|| (mes == 2 && es_bisiesto(anio) && dia > 29) || (mes == 2 && !es_bisiesto(anio) && dia > 28))
      			return false;
   		return true; 
	}
	
	
	//función que compara la fecha de entrada con la fecha actual
	function comparar_fecha(dia_e, mes_e, anio_e) {
		var fecha = new Date();
	  	var anio = fecha.getFullYear();
	  	var mes = fecha.getMonth() + 1;
	  	var dia = fecha.getDate();
		
		if (anio > anio_e){
			return false;
		}
		if ((anio ==anio_e) && (mes > mes_e)){
			return false;
		}
		if ((anio ==anio_e) && (mes == mes_e) && (dia > dia_e)){
			return false;
		}
		
		return true;
	}
	
	
	//funcion para comprobar que el email sea correcto
	function validarEmail(cad){		
		var i=0;
		var enc=false
		while(i<cad.length && !enc){
			if(cad.charAt(i)=='@')
				enc=true
			else
				i++
		}
		return enc
	}	
		
	//funcion para validar los campos del formulario de contacto
	function validar(wich){
		if(wich.nombre.value.length==0){
			alert("El campo 'Nombre' es obligatorio")
			wich.nombre.focus()
			return false
		}			
	
		if( validarEmail(wich.email.value)==false ){
			var msg="El email: "
			msg=msg+wich.email.value
			msg=msg+" , no tiene un formato válido."
			alert(msg)
			wich.email.focus()
			return false
		}
		return true;
	}


	//función que comprueba que esten rellenados todos los campos obligatorios
   function checkrequired(which){  
   
		if (document.miForm.habitaciones1.value == 0 && document.miForm.habitaciones2.value == 0 && document.miForm.habitaciones3.value == 0){
		   alert("No ha seleccionado ninguna habitación");
				return false;
		} 
		else{
			if ((document.miForm.habitaciones1.value == 0 && document.miForm.habitaciones2.value != 0) || (document.miForm.habitaciones1.value == 0 && document.miForm.habitaciones3.value != 0)){
			   alert("Tiene que seleccionar las habitaciones por orden, primero la habitación 1");
				return false;
			} 
			if (document.miForm.habitaciones1.value != 0 && document.miForm.habitaciones2.value == 0 && document.miForm.habitaciones3.value != 0){
			   alert("Antes de seleccionar la habitación 3 tiene que seleccionar la habitación 2");
				return false;
			} 
			if (document.miForm.habitaciones1.value != 0 && (document.miForm.d_entrada1.value == 0 || document.miForm.m_entrada1.value == 0 || document.miForm.a_entrada1.value == 0)){
			   alert("1ª Habitación: No ha seleccionado la fecha de entrada");
				return false;
			} 
			if (document.miForm.habitaciones2.value != 0 && (document.miForm.d_entrada2.value == 0 || document.miForm.m_entrada2.value == 0 || document.miForm.a_entrada2.value == 0)){
			   alert("2ª Habitación: No ha seleccionado la fecha de entrada");
				return false;
			} 
			if (document.miForm.habitaciones3.value != 0 && (document.miForm.d_entrada3.value == 0 || document.miForm.m_entrada3.value == 0 || document.miForm.a_entrada3.value == 0)){
			   alert("3ª Habitación: No ha seleccionado la fecha de entrada");
				return false;
			} 
			if (document.miForm.habitaciones1.value != 0 && document.miForm.d_entrada1.value != 0 && document.miForm.m_entrada1.value != 0 && document.miForm.a_entrada1.value != 0){
				if(!(comprobar_fecha (document.miForm.d_entrada1.value, document.miForm.m_entrada1.value, document.miForm.a_entrada1.value))){
				   alert("1ª Habitación: Fecha incorrecta");
					return false;
				}				
				if(!(comparar_fecha (document.miForm.d_entrada1.value, document.miForm.m_entrada1.value, document.miForm.a_entrada1.value))){
					alert("1ª Habitación: La fecha seleccionada es menor que la fecha actual");
					return false;
				}
			} 
			if (document.miForm.habitaciones2.value != 0 && document.miForm.d_entrada2.value != 0 && document.miForm.m_entrada2.value != 0 && document.miForm.a_entrada2.value != 0){
				if(!(comprobar_fecha (document.miForm.d_entrada2.value, document.miForm.m_entrada2.value, document.miForm.a_entrada2.value))){
					alert("2ª Habitación: Fecha incorrecta");
					return false;
				}			
				if(!(comparar_fecha (document.miForm.d_entrada2.value, document.miForm.m_entrada2.value, document.miForm.a_entrada2.value))){
					alert("2ª Habitación: La fecha seleccionada es menor que la fecha actual");
					return false;
				}
			} 
			if (document.miForm.habitaciones3.value != 0 && document.miForm.d_entrada3.value != 0 && document.miForm.m_entrada3.value != 0 && document.miForm.a_entrada3.value != 0){
				if(!(comprobar_fecha (document.miForm.d_entrada3.value, document.miForm.m_entrada3.value, document.miForm.a_entrada3.value))){
					alert("3ª Habitación: Fecha incorrecta");
					return false;
				}			
				if(!(comparar_fecha (document.miForm.d_entrada3.value, document.miForm.m_entrada3.value, document.miForm.a_entrada3.value))){
					alert("3ª Habitación: La fecha seleccionada es menor que la fecha actual");
					return false;
				}
			} 
		}
		
	  	var pass=true;
	 	var val=true;

		if (document.images){
			for (i=0;i<which.length;i++){
				var tempobj=which.elements[i];

				if(which.elements[i].name=="requiredemail"){
				  val=validarEmail(which.elements[i].value);
				}

				if (tempobj.name.substring(0,8)=="required"){
				  if ((tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
					pass=false;
					break;
				  }
				}
			}
		}

		 if (!pass){
			 alert("No ha rellenado alguno de los campos obligatorios. Por favor, complételos y envíe de nuevo!");
			 return false;
		 }
		 else{
			if (!val){
				alert("E-mail no válido. Por favor, revíselo y envíe de nuevo!");
				return false;
			}  
		 }
	}
	
	
	//función que comprueba que esten rellenados todos los campos obligatorios
   function checkrequired2(which){  
	  	var pass=true;

		if (document.images){
			for (i=0;i<which.length;i++){
				var tempobj=which.elements[i];

				if (tempobj.name.substring(0,8)=="required"){
				  if ((tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
					pass=false;
					break;
				  }
				}
			}
		}

		 if (!pass){
			 alert("No ha rellenado alguno de los campos obligatorios. Por favor, complételos y envíe de nuevo!");
			 return false;
		 }
	}


	//defino una varibles Array con los precios de las habiaciones (segun el indice)
	var precios = new Array("","55 €","65 €","75 €")
	var datos = new Array("","Individual con baño, suelos climatizados, TV vía satélite, conexión a internet vía WIFI e incomparables vistas",
					  "Doble Estandar con baño, suelos climatizados, TV vía satélite, conexión a internet vía WIFI e incomparables vistas",
					  "Doble Especial con baño, suelos climatizados, TV vía satélite, conexión a internet vía WIFI e incomparables vistas")
	var preciosI = new Array(0,55,65,75)


	//función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio1(){
      document.miForm.precio1.value =precios[document.miForm.habitaciones1.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones1.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }

      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }	
   
   	//función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio11(){
      document.miForm.precio1.value =precios[document.miForm.habitaciones1.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones1.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }		
   
   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio111(){
      document.miForm.precio1.value =precios[document.miForm.habitaciones1.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones1.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)
	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  
      document.miForm.total.value = base + " €"
   }	

      //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio1111(){
      document.miForm.precio1.value =precios[document.miForm.habitaciones1.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones1.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)
	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  
      document.miForm.total.value = base + " €"
   }	

   
   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio2(){
      document.miForm.precio2.value =precios[document.miForm.habitaciones2.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones2.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }
   
   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio22(){
      document.miForm.precio2.value =precios[document.miForm.habitaciones2.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones2.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	 	 
      document.miForm.total.value = base + " €"
   }
   
   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio222(){
      document.miForm.precio2.value =precios[document.miForm.habitaciones2.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones2.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }

   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio2222(){
      document.miForm.precio2.value =precios[document.miForm.habitaciones2.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones2.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }
   
	//función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio3(){
      document.miForm.precio3.value =precios[document.miForm.habitaciones3.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones3.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  	  
      document.miForm.total.value = base + " €"
   }

	//función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio33(){
      document.miForm.precio3.value =precios[document.miForm.habitaciones3.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones3.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }

   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio333(){
      document.miForm.precio3.value =precios[document.miForm.habitaciones3.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones3.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }

   //función que cambia el precio en un campo input segun la opcion marcada en el select
   function muestraPrecio3333(){
      document.miForm.precio3.value =precios[document.miForm.habitaciones3.selectedIndex]
      document.miForm.descripcion.value =datos[document.miForm.habitaciones3.selectedIndex]
      var base = (preciosI[document.miForm.habitaciones1.selectedIndex] * document.miForm.n_noches1.value) + (preciosI[document.miForm.habitaciones2.selectedIndex] * document.miForm.n_noches2.value) + (preciosI[document.miForm.habitaciones3.selectedIndex] * document.miForm.n_noches3.value)

	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 0){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones1.selectedIndex] == 55){
		 document.miForm.n_ninos1.checked = false;
		 document.miForm.n_ninos1.disable = true;
	  }	  
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 55){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones2.selectedIndex] == 0){
		 document.miForm.n_ninos2.checked = false;
		 document.miForm.n_ninos2.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 55){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  if(preciosI[document.miForm.habitaciones3.selectedIndex] == 0){
		 document.miForm.n_ninos3.checked = false;
		 document.miForm.n_ninos3.disable = true;
	  }
	  
      if(document.miForm.n_ninos1.checked) {
		  base = base + (20 * document.miForm.n_noches1.value)
	  }
      if(document.miForm.n_ninos2.checked) {
		  base = base + (20 * document.miForm.n_noches2.value)
	  }
      if(document.miForm.n_ninos3.checked) {
	  	base = base + (20 * document.miForm.n_noches3.value)
	  }
	  	  
      document.miForm.total.value = base + " €"
   }
   