javascript ATM