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 (LeadingZeros30216 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30216(secs) { if (secs < 0) { document.getElementById("cntdwns30216").innerHTML = FinishMessages30216; return; } DisplayStrs30216 = DisplayFormats30216.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30216 = DisplayStrs30216.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30216 = DisplayStrs30216.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30216 = DisplayStrs30216.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30216").innerHTML = DisplayStrs30216; if (CountActives30216) //alert(SetTimeOutPeriods30216); setTimeout("CountBacks30216(" + (secs+CountSteppers30216) + ")", SetTimeOutPeriods30216); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30216)=="undefined") BackColors30216 = ""; if (typeof(ForeColors30216)=="undefined") ForeColors30216= "white"; if (typeof(TargetDates30216)=="undefined") TargetDates30216 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats30216)=="undefined") DisplayFormats30216 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30216)=="undefined") CountActives30216 = true; if (typeof(FinishMessages30216)=="undefined") FinishMessages30216 = ""; if (typeof(CountSteppers30216)!="number") CountSteppers30216 = -1; if (typeof(LeadingZeros30216)=="undefined") LeadingZeros30216 = true; CountSteppers30216 = Math.ceil(CountSteppers30216); if (CountSteppers30216 == 0) CountActives30216 = false; var SetTimeOutPeriods30216 = (Math.abs(CountSteppers30216)-1)*1000 + 990; puti(BackColors30216, ForeColors30216); var dthens30216 = new Date(TargetDates30216); var dnows30216 = new Date("05/05/2024 12:56:09 AM"); if(CountSteppers30216>0) ddiffs30216 = new Date(dnows30216-dthens30216); else ddiffs30216 = new Date(dthens30216-dnows30216); gsecss30216 = Math.floor(ddiffs30216.valueOf()/1000); CountBacks30216(gsecss30216);