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 (LeadingZeros28530 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28530(secs) { if (secs < 0) { document.getElementById("cntdwns28530").innerHTML = FinishMessages28530; return; } DisplayStrs28530 = DisplayFormats28530.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28530 = DisplayStrs28530.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28530 = DisplayStrs28530.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28530 = DisplayStrs28530.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28530").innerHTML = DisplayStrs28530; if (CountActives28530) //alert(SetTimeOutPeriods28530); setTimeout("CountBacks28530(" + (secs+CountSteppers28530) + ")", SetTimeOutPeriods28530); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28530)=="undefined") BackColors28530 = ""; if (typeof(ForeColors28530)=="undefined") ForeColors28530= "white"; if (typeof(TargetDates28530)=="undefined") TargetDates28530 = "12/04/2023 9:00:00 PM"; if (typeof(DisplayFormats28530)=="undefined") DisplayFormats28530 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28530)=="undefined") CountActives28530 = true; if (typeof(FinishMessages28530)=="undefined") FinishMessages28530 = ""; if (typeof(CountSteppers28530)!="number") CountSteppers28530 = -1; if (typeof(LeadingZeros28530)=="undefined") LeadingZeros28530 = true; CountSteppers28530 = Math.ceil(CountSteppers28530); if (CountSteppers28530 == 0) CountActives28530 = false; var SetTimeOutPeriods28530 = (Math.abs(CountSteppers28530)-1)*1000 + 990; puti(BackColors28530, ForeColors28530); var dthens28530 = new Date(TargetDates28530); var dnows28530 = new Date("05/09/2025 10:10:29 AM"); if(CountSteppers28530>0) ddiffs28530 = new Date(dnows28530-dthens28530); else ddiffs28530 = new Date(dthens28530-dnows28530); gsecss28530 = Math.floor(ddiffs28530.valueOf()/1000); CountBacks28530(gsecss28530);