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 (LeadingZeros30587 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30587(secs) { if (secs < 0) { document.getElementById("cntdwns30587").innerHTML = FinishMessages30587; return; } DisplayStrs30587 = DisplayFormats30587.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30587 = DisplayStrs30587.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30587 = DisplayStrs30587.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30587 = DisplayStrs30587.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30587").innerHTML = DisplayStrs30587; if (CountActives30587) //alert(SetTimeOutPeriods30587); setTimeout("CountBacks30587(" + (secs+CountSteppers30587) + ")", SetTimeOutPeriods30587); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30587)=="undefined") BackColors30587 = ""; if (typeof(ForeColors30587)=="undefined") ForeColors30587= "white"; if (typeof(TargetDates30587)=="undefined") TargetDates30587 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30587)=="undefined") DisplayFormats30587 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30587)=="undefined") CountActives30587 = true; if (typeof(FinishMessages30587)=="undefined") FinishMessages30587 = ""; if (typeof(CountSteppers30587)!="number") CountSteppers30587 = -1; if (typeof(LeadingZeros30587)=="undefined") LeadingZeros30587 = true; CountSteppers30587 = Math.ceil(CountSteppers30587); if (CountSteppers30587 == 0) CountActives30587 = false; var SetTimeOutPeriods30587 = (Math.abs(CountSteppers30587)-1)*1000 + 990; puti(BackColors30587, ForeColors30587); var dthens30587 = new Date(TargetDates30587); var dnows30587 = new Date("09/08/2024 3:48:07 AM"); if(CountSteppers30587>0) ddiffs30587 = new Date(dnows30587-dthens30587); else ddiffs30587 = new Date(dthens30587-dnows30587); gsecss30587 = Math.floor(ddiffs30587.valueOf()/1000); CountBacks30587(gsecss30587);