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 (LeadingZeros28220 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28220(secs) { if (secs < 0) { document.getElementById("cntdwns28220").innerHTML = FinishMessages28220; return; } DisplayStrs28220 = DisplayFormats28220.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28220 = DisplayStrs28220.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28220 = DisplayStrs28220.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28220 = DisplayStrs28220.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28220").innerHTML = DisplayStrs28220; if (CountActives28220) //alert(SetTimeOutPeriods28220); setTimeout("CountBacks28220(" + (secs+CountSteppers28220) + ")", SetTimeOutPeriods28220); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28220)=="undefined") BackColors28220 = ""; if (typeof(ForeColors28220)=="undefined") ForeColors28220= "white"; if (typeof(TargetDates28220)=="undefined") TargetDates28220 = "05/31/2023 10:00:00 PM"; if (typeof(DisplayFormats28220)=="undefined") DisplayFormats28220 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28220)=="undefined") CountActives28220 = true; if (typeof(FinishMessages28220)=="undefined") FinishMessages28220 = ""; if (typeof(CountSteppers28220)!="number") CountSteppers28220 = -1; if (typeof(LeadingZeros28220)=="undefined") LeadingZeros28220 = true; CountSteppers28220 = Math.ceil(CountSteppers28220); if (CountSteppers28220 == 0) CountActives28220 = false; var SetTimeOutPeriods28220 = (Math.abs(CountSteppers28220)-1)*1000 + 990; puti(BackColors28220, ForeColors28220); var dthens28220 = new Date(TargetDates28220); var dnows28220 = new Date("05/11/2025 4:43:53 AM"); if(CountSteppers28220>0) ddiffs28220 = new Date(dnows28220-dthens28220); else ddiffs28220 = new Date(dthens28220-dnows28220); gsecss28220 = Math.floor(ddiffs28220.valueOf()/1000); CountBacks28220(gsecss28220);