function isEmpty(inputStr) {
	if (inputStr == "" || inputStr == null) {
		return true
		}
		return false
		}
function verifyForm(form) {
	var f = document.form1;
		if (!f.Individual.checked) {
		    if (isEmpty(f.companyName.value)){
				f.companyName.focus();			
				alert("Please enter your Company Name.")
				return false
				}
		    if (isEmpty(f.companyAddress.value)){
				f.companyAddress.focus();			
				alert("Please enter your Street Address.")
				return false
				}
	        if (isEmpty(f.companyCity.value)){
				f.companyCity.focus();			
				alert("Please enter a City.")
				return false
				}
	        if (isEmpty(f.companyState.value)){
				f.companyState.focus();			
				alert("Please enter a State.")
				return false
				}
		    if (isEmpty(f.companyZip.value)){
				f.companyZip.focus();			
				alert("Please enter your Zip or Postal Code.")
				return false
				}
			if (isEmpty(f.companyPhone.value)){
				f.companyPhone.focus();			
				alert("Please enter your Company Telephone Number.")
				return false
				}
			}
      	 	if (isEmpty(f.personNameFirst.value)){
			f.personNameFirst.focus();			
			alert("Please enter your First Name.")
			return false
			}
    	if (isEmpty(f.personNameLast.value)){
			f.personNameLast.focus();			
			alert("Please enter your Last Name.")
			return false
			}
		if (isEmpty(f.phoneBest.value)){
			f.phoneWork.focus();			
			alert("Please enter the Best Telephone Number to Reach You At.")
			return false
			}
		if (isEmpty(f.OwnerName.value)){
			f.OwnerName.focus();			
			alert("Please enter the owner name.")
			return false
			}
		if (isEmpty(f.subjAddress.value)){
			f.subjAddress.focus();			
			alert("Please enter in the property address.")
			return false
			}
		if (isEmpty(f.subjCity.value)){
			f.subjCity.focus();			
			alert("Please enter in the property city.")
			return false
			}
		if (isEmpty(f.subjCounty.value)){
			f.subjCounty.focus();			
			alert("Please enter in the property county.")
			return false
			}
		if (isEmpty(f.subjZip.value)){
			f.subjZip.focus();			
			alert("Please enter in the property zip.")
			return false
			}
		if (isEmpty(f.PropertyType.value)){
			f.PropertyType.focus();			
			alert("Please select a property type.")
			return false
			}
		if (isEmpty(f.AppraisalPurpose.value)){
			f.AppraisalPurpose.focus();			
			alert("Please select the purpose for the appraisal.")
			return false
			}
		if (isEmpty(f.email.value)){
			f.email.focus();			
			alert("Please enter an Email Address.")
			return false
			} else {
			var emailStr = f.email.value
			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=emailStr.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 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
			}
		}
	}