function checkRegistration() {
	var strPsw, strVerify;
	var objRegistrationForm;
	
	// retrieve the form field values
	objRegistrationForm = document.getElementById("memberRegistrationForm");
	
	// check to see if the user entered a username
	if (trim(objRegistrationForm.uname.value).length < 3) {
		alert("Please enter a username.");
		objRegistrationForm.uname.value = trim(objRegistrationForm.uname.value);
		objRegistrationForm.uname.focus();
		return false;
	}
	
	// check to see if the user entered a password
	if (trim(objRegistrationForm.psw.value).length < 6) {
		alert("Please enter a password. Passwords must be at least 6 characters long.");
		objRegistrationForm.psw.value = trim(objRegistrationForm.psw.value);
		objRegistrationForm.psw.focus();
		return false;
	}
	
	// check to see if the user verified their password
	if (trim(objRegistrationForm.verify.value).length < 6) {
		alert("Please verify your password.");
		objRegistrationForm.verify.value = trim(objRegistrationForm.verify.value);
		objRegistrationForm.verify.focus();
		return false;
	}
	
	// retrieve the password and the verified password values
	strPsw = new String(objRegistrationForm.psw.value).toString();
	strVerify = new String(objRegistrationForm.verify.value).toString();
	
	// check to see if the user-entered password matches the verified password
	if (strPsw != strVerify) {
		alert("Please ensure that your passwords match.");
		objRegistrationForm.psw.value = trim(objRegistrationForm.psw.value);
		objRegistrationForm.verify.value = trim(objRegistrationForm.verify.value);
		objRegistrationForm.verify.focus();
		return false;
	}
	
	// check that a valid email address was entered
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objRegistrationForm.email.value)))){
		alert("Please enter a valid email address.");
		objRegistrationForm.email.value = trim(objRegistrationForm.email.value);
		objRegistrationForm.email.focus();
		return false;
	}
	
	// check that the user has filled in their name
	if (trim(objRegistrationForm.name.value).length < 3) {
		alert("Please enter you first name.");
		objRegistrationForm.name.value = trim(objRegistrationForm.name.value);
		objRegistrationForm.name.focus();
		return false;
	}
	
	// check that the user has filled in their las name
	if (trim(objRegistrationForm.lastname.value).length < 3) {
		alert("Please enter your last name.");
		objRegistrationForm.lastname.value = trim(objRegistrationForm.lastname.value);
		objRegistrationForm.lastname.focus();
		return false;
	}
	
	// check that the first line of the shipping address has been entered
	if (trim(objRegistrationForm.addr1.value).length < 2) {
		alert("Please enter the first line of the shipping address.");
		objRegistrationForm.addr1.value = trim(objRegistrationForm.addr1.value);
		objRegistrationForm.addr1.focus();
		return false;
	}
	
	// check that the second line of the shipping address has been entered
	if (trim(objRegistrationForm.addr2.value).length < 2) {
		alert("Please enter the second line of the shipping address.");
		objRegistrationForm.addr2.value = trim(objRegistrationForm.addr2.value);
		objRegistrationForm.addr2.focus();
		return false;
	}
	
	// check that the city name has been entered
	if (trim(objRegistrationForm.city.value).length < 2) {
		alert("Please enter the city name.");
		objRegistrationForm.city.value = trim(objRegistrationForm.city.value);
		objRegistrationForm.city.focus();
		return false;
	}
	
	// check that the postal code has been entered
	if (trim(objRegistrationForm.code.value).length < 2) {
		alert("Please enter the postal code.");
		objRegistrationForm.code.value = trim(objRegistrationForm.code.value);
		objRegistrationForm.code.focus();
		return false;
	}
	
	// if function got this far, all the field values are valid and the information may be sent to the form processing script
	return true;
}