JavaScript based digital clock