<script>
function testFunc() {
var initialSecs = 65;
var currentSecs = initialSecs;
setTimeout(decrement,1000);
function decrement()
{var displayedSecs = currentSecs%60;
var displayedMin = Math.floor(currentSecs/60)%60;
if(displayedMin <= 9)
displayedMin = "0" + displayedMin;
if(displayedSecs <= 9)
displayedSecs = "0" + displayedSecs;
currentSecs--; document.getElementById("demo").innerHTML = displayedMin + ":" + displayedSecs;
if(currentSecs>-1)setTimeout(decrement,1000);
}}
</script>