function registration_checkForm(){	
	fullname = document.forms[0].fullname.value;
	if ((fullname == "") || (fullname == null)){
		alert("please enter a fullname.");
		return false;
	}
	else if (illegalFullName(fullname)){
		alert("please enter your first name, followed by last name.");
		return false;
	}
	email = document.forms[0].email.value;
	if (email == ""){
		alert("please enter an email.");
		return false;
	}
	if (!verifyEmail(email)){	
			alert("please enter a valid email address.");
			return false; 
	}
	username = document.forms[0].username.value;
	if (username == null || username == ""){
		alert("please enter a username.");
		return false;
	}
	if (!verifyUsername(username)){	
			alert("please enter a valid username.");
			return false; 
	}
	password = document.forms[0].password.value;
	password2 = document.forms[0].password2.value;
	if (password == null || password == ""){
		alert("please enter a password.");
		return false;
	}
	if (password.length < 6 || password.length > 12){
		alert("please enter a password that is 6-12 characters long.");
		return false;
	}
	if(password2 == null || password2 == ""){
		alert("please enter password to confirm.");
		return false;
	}
	if(password != password2){
		alert("passwords do not match. please reenter.");
		return false;
	}
	area_code = document.forms[0].area_code.value;
	if (area_code == null || area_code == ""){
		alert("please enter an area code.");
		return false;
	}
	telephone = document.forms[0].telephone.value;
	if (telephone == null || telephone == ""){
		alert("please enter a 7 digit telephone number.");
		return false;
	}
	
	return true;
}
function SetRegistrationType(){	
	var registration_type = 	document.forms[0].registration_type[document.forms[0].registration_type.selectedIndex].text;
	if (registration_type == "Manager"){
	}
	else if (registration_type == "Coach"){
		document.forms[0].action = 'register_coach.jsp';
		document.forms[0].submit();
	}
}	