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 (LeadingZeros28814 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28814(secs) { if (secs < 0) { document.getElementById("cntdwns28814").innerHTML = FinishMessages28814; return; } DisplayStrs28814 = DisplayFormats28814.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28814 = DisplayStrs28814.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28814 = DisplayStrs28814.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28814 = DisplayStrs28814.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28814").innerHTML = DisplayStrs28814; if (CountActives28814) //alert(SetTimeOutPeriods28814); setTimeout("CountBacks28814(" + (secs+CountSteppers28814) + ")", SetTimeOutPeriods28814); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28814)=="undefined") BackColors28814 = ""; if (typeof(ForeColors28814)=="undefined") ForeColors28814= "white"; if (typeof(TargetDates28814)=="undefined") TargetDates28814 = "10/03/2023 10:00:00 PM"; if (typeof(DisplayFormats28814)=="undefined") DisplayFormats28814 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28814)=="undefined") CountActives28814 = true; if (typeof(FinishMessages28814)=="undefined") FinishMessages28814 = ""; if (typeof(CountSteppers28814)!="number") CountSteppers28814 = -1; if (typeof(LeadingZeros28814)=="undefined") LeadingZeros28814 = true; CountSteppers28814 = Math.ceil(CountSteppers28814); if (CountSteppers28814 == 0) CountActives28814 = false; var SetTimeOutPeriods28814 = (Math.abs(CountSteppers28814)-1)*1000 + 990; puti(BackColors28814, ForeColors28814); var dthens28814 = new Date(TargetDates28814); var dnows28814 = new Date("05/09/2025 10:07:50 AM"); if(CountSteppers28814>0) ddiffs28814 = new Date(dnows28814-dthens28814); else ddiffs28814 = new Date(dthens28814-dnows28814); gsecss28814 = Math.floor(ddiffs28814.valueOf()/1000); CountBacks28814(gsecss28814);