// Declare global variables
var mainTimer = document.getElementById('startTimer');
var timerState = document.getElementById('displayTimer');
var currentTimer = document.getElementById('displayTimer').innerHTML;

// Event handler for user clicks on main timer
mainTimer.addEventListener('click', activateTimer);

function activateTimer() {
    if (timerState.style.zIndex == '-1') {
        timerState.style.zIndex = '1';
    } else {
        timerState.style.zIndex = '-1';
    }

}

function startTimer() {
    var count;
    if (timerState.style.zIndex == '-1') {

    }
}
@@ -203,16 +203,30 @@
 nerHTML;
+%0Avar count, t;
 %0A%0A// Eve
@@ -566,23 +566,130 @@
 dex == '
--
 1'
-) %7B%0A
+ %7C%7C count === 0) %7B%0A        // timer ends%0A    %7D else %7B%0A        count--;%0A        t = setTimeout(startTimer, 1000);
 %0A    %7D%0A%7D

update starttimer