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 (LeadingZeros28465 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28465(secs) { if (secs < 0) { document.getElementById("cntdwns28465").innerHTML = FinishMessages28465; return; } DisplayStrs28465 = DisplayFormats28465.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28465 = DisplayStrs28465.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28465 = DisplayStrs28465.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28465 = DisplayStrs28465.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28465").innerHTML = DisplayStrs28465; if (CountActives28465) //alert(SetTimeOutPeriods28465); setTimeout("CountBacks28465(" + (secs+CountSteppers28465) + ")", SetTimeOutPeriods28465); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28465)=="undefined") BackColors28465 = ""; if (typeof(ForeColors28465)=="undefined") ForeColors28465= "white"; if (typeof(TargetDates28465)=="undefined") TargetDates28465 = "06/01/2023 10:00:00 PM"; if (typeof(DisplayFormats28465)=="undefined") DisplayFormats28465 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28465)=="undefined") CountActives28465 = true; if (typeof(FinishMessages28465)=="undefined") FinishMessages28465 = ""; if (typeof(CountSteppers28465)!="number") CountSteppers28465 = -1; if (typeof(LeadingZeros28465)=="undefined") LeadingZeros28465 = true; CountSteppers28465 = Math.ceil(CountSteppers28465); if (CountSteppers28465 == 0) CountActives28465 = false; var SetTimeOutPeriods28465 = (Math.abs(CountSteppers28465)-1)*1000 + 990; puti(BackColors28465, ForeColors28465); var dthens28465 = new Date(TargetDates28465); var dnows28465 = new Date("05/11/2025 5:40:00 PM"); if(CountSteppers28465>0) ddiffs28465 = new Date(dnows28465-dthens28465); else ddiffs28465 = new Date(dthens28465-dnows28465); gsecss28465 = Math.floor(ddiffs28465.valueOf()/1000); CountBacks28465(gsecss28465);