function process_form() {

	// This checks to see if the form has been filled in correctly
	// before submitting it to the system

	if (document.signup.fname.value == "") {
		window.alert("First Name is required.");
			return false;
	}
	if (document.signup.lname.value == "") {
		window.alert("Last Name is required.");
		return false;
	}	
	// Check to see if the email address is entered, then if so
	// do a quick regex to check the format

	if (document.signup.email.value == "") {
		window.alert("Email is required.");
		return false;
	} else {
		// Define the regex
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!filter.test(document.signup.email.value)) {
			window.alert("Your email address does not look valid");
			return false;
		}
	}
	
			
		return true;
} // End of process_form

function process_form_login() {

	// This checks to see if the form has been filled in correctly
	// before submitting it to the system


	// Check to see if the email address is entered, then if so
	// do a quick regex to check the format

	if (document.signup.user.value == "") {
		window.alert("Username is required.");
		return false;
	} else {
		// Define the regex
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!filter.test(document.signup.user.value)) {
			window.alert("Your username is your email address.\n\nThe entered email address does not look valid.");
			return false;
		}
	}
	
		if (document.signup.pass.value == "") {
		window.alert("Password is required.");
		return false;
	}	
		
		return true;
} // End of process_form login

function process_form_forgot() {

	// This checks to see if the form has been filled in correctly
	// before submitting it to the system


	// Check to see if the email address is entered, then if so
	// do a quick regex to check the format

	if (document.signup.user.value == "") {
		window.alert("Username is required.");
		return false;
	} else {
		// Define the regex
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!filter.test(document.signup.user.value)) {
			window.alert("Your username is your email address.\n\nThe entered email address does not look valid.");
			return false;
		}
	}
	
	
		return true;
} // End of process_form forgot

