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 (LeadingZeros30052 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30052(secs) { if (secs < 0) { document.getElementById("cntdwns30052").innerHTML = FinishMessages30052; return; } DisplayStrs30052 = DisplayFormats30052.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30052 = DisplayStrs30052.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30052 = DisplayStrs30052.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30052 = DisplayStrs30052.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30052").innerHTML = DisplayStrs30052; if (CountActives30052) //alert(SetTimeOutPeriods30052); setTimeout("CountBacks30052(" + (secs+CountSteppers30052) + ")", SetTimeOutPeriods30052); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30052)=="undefined") BackColors30052 = ""; if (typeof(ForeColors30052)=="undefined") ForeColors30052= "white"; if (typeof(TargetDates30052)=="undefined") TargetDates30052 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30052)=="undefined") DisplayFormats30052 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30052)=="undefined") CountActives30052 = true; if (typeof(FinishMessages30052)=="undefined") FinishMessages30052 = ""; if (typeof(CountSteppers30052)!="number") CountSteppers30052 = -1; if (typeof(LeadingZeros30052)=="undefined") LeadingZeros30052 = true; CountSteppers30052 = Math.ceil(CountSteppers30052); if (CountSteppers30052 == 0) CountActives30052 = false; var SetTimeOutPeriods30052 = (Math.abs(CountSteppers30052)-1)*1000 + 990; puti(BackColors30052, ForeColors30052); var dthens30052 = new Date(TargetDates30052); var dnows30052 = new Date("05/06/2024 10:02:11 AM"); if(CountSteppers30052>0) ddiffs30052 = new Date(dnows30052-dthens30052); else ddiffs30052 = new Date(dthens30052-dnows30052); gsecss30052 = Math.floor(ddiffs30052.valueOf()/1000); CountBacks30052(gsecss30052);