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 (LeadingZeros31002 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31002(secs) { if (secs < 0) { document.getElementById("cntdwns31002").innerHTML = FinishMessages31002; return; } DisplayStrs31002 = DisplayFormats31002.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31002 = DisplayStrs31002.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31002 = DisplayStrs31002.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31002 = DisplayStrs31002.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31002").innerHTML = DisplayStrs31002; if (CountActives31002) //alert(SetTimeOutPeriods31002); setTimeout("CountBacks31002(" + (secs+CountSteppers31002) + ")", SetTimeOutPeriods31002); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31002)=="undefined") BackColors31002 = ""; if (typeof(ForeColors31002)=="undefined") ForeColors31002= "white"; if (typeof(TargetDates31002)=="undefined") TargetDates31002 = "10/26/2024 10:00:00 PM"; if (typeof(DisplayFormats31002)=="undefined") DisplayFormats31002 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31002)=="undefined") CountActives31002 = true; if (typeof(FinishMessages31002)=="undefined") FinishMessages31002 = ""; if (typeof(CountSteppers31002)!="number") CountSteppers31002 = -1; if (typeof(LeadingZeros31002)=="undefined") LeadingZeros31002 = true; CountSteppers31002 = Math.ceil(CountSteppers31002); if (CountSteppers31002 == 0) CountActives31002 = false; var SetTimeOutPeriods31002 = (Math.abs(CountSteppers31002)-1)*1000 + 990; puti(BackColors31002, ForeColors31002); var dthens31002 = new Date(TargetDates31002); var dnows31002 = new Date("10/26/2024 7:52:11 AM"); if(CountSteppers31002>0) ddiffs31002 = new Date(dnows31002-dthens31002); else ddiffs31002 = new Date(dthens31002-dnows31002); gsecss31002 = Math.floor(ddiffs31002.valueOf()/1000); CountBacks31002(gsecss31002);