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 (LeadingZeros30229 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30229(secs) { if (secs < 0) { document.getElementById("cntdwns30229").innerHTML = FinishMessages30229; return; } DisplayStrs30229 = DisplayFormats30229.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30229 = DisplayStrs30229.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30229 = DisplayStrs30229.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30229 = DisplayStrs30229.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30229").innerHTML = DisplayStrs30229; if (CountActives30229) //alert(SetTimeOutPeriods30229); setTimeout("CountBacks30229(" + (secs+CountSteppers30229) + ")", SetTimeOutPeriods30229); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30229)=="undefined") BackColors30229 = ""; if (typeof(ForeColors30229)=="undefined") ForeColors30229= "white"; if (typeof(TargetDates30229)=="undefined") TargetDates30229 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30229)=="undefined") DisplayFormats30229 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30229)=="undefined") CountActives30229 = true; if (typeof(FinishMessages30229)=="undefined") FinishMessages30229 = ""; if (typeof(CountSteppers30229)!="number") CountSteppers30229 = -1; if (typeof(LeadingZeros30229)=="undefined") LeadingZeros30229 = true; CountSteppers30229 = Math.ceil(CountSteppers30229); if (CountSteppers30229 == 0) CountActives30229 = false; var SetTimeOutPeriods30229 = (Math.abs(CountSteppers30229)-1)*1000 + 990; puti(BackColors30229, ForeColors30229); var dthens30229 = new Date(TargetDates30229); var dnows30229 = new Date("05/04/2024 7:51:24 PM"); if(CountSteppers30229>0) ddiffs30229 = new Date(dnows30229-dthens30229); else ddiffs30229 = new Date(dthens30229-dnows30229); gsecss30229 = Math.floor(ddiffs30229.valueOf()/1000); CountBacks30229(gsecss30229);