// this function will inspect to see if a person inputted the correct information for joining
function inspectIt() {
 a = document.thisForm;
 // testing to see if the user entered a username
 if(a.user.value == "") {
  alert("a username is required to complete this form");
  a.user.focus();
  return(false);
 }
 // testing to see if the user entered a username of at least length 4
 if(a.user.value.length < 4)
 {
  alert("your username (" + a.user.value + ") is too short!");
  a.user.focus();
  return(false);
 }
 // testing to see if the user entered the first password field
 if(a.pass.value == "") {
  alert("a password is required to complete this form");
  a.pass.focus();
  return(false);
 }
 // testing to see if the user entered a password of at least length 5
 if(a.pass.value.length < 5)
 {
  alert("your password, from the first password field, is too short!");
  a.pass.focus();
  return(false);
 }
 // testing to see if the user entered the second password field
 if(a.pass1.value == "") {
  alert("both password fields are required to complete this form");
  a.pass1.focus();
  return(false);
 }
 // testing to see if the user entered a second password of at least length 5
 if(a.pass1.value.length < 5)
 {
  alert("your password, from the second password field, is too short!");
  a.pass1.focus();
  return(false);
 }
 // test to see if the two passwords are the same
 if(a.pass.value != a.pass1.value)
 {
  alert("your passwords do not match!");
  a.pass.focus();
  return(false);
 }
 if(a.first.value == "") {
  alert("a first name is required to complete this form");
  a.first.focus();
  return(false);
 }
 // testing to see if the user entered a first name of at least length 2
 if(a.first.value.length < 2)
 {
  alert("your first name, " + a.first.value + " , is too short!");
  a.first.focus();
  return(false);
 }
 if(a.last.value == "") {
  alert("a last name is required to complete this form");
  a.last.focus();
  return(false);
 }
 // testing to see if the user entered a last name of at least length 2
 if(a.last.value.length < 2)
 {
  alert("your last name, " + a.last.value + " , is too short!");
  a.last.focus();
  return(false);
 }
 if(a.email.value == "") {
  alert("an email address is required to complete this form");
  a.email.focus();
  return(false);
 }
 // check to see if the email address is close to being valid
 if(a.email.value != "") {
  var testresults;
  var str=a.email.value;
  var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
  if (filter.test(str)) {
   testresults=true;
  }
  else {
   alert("Please input a valid email address!");
   testresults=false;
  }
  return (testresults)
 }
 // check to see if they have entered a response to their secrect question
 if(a.secretResponse.value == "")
 {
  alert("your secret response is required to complete this form!  It is used if you forget your current password.");
  a.secretResponse.focus();
  return(false);
 }
 // everything is ok, continue
 return(true);
}
