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 (LeadingZeros28568 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28568(secs) { if (secs < 0) { document.getElementById("cntdwns28568").innerHTML = FinishMessages28568; return; } DisplayStrs28568 = DisplayFormats28568.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28568 = DisplayStrs28568.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28568 = DisplayStrs28568.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28568 = DisplayStrs28568.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28568").innerHTML = DisplayStrs28568; if (CountActives28568) //alert(SetTimeOutPeriods28568); setTimeout("CountBacks28568(" + (secs+CountSteppers28568) + ")", SetTimeOutPeriods28568); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28568)=="undefined") BackColors28568 = ""; if (typeof(ForeColors28568)=="undefined") ForeColors28568= "white"; if (typeof(TargetDates28568)=="undefined") TargetDates28568 = "05/31/2023 10:00:00 PM"; if (typeof(DisplayFormats28568)=="undefined") DisplayFormats28568 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28568)=="undefined") CountActives28568 = true; if (typeof(FinishMessages28568)=="undefined") FinishMessages28568 = ""; if (typeof(CountSteppers28568)!="number") CountSteppers28568 = -1; if (typeof(LeadingZeros28568)=="undefined") LeadingZeros28568 = true; CountSteppers28568 = Math.ceil(CountSteppers28568); if (CountSteppers28568 == 0) CountActives28568 = false; var SetTimeOutPeriods28568 = (Math.abs(CountSteppers28568)-1)*1000 + 990; puti(BackColors28568, ForeColors28568); var dthens28568 = new Date(TargetDates28568); var dnows28568 = new Date("05/11/2025 10:56:00 AM"); if(CountSteppers28568>0) ddiffs28568 = new Date(dnows28568-dthens28568); else ddiffs28568 = new Date(dthens28568-dnows28568); gsecss28568 = Math.floor(ddiffs28568.valueOf()/1000); CountBacks28568(gsecss28568);