function validate()
{
x=document.contactForm
email=x.email.value.indexOf("@")||x.email.value.indexOf(".")
name=x.name.value
address=x.address.value
city=x.city.value
state=x.state.options
country=x.country.value
zipCode=x.zipCode.value
phone1=x.phone1.value
phone2=x.phone2.value
phone3=x.phone3.value
//email=x.email.value

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 (country.length<1)
 {
 alert("Please enter country")
 x.country.focus()
 return false
 }
if (zipCode.length<1)
 {
 alert("Please enter a zip")
 x.zipCode.focus()
 return false
 }
 if (phone1.length<3)
 {
 alert("Please enter a telephone number.")
 x.phone1.focus()
 return false
 }
 if (phone2.length<3)
 {
 alert("Please enter a telephone number.")
 x.phone2.focus()
 return false
 }
 if (phone3.length<4)
 {
 alert("Please enter a telephone number.")
 x.phone3.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
 }
}