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 (LeadingZeros28569 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28569(secs) { if (secs < 0) { document.getElementById("cntdwns28569").innerHTML = FinishMessages28569; return; } DisplayStrs28569 = DisplayFormats28569.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28569 = DisplayStrs28569.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28569 = DisplayStrs28569.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28569 = DisplayStrs28569.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28569").innerHTML = DisplayStrs28569; if (CountActives28569) //alert(SetTimeOutPeriods28569); setTimeout("CountBacks28569(" + (secs+CountSteppers28569) + ")", SetTimeOutPeriods28569); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28569)=="undefined") BackColors28569 = ""; if (typeof(ForeColors28569)=="undefined") ForeColors28569= "white"; if (typeof(TargetDates28569)=="undefined") TargetDates28569 = "06/06/2023 10:00:00 PM"; if (typeof(DisplayFormats28569)=="undefined") DisplayFormats28569 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28569)=="undefined") CountActives28569 = true; if (typeof(FinishMessages28569)=="undefined") FinishMessages28569 = ""; if (typeof(CountSteppers28569)!="number") CountSteppers28569 = -1; if (typeof(LeadingZeros28569)=="undefined") LeadingZeros28569 = true; CountSteppers28569 = Math.ceil(CountSteppers28569); if (CountSteppers28569 == 0) CountActives28569 = false; var SetTimeOutPeriods28569 = (Math.abs(CountSteppers28569)-1)*1000 + 990; puti(BackColors28569, ForeColors28569); var dthens28569 = new Date(TargetDates28569); var dnows28569 = new Date("05/09/2025 10:11:22 AM"); if(CountSteppers28569>0) ddiffs28569 = new Date(dnows28569-dthens28569); else ddiffs28569 = new Date(dthens28569-dnows28569); gsecss28569 = Math.floor(ddiffs28569.valueOf()/1000); CountBacks28569(gsecss28569);