// JavaScript Document
function validateform(){

		//the .replace at the end of each value eliminates any white space the user may have entered.  This way, just a space isn't considered an input.
	
		var f = document.voting
		
		if (f.name.value.replace(/^\s*|\s*$/g,'') == ""){
			alert ("A name is required to vote.");
			f.name.focus();
			return false;
		} 
		
		if (f.optin.checked == true){
			if (f.email.value.replace(/^\s*|\s*$/g,'') == ""){
				alert ("You must enter an email to enroll in the Heinz mailing list.");
				f.email.focus();
				return false;
			}
		}
}
//-->