// Contact Us and Ask a Counselor Form Validation

function confirmForm1() {
	if (document.f1.fname.value == '' || document.f1.lname.value == '' || !isValidEmail(document.f1.email.value)) {
		alert("Your first name, last name, and valid email address are required.");
		return false;
	} else {
		return true;
	}
}

function confirmForm2() {
	if (document.f1.FirstName.value == '' || document.f1.LastName.value == '' || !isValidEmail(document.f1.Email.value)) {
		alert("Your first name, last name, and valid email address are required.");
		return false;
	} else {
		return true;
	}
}

function isValidEmail(str) {
	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}
