function validate()
{
x=document.contactForm
name=x.name.value
address=x.address.value
city=x.city.value
state=x.state.options
zip=x.zip.value
country=x.country.options
phone=x.phone.value
email=x.email.value.indexOf("@")||x.email.value.indexOf(".")

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 (country.selectedIndex==0)
 {
 alert("Please select a state")
 x.country.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. Please use this format: name@domain.com.")
 x.email.focus()
 return false
 }
else
 {
 return true
 }
}