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 (LeadingZeros28213 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28213(secs) { if (secs < 0) { document.getElementById("cntdwns28213").innerHTML = FinishMessages28213; return; } DisplayStrs28213 = DisplayFormats28213.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28213 = DisplayStrs28213.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28213 = DisplayStrs28213.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28213 = DisplayStrs28213.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28213").innerHTML = DisplayStrs28213; if (CountActives28213) //alert(SetTimeOutPeriods28213); setTimeout("CountBacks28213(" + (secs+CountSteppers28213) + ")", SetTimeOutPeriods28213); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28213)=="undefined") BackColors28213 = ""; if (typeof(ForeColors28213)=="undefined") ForeColors28213= "white"; if (typeof(TargetDates28213)=="undefined") TargetDates28213 = "06/05/2023 10:00:00 PM"; if (typeof(DisplayFormats28213)=="undefined") DisplayFormats28213 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28213)=="undefined") CountActives28213 = true; if (typeof(FinishMessages28213)=="undefined") FinishMessages28213 = ""; if (typeof(CountSteppers28213)!="number") CountSteppers28213 = -1; if (typeof(LeadingZeros28213)=="undefined") LeadingZeros28213 = true; CountSteppers28213 = Math.ceil(CountSteppers28213); if (CountSteppers28213 == 0) CountActives28213 = false; var SetTimeOutPeriods28213 = (Math.abs(CountSteppers28213)-1)*1000 + 990; puti(BackColors28213, ForeColors28213); var dthens28213 = new Date(TargetDates28213); var dnows28213 = new Date("05/09/2025 10:07:49 AM"); if(CountSteppers28213>0) ddiffs28213 = new Date(dnows28213-dthens28213); else ddiffs28213 = new Date(dthens28213-dnows28213); gsecss28213 = Math.floor(ddiffs28213.valueOf()/1000); CountBacks28213(gsecss28213);