<!--
function Contact_Validator(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Please enter your full name.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Name.value.length < 1)
  {
    alert("Please enter your full name.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Email.value == "")
  {
    alert("Please enter a valid email address.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 5)
  {
    alert("Please enter a valid email address.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.P1.value == "")
  {
    alert("Please enter your area code");
    theForm.P1.focus();
    return (false);
  }

  if (theForm.P1.value.length < 3)
  {
    alert("Please enter at least 3 characters for your area code.");
    theForm.P1.focus();
    return (false);
  }

  if (theForm.P1.value.length > 3)
  {
    alert("Please enter at most 3 characters for your area code.");
    theForm.P1.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.P1.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the area code field.");
    theForm.P1.focus();
    return (false);
  }

  if (theForm.P2.value == "")
  {
    alert("Please enter your phone prefix.");
    theForm.P2.focus();
    return (false);
  }

  if (theForm.P2.value.length < 3)
  {
    alert("Please enter at least 3 characters for your phone prefix.");
    theForm.P2.focus();
    return (false);
  }

  if (theForm.P2.value.length > 3)
  {
    alert("Please enter at most 3 characters for your phone prefix.");
    theForm.P2.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.P2.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the phone prefix field.");
    theForm.P2.focus();
    return (false);
  }

  if (theForm.P3.value == "")
  {
    alert("Please enter a phone suffix.");
    theForm.P3.focus();
    return (false);
  }

  if (theForm.P3.value.length < 4)
  {
    alert("Please enter at least 4 characters for a phone suffix.");
    theForm.P3.focus();
    return (false);
  }

  if (theForm.P3.value.length > 4)
  {
    alert("Please enter at most 4 characters for a phone suffix.");
    theForm.P3.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.P3.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the phone suffix field.");
    theForm.P3.focus();
    return (false);
  }

  if (theForm.Comments.value == "")
  {
    alert("Please enter a value for the \"Questions or Comments\" section.");
    theForm.Comments.focus();
    return (false);
  }

  if (theForm.Comments.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Questions or Comments\" section.");
    theForm.Comments.focus();
    return (false);
  }
  return (true);
}
//-->


<!--
var formDefaults = {'Amount':'20000', 'Down':'0', 'Trade':'0', 'Term':'4', 'APR':'12.95' }	


function stripstring(string) {
    for (var i=0, output='', valid="1234567890."; i<string.length; i++)
       if (valid.indexOf(string.charAt(i)) != -1)
          output += string.charAt(i)
    return output;
} 


// Converts amount to a formatted string with leading dollar sign
// and rounded to 2 decimal places
// Copyright 1998 Millennium Software, Inc by Paul F Johnson www.msi-web.com
function Round2Dollars(amount) {
	//var dollars = "$"+Math.floor(amount)+".";
	var dollars = Math.floor(amount)+".";
	var cents = 100*(amount-Math.floor(amount))+0.5;
	result = dollars + Math.floor(cents/10) + Math.floor(cents%10);
	return result;
}

// Converts amount to a formatted string with leading dollar sign
// and rounded to nearest five dollars
// Copyright 1999 Millennium Software, Inc by Paul F Johnson pfj@msi-web.com
function Round2Five(amount) {
	var Amt10 = Math.floor((amount/10)) * 10;
	var Remainder = amount - Amt10;
	var Near5 = 0;
 	if (Remainder >= 7.5) {
		Near5 = 10;
	}
	else if (Remainder >= 2.5) {
		Near5 = 5;
	}
	result = "$"+(Amt10 + Near5)+".00";
	return result;
}

// Converts amount to a formatted string with NO leading dollar sign
// and rounded to 2 decimal places
// Copyright 1998 Millennium Software, Inc by Paul F Johnson pfj@msi-web.com
function Round2(amount) {
	var dollars = Math.floor(amount)+".";
	var cents = 100*(amount-Math.floor(amount))+0.5;
	result = dollars + Math.floor(cents/10) + Math.floor(cents%10);
	return result;
}


function CalcTheForm() {
	//var rPrincipal = (document.frmCalc.Amount.value)-(document.frmCalc.Down.value)-(document.frmCalc.Trade.value);
	var rPrincipal = (document.frmCalc.Amount.value);
	var rDown = (document.frmCalc.Down.value);
	var rTrade = (document.frmCalc.Trade.value);
	rPrincipal = rPrincipal-rDown-rTrade

	var rRateFactor = (document.frmCalc.APR.value) / 1200;
	//var rNumPmts = (document.frmCalc.Term.value) * 12;
	var rNumPmts = (document.frmCalc.Term.value);
	var rNumerator = rRateFactor * Math.pow((1 + rRateFactor), rNumPmts);
	var rDenominator = Math.pow((1 + rRateFactor), rNumPmts) - 1;
	var rPayment = rPrincipal * rNumerator / rDenominator;
	if (document.all) {
	  Calculation.innerHTML='Your estimated monthly payment is ' + Round2Dollars(rPayment) + '.';
	} else {
	  document.getElementById("Calculation").innerHTML='Your estimated monthly payment is ' + Round2Dollars(rPayment) + '.';
	}
}

//-->


<!--
function Calc_Validator(theForm)
{

  if (document.layers) {
    alert("The calculator is not supported by the old web browsing software you are using. Please update your web browser to something that was created within the last few years.");
    return (false);
  }

  theForm.Amount.value = stripstring(theForm.Amount.value)
  theForm.Term.value = stripstring(theForm.Term.value)
  theForm.APR.value = stripstring(theForm.APR.value)
  theForm.Down.value = stripstring(theForm.Down.value)
  theForm.Trade.value = stripstring(theForm.Trade.value)


  if (theForm.Term.selectedIndex == 0)
  {
    alert("The first \"Term\" option is not a valid selection.  Please choose one of the other options.");
    theForm.Term.focus();
    return (false);
  }

  if (theForm.APR.value == "")
  {
    theForm.APR.value = 12.99;
  }

  if (theForm.APR.value.length < 1)
  {
    theForm.APR.value = 12.99;
  }

  if (theForm.APR.value == 0)
  {
    theForm.APR.value = 12.99;
  }

  var checkOK = "0123456789-.";
  var checkStr = theForm.APR.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and \".\" characters in the \"APR\" field.");
    theForm.APR.focus();
    return (false);
  }

  if (theForm.Down.value == "")
  {
    theForm.Down.value = 0
  }

  if (theForm.Down.value.length < 1)
  {
    theForm.Down.value = 0
  }

  var checkOK = "0123456789-.";
  var checkStr = theForm.Down.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and \".\" characters in the \"Down Payment\" field.");
    theForm.Down.focus();
    return (false);
  }
  
  if (theForm.Trade.value == "")
  {
    theForm.Trade.value = 0
  }

  if (theForm.Trade.value.length < 1)
  {
    theForm.Trade.value = 0
  }

  var checkOK = "0123456789-.";
  var checkStr = theForm.Trade.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and \".\" characters in the \"Trade In Value\" field.");
    theForm.Trade.focus();
    return (false);
  }

  CalcTheForm()

  return (true);
}
//-->

<!--
function Friend_Validator(theForm)
{

  if (theForm.FromName.value == "")
  {
    alert("Please enter your name.");
    theForm.FromName.focus();
    return (false);
  }

  if (theForm.FromEmail.value == "")
  {
    alert("Please enter a your email address.");
    theForm.FromEmail.focus();
    return (false);
  }

  if (theForm.FromEmail.value.length < 5)
  {
    alert("Please enter a valid email address.");
    theForm.FromEmail.focus();
    return (false);
  }

  if (theForm.ToEmail.value == "")
  {
    alert("Please enter your friends email address.");
    theForm.ToEmail.focus();
    return (false);
  }

  if (theForm.ToEmail.value.length < 5)
  {
    alert("Please enter a valid email address for your friend.");
    theForm.ToEmail.focus();
    return (false);
  }
  return (true);
}
//-->
