JavaScript Loan Calculator

From  Javascript: The Definitive Guide  by David Flanagan.

Enter Loan Information:
1) Amount of the loan (any currency):
2) Annual percentage rate of interest:
3) Repayment period in years:
Payment Information:
4) Your monthly payment: $
5) Your total payment: $
6) Your total interest payments: $