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 (LeadingZeros30711 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30711(secs) { if (secs < 0) { document.getElementById("cntdwns30711").innerHTML = FinishMessages30711; return; } DisplayStrs30711 = DisplayFormats30711.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30711 = DisplayStrs30711.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30711 = DisplayStrs30711.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30711 = DisplayStrs30711.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30711").innerHTML = DisplayStrs30711; if (CountActives30711) //alert(SetTimeOutPeriods30711); setTimeout("CountBacks30711(" + (secs+CountSteppers30711) + ")", SetTimeOutPeriods30711); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30711)=="undefined") BackColors30711 = ""; if (typeof(ForeColors30711)=="undefined") ForeColors30711= "white"; if (typeof(TargetDates30711)=="undefined") TargetDates30711 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30711)=="undefined") DisplayFormats30711 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30711)=="undefined") CountActives30711 = true; if (typeof(FinishMessages30711)=="undefined") FinishMessages30711 = ""; if (typeof(CountSteppers30711)!="number") CountSteppers30711 = -1; if (typeof(LeadingZeros30711)=="undefined") LeadingZeros30711 = true; CountSteppers30711 = Math.ceil(CountSteppers30711); if (CountSteppers30711 == 0) CountActives30711 = false; var SetTimeOutPeriods30711 = (Math.abs(CountSteppers30711)-1)*1000 + 990; puti(BackColors30711, ForeColors30711); var dthens30711 = new Date(TargetDates30711); var dnows30711 = new Date("10/18/2024 6:01:59 AM"); if(CountSteppers30711>0) ddiffs30711 = new Date(dnows30711-dthens30711); else ddiffs30711 = new Date(dthens30711-dnows30711); gsecss30711 = Math.floor(ddiffs30711.valueOf()/1000); CountBacks30711(gsecss30711);