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 (LeadingZeros31859 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31859(secs) { if (secs < 0) { document.getElementById("cntdwns31859").innerHTML = FinishMessages31859; return; } DisplayStrs31859 = DisplayFormats31859.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31859 = DisplayStrs31859.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31859 = DisplayStrs31859.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31859 = DisplayStrs31859.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31859").innerHTML = DisplayStrs31859; if (CountActives31859) //alert(SetTimeOutPeriods31859); setTimeout("CountBacks31859(" + (secs+CountSteppers31859) + ")", SetTimeOutPeriods31859); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31859)=="undefined") BackColors31859 = ""; if (typeof(ForeColors31859)=="undefined") ForeColors31859= "white"; if (typeof(TargetDates31859)=="undefined") TargetDates31859 = "02/24/2025 10:00:00 PM"; if (typeof(DisplayFormats31859)=="undefined") DisplayFormats31859 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31859)=="undefined") CountActives31859 = true; if (typeof(FinishMessages31859)=="undefined") FinishMessages31859 = ""; if (typeof(CountSteppers31859)!="number") CountSteppers31859 = -1; if (typeof(LeadingZeros31859)=="undefined") LeadingZeros31859 = true; CountSteppers31859 = Math.ceil(CountSteppers31859); if (CountSteppers31859 == 0) CountActives31859 = false; var SetTimeOutPeriods31859 = (Math.abs(CountSteppers31859)-1)*1000 + 990; puti(BackColors31859, ForeColors31859); var dthens31859 = new Date(TargetDates31859); var dnows31859 = new Date("02/22/2025 10:52:21 AM"); if(CountSteppers31859>0) ddiffs31859 = new Date(dnows31859-dthens31859); else ddiffs31859 = new Date(dthens31859-dnows31859); gsecss31859 = Math.floor(ddiffs31859.valueOf()/1000); CountBacks31859(gsecss31859);