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 (LeadingZeros31547 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31547(secs) { if (secs < 0) { document.getElementById("cntdwns31547").innerHTML = FinishMessages31547; return; } DisplayStrs31547 = DisplayFormats31547.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31547 = DisplayStrs31547.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31547 = DisplayStrs31547.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31547 = DisplayStrs31547.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31547").innerHTML = DisplayStrs31547; if (CountActives31547) //alert(SetTimeOutPeriods31547); setTimeout("CountBacks31547(" + (secs+CountSteppers31547) + ")", SetTimeOutPeriods31547); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31547)=="undefined") BackColors31547 = ""; if (typeof(ForeColors31547)=="undefined") ForeColors31547= "white"; if (typeof(TargetDates31547)=="undefined") TargetDates31547 = "02/24/2025 10:00:00 PM"; if (typeof(DisplayFormats31547)=="undefined") DisplayFormats31547 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31547)=="undefined") CountActives31547 = true; if (typeof(FinishMessages31547)=="undefined") FinishMessages31547 = ""; if (typeof(CountSteppers31547)!="number") CountSteppers31547 = -1; if (typeof(LeadingZeros31547)=="undefined") LeadingZeros31547 = true; CountSteppers31547 = Math.ceil(CountSteppers31547); if (CountSteppers31547 == 0) CountActives31547 = false; var SetTimeOutPeriods31547 = (Math.abs(CountSteppers31547)-1)*1000 + 990; puti(BackColors31547, ForeColors31547); var dthens31547 = new Date(TargetDates31547); var dnows31547 = new Date("02/22/2025 9:32:10 PM"); if(CountSteppers31547>0) ddiffs31547 = new Date(dnows31547-dthens31547); else ddiffs31547 = new Date(dthens31547-dnows31547); gsecss31547 = Math.floor(ddiffs31547.valueOf()/1000); CountBacks31547(gsecss31547);