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 (LeadingZeros27545 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27545(secs) { if (secs < 0) { document.getElementById("cntdwns27545").innerHTML = FinishMessages27545; return; } DisplayStrs27545 = DisplayFormats27545.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27545 = DisplayStrs27545.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27545 = DisplayStrs27545.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27545 = DisplayStrs27545.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27545").innerHTML = DisplayStrs27545; if (CountActives27545) //alert(SetTimeOutPeriods27545); setTimeout("CountBacks27545(" + (secs+CountSteppers27545) + ")", SetTimeOutPeriods27545); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27545)=="undefined") BackColors27545 = ""; if (typeof(ForeColors27545)=="undefined") ForeColors27545= "white"; if (typeof(TargetDates27545)=="undefined") TargetDates27545 = "06/06/2023 11:00:00 PM"; if (typeof(DisplayFormats27545)=="undefined") DisplayFormats27545 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27545)=="undefined") CountActives27545 = true; if (typeof(FinishMessages27545)=="undefined") FinishMessages27545 = ""; if (typeof(CountSteppers27545)!="number") CountSteppers27545 = -1; if (typeof(LeadingZeros27545)=="undefined") LeadingZeros27545 = true; CountSteppers27545 = Math.ceil(CountSteppers27545); if (CountSteppers27545 == 0) CountActives27545 = false; var SetTimeOutPeriods27545 = (Math.abs(CountSteppers27545)-1)*1000 + 990; puti(BackColors27545, ForeColors27545); var dthens27545 = new Date(TargetDates27545); var dnows27545 = new Date("05/11/2025 2:14:17 PM"); if(CountSteppers27545>0) ddiffs27545 = new Date(dnows27545-dthens27545); else ddiffs27545 = new Date(dthens27545-dnows27545); gsecss27545 = Math.floor(ddiffs27545.valueOf()/1000); CountBacks27545(gsecss27545);