<!--

function selectcell() {
  document.inputForm.loan.select()
  document.inputForm.loan.focus()
}

function newwindow() {
  window.open("payment_notes0.html","Enter","scrollbars,width=420,height=400")
}

function newwindow1() {
  window.open("payment_notes4.html","Est","scrollbars,width=420,height=400")
}

function chknos(nos) {
var str = nos.value;
if(str.length == 0) {
 
 return false;
}

oneDecimal = false;
for (var i = 0; i <str.length; i++) {
 var y = str.substring(i, i + 1);
 if (y == "." && !oneDecimal) {
    oneDecimal = true;
    continue
 }
 if (y < "0" || y > "9") {
 alert("Please enter positive numbers only. Calculator will use the default value for this entry. Click on underlined items for help and default values.");
 return false;
 }
}
 return true;
}

function number(nos,def) {
if(!chknos(nos)) {
 return def;
}

var use = nos.value;
if(use == "" || use == null || (0 + use) == 0) {
 return def;
}

return parseFloat(use); 
}

function f1(nos, y) {
var str = "" + Math.round(nos);
if (str.length == 0) {
   str = "0";
}
str = "$" + str;
i = y - str.length;
while (0 < i--) {
 str = " " + str;
}
return str;
}

function f2(nos, y, dec) {
  var str = "" + Math.round(eval(nos)*Math.pow(10,dec));
    while (str.length <= dec) {
      str = "0" + str;
    }
  var decpoint = str.length - dec;
  str = str.substring (0,decpoint) + "." +
    str.substring (decpoint, str.length);
if (str.length == 0) {
    str = "0";
}
str = str;
i = y - str.length;
while (0 < i--) {
 str = " " + str;
}
return str;
}

function f3(nos, y) {
var str = "" + Math.round(nos);
if (str.length == 0) {
     str = "0";
}
i = y - str.length;
while (0 < i--) {
 str = " " + str;
}
return str;
}

function compute(input) {

var table = input.form;

loan = number(table.loan, 0);

intRate = number(table.rate, 0);

term = table.term.options[table.term.selectedIndex].text;

moTax = number(table.tax, 0) / 12;

moIns = number(table.ins, 0) / 12;

moFees = number(table.fees, 0) / 12;

k = Math.pow((intRate/1200) + 1, term*12);

moPI = (loan * k) / ((k -1) / (intRate/1200));
mottl = moPI + moTax + moIns + moFees;

table.loan.value = f3(loan, 1);
table.tax.value = f3(moTax*12, 1);
table.ins.value = f3(moIns*12, 1);
table.fees.value = f3(moFees*12, 1);
table.mottl.value = f1(mottl, 10);
table.moTax.value = f1(moTax, 10);
table.moIns.value = f1(moIns, 10);
table.moFees.value = f1(moFees, 10);
table.moPI.value=f1(moPI, 10);

intRate=intRate*1000
document.cookie="condition_loan="+intRate.toString()+term.toString()+loan.toString()
}

function checkLoan(form) {
   
   var loan = document.inputForm.loan.value
   if (isNaN(loan) || loan == 0 || loan < 1000) {
        alert("Loan Amount is either blank, zero or less than 1000. You must enter a positive number of 1000 or greater in Loan Amount to run an Amortization Table.")
   document.inputForm.loan.select()
   document.inputForm.loan.focus()
   
   }else{

window.open("amortz.htm","Amortz","menubar,scrollbars,width=530,height=600")
}
}

<!-->