function validate(theForm){
		
	if(isBlank(theForm.name.value)){
		alert("\"Name\" is a required field.");
		theForm.name.focus();
		return false;
	}
	
	if(isBlank(theForm.email.value)){
		alert("\"Email Address\" is a required field.");
		theForm.email.focus();
		return false;
	}else{
		if(!(isValidEmail(theForm.email.value))){
			alert("\"Email Address\" is not valid.");
			theForm.email.focus();
			return false;
		}
	}	
	if(isBlank(theForm.friendemail1.value)){
			alert("\"Friend email 1\" is a required field");
		theForm.friendemail1.focus();
		return false;
	}else{
		if(!(isValidEmail(theForm.friendemail1.value))){
			alert("\"Friend email 1\" is not valid.");
			theForm.friendemail1.focus();
			return false;
		}
	}		
	if(!(isBlank(theForm.friendemail2.value))){
		if(!(isValidEmail(theForm.friendemail1.value))){
			alert("\"Friend email 2\" is not valid.");
			theForm.friendemail1.focus();
			return false;
		}
	}	
	if(!(isBlank(theForm.friendemail3.value))){
		if(!(isValidEmail(theForm.friendemail1.value))){
			alert("\"Friend email 3\" is not valid.");
			theForm.friendemail1.focus();
			return false;
		}
	}	

		
	return true;

}

function submitForm(){
	document.form1.submit();
}


