function check(f){
		errorMsg	= "Please enter the following required fields:\n";
		isError		= false;
		strFname	= f.firstname.value;
		strLname	= f.lastname.value;
		strEmail	= f.email.value;
		strCity		= f.city.value;
		strState	= f.state.value;
		
		if(isStringWhitespace(strFname) || strFname.length < 1){			
			errorMsg += "First Name\n";
			isError = true; }

		if(isStringWhitespace(strLname) || strLname.length < 1){
			errorMsg += "Last Name\n";
			isError = true; }

		if(isStringWhitespace(strEmail) || strEmail.length < 1 || !checkEmail(strEmail)){
			errorMsg += "Email Address\n";
			isError = true; }
		
		if(isStringWhitespace(strCity) || strCity.length < 1){
			errorMsg += "City\n";
			isError = true; }

		if(isStringWhitespace(strState) || strState.length < 1){
			errorMsg += "State\n";
			isError = true; }

		if(isError){
			alert(errorMsg);
			return false; }
	}

	var whitespace = " \t\n\r";
	function isEmpty(s){   
		return ((s == null) || (s.length == 0));
	}
	function isStringWhitespace(s){   
		var i;
		if (isEmpty(s)) return true;
		for (i = 0; i < s.length; i++){
			var c = s.charAt(i);
			if (whitespace.indexOf(c) == -1) return false;
		}
		return true;
	}
	function checkEmail(pEmail){	
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(pEmail)){
			return (true)}
		return false; }