// JavaScript Document

function isEmail(sEmail) {
	var regEmail = /^([\w-]+\.?)*\w+@([\da-zA-z-]+\.)+[a-zA-z]{2,6}$/;
	return regEmail.test(sEmail);
}

function Validator(registration) {

	if (registration.name.value == "") {
		alert("Please enter a value for First Name");
		registration.first_name.focus();
		return(false);
	}
	
	if (registration.name.value == "") {
		alert("Please enter a value for Last Name");
		registration.last_name.focus();
		return(false);
	}
	
 	if (registration.address.value == "") {
		alert("Please enter a value for Address");
		registration.address.focus();
		return(false);
	}

	if (registration.DaytimePhone.value == "") {
		alert("Please enter a value for Daytime Phone.");
		registration.DaytimePhone.focus();
		return (false);
	}

	if (!isEmail(registration.Email.value)) {
		alert("Please enter a valid Email address");
		registration.Email.focus();
		return(false);
	}

	if (registration.upc.value == "") {
		alert("Please enter a valid UPC number");
		registration.upc.focus();
		return(false);
	}
	
} // END FUNCTION Validator

 -->