<!--
function Validate(theForm)
{


  if (theForm.FullName.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.FullName.focus();
    return (false);
  }



  if (theForm.Phone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }


  // make sure they answer (select box selection)
  CurrentlyListedvariable = theForm.CurrentlyListed.selectedIndex
  if (theForm.CurrentlyListed.options[CurrentlyListedvariable].value == "") {
    alert("Is it Currently Listed?");
    return (false);
  }


  // make sure they answer (select box selection)
  Relationshipvariable = theForm.Relationship.selectedIndex
  if (theForm.Relationship.options[Relationshipvariable].value == "") {
    alert("What is your Relationship to the property?")
    return false
  }

  // make sure they answer (select box selection)
  SellTimevariable = theForm.SellTime.selectedIndex
  if (theForm.SellTime.options[SellTimevariable].value == "") {
    alert("What is the Purpose of the valuation?");
    return (false);
  }


  // check to see if the email's valid
  if (!validEmail(theForm.Email.value)) {
    alert("Invalid email address");
    theForm.Email.focus();
    theForm.Email.select();
    return (false);
  }
 

  // make sure they answer (select box selection)
  NeedRealtorvariable = theForm.NeedRealtor.selectedIndex
  if (theForm.NeedRealtor.options[NeedRealtorvariable].value == "") {
    alert("Do you need a Realtor?");
    return (false);
  }


  // make sure they answer (select box selection)
  NeedMortgagevariable = theForm.NeedMortgage.selectedIndex
  if (theForm.NeedMortgage.options[NeedMortgagevariable].value == "") {
    alert("Do you need Mortgage information?");
    return (false);
  }



  if (theForm.Address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.Address.focus();
    return (false);
  }


  if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length < 1)
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.State.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.State.focus();
    return (false);
  }


  if (theForm.Zip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.Zip.focus();
    return (false);
  }


  function validEmail(email) {
  invalidChars = " /:,;"
	
 if (email == "") {	// cannot be empty 
     return false 
  }
  for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
  badChar = invalidChars.charAt(i)
    if (email.indexOf(badChar,0) > -1) {
      return false
    }
  }
  atPos = email.indexOf("@",1)			// there must be one "@" symbol
  if (atPos == -1) {
    return false
  }
  if (email.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
    return false
  }
  periodPos = email.indexOf(".",atPos)
  if (periodPos == -1) {					// and at least one "." after the "@"
    return false
  }
  if (periodPos+3 > email.length)	{		// must be at least 2 characters after the "."
    return false
  }
  return true
  }


  // make sure they answer (select box selection)
  PropertyTypevariable = theForm.PropertyType.selectedIndex
  if (theForm.PropertyType.options[PropertyTypevariable].value == "") {
    alert("What Type of Property is it?");
    return (false);
  }

  if (theForm.SquareFeet.value == "")
  {
    alert("How many Square Feet is the property?");
    theForm.SquareFeet.focus();
    return (false);
  }

  // make sure they answer (select box selection)
  Bedroomsvariable = theForm.Bedrooms.selectedIndex
  if (theForm.Bedrooms.options[Bedroomsvariable].value == "") {
    alert("How many Bedrooms?");
    return (false);
  }

  // make sure they answer (select box selection)
  Bathroomsvariable = theForm.Bathrooms.selectedIndex
  if (theForm.Bathrooms.options[Bathroomsvariable].value == "") {
    alert("How many Bathrooms?");
    return (false);
  }

  if (theForm.LotSize.value == "")
  {
    alert("What is the Lot Size?");
    theForm.LotSize.focus();
    return (false);
  }


  // make sure they answer (select box selection)
  Conditionvariable = theForm.Condition.selectedIndex
  if (theForm.Condition.options[Conditionvariable].value == "") {
    alert("What is the Condition of the property?");
    return (false);
  }

  return (true);  
}


function Valid(theForm)
{


  if (theForm.First.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.First.focus();
    return (false);
  }

  if (theForm.Last.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.Last.focus();
    return (false);
  }


  var Contact_choice = false;

  // Loop from zero to the one minus the number of radio button selections
  for (counter = 0; counter < theForm.Contact.length; counter++)
  {
	// If a radio button has been selected it will return true
	// (If not it will return false)
	if (theForm.Contact[counter].checked) {
		Contact_choice = true; 
		ContactChoice = theForm.Contact[counter].value;
		//alert(ContactChoice);
	}
  }

  if (!Contact_choice)
  {
	// If there were no selections made display an alert box 
	alert("Preferred Method of Contact?");
	return (false);
  }

  if (ContactChoice == "Email") {
	  // check to see if the email's valid
	  if (!validEmail(theForm.Email.value)) {
	    alert("Invalid email address");
	    theForm.Email.focus();
	    return (false);
	  }
  }

  if (ContactChoice == "Phone") {
	  // check to see if the phone's valid
	  if ((theForm.Pho1.value == "") || (theForm.Pho3.value == "") || (theForm.Pho3.value == "")) {
	    alert("Invalid Phone number");
	    theForm.Pho1.focus();
	    return (false);
	  }
  }

  if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"Area\" field.");
    theForm.City.focus();
    return (false);
  }

  function validEmail(email) {
  invalidChars = " /:,;"
	
 if (email == "") {	// cannot be empty 
     return false 
  }
  for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
  badChar = invalidChars.charAt(i)
    if (email.indexOf(badChar,0) > -1) {
      return false
    }
  }
  atPos = email.indexOf("@",1)			// there must be one "@" symbol
  if (atPos == -1) {
    return false
  }
  if (email.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
    return false
  }
  periodPos = email.indexOf(".",atPos)
  if (periodPos == -1) {					// and at least one "." after the "@"
    return false
  }
  if (periodPos+3 > email.length)	{		// must be at least 2 characters after the "."
    return false
  }
  return true
  }




  return (true);  
}

function temp(thetemper)
{

}

//-->
