updated javascript clock to include pause and restart