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 (LeadingZeros29021 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29021(secs) { if (secs < 0) { document.getElementById("cntdwns29021").innerHTML = FinishMessages29021; return; } DisplayStrs29021 = DisplayFormats29021.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29021 = DisplayStrs29021.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29021 = DisplayStrs29021.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29021 = DisplayStrs29021.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29021").innerHTML = DisplayStrs29021; if (CountActives29021) //alert(SetTimeOutPeriods29021); setTimeout("CountBacks29021(" + (secs+CountSteppers29021) + ")", SetTimeOutPeriods29021); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29021)=="undefined") BackColors29021 = ""; if (typeof(ForeColors29021)=="undefined") ForeColors29021= "white"; if (typeof(TargetDates29021)=="undefined") TargetDates29021 = "12/11/2023 9:00:00 PM"; if (typeof(DisplayFormats29021)=="undefined") DisplayFormats29021 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29021)=="undefined") CountActives29021 = true; if (typeof(FinishMessages29021)=="undefined") FinishMessages29021 = ""; if (typeof(CountSteppers29021)!="number") CountSteppers29021 = -1; if (typeof(LeadingZeros29021)=="undefined") LeadingZeros29021 = true; CountSteppers29021 = Math.ceil(CountSteppers29021); if (CountSteppers29021 == 0) CountActives29021 = false; var SetTimeOutPeriods29021 = (Math.abs(CountSteppers29021)-1)*1000 + 990; puti(BackColors29021, ForeColors29021); var dthens29021 = new Date(TargetDates29021); var dnows29021 = new Date("05/09/2025 10:10:29 AM"); if(CountSteppers29021>0) ddiffs29021 = new Date(dnows29021-dthens29021); else ddiffs29021 = new Date(dthens29021-dnows29021); gsecss29021 = Math.floor(ddiffs29021.valueOf()/1000); CountBacks29021(gsecss29021);