//<!-- JavaScript Document
function emailValidate(txt)
{
x=document.contactForm
email=x.Email.value
email2=x.Email2.value
apos=email.indexOf("@");
dotpos=email.lastIndexOf(".");
apos2=email2.indexOf("@");
dotpos2=email2.lastIndexOf(".");
fname=x.FirstName.value
lname=x.LastName.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 (fname.length<1)
 {
 alert("Please enter a first name")
 x.FirstName.focus()
 return false
 }
if (lname.length<1)
 {
 alert("Please enter a last name")
 x.LastName.focus()
 return false
 }
if (address.length<2)
 {
 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.length < 5 && apos<1||dotpos-apos<2)
 {
  alert("Please enter a valid email address. Your email address \
should be in this format: xxx@xxx.com.")
  x.Email.focus()
  return false
  }
if (email2.length < 5 && apos2<1||dotpos2-apos2<2)
 {
  alert("Please enter a valid confirmation email address. Your email address \
should be in this format: xxx@xxx.com.")
  x.Email2.focus()
  return false
  }
if (email != email2)
 {
  alert("Your emails do not match.")
  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
 } 
}

//Validate newsletter email signup
function emailCheck() {
if (document.email_signup.email.value == '') {
alert('Please enter a valid email address'); 
return false
}
else {
return true
}
}
//-->
