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 (LeadingZeros29501 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29501(secs) { if (secs < 0) { document.getElementById("cntdwns29501").innerHTML = FinishMessages29501; return; } DisplayStrs29501 = DisplayFormats29501.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29501 = DisplayStrs29501.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29501 = DisplayStrs29501.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29501 = DisplayStrs29501.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29501").innerHTML = DisplayStrs29501; if (CountActives29501) //alert(SetTimeOutPeriods29501); setTimeout("CountBacks29501(" + (secs+CountSteppers29501) + ")", SetTimeOutPeriods29501); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29501)=="undefined") BackColors29501 = ""; if (typeof(ForeColors29501)=="undefined") ForeColors29501= "white"; if (typeof(TargetDates29501)=="undefined") TargetDates29501 = "12/10/2023 10:00:00 PM"; if (typeof(DisplayFormats29501)=="undefined") DisplayFormats29501 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29501)=="undefined") CountActives29501 = true; if (typeof(FinishMessages29501)=="undefined") FinishMessages29501 = ""; if (typeof(CountSteppers29501)!="number") CountSteppers29501 = -1; if (typeof(LeadingZeros29501)=="undefined") LeadingZeros29501 = true; CountSteppers29501 = Math.ceil(CountSteppers29501); if (CountSteppers29501 == 0) CountActives29501 = false; var SetTimeOutPeriods29501 = (Math.abs(CountSteppers29501)-1)*1000 + 990; puti(BackColors29501, ForeColors29501); var dthens29501 = new Date(TargetDates29501); var dnows29501 = new Date("05/09/2025 10:06:56 AM"); if(CountSteppers29501>0) ddiffs29501 = new Date(dnows29501-dthens29501); else ddiffs29501 = new Date(dthens29501-dnows29501); gsecss29501 = Math.floor(ddiffs29501.valueOf()/1000); CountBacks29501(gsecss29501);