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 (LeadingZeros30480 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30480(secs) { if (secs < 0) { document.getElementById("cntdwns30480").innerHTML = FinishMessages30480; return; } DisplayStrs30480 = DisplayFormats30480.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30480 = DisplayStrs30480.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30480 = DisplayStrs30480.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30480 = DisplayStrs30480.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30480").innerHTML = DisplayStrs30480; if (CountActives30480) //alert(SetTimeOutPeriods30480); setTimeout("CountBacks30480(" + (secs+CountSteppers30480) + ")", SetTimeOutPeriods30480); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30480)=="undefined") BackColors30480 = ""; if (typeof(ForeColors30480)=="undefined") ForeColors30480= "white"; if (typeof(TargetDates30480)=="undefined") TargetDates30480 = "05/05/2024 10:00:00 PM"; if (typeof(DisplayFormats30480)=="undefined") DisplayFormats30480 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30480)=="undefined") CountActives30480 = true; if (typeof(FinishMessages30480)=="undefined") FinishMessages30480 = ""; if (typeof(CountSteppers30480)!="number") CountSteppers30480 = -1; if (typeof(LeadingZeros30480)=="undefined") LeadingZeros30480 = true; CountSteppers30480 = Math.ceil(CountSteppers30480); if (CountSteppers30480 == 0) CountActives30480 = false; var SetTimeOutPeriods30480 = (Math.abs(CountSteppers30480)-1)*1000 + 990; puti(BackColors30480, ForeColors30480); var dthens30480 = new Date(TargetDates30480); var dnows30480 = new Date("05/17/2024 6:52:59 AM"); if(CountSteppers30480>0) ddiffs30480 = new Date(dnows30480-dthens30480); else ddiffs30480 = new Date(dthens30480-dnows30480); gsecss30480 = Math.floor(ddiffs30480.valueOf()/1000); CountBacks30480(gsecss30480);