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 (LeadingZeros28563 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28563(secs) { if (secs < 0) { document.getElementById("cntdwns28563").innerHTML = FinishMessages28563; return; } DisplayStrs28563 = DisplayFormats28563.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28563 = DisplayStrs28563.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28563 = DisplayStrs28563.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28563 = DisplayStrs28563.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28563").innerHTML = DisplayStrs28563; if (CountActives28563) //alert(SetTimeOutPeriods28563); setTimeout("CountBacks28563(" + (secs+CountSteppers28563) + ")", SetTimeOutPeriods28563); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28563)=="undefined") BackColors28563 = ""; if (typeof(ForeColors28563)=="undefined") ForeColors28563= "white"; if (typeof(TargetDates28563)=="undefined") TargetDates28563 = "05/31/2023 10:00:00 PM"; if (typeof(DisplayFormats28563)=="undefined") DisplayFormats28563 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28563)=="undefined") CountActives28563 = true; if (typeof(FinishMessages28563)=="undefined") FinishMessages28563 = ""; if (typeof(CountSteppers28563)!="number") CountSteppers28563 = -1; if (typeof(LeadingZeros28563)=="undefined") LeadingZeros28563 = true; CountSteppers28563 = Math.ceil(CountSteppers28563); if (CountSteppers28563 == 0) CountActives28563 = false; var SetTimeOutPeriods28563 = (Math.abs(CountSteppers28563)-1)*1000 + 990; puti(BackColors28563, ForeColors28563); var dthens28563 = new Date(TargetDates28563); var dnows28563 = new Date("05/09/2025 10:08:42 AM"); if(CountSteppers28563>0) ddiffs28563 = new Date(dnows28563-dthens28563); else ddiffs28563 = new Date(dthens28563-dnows28563); gsecss28563 = Math.floor(ddiffs28563.valueOf()/1000); CountBacks28563(gsecss28563);