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 (LeadingZeros30986 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30986(secs) { if (secs < 0) { document.getElementById("cntdwns30986").innerHTML = FinishMessages30986; return; } DisplayStrs30986 = DisplayFormats30986.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30986 = DisplayStrs30986.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30986 = DisplayStrs30986.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30986 = DisplayStrs30986.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30986").innerHTML = DisplayStrs30986; if (CountActives30986) //alert(SetTimeOutPeriods30986); setTimeout("CountBacks30986(" + (secs+CountSteppers30986) + ")", SetTimeOutPeriods30986); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30986)=="undefined") BackColors30986 = ""; if (typeof(ForeColors30986)=="undefined") ForeColors30986= "white"; if (typeof(TargetDates30986)=="undefined") TargetDates30986 = "11/02/2024 9:00:00 PM"; if (typeof(DisplayFormats30986)=="undefined") DisplayFormats30986 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30986)=="undefined") CountActives30986 = true; if (typeof(FinishMessages30986)=="undefined") FinishMessages30986 = ""; if (typeof(CountSteppers30986)!="number") CountSteppers30986 = -1; if (typeof(LeadingZeros30986)=="undefined") LeadingZeros30986 = true; CountSteppers30986 = Math.ceil(CountSteppers30986); if (CountSteppers30986 == 0) CountActives30986 = false; var SetTimeOutPeriods30986 = (Math.abs(CountSteppers30986)-1)*1000 + 990; puti(BackColors30986, ForeColors30986); var dthens30986 = new Date(TargetDates30986); var dnows30986 = new Date("10/31/2024 11:07:58 AM"); if(CountSteppers30986>0) ddiffs30986 = new Date(dnows30986-dthens30986); else ddiffs30986 = new Date(dthens30986-dnows30986); gsecss30986 = Math.floor(ddiffs30986.valueOf()/1000); CountBacks30986(gsecss30986);