// Chocolatefountain.ca

function validateForm(f) {
	var email_reg = /^([\w\d.\-]{2,}\x40[\w\d.\-]{2,}\x2E[\w\d.\-]{2,})$/;
	if (f.name.value.length < 1) {
		alert("Please provide your name so we can contact you!");
		f.name.focus();
		return false;
	}
	if (f.phone.value.length < 1) {
		alert("Please provide your phone number so we can contact you!");
		f.phone.focus();
		return false;
	}
	if (f.email.value.length < 1) {
		alert("Please provide your email so we can contact you!");
		f.email.focus();
		return false;
	}
	if (!email_reg.test(f.email.value)) {
		alert("Please provide a valid email address.");
		f.email.focus();
		return false;
	}
	if (f.source.value.length < 1) {
		alert("How did you hear about us?");
		f.source.focus();
		return false;
	}	
	if (f.guests.value.length < 1) {
		alert("Approximately how many guests will you be expecting at your event?");
		f.guests.focus();
		return false;
	}
	if (f.city.value.length < 1) {
		alert("Please provide your city!");
		f.city.focus();
		return false;
	}	
}