var h3 = document.getElementsByTagName('h3')[0], seconds = 40, t;
function add() {
seconds--;
if (seconds >= 60) {
seconds = 0;
}
h3.textContent = (seconds > 9 ? seconds : "0" + seconds) + ' Seconds left.';
timer();
}
function timer() {
t = setTimeout(add, 1000);
}
timer();