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 (LeadingZeros28531 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28531(secs) { if (secs < 0) { document.getElementById("cntdwns28531").innerHTML = FinishMessages28531; return; } DisplayStrs28531 = DisplayFormats28531.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28531 = DisplayStrs28531.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28531 = DisplayStrs28531.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28531 = DisplayStrs28531.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28531").innerHTML = DisplayStrs28531; if (CountActives28531) //alert(SetTimeOutPeriods28531); setTimeout("CountBacks28531(" + (secs+CountSteppers28531) + ")", SetTimeOutPeriods28531); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28531)=="undefined") BackColors28531 = ""; if (typeof(ForeColors28531)=="undefined") ForeColors28531= "white"; if (typeof(TargetDates28531)=="undefined") TargetDates28531 = "06/07/2023 10:00:00 PM"; if (typeof(DisplayFormats28531)=="undefined") DisplayFormats28531 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28531)=="undefined") CountActives28531 = true; if (typeof(FinishMessages28531)=="undefined") FinishMessages28531 = ""; if (typeof(CountSteppers28531)!="number") CountSteppers28531 = -1; if (typeof(LeadingZeros28531)=="undefined") LeadingZeros28531 = true; CountSteppers28531 = Math.ceil(CountSteppers28531); if (CountSteppers28531 == 0) CountActives28531 = false; var SetTimeOutPeriods28531 = (Math.abs(CountSteppers28531)-1)*1000 + 990; puti(BackColors28531, ForeColors28531); var dthens28531 = new Date(TargetDates28531); var dnows28531 = new Date("05/11/2025 2:15:21 PM"); if(CountSteppers28531>0) ddiffs28531 = new Date(dnows28531-dthens28531); else ddiffs28531 = new Date(dthens28531-dnows28531); gsecss28531 = Math.floor(ddiffs28531.valueOf()/1000); CountBacks28531(gsecss28531);