<!--Hide
function validEmail(email) {       				 //VALIDATION OF FORM
	invalidChars = " /:,;"

	if (email == "") {							// Must be filled in
		return false
	}
	for (i=0; i<invalidChars.length; i++) {		// Check to see if it contains illegal characters
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0)> -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)				// There must be one "@" symbol
	if (atPos == -1) {
		return false
	}
	if (email.indexOf("@",atPos+1) != -1) {		// And only one "@" symbol
		return false
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {						// And at least one "." after the "@"
		return false
	}
	if (periodPos+3> email.length)	{			// Must be at least 2 characters after the "."
		return false
	}
	

return true;	

}


function valform(form){
whatState = form.State.selectedIndex;
whatCatOne = form.Category_One.selectedIndex;
whatCatTwo = form.Category_Two.selectedIndex;
whatCatThree = form.Category_Three.selectedIndex;
 
     if (form.First_Name.value == "") {
            alert("Please enter your first name.  Thank you.");
            form.First_Name.focus();
            return false;
            }
            
     if (form.Last_Name.value == "") {
            alert("Please enter your last name.  Thank you.");
            form.Last_Name.focus();
            return false;
            }
            
     if (form.Address.value == "") {
            alert("Please enter your Street or PO Box Address.  Thank you.");
            form.Address.focus();
            return false;
            }
            
     if (form.City.value == "") {
            alert("Please enter your City.  Thank you.");
            form.City.focus();
            return false;
            }
         
          
     if (form.State.options[whatState].value == "") {
             alert("Please enter your state. If you are not from the United States, then select 'Not US' from the option list.  Thank you.");
             form.State.focus();
             return false;
             } 
             
     if (form.Zip_Code.value == "") {
                 alert("Please enter your Zip or Postal Code.  Thank you.");
                 form.Zip_Code.focus();
                 return false;
            }   
            
     if (form.Country.value == "") {
            alert("Please enter your Country.  Thank you.");
            form.Country.focus();
            return false;
            }
            
      if (form.Business_Name.value == "") {
            alert("Please enter the name of your business.  Thank you.");
            form.Business_Name.focus();
            return false;
            }       
     
      if (form.WebSite.value == "") {
	   alert("Please enter your business web site address or URL.  Thank you.");
	   form.WebSite.focus();
	   return false;
            }
            
       if (form.WebSiteDesc.value == "") {
	   alert("Please enter a brief description your business web site.  Thank you.");
	   form.WebSiteDesc.focus();
	   return false;
            }      
            
     if (form.Category_One.options[whatCatOne].value == "") {
             alert("Please enter your first category that you would like to be listed in. Thank you.");
             form.Category_One.focus();
             return false;
             }
             
     if (form.Category_Two.options[whatCatTwo].value == "") {
             alert("Please enter your second category that you would like to be listed in. Thank you.");
             form.Category_Two.focus();
             return false;
             } 
             
     if (form.Category_Three.options[whatCatThree].value == "") {
             alert("Please enter your third category that you would like to be listed in. Thank you.");
             form.Category_Three.focus();
             return false;
             }            
            
       else if (!validEmail(form.email.value)) {
	      alert("Please enter a valid e-mail address.  Thank you.");
	      form.email.focus();
	      return false;
	  		
              }
              
     	var onlinepayment = form.Accept_Payments_Online[0].checked
     	var noonlinepayment = form.Accept_Payments_Online[1].checked
     	
	if ((!onlinepayment) && (!noonlinepayment)) {
     	        alert('Please indicate whether or not you accept payments online.  Thank you.');
	        return false;
	        
	}
	
	alert('Thank you, for listing with us.  We will have your web site listed as soon as possible.')
       
  }   
  
//End Hide-->

