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 (LeadingZeros30285 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30285(secs) { if (secs < 0) { document.getElementById("cntdwns30285").innerHTML = FinishMessages30285; return; } DisplayStrs30285 = DisplayFormats30285.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30285 = DisplayStrs30285.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30285 = DisplayStrs30285.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30285 = DisplayStrs30285.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30285").innerHTML = DisplayStrs30285; if (CountActives30285) //alert(SetTimeOutPeriods30285); setTimeout("CountBacks30285(" + (secs+CountSteppers30285) + ")", SetTimeOutPeriods30285); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30285)=="undefined") BackColors30285 = ""; if (typeof(ForeColors30285)=="undefined") ForeColors30285= "white"; if (typeof(TargetDates30285)=="undefined") TargetDates30285 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30285)=="undefined") DisplayFormats30285 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30285)=="undefined") CountActives30285 = true; if (typeof(FinishMessages30285)=="undefined") FinishMessages30285 = ""; if (typeof(CountSteppers30285)!="number") CountSteppers30285 = -1; if (typeof(LeadingZeros30285)=="undefined") LeadingZeros30285 = true; CountSteppers30285 = Math.ceil(CountSteppers30285); if (CountSteppers30285 == 0) CountActives30285 = false; var SetTimeOutPeriods30285 = (Math.abs(CountSteppers30285)-1)*1000 + 990; puti(BackColors30285, ForeColors30285); var dthens30285 = new Date(TargetDates30285); var dnows30285 = new Date("09/08/2024 2:04:09 AM"); if(CountSteppers30285>0) ddiffs30285 = new Date(dnows30285-dthens30285); else ddiffs30285 = new Date(dthens30285-dnows30285); gsecss30285 = Math.floor(ddiffs30285.valueOf()/1000); CountBacks30285(gsecss30285);