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 (LeadingZeros30129 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30129(secs) { if (secs < 0) { document.getElementById("cntdwns30129").innerHTML = FinishMessages30129; return; } DisplayStrs30129 = DisplayFormats30129.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30129 = DisplayStrs30129.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30129 = DisplayStrs30129.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30129 = DisplayStrs30129.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30129").innerHTML = DisplayStrs30129; if (CountActives30129) //alert(SetTimeOutPeriods30129); setTimeout("CountBacks30129(" + (secs+CountSteppers30129) + ")", SetTimeOutPeriods30129); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30129)=="undefined") BackColors30129 = ""; if (typeof(ForeColors30129)=="undefined") ForeColors30129= "white"; if (typeof(TargetDates30129)=="undefined") TargetDates30129 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats30129)=="undefined") DisplayFormats30129 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30129)=="undefined") CountActives30129 = true; if (typeof(FinishMessages30129)=="undefined") FinishMessages30129 = ""; if (typeof(CountSteppers30129)!="number") CountSteppers30129 = -1; if (typeof(LeadingZeros30129)=="undefined") LeadingZeros30129 = true; CountSteppers30129 = Math.ceil(CountSteppers30129); if (CountSteppers30129 == 0) CountActives30129 = false; var SetTimeOutPeriods30129 = (Math.abs(CountSteppers30129)-1)*1000 + 990; puti(BackColors30129, ForeColors30129); var dthens30129 = new Date(TargetDates30129); var dnows30129 = new Date("05/09/2024 5:46:40 AM"); if(CountSteppers30129>0) ddiffs30129 = new Date(dnows30129-dthens30129); else ddiffs30129 = new Date(dthens30129-dnows30129); gsecss30129 = Math.floor(ddiffs30129.valueOf()/1000); CountBacks30129(gsecss30129);