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 (LeadingZeros28997 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28997(secs) { if (secs < 0) { document.getElementById("cntdwns28997").innerHTML = FinishMessages28997; return; } DisplayStrs28997 = DisplayFormats28997.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28997 = DisplayStrs28997.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28997 = DisplayStrs28997.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28997 = DisplayStrs28997.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28997").innerHTML = DisplayStrs28997; if (CountActives28997) //alert(SetTimeOutPeriods28997); setTimeout("CountBacks28997(" + (secs+CountSteppers28997) + ")", SetTimeOutPeriods28997); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28997)=="undefined") BackColors28997 = ""; if (typeof(ForeColors28997)=="undefined") ForeColors28997= "white"; if (typeof(TargetDates28997)=="undefined") TargetDates28997 = "09/28/2023 10:00:00 PM"; if (typeof(DisplayFormats28997)=="undefined") DisplayFormats28997 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28997)=="undefined") CountActives28997 = true; if (typeof(FinishMessages28997)=="undefined") FinishMessages28997 = ""; if (typeof(CountSteppers28997)!="number") CountSteppers28997 = -1; if (typeof(LeadingZeros28997)=="undefined") LeadingZeros28997 = true; CountSteppers28997 = Math.ceil(CountSteppers28997); if (CountSteppers28997 == 0) CountActives28997 = false; var SetTimeOutPeriods28997 = (Math.abs(CountSteppers28997)-1)*1000 + 990; puti(BackColors28997, ForeColors28997); var dthens28997 = new Date(TargetDates28997); var dnows28997 = new Date("05/09/2025 10:06:56 AM"); if(CountSteppers28997>0) ddiffs28997 = new Date(dnows28997-dthens28997); else ddiffs28997 = new Date(dthens28997-dnows28997); gsecss28997 = Math.floor(ddiffs28997.valueOf()/1000); CountBacks28997(gsecss28997);