
function validar(form) {
     if (form.nombre.value.length > 15) {
          alert("El campo nombre debe tener al menos 15 caracteres");
          form.nombre.focus();
          return (false);
        }
     if (form.nombre.value.length == 0) {
          alert("El campo nombre no debe estar vacio");
          form.nombre.focus();
          return (false);
        }	
	
     if (form.apellidos.value.length > 30) {
          alert("El campo apellidos debe tener al menos 30 caracteres");
          form.apellidos.focus();
          return (false);
        }
     if (form.apellidos.value.length == 0) {
          alert("El campo apellidos no debe estar vacio");
          form.apellidos.focus();
          return (false);
        }	
      if (form.telefono.value.length > 15) {
          alert("El campo telefono debe tener al menos 15 caracteres");
          form.telefono.focus();
          return (false);
        }
     if (form.telefono.value.length == 0) {
          alert("El campo telefono no debe estar vacio");
          form.telefono.focus();
          return (false);
        }		
       if (form.horario.value.length > 100) {
          alert("El campo horario debe tener al menos 15 caracteres");
          form.horario.focus();
          return (false);
        }
     if (form.horario.value.length == 0) {
          alert("El campo horario no debe estar vacio");
          form.horario.focus();
          return (false);
        }			
    return (true);
   }