function datosformulario(){
  errStr="";
  
  if (errStr==""){vacio(document.getElementById('envio').Nombre.value,'"Nombre"');document.getElementById('envio').Nombre.focus();}  
  if (errStr==""){vocal(document.getElementById('envio').Nombre.value,'"Nombre"');document.getElementById('envio').Nombre.focus();}
  if (errStr==""){longitud_minima(document.getElementById('envio').Nombre.value,'"Nombre"',2);document.getElementById('envio').Nombre.focus();}
  if (errStr==""){longitud(document.getElementById('envio').Nombre.value,'"Nombre"',30);document.getElementById('envio').Nombre.focus();}
  
  if (errStr==""){vacio(document.getElementById('envio').Email.value,'"E-mail"');document.getElementById('envio').Email.focus();}
  if (errStr==""){longitud_minima(document.getElementById('envio').Email.value,'"E-mail"',6);document.getElementById('envio').Email.focus();}
  if (errStr==""){longitud(document.getElementById('envio').Email.value,'"E-mail"',50);document.getElementById('envio').Email.focus();}
  if (errStr==""){es_mail(document.getElementById('envio').Email.value,'"E-mail"');document.getElementById('envio').Email.focus();}
  
  if (errStr==""){
  if (document.getElementById('envio').EntradaDia.value == 0){
	  errStr="Seleccione día de entrada.";
  }
  }
  if (errStr==""){
  if (document.getElementById('envio').EntradaMes.value == 0){
	  errStr="Seleccione mes de entrada.";
  }
  }
  if (errStr==""){
  if (document.getElementById('envio').SalidaDia.value == 0){
	  errStr="Seleccione día de salida.";
  }
  }
  if (errStr==""){
  if (document.getElementById('envio').SalidaMes.value == 0){
	  errStr="Seleccione mes de entrada.";
  }
  }
  
  if (errStr==""){
  var tamano_grupo = document.getElementById('envio').Alojamiento.length;
  seleccionado = 0;
  for (i=0;i<tamano_grupo;i++) {		
		if(document.getElementById('envio').Alojamiento[i].checked){
			seleccionado = 1;
		}
  }
  
  if (seleccionado == 0){
	  errStr="Debe seleccionar un alojamiento.";
  }
  }  
  if (errStr==""){
	document.getElementById('envio').submit();	
  }else{
  	 alert(errStr);
  }
}

  //Comprueba tamanos de campos
  function longitud(parametro,nombre,largo)
   {
   cade=parametro
   if (cade.length>largo)
   errStr = errStr + nombre+" es demasiado largo.\r ";
   }
  
  function longitud_minima(parametro,nombre,largo)
   {
   cade=parametro
   if (cade.length<largo)
   errStr = errStr + nombre+" es demasiado corto.\r ";
   }
  
  function vacio(parametro,nombre)
   {
   nom=new String(parametro);
   if (nom=="")
   errStr = errStr + nombre+" está vacío.\r ";
   
   }
  
  function vocal(parametro,nombre)
   {
   nom=new String(parametro);
   nom=nom.toLowerCase()
   if (nom.indexOf("a")<0 && nom.indexOf("e")<0 && nom.indexOf("i")<0 && nom.indexOf("o")<0 && nom.indexOf("u")<0)
   errStr = errStr + nombre+" es incorrecto.\r ";
   }
  
  function numerico(parametro,nombre)
   {
   comprobar=parametro;          
   if (isNaN(comprobar)==true)
    {
    errStr = errStr + nombre+" debe ser numérico.\r ";
    }
   }
  
  function es_mail(texto,nombre)
	 {
     // Comprueba que el campo email es valido.
	 var cemail = texto;
	 resul1 = cemail.indexOf("@"); resul2 = cemail.lastIndexOf(".");
	 if (resul1 == -1 || resul2 == -1 || resul2 < resul1) 
	   { 
	   errStr = errStr + nombre+" es incorrecto.\r ";
	   }
    
    n=texto.indexOf("'");
    if (n>=0){errStr = errStr + nombre+" es incorrecto.\r ";}
    
	} 
   
   function quitar_comitas(parametro)
   {
   campo=parametro
   n=campo.indexOf("'");
   while (n>=0)
	 {
	 campo=campo.replace("'",'´');
	 n=campo.indexOf("'");
	 }
   return(campo);
   }