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 (LeadingZeros31612 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31612(secs) { if (secs < 0) { document.getElementById("cntdwns31612").innerHTML = FinishMessages31612; return; } DisplayStrs31612 = DisplayFormats31612.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31612 = DisplayStrs31612.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31612 = DisplayStrs31612.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31612 = DisplayStrs31612.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31612").innerHTML = DisplayStrs31612; if (CountActives31612) //alert(SetTimeOutPeriods31612); setTimeout("CountBacks31612(" + (secs+CountSteppers31612) + ")", SetTimeOutPeriods31612); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31612)=="undefined") BackColors31612 = ""; if (typeof(ForeColors31612)=="undefined") ForeColors31612= "white"; if (typeof(TargetDates31612)=="undefined") TargetDates31612 = "02/02/2025 10:00:00 PM"; if (typeof(DisplayFormats31612)=="undefined") DisplayFormats31612 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31612)=="undefined") CountActives31612 = true; if (typeof(FinishMessages31612)=="undefined") FinishMessages31612 = ""; if (typeof(CountSteppers31612)!="number") CountSteppers31612 = -1; if (typeof(LeadingZeros31612)=="undefined") LeadingZeros31612 = true; CountSteppers31612 = Math.ceil(CountSteppers31612); if (CountSteppers31612 == 0) CountActives31612 = false; var SetTimeOutPeriods31612 = (Math.abs(CountSteppers31612)-1)*1000 + 990; puti(BackColors31612, ForeColors31612); var dthens31612 = new Date(TargetDates31612); var dnows31612 = new Date("01/31/2025 11:07:10 AM"); if(CountSteppers31612>0) ddiffs31612 = new Date(dnows31612-dthens31612); else ddiffs31612 = new Date(dthens31612-dnows31612); gsecss31612 = Math.floor(ddiffs31612.valueOf()/1000); CountBacks31612(gsecss31612);