function checkValid (f) {
	if (f.identity.value == "") {
		alert('Enter your board identity')
		f.identity.focus();
		return false;
	}
	var titlePat1=/</;
	var titlePat2=/>/;
	var matchArray1=f.identity.value.match(titlePat1);
	var matchArray2=f.identity.value.match(titlePat2);
	if ((matchArray1 != null) || (matchArray2 != null)) {
		alert("You cannot have any HTML tags in the identity field.  Remove all '<' and '>'")
		return false
	}
	if (f.identity.value.length < 4) {
		alert('Your board identity must be at least 4 characters long')
		f.identity.focus();
		return false;
	}
	if (f.email.value == "") {
		alert('Enter an email')
		f.email.focus();
		return false;
	}
	if (f.password1.value.length < 4) {
		alert('Your password requires at least 4 characters')
		return false;
	}
	if (f.password2.value.length < 4) {
		alert('Your duplicate password requires the same character count')
		return false;
	}
	if (f.password1.value != f.password2.value) {
		alert('You must enter your password correctly both times')
		return false;
	}
	if ((f.title[0].checked == false) && (f.title[1].checked == false) && (f.title[2].checked == false)) {
		alert('You must select one Title');
		return false;
	}
	if (f.first.value == "") {
		alert('Enter a first name')
		f.first.focus();
		return false;
	}
	if (f.last.value == "") {
		alert('Enter a last name')
		f.last.focus();
		return false;
	}
	if (f.address1.value == "") {
		alert('Enter a primary address')
		f.address1.focus();
		return false;
	}
	if (f.city.value == "") {
		alert('Enter a city')
		f.city.focus();
		return false;
	}
	if (f.state.options[f.state.selectedIndex].value == "") {
		alert('Enter a state')
		f.city.focus();
		return false;
	}
	if (f.zip.value == "") {
		alert('Enter a zip or country code')
		f.zip.focus();
		return false;
	}
	if ((f.expecting[0].checked == false) && (f.expecting[1].checked == false))
	{
		alert('You must select whether you are expecting or not');
		return false;
	}
	if ((f.support[0].checked == false) && (f.support[1].checked == false))
	{
		alert('You must select whether you would support our research');
		return false;
	}
	if ((f.source[0].checked == false) && (f.source[1].checked == false) && (f.source[2].checked == false) && (f.source[3].checked == false) && (f.source[4].checked == false) && (f.source[5].checked == false))
	{
		alert('You must select where you heard about us');
		return false;
	}
	if ((f.source[2].checked == true) && (f.othersite_name.value.length < 1)) {
		alert('If you select \'Other Web Site\', you must provide us with the website.')
		return false;
	}
	if ((f.source[3].checked == true) && (f.magazine_name.value.length < 1)) {
		alert('If you select \'Magazine\', you must provide us with the magazine name.')
		return false;
	}
	if ((f.source[4].checked == true) && (f.tv_name.value.length < 1)) {
		alert('If you select \'TV\', you must provide us with the tv program name.')
		return false;
	}
	if ((f.source[5].checked == true) && (f.other_name.value.length < 1)) {
		alert('If you select \'Other\', you must provide us with that particular source.')
		return false;
	}
	// For email validation only
	
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var matchArray=f.email.value.match(emailPat)
	if (matchArray==null) {
	alert("Email address seems incorrect (check @ and .'s)")
	return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]
	if (user.match(userPat)==null) {
	 alert("The email username doesn't seem to be valid.")
	   return false
	}
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
	        alert("Destination IP address is invalid!")
		return false
	    }
	   }
	   return true
	}
	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
	alert("The domain name doesn't seem to be valid.")
	   return false
	}
	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || 
	   domArr[domArr.length-1].length>3) {
	  alert("The address must end in a three-letter domain, or two letter country.")
	  return false
	}
	if (len<2) {
	  var errStr="This address is missing a hostname!"
	  alert(errStr)
	  return false
	}
	return true; <!-- end email parsing -->
	
	// end email parsing
}
