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 (LeadingZeros31225 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31225(secs) { if (secs < 0) { document.getElementById("cntdwns31225").innerHTML = FinishMessages31225; return; } DisplayStrs31225 = DisplayFormats31225.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31225 = DisplayStrs31225.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31225 = DisplayStrs31225.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31225 = DisplayStrs31225.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31225").innerHTML = DisplayStrs31225; if (CountActives31225) //alert(SetTimeOutPeriods31225); setTimeout("CountBacks31225(" + (secs+CountSteppers31225) + ")", SetTimeOutPeriods31225); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31225)=="undefined") BackColors31225 = ""; if (typeof(ForeColors31225)=="undefined") ForeColors31225= "white"; if (typeof(TargetDates31225)=="undefined") TargetDates31225 = "11/01/2024 9:00:00 PM"; if (typeof(DisplayFormats31225)=="undefined") DisplayFormats31225 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31225)=="undefined") CountActives31225 = true; if (typeof(FinishMessages31225)=="undefined") FinishMessages31225 = ""; if (typeof(CountSteppers31225)!="number") CountSteppers31225 = -1; if (typeof(LeadingZeros31225)=="undefined") LeadingZeros31225 = true; CountSteppers31225 = Math.ceil(CountSteppers31225); if (CountSteppers31225 == 0) CountActives31225 = false; var SetTimeOutPeriods31225 = (Math.abs(CountSteppers31225)-1)*1000 + 990; puti(BackColors31225, ForeColors31225); var dthens31225 = new Date(TargetDates31225); var dnows31225 = new Date("10/31/2024 11:07:42 AM"); if(CountSteppers31225>0) ddiffs31225 = new Date(dnows31225-dthens31225); else ddiffs31225 = new Date(dthens31225-dnows31225); gsecss31225 = Math.floor(ddiffs31225.valueOf()/1000); CountBacks31225(gsecss31225);