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 (LeadingZeros28162 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28162(secs) { if (secs < 0) { document.getElementById("cntdwns28162").innerHTML = FinishMessages28162; return; } DisplayStrs28162 = DisplayFormats28162.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28162 = DisplayStrs28162.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28162 = DisplayStrs28162.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28162 = DisplayStrs28162.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28162").innerHTML = DisplayStrs28162; if (CountActives28162) //alert(SetTimeOutPeriods28162); setTimeout("CountBacks28162(" + (secs+CountSteppers28162) + ")", SetTimeOutPeriods28162); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28162)=="undefined") BackColors28162 = ""; if (typeof(ForeColors28162)=="undefined") ForeColors28162= "white"; if (typeof(TargetDates28162)=="undefined") TargetDates28162 = "06/13/2023 11:00:00 PM"; if (typeof(DisplayFormats28162)=="undefined") DisplayFormats28162 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28162)=="undefined") CountActives28162 = true; if (typeof(FinishMessages28162)=="undefined") FinishMessages28162 = ""; if (typeof(CountSteppers28162)!="number") CountSteppers28162 = -1; if (typeof(LeadingZeros28162)=="undefined") LeadingZeros28162 = true; CountSteppers28162 = Math.ceil(CountSteppers28162); if (CountSteppers28162 == 0) CountActives28162 = false; var SetTimeOutPeriods28162 = (Math.abs(CountSteppers28162)-1)*1000 + 990; puti(BackColors28162, ForeColors28162); var dthens28162 = new Date(TargetDates28162); var dnows28162 = new Date("05/11/2025 9:03:19 PM"); if(CountSteppers28162>0) ddiffs28162 = new Date(dnows28162-dthens28162); else ddiffs28162 = new Date(dthens28162-dnows28162); gsecss28162 = Math.floor(ddiffs28162.valueOf()/1000); CountBacks28162(gsecss28162);