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 (LeadingZeros28131 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28131(secs) { if (secs < 0) { document.getElementById("cntdwns28131").innerHTML = FinishMessages28131; return; } DisplayStrs28131 = DisplayFormats28131.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28131 = DisplayStrs28131.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28131 = DisplayStrs28131.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28131 = DisplayStrs28131.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28131").innerHTML = DisplayStrs28131; if (CountActives28131) //alert(SetTimeOutPeriods28131); setTimeout("CountBacks28131(" + (secs+CountSteppers28131) + ")", SetTimeOutPeriods28131); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28131)=="undefined") BackColors28131 = ""; if (typeof(ForeColors28131)=="undefined") ForeColors28131= "white"; if (typeof(TargetDates28131)=="undefined") TargetDates28131 = "03/31/2023 11:00:00 PM"; if (typeof(DisplayFormats28131)=="undefined") DisplayFormats28131 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28131)=="undefined") CountActives28131 = true; if (typeof(FinishMessages28131)=="undefined") FinishMessages28131 = ""; if (typeof(CountSteppers28131)!="number") CountSteppers28131 = -1; if (typeof(LeadingZeros28131)=="undefined") LeadingZeros28131 = true; CountSteppers28131 = Math.ceil(CountSteppers28131); if (CountSteppers28131 == 0) CountActives28131 = false; var SetTimeOutPeriods28131 = (Math.abs(CountSteppers28131)-1)*1000 + 990; puti(BackColors28131, ForeColors28131); var dthens28131 = new Date(TargetDates28131); var dnows28131 = new Date("05/13/2025 7:55:27 AM"); if(CountSteppers28131>0) ddiffs28131 = new Date(dnows28131-dthens28131); else ddiffs28131 = new Date(dthens28131-dnows28131); gsecss28131 = Math.floor(ddiffs28131.valueOf()/1000); CountBacks28131(gsecss28131);