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 (LeadingZeros28735 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28735(secs) { if (secs < 0) { document.getElementById("cntdwns28735").innerHTML = FinishMessages28735; return; } DisplayStrs28735 = DisplayFormats28735.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28735 = DisplayStrs28735.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28735 = DisplayStrs28735.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28735 = DisplayStrs28735.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28735").innerHTML = DisplayStrs28735; if (CountActives28735) //alert(SetTimeOutPeriods28735); setTimeout("CountBacks28735(" + (secs+CountSteppers28735) + ")", SetTimeOutPeriods28735); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28735)=="undefined") BackColors28735 = ""; if (typeof(ForeColors28735)=="undefined") ForeColors28735= "white"; if (typeof(TargetDates28735)=="undefined") TargetDates28735 = "12/11/2023 9:00:00 PM"; if (typeof(DisplayFormats28735)=="undefined") DisplayFormats28735 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28735)=="undefined") CountActives28735 = true; if (typeof(FinishMessages28735)=="undefined") FinishMessages28735 = ""; if (typeof(CountSteppers28735)!="number") CountSteppers28735 = -1; if (typeof(LeadingZeros28735)=="undefined") LeadingZeros28735 = true; CountSteppers28735 = Math.ceil(CountSteppers28735); if (CountSteppers28735 == 0) CountActives28735 = false; var SetTimeOutPeriods28735 = (Math.abs(CountSteppers28735)-1)*1000 + 990; puti(BackColors28735, ForeColors28735); var dthens28735 = new Date(TargetDates28735); var dnows28735 = new Date("05/09/2025 10:09:34 AM"); if(CountSteppers28735>0) ddiffs28735 = new Date(dnows28735-dthens28735); else ddiffs28735 = new Date(dthens28735-dnows28735); gsecss28735 = Math.floor(ddiffs28735.valueOf()/1000); CountBacks28735(gsecss28735);