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 (LeadingZeros31850 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31850(secs) { if (secs < 0) { document.getElementById("cntdwns31850").innerHTML = FinishMessages31850; return; } DisplayStrs31850 = DisplayFormats31850.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31850 = DisplayStrs31850.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31850 = DisplayStrs31850.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31850 = DisplayStrs31850.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31850").innerHTML = DisplayStrs31850; if (CountActives31850) //alert(SetTimeOutPeriods31850); setTimeout("CountBacks31850(" + (secs+CountSteppers31850) + ")", SetTimeOutPeriods31850); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31850)=="undefined") BackColors31850 = ""; if (typeof(ForeColors31850)=="undefined") ForeColors31850= "white"; if (typeof(TargetDates31850)=="undefined") TargetDates31850 = "02/24/2025 10:00:00 PM"; if (typeof(DisplayFormats31850)=="undefined") DisplayFormats31850 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31850)=="undefined") CountActives31850 = true; if (typeof(FinishMessages31850)=="undefined") FinishMessages31850 = ""; if (typeof(CountSteppers31850)!="number") CountSteppers31850 = -1; if (typeof(LeadingZeros31850)=="undefined") LeadingZeros31850 = true; CountSteppers31850 = Math.ceil(CountSteppers31850); if (CountSteppers31850 == 0) CountActives31850 = false; var SetTimeOutPeriods31850 = (Math.abs(CountSteppers31850)-1)*1000 + 990; puti(BackColors31850, ForeColors31850); var dthens31850 = new Date(TargetDates31850); var dnows31850 = new Date("02/22/2025 10:15:29 PM"); if(CountSteppers31850>0) ddiffs31850 = new Date(dnows31850-dthens31850); else ddiffs31850 = new Date(dthens31850-dnows31850); gsecss31850 = Math.floor(ddiffs31850.valueOf()/1000); CountBacks31850(gsecss31850);