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 (LeadingZeros30050 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30050(secs) { if (secs < 0) { document.getElementById("cntdwns30050").innerHTML = FinishMessages30050; return; } DisplayStrs30050 = DisplayFormats30050.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30050 = DisplayStrs30050.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30050 = DisplayStrs30050.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30050 = DisplayStrs30050.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30050").innerHTML = DisplayStrs30050; if (CountActives30050) //alert(SetTimeOutPeriods30050); setTimeout("CountBacks30050(" + (secs+CountSteppers30050) + ")", SetTimeOutPeriods30050); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30050)=="undefined") BackColors30050 = ""; if (typeof(ForeColors30050)=="undefined") ForeColors30050= "white"; if (typeof(TargetDates30050)=="undefined") TargetDates30050 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30050)=="undefined") DisplayFormats30050 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30050)=="undefined") CountActives30050 = true; if (typeof(FinishMessages30050)=="undefined") FinishMessages30050 = ""; if (typeof(CountSteppers30050)!="number") CountSteppers30050 = -1; if (typeof(LeadingZeros30050)=="undefined") LeadingZeros30050 = true; CountSteppers30050 = Math.ceil(CountSteppers30050); if (CountSteppers30050 == 0) CountActives30050 = false; var SetTimeOutPeriods30050 = (Math.abs(CountSteppers30050)-1)*1000 + 990; puti(BackColors30050, ForeColors30050); var dthens30050 = new Date(TargetDates30050); var dnows30050 = new Date("05/06/2024 11:22:55 AM"); if(CountSteppers30050>0) ddiffs30050 = new Date(dnows30050-dthens30050); else ddiffs30050 = new Date(dthens30050-dnows30050); gsecss30050 = Math.floor(ddiffs30050.valueOf()/1000); CountBacks30050(gsecss30050);