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 (LeadingZeros30520 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30520(secs) { if (secs < 0) { document.getElementById("cntdwns30520").innerHTML = FinishMessages30520; return; } DisplayStrs30520 = DisplayFormats30520.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30520 = DisplayStrs30520.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30520 = DisplayStrs30520.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30520 = DisplayStrs30520.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30520").innerHTML = DisplayStrs30520; if (CountActives30520) //alert(SetTimeOutPeriods30520); setTimeout("CountBacks30520(" + (secs+CountSteppers30520) + ")", SetTimeOutPeriods30520); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30520)=="undefined") BackColors30520 = ""; if (typeof(ForeColors30520)=="undefined") ForeColors30520= "white"; if (typeof(TargetDates30520)=="undefined") TargetDates30520 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30520)=="undefined") DisplayFormats30520 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30520)=="undefined") CountActives30520 = true; if (typeof(FinishMessages30520)=="undefined") FinishMessages30520 = ""; if (typeof(CountSteppers30520)!="number") CountSteppers30520 = -1; if (typeof(LeadingZeros30520)=="undefined") LeadingZeros30520 = true; CountSteppers30520 = Math.ceil(CountSteppers30520); if (CountSteppers30520 == 0) CountActives30520 = false; var SetTimeOutPeriods30520 = (Math.abs(CountSteppers30520)-1)*1000 + 990; puti(BackColors30520, ForeColors30520); var dthens30520 = new Date(TargetDates30520); var dnows30520 = new Date("09/08/2024 2:09:28 AM"); if(CountSteppers30520>0) ddiffs30520 = new Date(dnows30520-dthens30520); else ddiffs30520 = new Date(dthens30520-dnows30520); gsecss30520 = Math.floor(ddiffs30520.valueOf()/1000); CountBacks30520(gsecss30520);