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 (LeadingZeros28123 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28123(secs) { if (secs < 0) { document.getElementById("cntdwns28123").innerHTML = FinishMessages28123; return; } DisplayStrs28123 = DisplayFormats28123.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28123 = DisplayStrs28123.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28123 = DisplayStrs28123.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28123 = DisplayStrs28123.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28123").innerHTML = DisplayStrs28123; if (CountActives28123) //alert(SetTimeOutPeriods28123); setTimeout("CountBacks28123(" + (secs+CountSteppers28123) + ")", SetTimeOutPeriods28123); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28123)=="undefined") BackColors28123 = ""; if (typeof(ForeColors28123)=="undefined") ForeColors28123= "white"; if (typeof(TargetDates28123)=="undefined") TargetDates28123 = "03/24/2023 10:00:00 PM"; if (typeof(DisplayFormats28123)=="undefined") DisplayFormats28123 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28123)=="undefined") CountActives28123 = true; if (typeof(FinishMessages28123)=="undefined") FinishMessages28123 = ""; if (typeof(CountSteppers28123)!="number") CountSteppers28123 = -1; if (typeof(LeadingZeros28123)=="undefined") LeadingZeros28123 = true; CountSteppers28123 = Math.ceil(CountSteppers28123); if (CountSteppers28123 == 0) CountActives28123 = false; var SetTimeOutPeriods28123 = (Math.abs(CountSteppers28123)-1)*1000 + 990; puti(BackColors28123, ForeColors28123); var dthens28123 = new Date(TargetDates28123); var dnows28123 = new Date("05/13/2025 8:12:37 AM"); if(CountSteppers28123>0) ddiffs28123 = new Date(dnows28123-dthens28123); else ddiffs28123 = new Date(dthens28123-dnows28123); gsecss28123 = Math.floor(ddiffs28123.valueOf()/1000); CountBacks28123(gsecss28123);