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 (LeadingZeros30371 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30371(secs) { if (secs < 0) { document.getElementById("cntdwns30371").innerHTML = FinishMessages30371; return; } DisplayStrs30371 = DisplayFormats30371.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30371 = DisplayStrs30371.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30371 = DisplayStrs30371.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30371 = DisplayStrs30371.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30371").innerHTML = DisplayStrs30371; if (CountActives30371) //alert(SetTimeOutPeriods30371); setTimeout("CountBacks30371(" + (secs+CountSteppers30371) + ")", SetTimeOutPeriods30371); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30371)=="undefined") BackColors30371 = ""; if (typeof(ForeColors30371)=="undefined") ForeColors30371= "white"; if (typeof(TargetDates30371)=="undefined") TargetDates30371 = "04/22/2024 10:00:00 PM"; if (typeof(DisplayFormats30371)=="undefined") DisplayFormats30371 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30371)=="undefined") CountActives30371 = true; if (typeof(FinishMessages30371)=="undefined") FinishMessages30371 = ""; if (typeof(CountSteppers30371)!="number") CountSteppers30371 = -1; if (typeof(LeadingZeros30371)=="undefined") LeadingZeros30371 = true; CountSteppers30371 = Math.ceil(CountSteppers30371); if (CountSteppers30371 == 0) CountActives30371 = false; var SetTimeOutPeriods30371 = (Math.abs(CountSteppers30371)-1)*1000 + 990; puti(BackColors30371, ForeColors30371); var dthens30371 = new Date(TargetDates30371); var dnows30371 = new Date("05/02/2024 11:29:10 AM"); if(CountSteppers30371>0) ddiffs30371 = new Date(dnows30371-dthens30371); else ddiffs30371 = new Date(dthens30371-dnows30371); gsecss30371 = Math.floor(ddiffs30371.valueOf()/1000); CountBacks30371(gsecss30371);