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 (LeadingZeros28460 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28460(secs) { if (secs < 0) { document.getElementById("cntdwns28460").innerHTML = FinishMessages28460; return; } DisplayStrs28460 = DisplayFormats28460.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28460 = DisplayStrs28460.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28460 = DisplayStrs28460.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28460 = DisplayStrs28460.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28460").innerHTML = DisplayStrs28460; if (CountActives28460) //alert(SetTimeOutPeriods28460); setTimeout("CountBacks28460(" + (secs+CountSteppers28460) + ")", SetTimeOutPeriods28460); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28460)=="undefined") BackColors28460 = ""; if (typeof(ForeColors28460)=="undefined") ForeColors28460= "white"; if (typeof(TargetDates28460)=="undefined") TargetDates28460 = "05/31/2023 10:00:00 PM"; if (typeof(DisplayFormats28460)=="undefined") DisplayFormats28460 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28460)=="undefined") CountActives28460 = true; if (typeof(FinishMessages28460)=="undefined") FinishMessages28460 = ""; if (typeof(CountSteppers28460)!="number") CountSteppers28460 = -1; if (typeof(LeadingZeros28460)=="undefined") LeadingZeros28460 = true; CountSteppers28460 = Math.ceil(CountSteppers28460); if (CountSteppers28460 == 0) CountActives28460 = false; var SetTimeOutPeriods28460 = (Math.abs(CountSteppers28460)-1)*1000 + 990; puti(BackColors28460, ForeColors28460); var dthens28460 = new Date(TargetDates28460); var dnows28460 = new Date("05/09/2025 10:09:35 AM"); if(CountSteppers28460>0) ddiffs28460 = new Date(dnows28460-dthens28460); else ddiffs28460 = new Date(dthens28460-dnows28460); gsecss28460 = Math.floor(ddiffs28460.valueOf()/1000); CountBacks28460(gsecss28460);