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 (LeadingZeros30145 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30145(secs) { if (secs < 0) { document.getElementById("cntdwns30145").innerHTML = FinishMessages30145; return; } DisplayStrs30145 = DisplayFormats30145.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30145 = DisplayStrs30145.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30145 = DisplayStrs30145.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30145 = DisplayStrs30145.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30145").innerHTML = DisplayStrs30145; if (CountActives30145) //alert(SetTimeOutPeriods30145); setTimeout("CountBacks30145(" + (secs+CountSteppers30145) + ")", SetTimeOutPeriods30145); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30145)=="undefined") BackColors30145 = ""; if (typeof(ForeColors30145)=="undefined") ForeColors30145= "white"; if (typeof(TargetDates30145)=="undefined") TargetDates30145 = "04/01/2024 11:00:00 PM"; if (typeof(DisplayFormats30145)=="undefined") DisplayFormats30145 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30145)=="undefined") CountActives30145 = true; if (typeof(FinishMessages30145)=="undefined") FinishMessages30145 = ""; if (typeof(CountSteppers30145)!="number") CountSteppers30145 = -1; if (typeof(LeadingZeros30145)=="undefined") LeadingZeros30145 = true; CountSteppers30145 = Math.ceil(CountSteppers30145); if (CountSteppers30145 == 0) CountActives30145 = false; var SetTimeOutPeriods30145 = (Math.abs(CountSteppers30145)-1)*1000 + 990; puti(BackColors30145, ForeColors30145); var dthens30145 = new Date(TargetDates30145); var dnows30145 = new Date("04/29/2024 11:21:42 AM"); if(CountSteppers30145>0) ddiffs30145 = new Date(dnows30145-dthens30145); else ddiffs30145 = new Date(dthens30145-dnows30145); gsecss30145 = Math.floor(ddiffs30145.valueOf()/1000); CountBacks30145(gsecss30145);