var home = 'John Estick';

function goQuote($name,$value)
{

objQuote = new atbQuote($name, $value);


return(objQuote);

}

function atbQuote($item, $price)
{
objDeal = new atbRate('Interest Bearing over 12 Months at 19.90% APR variable', 12,  'STDIB1990360000',19.9,true,$price );
this.deal = objDeal.name;
this.price = Math.round($price * 100)/100;
this.factor = objDeal.factor;
this.period = objDeal.period;
this.item = $item;
this.repayment = objDeal.calculateRepayment();
atbQuote.prototype.calcPayment = calcMonthly;
atbQuote.prototype.Total= calcTotal;


}


function calcMonthly()
{
 monthly = this.price * this.factor;
 monthly = Math.floor(monthly*100)/100;
 return(monthly);
}
function calcTotal()
{
 return(Math.floor(this.period * this.calcPayment()*100)/100)
}
function makeWindow()
{
window.open('test_childwin.htm','kid');
kid.document.write('hello')
}


