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 (LeadingZeros28108 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28108(secs) { if (secs < 0) { document.getElementById("cntdwns28108").innerHTML = FinishMessages28108; return; } DisplayStrs28108 = DisplayFormats28108.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28108 = DisplayStrs28108.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28108 = DisplayStrs28108.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28108 = DisplayStrs28108.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28108").innerHTML = DisplayStrs28108; if (CountActives28108) //alert(SetTimeOutPeriods28108); setTimeout("CountBacks28108(" + (secs+CountSteppers28108) + ")", SetTimeOutPeriods28108); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28108)=="undefined") BackColors28108 = ""; if (typeof(ForeColors28108)=="undefined") ForeColors28108= "white"; if (typeof(TargetDates28108)=="undefined") TargetDates28108 = "05/30/2023 11:00:00 PM"; if (typeof(DisplayFormats28108)=="undefined") DisplayFormats28108 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28108)=="undefined") CountActives28108 = true; if (typeof(FinishMessages28108)=="undefined") FinishMessages28108 = ""; if (typeof(CountSteppers28108)!="number") CountSteppers28108 = -1; if (typeof(LeadingZeros28108)=="undefined") LeadingZeros28108 = true; CountSteppers28108 = Math.ceil(CountSteppers28108); if (CountSteppers28108 == 0) CountActives28108 = false; var SetTimeOutPeriods28108 = (Math.abs(CountSteppers28108)-1)*1000 + 990; puti(BackColors28108, ForeColors28108); var dthens28108 = new Date(TargetDates28108); var dnows28108 = new Date("05/09/2025 10:08:42 AM"); if(CountSteppers28108>0) ddiffs28108 = new Date(dnows28108-dthens28108); else ddiffs28108 = new Date(dthens28108-dnows28108); gsecss28108 = Math.floor(ddiffs28108.valueOf()/1000); CountBacks28108(gsecss28108);