function validate(txt)
{
if (txt == 'chamber') {
x=document.forms[0]
company_name=x.company_name.value
contact_name=x.contact_name.value
address=x.address.value
city=x.city.value
//country=x.country.options
zip=x.zip.value
phone=x.phone.value
email=x.email.value.search('@')
if (company_name.length<1)
 {
 alert("Please enter a company name")
 x.company_name.focus()
 return false
 }
if (contact_name.length<1)
 {
 alert("Please enter a contact name")
 x.contact_name.focus()
 return false
 }
if (address.length<1)
 {
 alert("Please enter an address")
 x.address.focus()
 return false
 }
if (city.length<1)
 {
 alert("Please enter a city")
 x.city.focus()
 return false
 }

if (zip.length<5)
 {
 alert("Please enter a zip")
 x.zip.focus()
 return false
 }
 if (phone.length<10)
 {
 alert("Please enter a telephone number.")
 x.phone.focus()
 return false
 }
 if (email == -1)
 {
  alert("Please enter a valid email address. Your email address \
should be in this format: xxx@xxx.com.")
  x.email.focus()
  return false
  }
 
else
 {
 return true
 }
}
else {
x=document.contactForm
email=x.email.value.search('@')
name=x.name.value
address=x.address.value
city=x.city.value
state=x.state.options
//country=x.country.options
zip=x.zip.value
phone=x.phone.value
referred_by=x.referred_by.options
contact_about=x.contact_about.options

if (name.length<1)
 {
 alert("Please enter a contact name")
 x.name.focus()
 return false
 }
if (address.length<1)
 {
 alert("Please enter an address")
 x.address.focus()
 return false
 }
if (city.length<1)
 {
 alert("Please enter a city")
 x.city.focus()
 return false
 }
if (state.selectedIndex==0)
 {
 alert("Please select a state")
 x.state.focus()
 return false
 }
if (zip.length<5)
 {
 alert("Please enter a zip")
 x.zip.focus()
 return false
 }
 if (phone.length<10)
 {
 alert("Please enter a telephone number.")
 x.phone.focus()
 return false
 }
 if (email == -1)
 {
  alert("Please enter a valid email address. Your email address \
should be in this format: xxx@xxx.com.")
  x.email.focus()
  return false
  }
 if (referred_by.selectedIndex==0)
 {
  alert("Please tell us how you found out about us.")
  x.referred_by.focus()
  return false
  }
  if (x.referred_by.selectedIndex==7)
 {
	  if (x.referred_by_other.value.length<=0)
	  {
	  alert("Please fill out the \"referred by other\" field.")
	  x.referred_by_other.focus()
	  return false
	  }
  }
 if (contact_about.selectedIndex==0)
 {
  alert("Please tell us what your are contacting us about.")
  x.contact_about.focus()
  return false
  }
 if (x.contact_about.selectedIndex==3)
 {
	  if (x.contact_about_other.value.length<=0)
	  {
	  alert("Please fill out the \"contact about other\" field.")
	  x.contact_about_other.focus()
	  return false
	  }
  }

else
 {
 return true
 } 
}

}
