Skip to content
function countdownTimer(durationInSeconds) {
var countdownDate = new Date().getTime() + durationInSeconds * 1000;
var countdownInterval = setInterval(function () {
var now = new Date().getTime();
var distance = countdownDate - now;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
document.getElementById("days").innerHTML = (days < 10 ? '0' : '') + days;
document.getElementById("hours").innerHTML = (hours < 10 ? '0' : '') + hours;
document.getElementById("minutes").innerHTML = (minutes < 10 ? '0' : '') + minutes;
document.getElementById("seconds").innerHTML = (seconds < 10 ? '0' : '') + seconds;
if (distance < 0) {
clearInterval(countdownInterval);
document.getElementById("countdown").innerHTML = "EXPIRED";
}
}, 1000);
}
// Start the countdown from 10 minutes (600 seconds)
countdownTimer(600);