	function frmValidate (whichForm) {
	
	//fname
	theField = whichForm.fname.value;
	if (theField=="") {
	alert("Please enter your first name.");
	whichForm.fname.focus();
	return false;
	}
	
	//lname
	theField = whichForm.lname.value;
	if (theField=="") {
	alert("Please enter your last name.");
	whichForm.lname.focus();
	return false;
	}
	
	// email
	theField = whichForm.email.value;
	if (theField==""){
	alert("Please enter your email address.");
	whichForm.email.focus();
	return false;
	}
	
	email_pattern = /.+\@.+\..+/;
    if (!email_pattern.test(theField)){
    alert("Please enter your email in the proper format:\n\nuser@some.thing");
    whichForm.email.focus();
	return false;
    }
	
	if (whichForm.email.value != whichForm.email2.value) {
	alert("Please make sure you have re-typed your email correctly.");
	whichForm.email2.focus();
	return false;
	}
	
	//password
	theField = whichForm.password.value;
	if (theField=="") {
	alert("Please enter your password.");
	whichForm.password.focus();
	return false;
	}
	
	//password2
	theField = whichForm.password2.value;
	if (theField=="") {
	alert("Please re-type your password.");
	whichForm.password2.focus();
	return false;
	}
	
	if (whichForm.password.value != whichForm.password2.value) {
	alert("Please make sure you have re-typed your password correctly.");
	whichForm.password2.focus();
	return false;
	}
	
	return true;
	}// -->
