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 (LeadingZeros28597 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28597(secs) { if (secs < 0) { document.getElementById("cntdwns28597").innerHTML = FinishMessages28597; return; } DisplayStrs28597 = DisplayFormats28597.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28597 = DisplayStrs28597.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28597 = DisplayStrs28597.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28597 = DisplayStrs28597.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28597").innerHTML = DisplayStrs28597; if (CountActives28597) //alert(SetTimeOutPeriods28597); setTimeout("CountBacks28597(" + (secs+CountSteppers28597) + ")", SetTimeOutPeriods28597); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28597)=="undefined") BackColors28597 = ""; if (typeof(ForeColors28597)=="undefined") ForeColors28597= "white"; if (typeof(TargetDates28597)=="undefined") TargetDates28597 = "06/05/2023 10:00:00 PM"; if (typeof(DisplayFormats28597)=="undefined") DisplayFormats28597 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28597)=="undefined") CountActives28597 = true; if (typeof(FinishMessages28597)=="undefined") FinishMessages28597 = ""; if (typeof(CountSteppers28597)!="number") CountSteppers28597 = -1; if (typeof(LeadingZeros28597)=="undefined") LeadingZeros28597 = true; CountSteppers28597 = Math.ceil(CountSteppers28597); if (CountSteppers28597 == 0) CountActives28597 = false; var SetTimeOutPeriods28597 = (Math.abs(CountSteppers28597)-1)*1000 + 990; puti(BackColors28597, ForeColors28597); var dthens28597 = new Date(TargetDates28597); var dnows28597 = new Date("05/11/2025 10:55:59 AM"); if(CountSteppers28597>0) ddiffs28597 = new Date(dnows28597-dthens28597); else ddiffs28597 = new Date(dthens28597-dnows28597); gsecss28597 = Math.floor(ddiffs28597.valueOf()/1000); CountBacks28597(gsecss28597);