JavaScript Loan Payment