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 (LeadingZeros29051 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29051(secs) { if (secs < 0) { document.getElementById("cntdwns29051").innerHTML = FinishMessages29051; return; } DisplayStrs29051 = DisplayFormats29051.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29051 = DisplayStrs29051.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29051 = DisplayStrs29051.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29051 = DisplayStrs29051.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29051").innerHTML = DisplayStrs29051; if (CountActives29051) //alert(SetTimeOutPeriods29051); setTimeout("CountBacks29051(" + (secs+CountSteppers29051) + ")", SetTimeOutPeriods29051); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29051)=="undefined") BackColors29051 = ""; if (typeof(ForeColors29051)=="undefined") ForeColors29051= "white"; if (typeof(TargetDates29051)=="undefined") TargetDates29051 = "12/05/2023 9:00:00 PM"; if (typeof(DisplayFormats29051)=="undefined") DisplayFormats29051 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29051)=="undefined") CountActives29051 = true; if (typeof(FinishMessages29051)=="undefined") FinishMessages29051 = ""; if (typeof(CountSteppers29051)!="number") CountSteppers29051 = -1; if (typeof(LeadingZeros29051)=="undefined") LeadingZeros29051 = true; CountSteppers29051 = Math.ceil(CountSteppers29051); if (CountSteppers29051 == 0) CountActives29051 = false; var SetTimeOutPeriods29051 = (Math.abs(CountSteppers29051)-1)*1000 + 990; puti(BackColors29051, ForeColors29051); var dthens29051 = new Date(TargetDates29051); var dnows29051 = new Date("05/09/2025 10:08:42 AM"); if(CountSteppers29051>0) ddiffs29051 = new Date(dnows29051-dthens29051); else ddiffs29051 = new Date(dthens29051-dnows29051); gsecss29051 = Math.floor(ddiffs29051.valueOf()/1000); CountBacks29051(gsecss29051);