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 (LeadingZeros30127 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30127(secs) { if (secs < 0) { document.getElementById("cntdwns30127").innerHTML = FinishMessages30127; return; } DisplayStrs30127 = DisplayFormats30127.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30127 = DisplayStrs30127.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30127 = DisplayStrs30127.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30127 = DisplayStrs30127.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30127").innerHTML = DisplayStrs30127; if (CountActives30127) //alert(SetTimeOutPeriods30127); setTimeout("CountBacks30127(" + (secs+CountSteppers30127) + ")", SetTimeOutPeriods30127); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30127)=="undefined") BackColors30127 = ""; if (typeof(ForeColors30127)=="undefined") ForeColors30127= "white"; if (typeof(TargetDates30127)=="undefined") TargetDates30127 = "04/19/2024 10:00:00 PM"; if (typeof(DisplayFormats30127)=="undefined") DisplayFormats30127 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30127)=="undefined") CountActives30127 = true; if (typeof(FinishMessages30127)=="undefined") FinishMessages30127 = ""; if (typeof(CountSteppers30127)!="number") CountSteppers30127 = -1; if (typeof(LeadingZeros30127)=="undefined") LeadingZeros30127 = true; CountSteppers30127 = Math.ceil(CountSteppers30127); if (CountSteppers30127 == 0) CountActives30127 = false; var SetTimeOutPeriods30127 = (Math.abs(CountSteppers30127)-1)*1000 + 990; puti(BackColors30127, ForeColors30127); var dthens30127 = new Date(TargetDates30127); var dnows30127 = new Date("04/30/2024 8:12:43 AM"); if(CountSteppers30127>0) ddiffs30127 = new Date(dnows30127-dthens30127); else ddiffs30127 = new Date(dthens30127-dnows30127); gsecss30127 = Math.floor(ddiffs30127.valueOf()/1000); CountBacks30127(gsecss30127);