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 (LeadingZeros31024 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31024(secs) { if (secs < 0) { document.getElementById("cntdwns31024").innerHTML = FinishMessages31024; return; } DisplayStrs31024 = DisplayFormats31024.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31024 = DisplayStrs31024.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31024 = DisplayStrs31024.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31024 = DisplayStrs31024.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31024").innerHTML = DisplayStrs31024; if (CountActives31024) //alert(SetTimeOutPeriods31024); setTimeout("CountBacks31024(" + (secs+CountSteppers31024) + ")", SetTimeOutPeriods31024); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31024)=="undefined") BackColors31024 = ""; if (typeof(ForeColors31024)=="undefined") ForeColors31024= "white"; if (typeof(TargetDates31024)=="undefined") TargetDates31024 = "11/15/2024 9:00:00 PM"; if (typeof(DisplayFormats31024)=="undefined") DisplayFormats31024 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31024)=="undefined") CountActives31024 = true; if (typeof(FinishMessages31024)=="undefined") FinishMessages31024 = ""; if (typeof(CountSteppers31024)!="number") CountSteppers31024 = -1; if (typeof(LeadingZeros31024)=="undefined") LeadingZeros31024 = true; CountSteppers31024 = Math.ceil(CountSteppers31024); if (CountSteppers31024 == 0) CountActives31024 = false; var SetTimeOutPeriods31024 = (Math.abs(CountSteppers31024)-1)*1000 + 990; puti(BackColors31024, ForeColors31024); var dthens31024 = new Date(TargetDates31024); var dnows31024 = new Date("11/13/2024 7:57:16 AM"); if(CountSteppers31024>0) ddiffs31024 = new Date(dnows31024-dthens31024); else ddiffs31024 = new Date(dthens31024-dnows31024); gsecss31024 = Math.floor(ddiffs31024.valueOf()/1000); CountBacks31024(gsecss31024);