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 (LeadingZeros27919 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27919(secs) { if (secs < 0) { document.getElementById("cntdwns27919").innerHTML = FinishMessages27919; return; } DisplayStrs27919 = DisplayFormats27919.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27919 = DisplayStrs27919.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27919 = DisplayStrs27919.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27919 = DisplayStrs27919.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27919").innerHTML = DisplayStrs27919; if (CountActives27919) //alert(SetTimeOutPeriods27919); setTimeout("CountBacks27919(" + (secs+CountSteppers27919) + ")", SetTimeOutPeriods27919); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27919)=="undefined") BackColors27919 = ""; if (typeof(ForeColors27919)=="undefined") ForeColors27919= "white"; if (typeof(TargetDates27919)=="undefined") TargetDates27919 = "03/27/2023 11:00:00 PM"; if (typeof(DisplayFormats27919)=="undefined") DisplayFormats27919 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27919)=="undefined") CountActives27919 = true; if (typeof(FinishMessages27919)=="undefined") FinishMessages27919 = ""; if (typeof(CountSteppers27919)!="number") CountSteppers27919 = -1; if (typeof(LeadingZeros27919)=="undefined") LeadingZeros27919 = true; CountSteppers27919 = Math.ceil(CountSteppers27919); if (CountSteppers27919 == 0) CountActives27919 = false; var SetTimeOutPeriods27919 = (Math.abs(CountSteppers27919)-1)*1000 + 990; puti(BackColors27919, ForeColors27919); var dthens27919 = new Date(TargetDates27919); var dnows27919 = new Date("05/13/2025 12:00:18 PM"); if(CountSteppers27919>0) ddiffs27919 = new Date(dnows27919-dthens27919); else ddiffs27919 = new Date(dthens27919-dnows27919); gsecss27919 = Math.floor(ddiffs27919.valueOf()/1000); CountBacks27919(gsecss27919);