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 (LeadingZeros30211 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30211(secs) { if (secs < 0) { document.getElementById("cntdwns30211").innerHTML = FinishMessages30211; return; } DisplayStrs30211 = DisplayFormats30211.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30211 = DisplayStrs30211.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30211 = DisplayStrs30211.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30211 = DisplayStrs30211.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30211").innerHTML = DisplayStrs30211; if (CountActives30211) //alert(SetTimeOutPeriods30211); setTimeout("CountBacks30211(" + (secs+CountSteppers30211) + ")", SetTimeOutPeriods30211); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30211)=="undefined") BackColors30211 = ""; if (typeof(ForeColors30211)=="undefined") ForeColors30211= "white"; if (typeof(TargetDates30211)=="undefined") TargetDates30211 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats30211)=="undefined") DisplayFormats30211 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30211)=="undefined") CountActives30211 = true; if (typeof(FinishMessages30211)=="undefined") FinishMessages30211 = ""; if (typeof(CountSteppers30211)!="number") CountSteppers30211 = -1; if (typeof(LeadingZeros30211)=="undefined") LeadingZeros30211 = true; CountSteppers30211 = Math.ceil(CountSteppers30211); if (CountSteppers30211 == 0) CountActives30211 = false; var SetTimeOutPeriods30211 = (Math.abs(CountSteppers30211)-1)*1000 + 990; puti(BackColors30211, ForeColors30211); var dthens30211 = new Date(TargetDates30211); var dnows30211 = new Date("05/07/2024 8:40:34 PM"); if(CountSteppers30211>0) ddiffs30211 = new Date(dnows30211-dthens30211); else ddiffs30211 = new Date(dthens30211-dnows30211); gsecss30211 = Math.floor(ddiffs30211.valueOf()/1000); CountBacks30211(gsecss30211);