Minor Javascript timer modification