  function check_all (form) {
    //check to see if they entered a first name
    if (!form.firstname.value) { 
      alert("Please enter your first name."); 
      form.firstname.focus();
      return false; 
    }

    //check to see if they entered a last name
    if (!form.lastname.value) { 
      alert("Please enter your last name."); 
      form.lastname.focus();
      return false; 
    }

    //check on account num, if it is not disabled
    if (form.accountnum.disabled == false) {
      if (!form.accountnum.value) {
        alert("Please enter an account number.");
        form.accountnum.focus(); 
        return false;
      } 
    }

    //check to see if they entered a username
    if (!form.username.value) { 
      alert("Please enter a username."); 
      form.username.focus(); 
      return false; 
    }

    //check to see if username is right length
    if ((form.username.value.length >= 5) && (form.username.value.length <= 8)) {
    } else {
      alert("Username should be between 5 and 8 characters.");
      form.username.value='';
      form.username.focus(); 
      return false;
    }  

    //check to see if they entered a passwword
    if (!form.pwd1.value) { 
      alert("Please enter a password."); 
      form.pwd1.focus(); 
      return false; 
    }

    //check to see if password is right length
    if ((form.pwd1.value.length >= 5) && (form.pwd1.value.length <= 8)) {
    } else {
      alert("Password should be between 5 and 8 characters.");
      form.pwd1.value='';
      form.pwd1.focus(); 
      return false;
    }  

    //check to see if they entered a password confirmation
    if (!form.pwd2.value) { 
      alert("Please enter your password again to confirm it.");
      form.pwd2.focus(); 
      return false; 
    }

    //check to see if password confirmation is right length
    if ((form.pwd2.value.length >= 5) && (form.pwd2.value.length <= 8)) {
    } else {
      alert("Confirm password should be between 5 and 8 characters.");
      form.pwd2.value='';
      form.pwd2.focus(); 
      return false;
    }  

    //check to see if passwords match
    if (form.pwd1.value != form.pwd2.value) {
      form.pwd1.value='';
      form.pwd2.value='';
      alert("Passwords do not match!");
      form.pwd1.focus();
      return false;
    }

    //check to see if they entered an e-mail address
    if (!form.email.value) { 
      alert("Please enter an e-mail address."); 
      form.email.focus(); 
      return false; 
    }

    //check to see if e-mail address is valid
    var x = form.email.value;
    var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if (filter.test(x)) {
      return true;
    } else {
      alert('Please enter a valid email address');
      form.email.value='';
      form.email.focus(); 
      return false;
    }
  }
