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 (LeadingZeros30120 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30120(secs) { if (secs < 0) { document.getElementById("cntdwns30120").innerHTML = FinishMessages30120; return; } DisplayStrs30120 = DisplayFormats30120.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30120 = DisplayStrs30120.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30120 = DisplayStrs30120.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30120 = DisplayStrs30120.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30120").innerHTML = DisplayStrs30120; if (CountActives30120) //alert(SetTimeOutPeriods30120); setTimeout("CountBacks30120(" + (secs+CountSteppers30120) + ")", SetTimeOutPeriods30120); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30120)=="undefined") BackColors30120 = ""; if (typeof(ForeColors30120)=="undefined") ForeColors30120= "white"; if (typeof(TargetDates30120)=="undefined") TargetDates30120 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30120)=="undefined") DisplayFormats30120 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30120)=="undefined") CountActives30120 = true; if (typeof(FinishMessages30120)=="undefined") FinishMessages30120 = ""; if (typeof(CountSteppers30120)!="number") CountSteppers30120 = -1; if (typeof(LeadingZeros30120)=="undefined") LeadingZeros30120 = true; CountSteppers30120 = Math.ceil(CountSteppers30120); if (CountSteppers30120 == 0) CountActives30120 = false; var SetTimeOutPeriods30120 = (Math.abs(CountSteppers30120)-1)*1000 + 990; puti(BackColors30120, ForeColors30120); var dthens30120 = new Date(TargetDates30120); var dnows30120 = new Date("05/06/2024 11:24:24 AM"); if(CountSteppers30120>0) ddiffs30120 = new Date(dnows30120-dthens30120); else ddiffs30120 = new Date(dthens30120-dnows30120); gsecss30120 = Math.floor(ddiffs30120.valueOf()/1000); CountBacks30120(gsecss30120);