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 (LeadingZeros31700 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31700(secs) { if (secs < 0) { document.getElementById("cntdwns31700").innerHTML = FinishMessages31700; return; } DisplayStrs31700 = DisplayFormats31700.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31700 = DisplayStrs31700.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31700 = DisplayStrs31700.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31700 = DisplayStrs31700.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31700").innerHTML = DisplayStrs31700; if (CountActives31700) //alert(SetTimeOutPeriods31700); setTimeout("CountBacks31700(" + (secs+CountSteppers31700) + ")", SetTimeOutPeriods31700); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31700)=="undefined") BackColors31700 = ""; if (typeof(ForeColors31700)=="undefined") ForeColors31700= "white"; if (typeof(TargetDates31700)=="undefined") TargetDates31700 = "02/24/2025 10:00:00 PM"; if (typeof(DisplayFormats31700)=="undefined") DisplayFormats31700 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31700)=="undefined") CountActives31700 = true; if (typeof(FinishMessages31700)=="undefined") FinishMessages31700 = ""; if (typeof(CountSteppers31700)!="number") CountSteppers31700 = -1; if (typeof(LeadingZeros31700)=="undefined") LeadingZeros31700 = true; CountSteppers31700 = Math.ceil(CountSteppers31700); if (CountSteppers31700 == 0) CountActives31700 = false; var SetTimeOutPeriods31700 = (Math.abs(CountSteppers31700)-1)*1000 + 990; puti(BackColors31700, ForeColors31700); var dthens31700 = new Date(TargetDates31700); var dnows31700 = new Date("02/22/2025 9:30:23 PM"); if(CountSteppers31700>0) ddiffs31700 = new Date(dnows31700-dthens31700); else ddiffs31700 = new Date(dthens31700-dnows31700); gsecss31700 = Math.floor(ddiffs31700.valueOf()/1000); CountBacks31700(gsecss31700);