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 (LeadingZeros31857 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31857(secs) { if (secs < 0) { document.getElementById("cntdwns31857").innerHTML = FinishMessages31857; return; } DisplayStrs31857 = DisplayFormats31857.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31857 = DisplayStrs31857.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31857 = DisplayStrs31857.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31857 = DisplayStrs31857.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31857").innerHTML = DisplayStrs31857; if (CountActives31857) //alert(SetTimeOutPeriods31857); setTimeout("CountBacks31857(" + (secs+CountSteppers31857) + ")", SetTimeOutPeriods31857); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31857)=="undefined") BackColors31857 = ""; if (typeof(ForeColors31857)=="undefined") ForeColors31857= "white"; if (typeof(TargetDates31857)=="undefined") TargetDates31857 = "02/24/2025 10:00:00 PM"; if (typeof(DisplayFormats31857)=="undefined") DisplayFormats31857 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31857)=="undefined") CountActives31857 = true; if (typeof(FinishMessages31857)=="undefined") FinishMessages31857 = ""; if (typeof(CountSteppers31857)!="number") CountSteppers31857 = -1; if (typeof(LeadingZeros31857)=="undefined") LeadingZeros31857 = true; CountSteppers31857 = Math.ceil(CountSteppers31857); if (CountSteppers31857 == 0) CountActives31857 = false; var SetTimeOutPeriods31857 = (Math.abs(CountSteppers31857)-1)*1000 + 990; puti(BackColors31857, ForeColors31857); var dthens31857 = new Date(TargetDates31857); var dnows31857 = new Date("02/22/2025 9:27:05 PM"); if(CountSteppers31857>0) ddiffs31857 = new Date(dnows31857-dthens31857); else ddiffs31857 = new Date(dthens31857-dnows31857); gsecss31857 = Math.floor(ddiffs31857.valueOf()/1000); CountBacks31857(gsecss31857);