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 (LeadingZeros28027 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28027(secs) { if (secs < 0) { document.getElementById("cntdwns28027").innerHTML = FinishMessages28027; return; } DisplayStrs28027 = DisplayFormats28027.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28027 = DisplayStrs28027.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28027 = DisplayStrs28027.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28027 = DisplayStrs28027.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28027").innerHTML = DisplayStrs28027; if (CountActives28027) //alert(SetTimeOutPeriods28027); setTimeout("CountBacks28027(" + (secs+CountSteppers28027) + ")", SetTimeOutPeriods28027); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28027)=="undefined") BackColors28027 = ""; if (typeof(ForeColors28027)=="undefined") ForeColors28027= "white"; if (typeof(TargetDates28027)=="undefined") TargetDates28027 = "09/25/2023 11:00:00 PM"; if (typeof(DisplayFormats28027)=="undefined") DisplayFormats28027 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28027)=="undefined") CountActives28027 = true; if (typeof(FinishMessages28027)=="undefined") FinishMessages28027 = ""; if (typeof(CountSteppers28027)!="number") CountSteppers28027 = -1; if (typeof(LeadingZeros28027)=="undefined") LeadingZeros28027 = true; CountSteppers28027 = Math.ceil(CountSteppers28027); if (CountSteppers28027 == 0) CountActives28027 = false; var SetTimeOutPeriods28027 = (Math.abs(CountSteppers28027)-1)*1000 + 990; puti(BackColors28027, ForeColors28027); var dthens28027 = new Date(TargetDates28027); var dnows28027 = new Date("05/09/2025 12:57:00 PM"); if(CountSteppers28027>0) ddiffs28027 = new Date(dnows28027-dthens28027); else ddiffs28027 = new Date(dthens28027-dnows28027); gsecss28027 = Math.floor(ddiffs28027.valueOf()/1000); CountBacks28027(gsecss28027);