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 (LeadingZeros30051 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30051(secs) { if (secs < 0) { document.getElementById("cntdwns30051").innerHTML = FinishMessages30051; return; } DisplayStrs30051 = DisplayFormats30051.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30051 = DisplayStrs30051.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30051 = DisplayStrs30051.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30051 = DisplayStrs30051.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30051").innerHTML = DisplayStrs30051; if (CountActives30051) //alert(SetTimeOutPeriods30051); setTimeout("CountBacks30051(" + (secs+CountSteppers30051) + ")", SetTimeOutPeriods30051); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30051)=="undefined") BackColors30051 = ""; if (typeof(ForeColors30051)=="undefined") ForeColors30051= "white"; if (typeof(TargetDates30051)=="undefined") TargetDates30051 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30051)=="undefined") DisplayFormats30051 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30051)=="undefined") CountActives30051 = true; if (typeof(FinishMessages30051)=="undefined") FinishMessages30051 = ""; if (typeof(CountSteppers30051)!="number") CountSteppers30051 = -1; if (typeof(LeadingZeros30051)=="undefined") LeadingZeros30051 = true; CountSteppers30051 = Math.ceil(CountSteppers30051); if (CountSteppers30051 == 0) CountActives30051 = false; var SetTimeOutPeriods30051 = (Math.abs(CountSteppers30051)-1)*1000 + 990; puti(BackColors30051, ForeColors30051); var dthens30051 = new Date(TargetDates30051); var dnows30051 = new Date("05/06/2024 8:28:40 AM"); if(CountSteppers30051>0) ddiffs30051 = new Date(dnows30051-dthens30051); else ddiffs30051 = new Date(dthens30051-dnows30051); gsecss30051 = Math.floor(ddiffs30051.valueOf()/1000); CountBacks30051(gsecss30051);