//CODE FOR HANDLING TIMER //Timer code var Seconds = [intSeconds]; var Interval = null; function StartTimer(){ Interval = window.setInterval('DownTime()',1000); document.getElementById('TimerText').style.display = 'inline'; } function DownTime(){ var ss = Seconds % 60; if (ss<10){ ss='0' + ss + ''; } var mm = Math.floor(Seconds / 60); if (document.getElementById('Timer') == null){ return; } document.getElementById('TimerText').innerHTML = mm + ':' + ss; if (Seconds < 1){ window.clearInterval(Interval); TimeOver = true; TimesUp(); } Seconds--; }