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 (LeadingZeros30477 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30477(secs) { if (secs < 0) { document.getElementById("cntdwns30477").innerHTML = FinishMessages30477; return; } DisplayStrs30477 = DisplayFormats30477.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30477 = DisplayStrs30477.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30477 = DisplayStrs30477.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30477 = DisplayStrs30477.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30477").innerHTML = DisplayStrs30477; if (CountActives30477) //alert(SetTimeOutPeriods30477); setTimeout("CountBacks30477(" + (secs+CountSteppers30477) + ")", SetTimeOutPeriods30477); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30477)=="undefined") BackColors30477 = ""; if (typeof(ForeColors30477)=="undefined") ForeColors30477= "white"; if (typeof(TargetDates30477)=="undefined") TargetDates30477 = "05/13/2024 10:00:00 PM"; if (typeof(DisplayFormats30477)=="undefined") DisplayFormats30477 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30477)=="undefined") CountActives30477 = true; if (typeof(FinishMessages30477)=="undefined") FinishMessages30477 = ""; if (typeof(CountSteppers30477)!="number") CountSteppers30477 = -1; if (typeof(LeadingZeros30477)=="undefined") LeadingZeros30477 = true; CountSteppers30477 = Math.ceil(CountSteppers30477); if (CountSteppers30477 == 0) CountActives30477 = false; var SetTimeOutPeriods30477 = (Math.abs(CountSteppers30477)-1)*1000 + 990; puti(BackColors30477, ForeColors30477); var dthens30477 = new Date(TargetDates30477); var dnows30477 = new Date("05/20/2024 8:04:48 PM"); if(CountSteppers30477>0) ddiffs30477 = new Date(dnows30477-dthens30477); else ddiffs30477 = new Date(dthens30477-dnows30477); gsecss30477 = Math.floor(ddiffs30477.valueOf()/1000); CountBacks30477(gsecss30477);