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 (LeadingZeros30971 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30971(secs) { if (secs < 0) { document.getElementById("cntdwns30971").innerHTML = FinishMessages30971; return; } DisplayStrs30971 = DisplayFormats30971.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30971 = DisplayStrs30971.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30971 = DisplayStrs30971.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30971 = DisplayStrs30971.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30971").innerHTML = DisplayStrs30971; if (CountActives30971) //alert(SetTimeOutPeriods30971); setTimeout("CountBacks30971(" + (secs+CountSteppers30971) + ")", SetTimeOutPeriods30971); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30971)=="undefined") BackColors30971 = ""; if (typeof(ForeColors30971)=="undefined") ForeColors30971= "white"; if (typeof(TargetDates30971)=="undefined") TargetDates30971 = "11/01/2024 8:00:00 PM"; if (typeof(DisplayFormats30971)=="undefined") DisplayFormats30971 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30971)=="undefined") CountActives30971 = true; if (typeof(FinishMessages30971)=="undefined") FinishMessages30971 = ""; if (typeof(CountSteppers30971)!="number") CountSteppers30971 = -1; if (typeof(LeadingZeros30971)=="undefined") LeadingZeros30971 = true; CountSteppers30971 = Math.ceil(CountSteppers30971); if (CountSteppers30971 == 0) CountActives30971 = false; var SetTimeOutPeriods30971 = (Math.abs(CountSteppers30971)-1)*1000 + 990; puti(BackColors30971, ForeColors30971); var dthens30971 = new Date(TargetDates30971); var dnows30971 = new Date("10/31/2024 11:07:57 AM"); if(CountSteppers30971>0) ddiffs30971 = new Date(dnows30971-dthens30971); else ddiffs30971 = new Date(dthens30971-dnows30971); gsecss30971 = Math.floor(ddiffs30971.valueOf()/1000); CountBacks30971(gsecss30971);