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 (LeadingZeros28939 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28939(secs) { if (secs < 0) { document.getElementById("cntdwns28939").innerHTML = FinishMessages28939; return; } DisplayStrs28939 = DisplayFormats28939.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28939 = DisplayStrs28939.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28939 = DisplayStrs28939.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28939 = DisplayStrs28939.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28939").innerHTML = DisplayStrs28939; if (CountActives28939) //alert(SetTimeOutPeriods28939); setTimeout("CountBacks28939(" + (secs+CountSteppers28939) + ")", SetTimeOutPeriods28939); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28939)=="undefined") BackColors28939 = ""; if (typeof(ForeColors28939)=="undefined") ForeColors28939= "white"; if (typeof(TargetDates28939)=="undefined") TargetDates28939 = "10/03/2023 10:00:00 PM"; if (typeof(DisplayFormats28939)=="undefined") DisplayFormats28939 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28939)=="undefined") CountActives28939 = true; if (typeof(FinishMessages28939)=="undefined") FinishMessages28939 = ""; if (typeof(CountSteppers28939)!="number") CountSteppers28939 = -1; if (typeof(LeadingZeros28939)=="undefined") LeadingZeros28939 = true; CountSteppers28939 = Math.ceil(CountSteppers28939); if (CountSteppers28939 == 0) CountActives28939 = false; var SetTimeOutPeriods28939 = (Math.abs(CountSteppers28939)-1)*1000 + 990; puti(BackColors28939, ForeColors28939); var dthens28939 = new Date(TargetDates28939); var dnows28939 = new Date("05/09/2025 10:08:41 AM"); if(CountSteppers28939>0) ddiffs28939 = new Date(dnows28939-dthens28939); else ddiffs28939 = new Date(dthens28939-dnows28939); gsecss28939 = Math.floor(ddiffs28939.valueOf()/1000); CountBacks28939(gsecss28939);