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 (LeadingZeros28121 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28121(secs) { if (secs < 0) { document.getElementById("cntdwns28121").innerHTML = FinishMessages28121; return; } DisplayStrs28121 = DisplayFormats28121.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28121 = DisplayStrs28121.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28121 = DisplayStrs28121.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28121 = DisplayStrs28121.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28121").innerHTML = DisplayStrs28121; if (CountActives28121) //alert(SetTimeOutPeriods28121); setTimeout("CountBacks28121(" + (secs+CountSteppers28121) + ")", SetTimeOutPeriods28121); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28121)=="undefined") BackColors28121 = ""; if (typeof(ForeColors28121)=="undefined") ForeColors28121= "white"; if (typeof(TargetDates28121)=="undefined") TargetDates28121 = "03/24/2023 10:00:00 PM"; if (typeof(DisplayFormats28121)=="undefined") DisplayFormats28121 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28121)=="undefined") CountActives28121 = true; if (typeof(FinishMessages28121)=="undefined") FinishMessages28121 = ""; if (typeof(CountSteppers28121)!="number") CountSteppers28121 = -1; if (typeof(LeadingZeros28121)=="undefined") LeadingZeros28121 = true; CountSteppers28121 = Math.ceil(CountSteppers28121); if (CountSteppers28121 == 0) CountActives28121 = false; var SetTimeOutPeriods28121 = (Math.abs(CountSteppers28121)-1)*1000 + 990; puti(BackColors28121, ForeColors28121); var dthens28121 = new Date(TargetDates28121); var dnows28121 = new Date("05/13/2025 6:39:45 AM"); if(CountSteppers28121>0) ddiffs28121 = new Date(dnows28121-dthens28121); else ddiffs28121 = new Date(dthens28121-dnows28121); gsecss28121 = Math.floor(ddiffs28121.valueOf()/1000); CountBacks28121(gsecss28121);