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 (LeadingZeros30306 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30306(secs) { if (secs < 0) { document.getElementById("cntdwns30306").innerHTML = FinishMessages30306; return; } DisplayStrs30306 = DisplayFormats30306.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30306 = DisplayStrs30306.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30306 = DisplayStrs30306.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30306 = DisplayStrs30306.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30306").innerHTML = DisplayStrs30306; if (CountActives30306) //alert(SetTimeOutPeriods30306); setTimeout("CountBacks30306(" + (secs+CountSteppers30306) + ")", SetTimeOutPeriods30306); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30306)=="undefined") BackColors30306 = ""; if (typeof(ForeColors30306)=="undefined") ForeColors30306= "white"; if (typeof(TargetDates30306)=="undefined") TargetDates30306 = "04/19/2024 10:00:00 PM"; if (typeof(DisplayFormats30306)=="undefined") DisplayFormats30306 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30306)=="undefined") CountActives30306 = true; if (typeof(FinishMessages30306)=="undefined") FinishMessages30306 = ""; if (typeof(CountSteppers30306)!="number") CountSteppers30306 = -1; if (typeof(LeadingZeros30306)=="undefined") LeadingZeros30306 = true; CountSteppers30306 = Math.ceil(CountSteppers30306); if (CountSteppers30306 == 0) CountActives30306 = false; var SetTimeOutPeriods30306 = (Math.abs(CountSteppers30306)-1)*1000 + 990; puti(BackColors30306, ForeColors30306); var dthens30306 = new Date(TargetDates30306); var dnows30306 = new Date("04/30/2024 7:16:28 AM"); if(CountSteppers30306>0) ddiffs30306 = new Date(dnows30306-dthens30306); else ddiffs30306 = new Date(dthens30306-dnows30306); gsecss30306 = Math.floor(ddiffs30306.valueOf()/1000); CountBacks30306(gsecss30306);