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 (LeadingZeros29891 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29891(secs) { if (secs < 0) { document.getElementById("cntdwns29891").innerHTML = FinishMessages29891; return; } DisplayStrs29891 = DisplayFormats29891.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29891 = DisplayStrs29891.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29891 = DisplayStrs29891.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29891 = DisplayStrs29891.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29891").innerHTML = DisplayStrs29891; if (CountActives29891) //alert(SetTimeOutPeriods29891); setTimeout("CountBacks29891(" + (secs+CountSteppers29891) + ")", SetTimeOutPeriods29891); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29891)=="undefined") BackColors29891 = ""; if (typeof(ForeColors29891)=="undefined") ForeColors29891= "white"; if (typeof(TargetDates29891)=="undefined") TargetDates29891 = "04/21/2024 11:00:00 PM"; if (typeof(DisplayFormats29891)=="undefined") DisplayFormats29891 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29891)=="undefined") CountActives29891 = true; if (typeof(FinishMessages29891)=="undefined") FinishMessages29891 = ""; if (typeof(CountSteppers29891)!="number") CountSteppers29891 = -1; if (typeof(LeadingZeros29891)=="undefined") LeadingZeros29891 = true; CountSteppers29891 = Math.ceil(CountSteppers29891); if (CountSteppers29891 == 0) CountActives29891 = false; var SetTimeOutPeriods29891 = (Math.abs(CountSteppers29891)-1)*1000 + 990; puti(BackColors29891, ForeColors29891); var dthens29891 = new Date(TargetDates29891); var dnows29891 = new Date("05/02/2024 7:19:00 AM"); if(CountSteppers29891>0) ddiffs29891 = new Date(dnows29891-dthens29891); else ddiffs29891 = new Date(dthens29891-dnows29891); gsecss29891 = Math.floor(ddiffs29891.valueOf()/1000); CountBacks29891(gsecss29891);