function checkForm(frm) {
	for (var i=0;i<frm.length;i++) {
		current = frm.elements[i];
		if(current.name.indexOf("_req") > -1) {
			if(current.value.replace(/^\s+|\s+$/, '') == "" && current.type=="text") {
					alert("You need to enter text in all fields.");
					return false;
				}
			if(current.value.replace(/^\s+|\s+$/, '') == "" && current.type=="password") {
				alert("You need to enter text in all password fields.");
				return false;
			}
			if(current.value == "#" && current.type != "text") {
				alert("You have to make a selection in all drop down menus.");
				return false;
			}
			if(current.value.replace(/^\s+|\s+$/, '') == "" && current.type=="textarea") {
				alert("You need to enter text in all required text areas.");
				return false;
			}
			if(current.name == "spam_req") {
				if(current.checked != true) {
					alert("You have not checked the verification box. Please do so and try again.");
					return false;
				}
			}
		}
	}
	return true;
}


