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 (LeadingZeros28999 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28999(secs) { if (secs < 0) { document.getElementById("cntdwns28999").innerHTML = FinishMessages28999; return; } DisplayStrs28999 = DisplayFormats28999.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28999 = DisplayStrs28999.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28999 = DisplayStrs28999.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28999 = DisplayStrs28999.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28999").innerHTML = DisplayStrs28999; if (CountActives28999) //alert(SetTimeOutPeriods28999); setTimeout("CountBacks28999(" + (secs+CountSteppers28999) + ")", SetTimeOutPeriods28999); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28999)=="undefined") BackColors28999 = ""; if (typeof(ForeColors28999)=="undefined") ForeColors28999= "white"; if (typeof(TargetDates28999)=="undefined") TargetDates28999 = "10/03/2023 10:00:00 PM"; if (typeof(DisplayFormats28999)=="undefined") DisplayFormats28999 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28999)=="undefined") CountActives28999 = true; if (typeof(FinishMessages28999)=="undefined") FinishMessages28999 = ""; if (typeof(CountSteppers28999)!="number") CountSteppers28999 = -1; if (typeof(LeadingZeros28999)=="undefined") LeadingZeros28999 = true; CountSteppers28999 = Math.ceil(CountSteppers28999); if (CountSteppers28999 == 0) CountActives28999 = false; var SetTimeOutPeriods28999 = (Math.abs(CountSteppers28999)-1)*1000 + 990; puti(BackColors28999, ForeColors28999); var dthens28999 = new Date(TargetDates28999); var dnows28999 = new Date("05/09/2025 10:06:57 AM"); if(CountSteppers28999>0) ddiffs28999 = new Date(dnows28999-dthens28999); else ddiffs28999 = new Date(dthens28999-dnows28999); gsecss28999 = Math.floor(ddiffs28999.valueOf()/1000); CountBacks28999(gsecss28999);