time value of money javascript functions.