<!-- Hide from old browsers

function displayMenu(currentMenu) {
var thisMenu = document.getElementById(currentMenu).style

// The above creates a new function that will expand and contract certain menus that are specified.

if (thisMenu.display == "block") {
thisMenu.display = "none"
} else {
thisMenu.display = "block"
}
return false
}



var xmlreq;
function sendXmlHttpRequest(url)
{
   var obj=getXmlHttpRequestObj(url);
   if(obj==null)
   return false;
    try
       {
        if (window.XMLHttpRequest) {
            obj.send(null);
            return true;
        // branch for IE/Windows ActiveX version
        } else if (window.ActiveXObject) {
            if (obj) {
                obj.send();
                return true;}
            }
       }
    catch(e)
       {
       }
    return false;
}

function sendXmlHttpRequestObj(obj)
{
    try
       {
        if (window.XMLHttpRequest) {
            obj.send(null);
            return true;
        // branch for IE/Windows ActiveX version
        } else if (window.ActiveXObject) {
            if (obj) {
                obj.send();
                return true;}
            }
       }
    catch(e)
       {
       }
    return false;
}


function getXmlHttpRequestObj(url)
{
    try
       {
        if (window.XMLHttpRequest) {
            xmlreq = new XMLHttpRequest();
            xmlreq.onreadystatechange = processStateChange;
            xmlreq.open("GET", url, true);
            return xmlreq;
        } else if (window.ActiveXObject) {
            xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
            if (xmlreq) {
                xmlreq.onreadystatechange = processStateChange;
                xmlreq.open("GET", url, true);
                return xmlreq;}
            }
       }
    catch(e)
       {
       }
    return null;
}



function processStateChange()
{
if (xmlreq.readyState == 4)
   {
   httpXmlDone(xmlreq);
   } 
}



function verifier()
{
    m=document.fform;
    var id=m.fmcompare.value;
    var code=m.fmdata.value;
    var r=Math.abs(Math.round(100*Math.random()));

    var sent=sendXmlHttpRequest("/inc/xmlxfer?rtype=formok&id="+id+"&code="+code+"&rand="+r);
    if(sent==false)
       httpXmlDone("1");
    return false;
}
var tryCount=0;

function httpXmlDone(xmlreq)
{
   if(xmlreq.responseText==1 || tryCount>3)
       {
       if(formverify())
           {
           document.fform.submit();
           }
        }
   else
       {
       tryCount++;
       alert("Please be sure you've entered the correct security code shown");
}
}




var verifylist=new Array();
verifylist[0]="First_Name:";
verifylist[1]="Last_Name:";
verifylist[2]="Your_Time_Zone:";
verifylist[3]="Best_time_to_call_you_back_with_a_quote:";
verifylist[4]="(Area_code)_Phone_number:";
verifylist[5]="Email_Address:";
verifylist[6]="Your_address:";
verifylist[7]="Your_City:";
verifylist[8]="Zip_Code:";
verifylist[9]="Fully_describe_the_property_&_improvements:";
verifylist[10]="Property_address:";
verifylist[11]="City:";
verifylist[12]="Zip_Code:";
verifylist[13]="Property_County:";
verifylist[14]="Note_payors_name:";
verifylist[15]="Note_payors_address:";
verifylist[16]="Note_payors_SSN#:";
verifylist[17]="Date_of_sale:";
verifylist[18]="Sale_price:";
verifylist[19]="Down_payment:";
verifylist[20]="Beginning_balance_(1st_lien):";
verifylist[21]="Date_1st_payment_was_due:";
verifylist[22]="Date_next_payment_is_due:";
verifylist[23]="Payment_amount:";
verifylist[24]="Original_term_of_note_(in_months):";
verifylist[25]="Original_interest_rate:";
verifylist[26]="Current_balance_(1st_lien):";
verifylist[27]="Number_of_payments_made:";
verifylist[28]="Number_of_payments_remaining:";
verifylist[29]="What_is_the_current__value_of_the_property:";
verifylist[30]="Date_last_payment_was_made:";
verifylist[31]="Unpaid_principal_balance:";
verifylist[32]="Legal_balance:";
verifylist[33]="Accrued_interest:";
verifylist[34]="Current_interest_rate:";
verifylist[35]="fmdata";

function formverify()
{
   m=document.fform;

   

   e=m.elements;
   for(i=0;i<e.length;i++){
      t=e[i].type;
      if(t=="hidden")
       continue;
      n=e[i].name;
      n=n.substring(5);

      if(t=="text" || t=="textarea"){
         for(j=0;j<verifylist.length;j++){
           if(n==verifylist[j]){
             l=e[i].value;
             re=new RegExp(" +");
             if(l.length==0 || l.replace(re,"").length==0){
              alert("Please ensure all fields are entered correctly.");
              return false;
              }
             }

           }
      }
   }
   return true;
}



function FrontPage_Form1_Validator(theForm)  {      if (theForm.Your_Name.value == "")    {      alert("Please enter a value for the \"Your Name\" field.");      theForm.Your_Name.focus();      return (false);    }      if (theForm.Your_Name.value.length < 2)    {      alert("Please enter at least 2 characters in the \"Your Name\" field.");      theForm.Your_Name.focus();      return (false);    }      if (theForm.Your_Name.value.length > 199)    {      alert("Please enter at most 199 characters in the \"Your Name\" field.");      theForm.Your_Name.focus();      return (false);    }      if (theForm.Your_Phone.value == "")    {      alert("Please enter a value for the \"Your Phone\" field.");      theForm.Your_Phone.focus();      return (false);    }      if (theForm.Your_Phone.value.length < 10)    {      alert("Please enter at least 10 characters in the \"Your Phone\" field.");      theForm.Your_Phone.focus();      return (false);    }      if (theForm.Your_Phone.value.length > 199)    {      alert("Please enter at most 199 characters in the \"Your Phone\" field.");      theForm.Your_Phone.focus();      return (false);    }      if (theForm.Your_Email.value == "")    {      alert("Please enter a value for the \"Your Email Address\" field.");      theForm.Your_Email.focus();      return (false);    }      if (theForm.Your_Email.value.length < 6)    {      alert("Please enter at least 6 characters in the \"Your Email Address\" field.");      theForm.Your_Email.focus();      return (false);    }      if (theForm.Your_Email.value.length > 199)    {      alert("Please enter at most 199 characters in the \"Your Email Address\" field.");      theForm.Your_Email.focus();      return (false);    }      if (theForm.county.value == "")    {      alert("Please enter a value for the \"County\" field.");      theForm.county.focus();      return (false);    }      if (theForm.county.value.length < 2)    {      alert("Please enter at least 2 characters in the \"County\" field.");      theForm.county.focus();      return (false);    }    return (true);  } 






// -->
