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 (LeadingZeros30251 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30251(secs) { if (secs < 0) { document.getElementById("cntdwns30251").innerHTML = FinishMessages30251; return; } DisplayStrs30251 = DisplayFormats30251.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30251 = DisplayStrs30251.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30251 = DisplayStrs30251.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30251 = DisplayStrs30251.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30251").innerHTML = DisplayStrs30251; if (CountActives30251) //alert(SetTimeOutPeriods30251); setTimeout("CountBacks30251(" + (secs+CountSteppers30251) + ")", SetTimeOutPeriods30251); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30251)=="undefined") BackColors30251 = ""; if (typeof(ForeColors30251)=="undefined") ForeColors30251= "white"; if (typeof(TargetDates30251)=="undefined") TargetDates30251 = "04/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30251)=="undefined") DisplayFormats30251 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30251)=="undefined") CountActives30251 = true; if (typeof(FinishMessages30251)=="undefined") FinishMessages30251 = ""; if (typeof(CountSteppers30251)!="number") CountSteppers30251 = -1; if (typeof(LeadingZeros30251)=="undefined") LeadingZeros30251 = true; CountSteppers30251 = Math.ceil(CountSteppers30251); if (CountSteppers30251 == 0) CountActives30251 = false; var SetTimeOutPeriods30251 = (Math.abs(CountSteppers30251)-1)*1000 + 990; puti(BackColors30251, ForeColors30251); var dthens30251 = new Date(TargetDates30251); var dnows30251 = new Date("05/13/2024 12:22:45 PM"); if(CountSteppers30251>0) ddiffs30251 = new Date(dnows30251-dthens30251); else ddiffs30251 = new Date(dthens30251-dnows30251); gsecss30251 = Math.floor(ddiffs30251.valueOf()/1000); CountBacks30251(gsecss30251);