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 (LeadingZeros27421 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27421(secs) { if (secs < 0) { document.getElementById("cntdwns27421").innerHTML = FinishMessages27421; return; } DisplayStrs27421 = DisplayFormats27421.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27421 = DisplayStrs27421.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27421 = DisplayStrs27421.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27421 = DisplayStrs27421.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27421").innerHTML = DisplayStrs27421; if (CountActives27421) //alert(SetTimeOutPeriods27421); setTimeout("CountBacks27421(" + (secs+CountSteppers27421) + ")", SetTimeOutPeriods27421); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27421)=="undefined") BackColors27421 = ""; if (typeof(ForeColors27421)=="undefined") ForeColors27421= "white"; if (typeof(TargetDates27421)=="undefined") TargetDates27421 = "06/05/2023 10:00:00 PM"; if (typeof(DisplayFormats27421)=="undefined") DisplayFormats27421 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27421)=="undefined") CountActives27421 = true; if (typeof(FinishMessages27421)=="undefined") FinishMessages27421 = ""; if (typeof(CountSteppers27421)!="number") CountSteppers27421 = -1; if (typeof(LeadingZeros27421)=="undefined") LeadingZeros27421 = true; CountSteppers27421 = Math.ceil(CountSteppers27421); if (CountSteppers27421 == 0) CountActives27421 = false; var SetTimeOutPeriods27421 = (Math.abs(CountSteppers27421)-1)*1000 + 990; puti(BackColors27421, ForeColors27421); var dthens27421 = new Date(TargetDates27421); var dnows27421 = new Date("05/09/2025 10:10:29 AM"); if(CountSteppers27421>0) ddiffs27421 = new Date(dnows27421-dthens27421); else ddiffs27421 = new Date(dthens27421-dnows27421); gsecss27421 = Math.floor(ddiffs27421.valueOf()/1000); CountBacks27421(gsecss27421);