function validate_option1(form)
{

 if (form.telephone_number.value.length == 0) {
  alert("Please enter a telephone number.");
  form.telephone_number.select();
  form.telephone_number.focus();
  return false;
 }

 if (form.telephone_number.value.length < 7) {
  alert("Please enter all seven digits of your telephone number.");
  form.telephone_number.select();
  form.telephone_number.focus();
  return false;
 }

index  = form.best_day.selectedIndex;
var dayValue = form.best_day.options[index].value;

if (dayValue.length < 1) {
  alert("Please select a day.");
  form.best_day.focus();
  return false;
 }

 if (form.best_time.value.length < 1) {
  alert("Please enter a time you can be reached.");
  form.best_time.select();
  form.best_time.focus();
  return false;
 }

return true;
}


function validate_option2(form)
{
 if (form.email.value.length == 0) {
  alert("Please enter an email address.");
  form.email.select();
  form.email.focus();
  return false;
 }
 if (!isValidEmail(form.email.value)) {
  alert("Please enter a valid email address.");
  form.email.select();
  form.email.focus();
  return false;
 }

return true;
}

function validate_option3(form)
{

 if (form.specific_information.value.length < 10 ) {
  alert("Please enter enough information so we may contact you.");
  form.specific_information.select();
  form.specific_information.focus();
  return false;
 }

return true;
}


function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function showPrivacy() {
    var ndoc;
    var astr;
    aPopUp = window.open(' ', 'Privacy','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width=350,height=300,top=400,left=500');
    ndoc = aPopUp.document;
    astr = '<HTML><HEAD><BR><TITLE>Privacy Statement</TITLE></HEAD><BODY BGCOLOR="#FFFFCC">';
    astr = astr + "<center>We respect the privacy of all visitors to our site. Although various forms within our site require you to provide us with personal identification information such as your name, ";
    astr = astr + "phone number and email address, please rest assured that we will not redistribute this information to any outside source or third party.<br><br>";
    astr = astr + "The information you supply us with on this site is used solely for the purpose of helping you find a new apartment home. ";
    astr = astr + "We value your interest in our communities and we value your privacy.";
    astr = astr + "</center>";
    astr = astr + "<br><center><input type=submit name=btnY value=' Close ' ";
    astr = astr + "onClick='self.close();'></center>";
    astr = astr + '</HTML>';
    ndoc.write(astr);
    ndoc.close();
    self.aNoteWin = aPopUp;
    aPopUp.focus();
    return(true);
}
