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 (LeadingZeros29031 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29031(secs) { if (secs < 0) { document.getElementById("cntdwns29031").innerHTML = FinishMessages29031; return; } DisplayStrs29031 = DisplayFormats29031.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29031 = DisplayStrs29031.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29031 = DisplayStrs29031.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29031 = DisplayStrs29031.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29031").innerHTML = DisplayStrs29031; if (CountActives29031) //alert(SetTimeOutPeriods29031); setTimeout("CountBacks29031(" + (secs+CountSteppers29031) + ")", SetTimeOutPeriods29031); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29031)=="undefined") BackColors29031 = ""; if (typeof(ForeColors29031)=="undefined") ForeColors29031= "white"; if (typeof(TargetDates29031)=="undefined") TargetDates29031 = "10/03/2023 10:00:00 PM"; if (typeof(DisplayFormats29031)=="undefined") DisplayFormats29031 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29031)=="undefined") CountActives29031 = true; if (typeof(FinishMessages29031)=="undefined") FinishMessages29031 = ""; if (typeof(CountSteppers29031)!="number") CountSteppers29031 = -1; if (typeof(LeadingZeros29031)=="undefined") LeadingZeros29031 = true; CountSteppers29031 = Math.ceil(CountSteppers29031); if (CountSteppers29031 == 0) CountActives29031 = false; var SetTimeOutPeriods29031 = (Math.abs(CountSteppers29031)-1)*1000 + 990; puti(BackColors29031, ForeColors29031); var dthens29031 = new Date(TargetDates29031); var dnows29031 = new Date("05/11/2025 2:14:17 PM"); if(CountSteppers29031>0) ddiffs29031 = new Date(dnows29031-dthens29031); else ddiffs29031 = new Date(dthens29031-dnows29031); gsecss29031 = Math.floor(ddiffs29031.valueOf()/1000); CountBacks29031(gsecss29031);