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 (LeadingZeros30170 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30170(secs) { if (secs < 0) { document.getElementById("cntdwns30170").innerHTML = FinishMessages30170; return; } DisplayStrs30170 = DisplayFormats30170.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30170 = DisplayStrs30170.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30170 = DisplayStrs30170.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30170 = DisplayStrs30170.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30170").innerHTML = DisplayStrs30170; if (CountActives30170) //alert(SetTimeOutPeriods30170); setTimeout("CountBacks30170(" + (secs+CountSteppers30170) + ")", SetTimeOutPeriods30170); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30170)=="undefined") BackColors30170 = ""; if (typeof(ForeColors30170)=="undefined") ForeColors30170= "white"; if (typeof(TargetDates30170)=="undefined") TargetDates30170 = "03/31/2024 10:00:00 PM"; if (typeof(DisplayFormats30170)=="undefined") DisplayFormats30170 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30170)=="undefined") CountActives30170 = true; if (typeof(FinishMessages30170)=="undefined") FinishMessages30170 = ""; if (typeof(CountSteppers30170)!="number") CountSteppers30170 = -1; if (typeof(LeadingZeros30170)=="undefined") LeadingZeros30170 = true; CountSteppers30170 = Math.ceil(CountSteppers30170); if (CountSteppers30170 == 0) CountActives30170 = false; var SetTimeOutPeriods30170 = (Math.abs(CountSteppers30170)-1)*1000 + 990; puti(BackColors30170, ForeColors30170); var dthens30170 = new Date(TargetDates30170); var dnows30170 = new Date("04/29/2024 4:53:29 PM"); if(CountSteppers30170>0) ddiffs30170 = new Date(dnows30170-dthens30170); else ddiffs30170 = new Date(dthens30170-dnows30170); gsecss30170 = Math.floor(ddiffs30170.valueOf()/1000); CountBacks30170(gsecss30170);