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 (LeadingZeros31815 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31815(secs) { if (secs < 0) { document.getElementById("cntdwns31815").innerHTML = FinishMessages31815; return; } DisplayStrs31815 = DisplayFormats31815.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31815 = DisplayStrs31815.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31815 = DisplayStrs31815.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31815 = DisplayStrs31815.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31815").innerHTML = DisplayStrs31815; if (CountActives31815) //alert(SetTimeOutPeriods31815); setTimeout("CountBacks31815(" + (secs+CountSteppers31815) + ")", SetTimeOutPeriods31815); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31815)=="undefined") BackColors31815 = ""; if (typeof(ForeColors31815)=="undefined") ForeColors31815= "white"; if (typeof(TargetDates31815)=="undefined") TargetDates31815 = "02/07/2025 10:00:00 PM"; if (typeof(DisplayFormats31815)=="undefined") DisplayFormats31815 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31815)=="undefined") CountActives31815 = true; if (typeof(FinishMessages31815)=="undefined") FinishMessages31815 = ""; if (typeof(CountSteppers31815)!="number") CountSteppers31815 = -1; if (typeof(LeadingZeros31815)=="undefined") LeadingZeros31815 = true; CountSteppers31815 = Math.ceil(CountSteppers31815); if (CountSteppers31815 == 0) CountActives31815 = false; var SetTimeOutPeriods31815 = (Math.abs(CountSteppers31815)-1)*1000 + 990; puti(BackColors31815, ForeColors31815); var dthens31815 = new Date(TargetDates31815); var dnows31815 = new Date("02/05/2025 7:52:11 AM"); if(CountSteppers31815>0) ddiffs31815 = new Date(dnows31815-dthens31815); else ddiffs31815 = new Date(dthens31815-dnows31815); gsecss31815 = Math.floor(ddiffs31815.valueOf()/1000); CountBacks31815(gsecss31815);