function calcage(secs, num1, num2, addDay, seconds) { if (addDay == 1){ s = ((Math.floor(secs/num1))).toString(); } else{ s = ((Math.floor(secs/num1))%num2).toString(); } if (LeadingZeros27587 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27587(secs) { if (secs < 0) { document.getElementById("cntdwns27587").innerHTML = FinishMessages27587; return; } DisplayStrs27587 = DisplayFormats27587.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27587 = DisplayStrs27587.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27587 = DisplayStrs27587.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27587 = DisplayStrs27587.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27587").innerHTML = DisplayStrs27587; if (CountActives27587) //alert(SetTimeOutPeriods27587); setTimeout("CountBacks27587(" + (secs+CountSteppers27587) + ")", SetTimeOutPeriods27587); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27587)=="undefined") BackColors27587 = ""; if (typeof(ForeColors27587)=="undefined") ForeColors27587= "white"; if (typeof(TargetDates27587)=="undefined") TargetDates27587 = "03/30/2023 11:00:00 PM"; if (typeof(DisplayFormats27587)=="undefined") DisplayFormats27587 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27587)=="undefined") CountActives27587 = true; if (typeof(FinishMessages27587)=="undefined") FinishMessages27587 = ""; if (typeof(CountSteppers27587)!="number") CountSteppers27587 = -1; if (typeof(LeadingZeros27587)=="undefined") LeadingZeros27587 = true; CountSteppers27587 = Math.ceil(CountSteppers27587); if (CountSteppers27587 == 0) CountActives27587 = false; var SetTimeOutPeriods27587 = (Math.abs(CountSteppers27587)-1)*1000 + 990; puti(BackColors27587, ForeColors27587); var dthens27587 = new Date(TargetDates27587); var dnows27587 = new Date("05/13/2025 5:01:58 PM"); if(CountSteppers27587>0) ddiffs27587 = new Date(dnows27587-dthens27587); else ddiffs27587 = new Date(dthens27587-dnows27587); gsecss27587 = Math.floor(ddiffs27587.valueOf()/1000); CountBacks27587(gsecss27587);