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 (LeadingZeros27508 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27508(secs) { if (secs < 0) { document.getElementById("cntdwns27508").innerHTML = FinishMessages27508; return; } DisplayStrs27508 = DisplayFormats27508.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27508 = DisplayStrs27508.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27508 = DisplayStrs27508.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27508 = DisplayStrs27508.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27508").innerHTML = DisplayStrs27508; if (CountActives27508) //alert(SetTimeOutPeriods27508); setTimeout("CountBacks27508(" + (secs+CountSteppers27508) + ")", SetTimeOutPeriods27508); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27508)=="undefined") BackColors27508 = ""; if (typeof(ForeColors27508)=="undefined") ForeColors27508= "white"; if (typeof(TargetDates27508)=="undefined") TargetDates27508 = "06/12/2023 10:00:00 PM"; if (typeof(DisplayFormats27508)=="undefined") DisplayFormats27508 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27508)=="undefined") CountActives27508 = true; if (typeof(FinishMessages27508)=="undefined") FinishMessages27508 = ""; if (typeof(CountSteppers27508)!="number") CountSteppers27508 = -1; if (typeof(LeadingZeros27508)=="undefined") LeadingZeros27508 = true; CountSteppers27508 = Math.ceil(CountSteppers27508); if (CountSteppers27508 == 0) CountActives27508 = false; var SetTimeOutPeriods27508 = (Math.abs(CountSteppers27508)-1)*1000 + 990; puti(BackColors27508, ForeColors27508); var dthens27508 = new Date(TargetDates27508); var dnows27508 = new Date("05/11/2025 10:57:20 AM"); if(CountSteppers27508>0) ddiffs27508 = new Date(dnows27508-dthens27508); else ddiffs27508 = new Date(dthens27508-dnows27508); gsecss27508 = Math.floor(ddiffs27508.valueOf()/1000); CountBacks27508(gsecss27508);