/* garibaldi.js Document */

/* Designed by: Skillings Technology, New Ulm Web Design (Ronald Calbick */
/* Date: 03/29/09 */

/*Confirm Submit Function*/
function confirmSubmit() {
	/*Ensures all required fields contain information*/
	if (document.forms[0].Name.value=="" || document.forms[0].Email.value=="" || document.forms[0].Comments.value=="") {
		window.alert("Please complete all fields before clicking SEND.");
		document.forms[0].Name.focus();
		return false;

	}
	
	/*Email address validation*/	
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.forms[0].Email.value)==false){
		window.alert("You must enter a valid email address.");
		document.forms[0].Email.focus();
		document.forms[0].Email.value="";
		return (false);
	}
}

/*Confirm Reset Function - confirms that a user wants to reset the form*/
function confirmReset() {
	var resetForm = window.confirm("Are you sure you want to reset the form?");
	if (resetForm==true)
		return true;
	return false;
}