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 (LeadingZeros28501 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28501(secs) { if (secs < 0) { document.getElementById("cntdwns28501").innerHTML = FinishMessages28501; return; } DisplayStrs28501 = DisplayFormats28501.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28501 = DisplayStrs28501.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28501 = DisplayStrs28501.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28501 = DisplayStrs28501.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28501").innerHTML = DisplayStrs28501; if (CountActives28501) //alert(SetTimeOutPeriods28501); setTimeout("CountBacks28501(" + (secs+CountSteppers28501) + ")", SetTimeOutPeriods28501); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28501)=="undefined") BackColors28501 = ""; if (typeof(ForeColors28501)=="undefined") ForeColors28501= "white"; if (typeof(TargetDates28501)=="undefined") TargetDates28501 = "09/30/2023 10:00:00 PM"; if (typeof(DisplayFormats28501)=="undefined") DisplayFormats28501 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28501)=="undefined") CountActives28501 = true; if (typeof(FinishMessages28501)=="undefined") FinishMessages28501 = ""; if (typeof(CountSteppers28501)!="number") CountSteppers28501 = -1; if (typeof(LeadingZeros28501)=="undefined") LeadingZeros28501 = true; CountSteppers28501 = Math.ceil(CountSteppers28501); if (CountSteppers28501 == 0) CountActives28501 = false; var SetTimeOutPeriods28501 = (Math.abs(CountSteppers28501)-1)*1000 + 990; puti(BackColors28501, ForeColors28501); var dthens28501 = new Date(TargetDates28501); var dnows28501 = new Date("05/09/2025 12:56:00 PM"); if(CountSteppers28501>0) ddiffs28501 = new Date(dnows28501-dthens28501); else ddiffs28501 = new Date(dthens28501-dnows28501); gsecss28501 = Math.floor(ddiffs28501.valueOf()/1000); CountBacks28501(gsecss28501);