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 (LeadingZeros29216 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29216(secs) { if (secs < 0) { document.getElementById("cntdwns29216").innerHTML = FinishMessages29216; return; } DisplayStrs29216 = DisplayFormats29216.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29216 = DisplayStrs29216.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29216 = DisplayStrs29216.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29216 = DisplayStrs29216.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29216").innerHTML = DisplayStrs29216; if (CountActives29216) //alert(SetTimeOutPeriods29216); setTimeout("CountBacks29216(" + (secs+CountSteppers29216) + ")", SetTimeOutPeriods29216); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29216)=="undefined") BackColors29216 = ""; if (typeof(ForeColors29216)=="undefined") ForeColors29216= "white"; if (typeof(TargetDates29216)=="undefined") TargetDates29216 = "12/10/2023 9:00:00 PM"; if (typeof(DisplayFormats29216)=="undefined") DisplayFormats29216 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29216)=="undefined") CountActives29216 = true; if (typeof(FinishMessages29216)=="undefined") FinishMessages29216 = ""; if (typeof(CountSteppers29216)!="number") CountSteppers29216 = -1; if (typeof(LeadingZeros29216)=="undefined") LeadingZeros29216 = true; CountSteppers29216 = Math.ceil(CountSteppers29216); if (CountSteppers29216 == 0) CountActives29216 = false; var SetTimeOutPeriods29216 = (Math.abs(CountSteppers29216)-1)*1000 + 990; puti(BackColors29216, ForeColors29216); var dthens29216 = new Date(TargetDates29216); var dnows29216 = new Date("05/11/2025 10:56:00 AM"); if(CountSteppers29216>0) ddiffs29216 = new Date(dnows29216-dthens29216); else ddiffs29216 = new Date(dthens29216-dnows29216); gsecss29216 = Math.floor(ddiffs29216.valueOf()/1000); CountBacks29216(gsecss29216);