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 (LeadingZeros28532 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28532(secs) { if (secs < 0) { document.getElementById("cntdwns28532").innerHTML = FinishMessages28532; return; } DisplayStrs28532 = DisplayFormats28532.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28532 = DisplayStrs28532.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28532 = DisplayStrs28532.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28532 = DisplayStrs28532.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28532").innerHTML = DisplayStrs28532; if (CountActives28532) //alert(SetTimeOutPeriods28532); setTimeout("CountBacks28532(" + (secs+CountSteppers28532) + ")", SetTimeOutPeriods28532); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28532)=="undefined") BackColors28532 = ""; if (typeof(ForeColors28532)=="undefined") ForeColors28532= "white"; if (typeof(TargetDates28532)=="undefined") TargetDates28532 = "06/07/2023 10:00:00 PM"; if (typeof(DisplayFormats28532)=="undefined") DisplayFormats28532 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28532)=="undefined") CountActives28532 = true; if (typeof(FinishMessages28532)=="undefined") FinishMessages28532 = ""; if (typeof(CountSteppers28532)!="number") CountSteppers28532 = -1; if (typeof(LeadingZeros28532)=="undefined") LeadingZeros28532 = true; CountSteppers28532 = Math.ceil(CountSteppers28532); if (CountSteppers28532 == 0) CountActives28532 = false; var SetTimeOutPeriods28532 = (Math.abs(CountSteppers28532)-1)*1000 + 990; puti(BackColors28532, ForeColors28532); var dthens28532 = new Date(TargetDates28532); var dnows28532 = new Date("05/11/2025 5:42:38 PM"); if(CountSteppers28532>0) ddiffs28532 = new Date(dnows28532-dthens28532); else ddiffs28532 = new Date(dthens28532-dnows28532); gsecss28532 = Math.floor(ddiffs28532.valueOf()/1000); CountBacks28532(gsecss28532);