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 (LeadingZeros30815 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30815(secs) { if (secs < 0) { document.getElementById("cntdwns30815").innerHTML = FinishMessages30815; return; } DisplayStrs30815 = DisplayFormats30815.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30815 = DisplayStrs30815.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30815 = DisplayStrs30815.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30815 = DisplayStrs30815.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30815").innerHTML = DisplayStrs30815; if (CountActives30815) //alert(SetTimeOutPeriods30815); setTimeout("CountBacks30815(" + (secs+CountSteppers30815) + ")", SetTimeOutPeriods30815); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30815)=="undefined") BackColors30815 = ""; if (typeof(ForeColors30815)=="undefined") ForeColors30815= "white"; if (typeof(TargetDates30815)=="undefined") TargetDates30815 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30815)=="undefined") DisplayFormats30815 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30815)=="undefined") CountActives30815 = true; if (typeof(FinishMessages30815)=="undefined") FinishMessages30815 = ""; if (typeof(CountSteppers30815)!="number") CountSteppers30815 = -1; if (typeof(LeadingZeros30815)=="undefined") LeadingZeros30815 = true; CountSteppers30815 = Math.ceil(CountSteppers30815); if (CountSteppers30815 == 0) CountActives30815 = false; var SetTimeOutPeriods30815 = (Math.abs(CountSteppers30815)-1)*1000 + 990; puti(BackColors30815, ForeColors30815); var dthens30815 = new Date(TargetDates30815); var dnows30815 = new Date("09/08/2024 2:06:33 AM"); if(CountSteppers30815>0) ddiffs30815 = new Date(dnows30815-dthens30815); else ddiffs30815 = new Date(dthens30815-dnows30815); gsecss30815 = Math.floor(ddiffs30815.valueOf()/1000); CountBacks30815(gsecss30815);