var timeC_741721 = 28732729; CountTime_741721(); function CountTime_741721() { var show_days = true; if(timeC_741721 > 0){ timeC_741721 -= 1; } else { timeC_741721 = 0; } // DAYS var days = Math.floor(timeC_741721 / 86400); if (days > 0) { if (show_days) { document.getElementById("countdown_hrs_741721").innerHTML = days; document.getElementById("label_hrs_741721").innerHTML = "d "; } } else { show_days = false; } // HOURS if (show_days) { var hrs = Math.floor(timeC_741721 / 3600) - (days * 24); } else { var hrs = Math.floor(timeC_741721 / 3600); } if (hrs < 10) { hrs = "0" + hrs; } if (show_days) { document.getElementById("countdown_mins_741721").innerHTML = hrs; document.getElementById("label_mins_741721").innerHTML = "hr "; } else { document.getElementById("countdown_hrs_741721").innerHTML = hrs; document.getElementById("label_hrs_741721").innerHTML = "hr "; } // MINUTES var mins = Math.floor(timeC_741721 / 60) % 60; if (mins < 10) { mins = "0" + mins; } if (show_days) { document.getElementById("countdown_secs_741721").innerHTML = mins; document.getElementById("label_secs_741721").innerHTML = "min "; } else { document.getElementById("countdown_mins_741721").innerHTML = mins; document.getElementById("label_mins_741721").innerHTML = "min "; } // SECONDS if (! show_days) { var secs = (timeC_741721 % 60); if (secs < 10) { secs = "0" + secs; } document.getElementById("countdown_secs_741721").innerHTML = secs; document.getElementById("label_secs_741721").innerHTML = "sec "; } if(timeC_741721 > 0){ setTimeout( "CountTime_741721()", 1000 ); } }