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 (LeadingZeros30390 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30390(secs) { if (secs < 0) { document.getElementById("cntdwns30390").innerHTML = FinishMessages30390; return; } DisplayStrs30390 = DisplayFormats30390.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30390 = DisplayStrs30390.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30390 = DisplayStrs30390.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30390 = DisplayStrs30390.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30390").innerHTML = DisplayStrs30390; if (CountActives30390) //alert(SetTimeOutPeriods30390); setTimeout("CountBacks30390(" + (secs+CountSteppers30390) + ")", SetTimeOutPeriods30390); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30390)=="undefined") BackColors30390 = ""; if (typeof(ForeColors30390)=="undefined") ForeColors30390= "white"; if (typeof(TargetDates30390)=="undefined") TargetDates30390 = "04/28/2024 10:00:00 PM"; if (typeof(DisplayFormats30390)=="undefined") DisplayFormats30390 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30390)=="undefined") CountActives30390 = true; if (typeof(FinishMessages30390)=="undefined") FinishMessages30390 = ""; if (typeof(CountSteppers30390)!="number") CountSteppers30390 = -1; if (typeof(LeadingZeros30390)=="undefined") LeadingZeros30390 = true; CountSteppers30390 = Math.ceil(CountSteppers30390); if (CountSteppers30390 == 0) CountActives30390 = false; var SetTimeOutPeriods30390 = (Math.abs(CountSteppers30390)-1)*1000 + 990; puti(BackColors30390, ForeColors30390); var dthens30390 = new Date(TargetDates30390); var dnows30390 = new Date("05/05/2024 7:46:16 AM"); if(CountSteppers30390>0) ddiffs30390 = new Date(dnows30390-dthens30390); else ddiffs30390 = new Date(dthens30390-dnows30390); gsecss30390 = Math.floor(ddiffs30390.valueOf()/1000); CountBacks30390(gsecss30390);