// JavaScript Document

var counter = 180;
var timerID;
function startCounter() {
	document.getElementById('timer').innerHTML = "Você será redirecionado em " + (counter-counter%60)/60+"m "+counter%60+"s";
	counter--;
	timerID = setTimeout("startCounter()", 1000)
}

function stopCounter() {
	clearTimeout(timerID);
}

document.onstop = stopCounter;
