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 (LeadingZeros28822 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28822(secs) { if (secs < 0) { document.getElementById("cntdwns28822").innerHTML = FinishMessages28822; return; } DisplayStrs28822 = DisplayFormats28822.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28822 = DisplayStrs28822.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28822 = DisplayStrs28822.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28822 = DisplayStrs28822.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28822").innerHTML = DisplayStrs28822; if (CountActives28822) //alert(SetTimeOutPeriods28822); setTimeout("CountBacks28822(" + (secs+CountSteppers28822) + ")", SetTimeOutPeriods28822); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28822)=="undefined") BackColors28822 = ""; if (typeof(ForeColors28822)=="undefined") ForeColors28822= "white"; if (typeof(TargetDates28822)=="undefined") TargetDates28822 = "04/22/2024 10:00:00 PM"; if (typeof(DisplayFormats28822)=="undefined") DisplayFormats28822 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28822)=="undefined") CountActives28822 = true; if (typeof(FinishMessages28822)=="undefined") FinishMessages28822 = ""; if (typeof(CountSteppers28822)!="number") CountSteppers28822 = -1; if (typeof(LeadingZeros28822)=="undefined") LeadingZeros28822 = true; CountSteppers28822 = Math.ceil(CountSteppers28822); if (CountSteppers28822 == 0) CountActives28822 = false; var SetTimeOutPeriods28822 = (Math.abs(CountSteppers28822)-1)*1000 + 990; puti(BackColors28822, ForeColors28822); var dthens28822 = new Date(TargetDates28822); var dnows28822 = new Date("05/03/2024 6:29:28 AM"); if(CountSteppers28822>0) ddiffs28822 = new Date(dnows28822-dthens28822); else ddiffs28822 = new Date(dthens28822-dnows28822); gsecss28822 = Math.floor(ddiffs28822.valueOf()/1000); CountBacks28822(gsecss28822);