
<!--
//Function Definitions ****************************

// Email Validation. Originally by PerlScriptsJavaScripts.com. Modified by us!
function checkEmail(e) {
	ok = "1234567890abcdefghijklmnopqrstuvwxyz[].@-_ABCDEFGHIJKLMNOPQRSTUVWXYZ";

	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
			return (false);
		}//end if	
	} //end forloop 

	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);		
		} //end if 
	}
} //end function


// Checking the Form ==============================================================================
function checkMailForm(f) { // f is the form (passed using the this keyword)

	// check the email address ( the exclamation means "not" )
	if(!checkEmail(f.email.value)){
		alert("Please enter a valid email address.");
		f.email.focus(); 
	// make sure the form is not submitted
	return false;
	}//end if
	return true;
}// end function
// -->
