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 (LeadingZeros30330 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30330(secs) { if (secs < 0) { document.getElementById("cntdwns30330").innerHTML = FinishMessages30330; return; } DisplayStrs30330 = DisplayFormats30330.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30330 = DisplayStrs30330.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30330 = DisplayStrs30330.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30330 = DisplayStrs30330.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30330").innerHTML = DisplayStrs30330; if (CountActives30330) //alert(SetTimeOutPeriods30330); setTimeout("CountBacks30330(" + (secs+CountSteppers30330) + ")", SetTimeOutPeriods30330); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30330)=="undefined") BackColors30330 = ""; if (typeof(ForeColors30330)=="undefined") ForeColors30330= "white"; if (typeof(TargetDates30330)=="undefined") TargetDates30330 = "04/27/2024 10:00:00 PM"; if (typeof(DisplayFormats30330)=="undefined") DisplayFormats30330 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30330)=="undefined") CountActives30330 = true; if (typeof(FinishMessages30330)=="undefined") FinishMessages30330 = ""; if (typeof(CountSteppers30330)!="number") CountSteppers30330 = -1; if (typeof(LeadingZeros30330)=="undefined") LeadingZeros30330 = true; CountSteppers30330 = Math.ceil(CountSteppers30330); if (CountSteppers30330 == 0) CountActives30330 = false; var SetTimeOutPeriods30330 = (Math.abs(CountSteppers30330)-1)*1000 + 990; puti(BackColors30330, ForeColors30330); var dthens30330 = new Date(TargetDates30330); var dnows30330 = new Date("05/05/2024 5:49:09 PM"); if(CountSteppers30330>0) ddiffs30330 = new Date(dnows30330-dthens30330); else ddiffs30330 = new Date(dthens30330-dnows30330); gsecss30330 = Math.floor(ddiffs30330.valueOf()/1000); CountBacks30330(gsecss30330);