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 (LeadingZeros30316 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30316(secs) { if (secs < 0) { document.getElementById("cntdwns30316").innerHTML = FinishMessages30316; return; } DisplayStrs30316 = DisplayFormats30316.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30316 = DisplayStrs30316.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30316 = DisplayStrs30316.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30316 = DisplayStrs30316.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30316").innerHTML = DisplayStrs30316; if (CountActives30316) //alert(SetTimeOutPeriods30316); setTimeout("CountBacks30316(" + (secs+CountSteppers30316) + ")", SetTimeOutPeriods30316); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30316)=="undefined") BackColors30316 = ""; if (typeof(ForeColors30316)=="undefined") ForeColors30316= "white"; if (typeof(TargetDates30316)=="undefined") TargetDates30316 = "04/25/2024 10:00:00 PM"; if (typeof(DisplayFormats30316)=="undefined") DisplayFormats30316 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30316)=="undefined") CountActives30316 = true; if (typeof(FinishMessages30316)=="undefined") FinishMessages30316 = ""; if (typeof(CountSteppers30316)!="number") CountSteppers30316 = -1; if (typeof(LeadingZeros30316)=="undefined") LeadingZeros30316 = true; CountSteppers30316 = Math.ceil(CountSteppers30316); if (CountSteppers30316 == 0) CountActives30316 = false; var SetTimeOutPeriods30316 = (Math.abs(CountSteppers30316)-1)*1000 + 990; puti(BackColors30316, ForeColors30316); var dthens30316 = new Date(TargetDates30316); var dnows30316 = new Date("05/04/2024 7:18:02 AM"); if(CountSteppers30316>0) ddiffs30316 = new Date(dnows30316-dthens30316); else ddiffs30316 = new Date(dthens30316-dnows30316); gsecss30316 = Math.floor(ddiffs30316.valueOf()/1000); CountBacks30316(gsecss30316);