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 (LeadingZeros27777 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27777(secs) { if (secs < 0) { document.getElementById("cntdwns27777").innerHTML = FinishMessages27777; return; } DisplayStrs27777 = DisplayFormats27777.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27777 = DisplayStrs27777.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27777 = DisplayStrs27777.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27777 = DisplayStrs27777.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27777").innerHTML = DisplayStrs27777; if (CountActives27777) //alert(SetTimeOutPeriods27777); setTimeout("CountBacks27777(" + (secs+CountSteppers27777) + ")", SetTimeOutPeriods27777); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27777)=="undefined") BackColors27777 = ""; if (typeof(ForeColors27777)=="undefined") ForeColors27777= "white"; if (typeof(TargetDates27777)=="undefined") TargetDates27777 = "04/01/2023 11:00:00 PM"; if (typeof(DisplayFormats27777)=="undefined") DisplayFormats27777 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27777)=="undefined") CountActives27777 = true; if (typeof(FinishMessages27777)=="undefined") FinishMessages27777 = ""; if (typeof(CountSteppers27777)!="number") CountSteppers27777 = -1; if (typeof(LeadingZeros27777)=="undefined") LeadingZeros27777 = true; CountSteppers27777 = Math.ceil(CountSteppers27777); if (CountSteppers27777 == 0) CountActives27777 = false; var SetTimeOutPeriods27777 = (Math.abs(CountSteppers27777)-1)*1000 + 990; puti(BackColors27777, ForeColors27777); var dthens27777 = new Date(TargetDates27777); var dnows27777 = new Date("05/13/2025 11:57:40 AM"); if(CountSteppers27777>0) ddiffs27777 = new Date(dnows27777-dthens27777); else ddiffs27777 = new Date(dthens27777-dnows27777); gsecss27777 = Math.floor(ddiffs27777.valueOf()/1000); CountBacks27777(gsecss27777);