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 (LeadingZeros30380 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30380(secs) { if (secs < 0) { document.getElementById("cntdwns30380").innerHTML = FinishMessages30380; return; } DisplayStrs30380 = DisplayFormats30380.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30380 = DisplayStrs30380.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30380 = DisplayStrs30380.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30380 = DisplayStrs30380.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30380").innerHTML = DisplayStrs30380; if (CountActives30380) //alert(SetTimeOutPeriods30380); setTimeout("CountBacks30380(" + (secs+CountSteppers30380) + ")", SetTimeOutPeriods30380); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30380)=="undefined") BackColors30380 = ""; if (typeof(ForeColors30380)=="undefined") ForeColors30380= "white"; if (typeof(TargetDates30380)=="undefined") TargetDates30380 = "04/25/2024 10:00:00 PM"; if (typeof(DisplayFormats30380)=="undefined") DisplayFormats30380 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30380)=="undefined") CountActives30380 = true; if (typeof(FinishMessages30380)=="undefined") FinishMessages30380 = ""; if (typeof(CountSteppers30380)!="number") CountSteppers30380 = -1; if (typeof(LeadingZeros30380)=="undefined") LeadingZeros30380 = true; CountSteppers30380 = Math.ceil(CountSteppers30380); if (CountSteppers30380 == 0) CountActives30380 = false; var SetTimeOutPeriods30380 = (Math.abs(CountSteppers30380)-1)*1000 + 990; puti(BackColors30380, ForeColors30380); var dthens30380 = new Date(TargetDates30380); var dnows30380 = new Date("05/04/2024 7:00:01 AM"); if(CountSteppers30380>0) ddiffs30380 = new Date(dnows30380-dthens30380); else ddiffs30380 = new Date(dthens30380-dnows30380); gsecss30380 = Math.floor(ddiffs30380.valueOf()/1000); CountBacks30380(gsecss30380);