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 (LeadingZeros31033 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31033(secs) { if (secs < 0) { document.getElementById("cntdwns31033").innerHTML = FinishMessages31033; return; } DisplayStrs31033 = DisplayFormats31033.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31033 = DisplayStrs31033.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31033 = DisplayStrs31033.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31033 = DisplayStrs31033.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31033").innerHTML = DisplayStrs31033; if (CountActives31033) //alert(SetTimeOutPeriods31033); setTimeout("CountBacks31033(" + (secs+CountSteppers31033) + ")", SetTimeOutPeriods31033); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31033)=="undefined") BackColors31033 = ""; if (typeof(ForeColors31033)=="undefined") ForeColors31033= "white"; if (typeof(TargetDates31033)=="undefined") TargetDates31033 = "11/01/2024 9:00:00 PM"; if (typeof(DisplayFormats31033)=="undefined") DisplayFormats31033 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31033)=="undefined") CountActives31033 = true; if (typeof(FinishMessages31033)=="undefined") FinishMessages31033 = ""; if (typeof(CountSteppers31033)!="number") CountSteppers31033 = -1; if (typeof(LeadingZeros31033)=="undefined") LeadingZeros31033 = true; CountSteppers31033 = Math.ceil(CountSteppers31033); if (CountSteppers31033 == 0) CountActives31033 = false; var SetTimeOutPeriods31033 = (Math.abs(CountSteppers31033)-1)*1000 + 990; puti(BackColors31033, ForeColors31033); var dthens31033 = new Date(TargetDates31033); var dnows31033 = new Date("10/31/2024 11:07:58 AM"); if(CountSteppers31033>0) ddiffs31033 = new Date(dnows31033-dthens31033); else ddiffs31033 = new Date(dthens31033-dnows31033); gsecss31033 = Math.floor(ddiffs31033.valueOf()/1000); CountBacks31033(gsecss31033);