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 (LeadingZeros28150 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28150(secs) { if (secs < 0) { document.getElementById("cntdwns28150").innerHTML = FinishMessages28150; return; } DisplayStrs28150 = DisplayFormats28150.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28150 = DisplayStrs28150.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28150 = DisplayStrs28150.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28150 = DisplayStrs28150.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28150").innerHTML = DisplayStrs28150; if (CountActives28150) //alert(SetTimeOutPeriods28150); setTimeout("CountBacks28150(" + (secs+CountSteppers28150) + ")", SetTimeOutPeriods28150); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28150)=="undefined") BackColors28150 = ""; if (typeof(ForeColors28150)=="undefined") ForeColors28150= "white"; if (typeof(TargetDates28150)=="undefined") TargetDates28150 = "09/28/2023 10:00:00 PM"; if (typeof(DisplayFormats28150)=="undefined") DisplayFormats28150 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28150)=="undefined") CountActives28150 = true; if (typeof(FinishMessages28150)=="undefined") FinishMessages28150 = ""; if (typeof(CountSteppers28150)!="number") CountSteppers28150 = -1; if (typeof(LeadingZeros28150)=="undefined") LeadingZeros28150 = true; CountSteppers28150 = Math.ceil(CountSteppers28150); if (CountSteppers28150 == 0) CountActives28150 = false; var SetTimeOutPeriods28150 = (Math.abs(CountSteppers28150)-1)*1000 + 990; puti(BackColors28150, ForeColors28150); var dthens28150 = new Date(TargetDates28150); var dnows28150 = new Date("05/11/2025 8:59:11 PM"); if(CountSteppers28150>0) ddiffs28150 = new Date(dnows28150-dthens28150); else ddiffs28150 = new Date(dthens28150-dnows28150); gsecss28150 = Math.floor(ddiffs28150.valueOf()/1000); CountBacks28150(gsecss28150);