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 (LeadingZeros31005 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31005(secs) { if (secs < 0) { document.getElementById("cntdwns31005").innerHTML = FinishMessages31005; return; } DisplayStrs31005 = DisplayFormats31005.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31005 = DisplayStrs31005.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31005 = DisplayStrs31005.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31005 = DisplayStrs31005.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31005").innerHTML = DisplayStrs31005; if (CountActives31005) //alert(SetTimeOutPeriods31005); setTimeout("CountBacks31005(" + (secs+CountSteppers31005) + ")", SetTimeOutPeriods31005); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31005)=="undefined") BackColors31005 = ""; if (typeof(ForeColors31005)=="undefined") ForeColors31005= "white"; if (typeof(TargetDates31005)=="undefined") TargetDates31005 = "11/01/2024 9:00:00 PM"; if (typeof(DisplayFormats31005)=="undefined") DisplayFormats31005 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31005)=="undefined") CountActives31005 = true; if (typeof(FinishMessages31005)=="undefined") FinishMessages31005 = ""; if (typeof(CountSteppers31005)!="number") CountSteppers31005 = -1; if (typeof(LeadingZeros31005)=="undefined") LeadingZeros31005 = true; CountSteppers31005 = Math.ceil(CountSteppers31005); if (CountSteppers31005 == 0) CountActives31005 = false; var SetTimeOutPeriods31005 = (Math.abs(CountSteppers31005)-1)*1000 + 990; puti(BackColors31005, ForeColors31005); var dthens31005 = new Date(TargetDates31005); var dnows31005 = new Date("10/31/2024 11:07:41 AM"); if(CountSteppers31005>0) ddiffs31005 = new Date(dnows31005-dthens31005); else ddiffs31005 = new Date(dthens31005-dnows31005); gsecss31005 = Math.floor(ddiffs31005.valueOf()/1000); CountBacks31005(gsecss31005);