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 (LeadingZeros28547 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28547(secs) { if (secs < 0) { document.getElementById("cntdwns28547").innerHTML = FinishMessages28547; return; } DisplayStrs28547 = DisplayFormats28547.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28547 = DisplayStrs28547.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28547 = DisplayStrs28547.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28547 = DisplayStrs28547.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28547").innerHTML = DisplayStrs28547; if (CountActives28547) //alert(SetTimeOutPeriods28547); setTimeout("CountBacks28547(" + (secs+CountSteppers28547) + ")", SetTimeOutPeriods28547); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28547)=="undefined") BackColors28547 = ""; if (typeof(ForeColors28547)=="undefined") ForeColors28547= "white"; if (typeof(TargetDates28547)=="undefined") TargetDates28547 = "06/06/2023 10:00:00 PM"; if (typeof(DisplayFormats28547)=="undefined") DisplayFormats28547 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28547)=="undefined") CountActives28547 = true; if (typeof(FinishMessages28547)=="undefined") FinishMessages28547 = ""; if (typeof(CountSteppers28547)!="number") CountSteppers28547 = -1; if (typeof(LeadingZeros28547)=="undefined") LeadingZeros28547 = true; CountSteppers28547 = Math.ceil(CountSteppers28547); if (CountSteppers28547 == 0) CountActives28547 = false; var SetTimeOutPeriods28547 = (Math.abs(CountSteppers28547)-1)*1000 + 990; puti(BackColors28547, ForeColors28547); var dthens28547 = new Date(TargetDates28547); var dnows28547 = new Date("05/11/2025 2:15:21 PM"); if(CountSteppers28547>0) ddiffs28547 = new Date(dnows28547-dthens28547); else ddiffs28547 = new Date(dthens28547-dnows28547); gsecss28547 = Math.floor(ddiffs28547.valueOf()/1000); CountBacks28547(gsecss28547);