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 (LeadingZeros28250 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28250(secs) { if (secs < 0) { document.getElementById("cntdwns28250").innerHTML = FinishMessages28250; return; } DisplayStrs28250 = DisplayFormats28250.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28250 = DisplayStrs28250.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28250 = DisplayStrs28250.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28250 = DisplayStrs28250.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28250").innerHTML = DisplayStrs28250; if (CountActives28250) //alert(SetTimeOutPeriods28250); setTimeout("CountBacks28250(" + (secs+CountSteppers28250) + ")", SetTimeOutPeriods28250); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28250)=="undefined") BackColors28250 = ""; if (typeof(ForeColors28250)=="undefined") ForeColors28250= "white"; if (typeof(TargetDates28250)=="undefined") TargetDates28250 = "06/07/2023 10:00:00 PM"; if (typeof(DisplayFormats28250)=="undefined") DisplayFormats28250 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28250)=="undefined") CountActives28250 = true; if (typeof(FinishMessages28250)=="undefined") FinishMessages28250 = ""; if (typeof(CountSteppers28250)!="number") CountSteppers28250 = -1; if (typeof(LeadingZeros28250)=="undefined") LeadingZeros28250 = true; CountSteppers28250 = Math.ceil(CountSteppers28250); if (CountSteppers28250 == 0) CountActives28250 = false; var SetTimeOutPeriods28250 = (Math.abs(CountSteppers28250)-1)*1000 + 990; puti(BackColors28250, ForeColors28250); var dthens28250 = new Date(TargetDates28250); var dnows28250 = new Date("05/09/2025 10:11:22 AM"); if(CountSteppers28250>0) ddiffs28250 = new Date(dnows28250-dthens28250); else ddiffs28250 = new Date(dthens28250-dnows28250); gsecss28250 = Math.floor(ddiffs28250.valueOf()/1000); CountBacks28250(gsecss28250);