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 (LeadingZeros30824 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30824(secs) { if (secs < 0) { document.getElementById("cntdwns30824").innerHTML = FinishMessages30824; return; } DisplayStrs30824 = DisplayFormats30824.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30824 = DisplayStrs30824.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30824 = DisplayStrs30824.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30824 = DisplayStrs30824.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30824").innerHTML = DisplayStrs30824; if (CountActives30824) //alert(SetTimeOutPeriods30824); setTimeout("CountBacks30824(" + (secs+CountSteppers30824) + ")", SetTimeOutPeriods30824); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30824)=="undefined") BackColors30824 = ""; if (typeof(ForeColors30824)=="undefined") ForeColors30824= "white"; if (typeof(TargetDates30824)=="undefined") TargetDates30824 = "07/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30824)=="undefined") DisplayFormats30824 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30824)=="undefined") CountActives30824 = true; if (typeof(FinishMessages30824)=="undefined") FinishMessages30824 = ""; if (typeof(CountSteppers30824)!="number") CountSteppers30824 = -1; if (typeof(LeadingZeros30824)=="undefined") LeadingZeros30824 = true; CountSteppers30824 = Math.ceil(CountSteppers30824); if (CountSteppers30824 == 0) CountActives30824 = false; var SetTimeOutPeriods30824 = (Math.abs(CountSteppers30824)-1)*1000 + 990; puti(BackColors30824, ForeColors30824); var dthens30824 = new Date(TargetDates30824); var dnows30824 = new Date("10/18/2024 8:41:53 AM"); if(CountSteppers30824>0) ddiffs30824 = new Date(dnows30824-dthens30824); else ddiffs30824 = new Date(dthens30824-dnows30824); gsecss30824 = Math.floor(ddiffs30824.valueOf()/1000); CountBacks30824(gsecss30824);