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 (LeadingZeros31001 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31001(secs) { if (secs < 0) { document.getElementById("cntdwns31001").innerHTML = FinishMessages31001; return; } DisplayStrs31001 = DisplayFormats31001.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31001 = DisplayStrs31001.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31001 = DisplayStrs31001.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31001 = DisplayStrs31001.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31001").innerHTML = DisplayStrs31001; if (CountActives31001) //alert(SetTimeOutPeriods31001); setTimeout("CountBacks31001(" + (secs+CountSteppers31001) + ")", SetTimeOutPeriods31001); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31001)=="undefined") BackColors31001 = ""; if (typeof(ForeColors31001)=="undefined") ForeColors31001= "white"; if (typeof(TargetDates31001)=="undefined") TargetDates31001 = "10/26/2024 10:00:00 PM"; if (typeof(DisplayFormats31001)=="undefined") DisplayFormats31001 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31001)=="undefined") CountActives31001 = true; if (typeof(FinishMessages31001)=="undefined") FinishMessages31001 = ""; if (typeof(CountSteppers31001)!="number") CountSteppers31001 = -1; if (typeof(LeadingZeros31001)=="undefined") LeadingZeros31001 = true; CountSteppers31001 = Math.ceil(CountSteppers31001); if (CountSteppers31001 == 0) CountActives31001 = false; var SetTimeOutPeriods31001 = (Math.abs(CountSteppers31001)-1)*1000 + 990; puti(BackColors31001, ForeColors31001); var dthens31001 = new Date(TargetDates31001); var dnows31001 = new Date("10/26/2024 7:52:11 AM"); if(CountSteppers31001>0) ddiffs31001 = new Date(dnows31001-dthens31001); else ddiffs31001 = new Date(dthens31001-dnows31001); gsecss31001 = Math.floor(ddiffs31001.valueOf()/1000); CountBacks31001(gsecss31001);