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 (LeadingZeros31416 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31416(secs) { if (secs < 0) { document.getElementById("cntdwns31416").innerHTML = FinishMessages31416; return; } DisplayStrs31416 = DisplayFormats31416.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31416 = DisplayStrs31416.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31416 = DisplayStrs31416.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31416 = DisplayStrs31416.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31416").innerHTML = DisplayStrs31416; if (CountActives31416) //alert(SetTimeOutPeriods31416); setTimeout("CountBacks31416(" + (secs+CountSteppers31416) + ")", SetTimeOutPeriods31416); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31416)=="undefined") BackColors31416 = ""; if (typeof(ForeColors31416)=="undefined") ForeColors31416= "white"; if (typeof(TargetDates31416)=="undefined") TargetDates31416 = "11/16/2024 10:00:00 PM"; if (typeof(DisplayFormats31416)=="undefined") DisplayFormats31416 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31416)=="undefined") CountActives31416 = true; if (typeof(FinishMessages31416)=="undefined") FinishMessages31416 = ""; if (typeof(CountSteppers31416)!="number") CountSteppers31416 = -1; if (typeof(LeadingZeros31416)=="undefined") LeadingZeros31416 = true; CountSteppers31416 = Math.ceil(CountSteppers31416); if (CountSteppers31416 == 0) CountActives31416 = false; var SetTimeOutPeriods31416 = (Math.abs(CountSteppers31416)-1)*1000 + 990; puti(BackColors31416, ForeColors31416); var dthens31416 = new Date(TargetDates31416); var dnows31416 = new Date("11/14/2024 3:19:14 PM"); if(CountSteppers31416>0) ddiffs31416 = new Date(dnows31416-dthens31416); else ddiffs31416 = new Date(dthens31416-dnows31416); gsecss31416 = Math.floor(ddiffs31416.valueOf()/1000); CountBacks31416(gsecss31416);