function checkWholeForm(theForm) {
    var why = "";
    why += checkName(theForm.name.value);
    why += checkEmail(theForm.email.value);
    why += checkSubject(theForm.subject.value);
    why += checkComments(theForm.comments.value);
    why += checkCode(theForm.code.value);
    if (why != "") {
       alert(why);
       return false;
    }
return true;
}

function checkName (strng) {
  var error = "";
  if (strng == "") {
    error = "Please enter your full name.\n";
  }
  return error;
}

function checkEmail (strng) {
  var error = "";
  if (strng == "") {
    error = "Please enter your e-mail address.\n";
  }
  return error;
}

function checkSubject (strng) {
  var error = "";
  if (strng == "") {
    error = "Please enter the subject of your e-mail.\n";
  }
  return error;
}

function checkComments (strng) {
  var error = "";
  if (strng == "") {
    error = "Please enter the body of your e-mail.\n";
  }
  return error;
}

function checkCode (strng) {
  var error = "";
  if (strng == "") {
    error = "Please enter the 4-digit code as shown.\n";
  }
  return error;
}


