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 (LeadingZeros30270 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30270(secs) { if (secs < 0) { document.getElementById("cntdwns30270").innerHTML = FinishMessages30270; return; } DisplayStrs30270 = DisplayFormats30270.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30270 = DisplayStrs30270.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30270 = DisplayStrs30270.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30270 = DisplayStrs30270.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30270").innerHTML = DisplayStrs30270; if (CountActives30270) //alert(SetTimeOutPeriods30270); setTimeout("CountBacks30270(" + (secs+CountSteppers30270) + ")", SetTimeOutPeriods30270); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30270)=="undefined") BackColors30270 = ""; if (typeof(ForeColors30270)=="undefined") ForeColors30270= "white"; if (typeof(TargetDates30270)=="undefined") TargetDates30270 = "04/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30270)=="undefined") DisplayFormats30270 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30270)=="undefined") CountActives30270 = true; if (typeof(FinishMessages30270)=="undefined") FinishMessages30270 = ""; if (typeof(CountSteppers30270)!="number") CountSteppers30270 = -1; if (typeof(LeadingZeros30270)=="undefined") LeadingZeros30270 = true; CountSteppers30270 = Math.ceil(CountSteppers30270); if (CountSteppers30270 == 0) CountActives30270 = false; var SetTimeOutPeriods30270 = (Math.abs(CountSteppers30270)-1)*1000 + 990; puti(BackColors30270, ForeColors30270); var dthens30270 = new Date(TargetDates30270); var dnows30270 = new Date("05/09/2024 9:01:52 PM"); if(CountSteppers30270>0) ddiffs30270 = new Date(dnows30270-dthens30270); else ddiffs30270 = new Date(dthens30270-dnows30270); gsecss30270 = Math.floor(ddiffs30270.valueOf()/1000); CountBacks30270(gsecss30270);