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 (LeadingZeros27978 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27978(secs) { if (secs < 0) { document.getElementById("cntdwns27978").innerHTML = FinishMessages27978; return; } DisplayStrs27978 = DisplayFormats27978.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27978 = DisplayStrs27978.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27978 = DisplayStrs27978.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27978 = DisplayStrs27978.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27978").innerHTML = DisplayStrs27978; if (CountActives27978) //alert(SetTimeOutPeriods27978); setTimeout("CountBacks27978(" + (secs+CountSteppers27978) + ")", SetTimeOutPeriods27978); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27978)=="undefined") BackColors27978 = ""; if (typeof(ForeColors27978)=="undefined") ForeColors27978= "white"; if (typeof(TargetDates27978)=="undefined") TargetDates27978 = "06/06/2023 11:00:00 PM"; if (typeof(DisplayFormats27978)=="undefined") DisplayFormats27978 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27978)=="undefined") CountActives27978 = true; if (typeof(FinishMessages27978)=="undefined") FinishMessages27978 = ""; if (typeof(CountSteppers27978)!="number") CountSteppers27978 = -1; if (typeof(LeadingZeros27978)=="undefined") LeadingZeros27978 = true; CountSteppers27978 = Math.ceil(CountSteppers27978); if (CountSteppers27978 == 0) CountActives27978 = false; var SetTimeOutPeriods27978 = (Math.abs(CountSteppers27978)-1)*1000 + 990; puti(BackColors27978, ForeColors27978); var dthens27978 = new Date(TargetDates27978); var dnows27978 = new Date("05/11/2025 10:55:59 AM"); if(CountSteppers27978>0) ddiffs27978 = new Date(dnows27978-dthens27978); else ddiffs27978 = new Date(dthens27978-dnows27978); gsecss27978 = Math.floor(ddiffs27978.valueOf()/1000); CountBacks27978(gsecss27978);