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 (LeadingZeros31057 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31057(secs) { if (secs < 0) { document.getElementById("cntdwns31057").innerHTML = FinishMessages31057; return; } DisplayStrs31057 = DisplayFormats31057.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31057 = DisplayStrs31057.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31057 = DisplayStrs31057.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31057 = DisplayStrs31057.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31057").innerHTML = DisplayStrs31057; if (CountActives31057) //alert(SetTimeOutPeriods31057); setTimeout("CountBacks31057(" + (secs+CountSteppers31057) + ")", SetTimeOutPeriods31057); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31057)=="undefined") BackColors31057 = ""; if (typeof(ForeColors31057)=="undefined") ForeColors31057= "white"; if (typeof(TargetDates31057)=="undefined") TargetDates31057 = "10/31/2024 9:00:00 PM"; if (typeof(DisplayFormats31057)=="undefined") DisplayFormats31057 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31057)=="undefined") CountActives31057 = true; if (typeof(FinishMessages31057)=="undefined") FinishMessages31057 = ""; if (typeof(CountSteppers31057)!="number") CountSteppers31057 = -1; if (typeof(LeadingZeros31057)=="undefined") LeadingZeros31057 = true; CountSteppers31057 = Math.ceil(CountSteppers31057); if (CountSteppers31057 == 0) CountActives31057 = false; var SetTimeOutPeriods31057 = (Math.abs(CountSteppers31057)-1)*1000 + 990; puti(BackColors31057, ForeColors31057); var dthens31057 = new Date(TargetDates31057); var dnows31057 = new Date("10/30/2024 1:26:13 PM"); if(CountSteppers31057>0) ddiffs31057 = new Date(dnows31057-dthens31057); else ddiffs31057 = new Date(dthens31057-dnows31057); gsecss31057 = Math.floor(ddiffs31057.valueOf()/1000); CountBacks31057(gsecss31057);