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 (LeadingZeros28107 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28107(secs) { if (secs < 0) { document.getElementById("cntdwns28107").innerHTML = FinishMessages28107; return; } DisplayStrs28107 = DisplayFormats28107.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28107 = DisplayStrs28107.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28107 = DisplayStrs28107.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28107 = DisplayStrs28107.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28107").innerHTML = DisplayStrs28107; if (CountActives28107) //alert(SetTimeOutPeriods28107); setTimeout("CountBacks28107(" + (secs+CountSteppers28107) + ")", SetTimeOutPeriods28107); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28107)=="undefined") BackColors28107 = ""; if (typeof(ForeColors28107)=="undefined") ForeColors28107= "white"; if (typeof(TargetDates28107)=="undefined") TargetDates28107 = "03/31/2023 11:00:00 PM"; if (typeof(DisplayFormats28107)=="undefined") DisplayFormats28107 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28107)=="undefined") CountActives28107 = true; if (typeof(FinishMessages28107)=="undefined") FinishMessages28107 = ""; if (typeof(CountSteppers28107)!="number") CountSteppers28107 = -1; if (typeof(LeadingZeros28107)=="undefined") LeadingZeros28107 = true; CountSteppers28107 = Math.ceil(CountSteppers28107); if (CountSteppers28107 == 0) CountActives28107 = false; var SetTimeOutPeriods28107 = (Math.abs(CountSteppers28107)-1)*1000 + 990; puti(BackColors28107, ForeColors28107); var dthens28107 = new Date(TargetDates28107); var dnows28107 = new Date("05/13/2025 4:20:39 AM"); if(CountSteppers28107>0) ddiffs28107 = new Date(dnows28107-dthens28107); else ddiffs28107 = new Date(dthens28107-dnows28107); gsecss28107 = Math.floor(ddiffs28107.valueOf()/1000); CountBacks28107(gsecss28107);