// Validaciones del formulario de contactus

function validate_contactus(form){
   nombre = form.nombre.value;
   email = form.email.value;
   individual = form.individual.value;
   matrimonial = form.matrimonial.value;
   adultos = form.adultos.value;
   fechal = form.fechal.value;
   fechas = form.fechas.value;
      
  var msg="";
  var todo=true;//se mantiene true si todos los campos estan correctos
   
 if(!validateNotEmpty(nombre)){
   msg=msg+"Por favor introduzca su nombre.\n";
   todo=false;
 }
 
 if(!validateNotEmpty(email)){
   msg=msg+"Escriba su email o correo electrónico.\n";
   todo=false;
 }
 else if(!validateEmail(email)){
   msg=msg+"Debe escribir su email correctamente.\n";
   todo=false;
 }
 
 if((!validateNotEmpty(individual))&&(!validateNotEmpty(matrimonial))){
   msg=msg+"Debe escribir la cantidad de habitaciones a reservar, ya sean individual o matrimonial.\n";
   todo=false;
 }
 
 if(!validateNotEmpty(fechal)){
   msg=msg+"Indique la fecha de llegada.\n";
   todo=false;
 }
 
  if(!validateNotEmpty(fechas)){
   msg=msg+"Indique la fecha de salida.\n";
   todo=false;
 }
 
  if(!validateNotEmpty(adultos)){
   msg=msg+"Debe especificar la cantidad de adultos que vendrán.\n";
   todo=false;
 }
 
 
 if(todo==false)
   alert(msg);
 return todo;
   
}