<!-- 

// the following function checks the contact form for errors
// that may have been entered by the user. Errors in the form
// could prevent the web author from building an accurate
// database of potential customers.

// To write this form, I relied primarily on an example in a good
// book called The Book of JavaScript, by Thau!. Thau! is also the
// author of the JavaScript tutorials on www.webmonkey.com.

function checkForm() {
  var error_mess = "";

		 
		   // check the comment field
  if ((document.getElementById("contact").comment.value == "comment") ||
	 (document.getElementById("contact").comment.value == "")) 
		{
		error_mess += "- You must enter your comment or question.\n";
		event.returnValue=false;
		}

  // displays itemized error message
  // if the error message is blank, then the user didn't make any mistakes and the
  // form can be submitted to the cgi script for processing. If an error message
  // does display, the form returns false to prevent the errors from getting submitted.
  if (error_mess == "") {
	return true;
	} else {
	error_mess = "We found the following errors in your form: \n" + error_mess;
	alert(error_mess);
	return false;
	}
  }

// -->
