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 (LeadingZeros28215 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28215(secs) { if (secs < 0) { document.getElementById("cntdwns28215").innerHTML = FinishMessages28215; return; } DisplayStrs28215 = DisplayFormats28215.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28215 = DisplayStrs28215.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28215 = DisplayStrs28215.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28215 = DisplayStrs28215.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28215").innerHTML = DisplayStrs28215; if (CountActives28215) //alert(SetTimeOutPeriods28215); setTimeout("CountBacks28215(" + (secs+CountSteppers28215) + ")", SetTimeOutPeriods28215); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28215)=="undefined") BackColors28215 = ""; if (typeof(ForeColors28215)=="undefined") ForeColors28215= "white"; if (typeof(TargetDates28215)=="undefined") TargetDates28215 = "06/03/2023 10:00:00 PM"; if (typeof(DisplayFormats28215)=="undefined") DisplayFormats28215 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28215)=="undefined") CountActives28215 = true; if (typeof(FinishMessages28215)=="undefined") FinishMessages28215 = ""; if (typeof(CountSteppers28215)!="number") CountSteppers28215 = -1; if (typeof(LeadingZeros28215)=="undefined") LeadingZeros28215 = true; CountSteppers28215 = Math.ceil(CountSteppers28215); if (CountSteppers28215 == 0) CountActives28215 = false; var SetTimeOutPeriods28215 = (Math.abs(CountSteppers28215)-1)*1000 + 990; puti(BackColors28215, ForeColors28215); var dthens28215 = new Date(TargetDates28215); var dnows28215 = new Date("05/11/2025 10:54:57 AM"); if(CountSteppers28215>0) ddiffs28215 = new Date(dnows28215-dthens28215); else ddiffs28215 = new Date(dthens28215-dnows28215); gsecss28215 = Math.floor(ddiffs28215.valueOf()/1000); CountBacks28215(gsecss28215);