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 (LeadingZeros30226 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30226(secs) { if (secs < 0) { document.getElementById("cntdwns30226").innerHTML = FinishMessages30226; return; } DisplayStrs30226 = DisplayFormats30226.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30226 = DisplayStrs30226.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30226 = DisplayStrs30226.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30226 = DisplayStrs30226.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30226").innerHTML = DisplayStrs30226; if (CountActives30226) //alert(SetTimeOutPeriods30226); setTimeout("CountBacks30226(" + (secs+CountSteppers30226) + ")", SetTimeOutPeriods30226); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30226)=="undefined") BackColors30226 = ""; if (typeof(ForeColors30226)=="undefined") ForeColors30226= "white"; if (typeof(TargetDates30226)=="undefined") TargetDates30226 = "04/22/2024 11:00:00 PM"; if (typeof(DisplayFormats30226)=="undefined") DisplayFormats30226 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30226)=="undefined") CountActives30226 = true; if (typeof(FinishMessages30226)=="undefined") FinishMessages30226 = ""; if (typeof(CountSteppers30226)!="number") CountSteppers30226 = -1; if (typeof(LeadingZeros30226)=="undefined") LeadingZeros30226 = true; CountSteppers30226 = Math.ceil(CountSteppers30226); if (CountSteppers30226 == 0) CountActives30226 = false; var SetTimeOutPeriods30226 = (Math.abs(CountSteppers30226)-1)*1000 + 990; puti(BackColors30226, ForeColors30226); var dthens30226 = new Date(TargetDates30226); var dnows30226 = new Date("05/03/2024 12:21:17 AM"); if(CountSteppers30226>0) ddiffs30226 = new Date(dnows30226-dthens30226); else ddiffs30226 = new Date(dthens30226-dnows30226); gsecss30226 = Math.floor(ddiffs30226.valueOf()/1000); CountBacks30226(gsecss30226);