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 (LeadingZeros30511 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30511(secs) { if (secs < 0) { document.getElementById("cntdwns30511").innerHTML = FinishMessages30511; return; } DisplayStrs30511 = DisplayFormats30511.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30511 = DisplayStrs30511.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30511 = DisplayStrs30511.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30511 = DisplayStrs30511.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30511").innerHTML = DisplayStrs30511; if (CountActives30511) //alert(SetTimeOutPeriods30511); setTimeout("CountBacks30511(" + (secs+CountSteppers30511) + ")", SetTimeOutPeriods30511); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30511)=="undefined") BackColors30511 = ""; if (typeof(ForeColors30511)=="undefined") ForeColors30511= "white"; if (typeof(TargetDates30511)=="undefined") TargetDates30511 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30511)=="undefined") DisplayFormats30511 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30511)=="undefined") CountActives30511 = true; if (typeof(FinishMessages30511)=="undefined") FinishMessages30511 = ""; if (typeof(CountSteppers30511)!="number") CountSteppers30511 = -1; if (typeof(LeadingZeros30511)=="undefined") LeadingZeros30511 = true; CountSteppers30511 = Math.ceil(CountSteppers30511); if (CountSteppers30511 == 0) CountActives30511 = false; var SetTimeOutPeriods30511 = (Math.abs(CountSteppers30511)-1)*1000 + 990; puti(BackColors30511, ForeColors30511); var dthens30511 = new Date(TargetDates30511); var dnows30511 = new Date("09/08/2024 2:23:51 AM"); if(CountSteppers30511>0) ddiffs30511 = new Date(dnows30511-dthens30511); else ddiffs30511 = new Date(dthens30511-dnows30511); gsecss30511 = Math.floor(ddiffs30511.valueOf()/1000); CountBacks30511(gsecss30511);