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 (LeadingZeros28621 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28621(secs) { if (secs < 0) { document.getElementById("cntdwns28621").innerHTML = FinishMessages28621; return; } DisplayStrs28621 = DisplayFormats28621.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28621 = DisplayStrs28621.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28621 = DisplayStrs28621.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28621 = DisplayStrs28621.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28621").innerHTML = DisplayStrs28621; if (CountActives28621) //alert(SetTimeOutPeriods28621); setTimeout("CountBacks28621(" + (secs+CountSteppers28621) + ")", SetTimeOutPeriods28621); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28621)=="undefined") BackColors28621 = ""; if (typeof(ForeColors28621)=="undefined") ForeColors28621= "white"; if (typeof(TargetDates28621)=="undefined") TargetDates28621 = "06/05/2023 10:00:00 PM"; if (typeof(DisplayFormats28621)=="undefined") DisplayFormats28621 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28621)=="undefined") CountActives28621 = true; if (typeof(FinishMessages28621)=="undefined") FinishMessages28621 = ""; if (typeof(CountSteppers28621)!="number") CountSteppers28621 = -1; if (typeof(LeadingZeros28621)=="undefined") LeadingZeros28621 = true; CountSteppers28621 = Math.ceil(CountSteppers28621); if (CountSteppers28621 == 0) CountActives28621 = false; var SetTimeOutPeriods28621 = (Math.abs(CountSteppers28621)-1)*1000 + 990; puti(BackColors28621, ForeColors28621); var dthens28621 = new Date(TargetDates28621); var dnows28621 = new Date("05/11/2025 5:41:13 PM"); if(CountSteppers28621>0) ddiffs28621 = new Date(dnows28621-dthens28621); else ddiffs28621 = new Date(dthens28621-dnows28621); gsecss28621 = Math.floor(ddiffs28621.valueOf()/1000); CountBacks28621(gsecss28621);