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
phone=x.phone.value
fax=x.fax.value
/*email=x.email.value*/
emailIndex=(x.email.value.match('@')||x.email.value.match('.'))
faxed=x.faxed
e_mailed=x.e_mailed
mailed=x.mailed

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 (emailIndex != ('@' || '.'))
		{
	 alert("Please enter a valid email address. Your email address \
should be in this format: xxx@xxx.com.")
 	x.email.focus()
 	return false
	} 
if (faxed.checked)
 {
 	if (fax.length<10)
 	{
 	alert("You requested that we fax information \
to you. Please enter a fax number.")
 	x.fax.focus()
 	return false
 	}
 }
 if (e_mailed.checked!=1 && mailed.checked!=1 && faxed.checked!=1)
  {
   alert("Please enter a delivery method.")
   x.faxed.focus()
   return false
   }
else
 {
 return true
 }
}