function calc_btf(){
amount = document.calc.amount.value;
deposit = document.calc.deposit.value;

document.calc.btf.value = amount-deposit;

}

function SetToFirstControl()
{
  var bFound = false; 

  //for each form
  for (f=0; f < document.forms.length; f++) 
  {
    //for each element in each form
    for(i=0; i < document.forms[f].length; i++)
    {
      //if it's not a hidden element
      if (document.forms[f][i].type != "hidden") 
      { 
        //and it's not disabled
        if (document.forms[f][i].disabled != true) 
        {
          try {
             //set the focus to it
             document.forms[f][i].focus();
             var bFound = true;
          }
          catch(er) {
          }
        }
      }
      //if found in this element, stop looking
      if (bFound == true)
        break;
    }
    //if found in this form, stop looking
    if (bFound == true)
      break;
  }
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=600,left = 262,top = 34');");
}
