Added javascript to timer