<!--
function validateForm(terms) 
{
 var okSoFar=true
 with (document.contactform)
 {
  if (firstname.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter the your first name.")
    firstname.focus()
  }
  if (lastname.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter the your last name.")
    lastname.focus()
  }
  var foundAt = email.value.indexOf("@",0)
  if (foundAt < 1 && okSoFar)
  {
    okSoFar = false
    alert ("Please enter a valid email address.")
    email.focus()
  }
  var e1 = email.value
  var e2 = email2.value
  if (!(e1==e2) && okSoFar)
  {
    okSoFar = false
    alert ("The email addresses you entered do not match. Please check for errors.")
    email.focus()
  }
  if (phone.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter the your phone number.")
    phone.focus()
  }
  if (condotype.value=="Select" && okSoFar)
  {
    okSoFar=false
    alert("Please select a condo type.")
    condotype.focus()
  }
  if (startdate.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please select the desired arrival date for you stay.")
    startdate.focus()
  }


//THIS SECTION CHECKS THE MINIMUM BID AND CONDO TYPE
  if (bid.value<=89.99 && condotype.value=="Efficiency Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for an Efficiency Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=119.99 && condotype.value=="Studio Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a Studio Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=149.99 && condotype.value=="Studio Ocean Front" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a Studio Ocean Front Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=69.99 && condotype.value=="1 Bedroom Park View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 1 Bedroom Park View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=129.99 && condotype.value=="1 Bedroom Moderate Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 1 Bedroom Moderate Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=149.99 && condotype.value=="1 Bedroom Tower Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 1 Bedroom Tower Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=179.99 && condotype.value=="1 Bedroom Ocean Front" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 1 Bedroom Ocean Front Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=159.99 && condotype.value=="2 Bedroom Park View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 2 Bedroom Park View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=199.99 && condotype.value=="2 Bedroom Moderate Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 2 Bedroom Moderate Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=249.99 && condotype.value=="2 Bedroom Low Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 2 Bedroom Low Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=279.99 && condotype.value=="2 Bedroom Tower Ocean View" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 2 Bedroom Tower Ocean View Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=299.99 && condotype.value=="2 Bedroom Ocean Front" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 2 Bedroom Ocean Front Condo. Please increase you bid and submit again.")
    bid.focus()
  }
  else if (bid.value<=349.99 && condotype.value=="3 Bedroom Ocean Front" && okSoFar)
  {
    okSoFar=false
    alert ("Your bid does not meet the minimum bid requirements for a 3 Bedroom Ocean Front Condo. Please increase you bid and submit again.")
    bid.focus()
  }
//THIS SECTION CHECKS THE MINIMUM BID AND CONDO TYPE


    if (terms.checked==0 && okSoFar)
  {
    okSoFar=false
    alert("You must agree to the terms and conditions to submit a bid.")
    terms.focus()
  }
  if (okSoFar==true)  
  {
   block_spam_bots.value=4*3;//spam bots currently can not read JavaScript, if could then they'd fail the maths!
   submit();                  // do check for updates often at:  www.TheDemoSite.co.uk 
  } 
 }
}
// -->