function validateForm(who) {
	var missing = new Array();
	var msg = "Please be sure to fill out all of the fields marked in red.";
	for(i=0;i<who.elements.length;i++) {
		if(who.elements[i].className == "required" && who.elements[i].value.length < 1) {
			missing.push(who.elements[i].name);
		} else if(who.elements[i].className == "required" && who.elements[i].name == "email") {
			if(!validateEmail(who.elements[i].value)) {
				missing.push(who.elements[i].name);
				missing.length > 1 ? msg += "\nAlso, please make sure you have entered a valid email address." : msg = "Please make sure you have entered a valid email address.";
			}
		}
	}
	if (missing.length > 0) {
		labels = document.getElementsByTagName("LABEL");
		for(h=0;h<labels.length;h++) {
			labels[h].className = "";
		}
		for(j=0;j<missing.length;j++) {
			document.getElementById(missing[j]).className = "required";
		}
		alert(msg);
		return false;
	}
	else {
		return true;
	}
}

function validateEmail(str) {
	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}