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 (LeadingZeros28180 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28180(secs) { if (secs < 0) { document.getElementById("cntdwns28180").innerHTML = FinishMessages28180; return; } DisplayStrs28180 = DisplayFormats28180.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28180 = DisplayStrs28180.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28180 = DisplayStrs28180.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28180 = DisplayStrs28180.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28180").innerHTML = DisplayStrs28180; if (CountActives28180) //alert(SetTimeOutPeriods28180); setTimeout("CountBacks28180(" + (secs+CountSteppers28180) + ")", SetTimeOutPeriods28180); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28180)=="undefined") BackColors28180 = ""; if (typeof(ForeColors28180)=="undefined") ForeColors28180= "white"; if (typeof(TargetDates28180)=="undefined") TargetDates28180 = "09/27/2023 11:00:00 PM"; if (typeof(DisplayFormats28180)=="undefined") DisplayFormats28180 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28180)=="undefined") CountActives28180 = true; if (typeof(FinishMessages28180)=="undefined") FinishMessages28180 = ""; if (typeof(CountSteppers28180)!="number") CountSteppers28180 = -1; if (typeof(LeadingZeros28180)=="undefined") LeadingZeros28180 = true; CountSteppers28180 = Math.ceil(CountSteppers28180); if (CountSteppers28180 == 0) CountActives28180 = false; var SetTimeOutPeriods28180 = (Math.abs(CountSteppers28180)-1)*1000 + 990; puti(BackColors28180, ForeColors28180); var dthens28180 = new Date(TargetDates28180); var dnows28180 = new Date("05/11/2025 5:39:59 PM"); if(CountSteppers28180>0) ddiffs28180 = new Date(dnows28180-dthens28180); else ddiffs28180 = new Date(dthens28180-dnows28180); gsecss28180 = Math.floor(ddiffs28180.valueOf()/1000); CountBacks28180(gsecss28180);