var i=5;if(i<0){window.location.href="/";} var a=setInterval(function(){document.getElementById('time').innerText=i if(i==0){window.location.href="/";clearInterval(a)} i--},1000);