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 (LeadingZeros29984 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29984(secs) { if (secs < 0) { document.getElementById("cntdwns29984").innerHTML = FinishMessages29984; return; } DisplayStrs29984 = DisplayFormats29984.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29984 = DisplayStrs29984.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29984 = DisplayStrs29984.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29984 = DisplayStrs29984.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29984").innerHTML = DisplayStrs29984; if (CountActives29984) //alert(SetTimeOutPeriods29984); setTimeout("CountBacks29984(" + (secs+CountSteppers29984) + ")", SetTimeOutPeriods29984); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29984)=="undefined") BackColors29984 = ""; if (typeof(ForeColors29984)=="undefined") ForeColors29984= "white"; if (typeof(TargetDates29984)=="undefined") TargetDates29984 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats29984)=="undefined") DisplayFormats29984 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29984)=="undefined") CountActives29984 = true; if (typeof(FinishMessages29984)=="undefined") FinishMessages29984 = ""; if (typeof(CountSteppers29984)!="number") CountSteppers29984 = -1; if (typeof(LeadingZeros29984)=="undefined") LeadingZeros29984 = true; CountSteppers29984 = Math.ceil(CountSteppers29984); if (CountSteppers29984 == 0) CountActives29984 = false; var SetTimeOutPeriods29984 = (Math.abs(CountSteppers29984)-1)*1000 + 990; puti(BackColors29984, ForeColors29984); var dthens29984 = new Date(TargetDates29984); var dnows29984 = new Date("05/07/2024 11:13:05 AM"); if(CountSteppers29984>0) ddiffs29984 = new Date(dnows29984-dthens29984); else ddiffs29984 = new Date(dthens29984-dnows29984); gsecss29984 = Math.floor(ddiffs29984.valueOf()/1000); CountBacks29984(gsecss29984);