/*==========================================================
 contact.js
  Created 09/16/2008 by Greg Spry
   Holds javascript specific to contact form submission

==========================================================*/
	function submitContactForm(theForm) {
		with(theForm) {
			if(name.value == "") {
				alert("Please enter your first and last name.");
				name.focus();
				return;
			}
			if(imEmailField.value == "") {
				alert("Please enter your email address.");
				imEmailField.focus();
				return;
			}
			if(!isValidEmail(imEmailField.value)) {
				alert("Please enter a valid email address in the format local@domain.ext.");
				imEmailField.focus();
				return;
			}
			if(comments.value == "") {
				alert("Please enter a few comments.");
				comments.focus();
				return;
			}
			submit();
		}
	}

/*========================================================*/
	function isValidEmail(email) {
		return email.match(/^(\w|-|_|\.)+@(\w|-|_|\.){3,}\.\w{2,5}$/);
	}

/*========================================================*/


