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 (LeadingZeros30547 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30547(secs) { if (secs < 0) { document.getElementById("cntdwns30547").innerHTML = FinishMessages30547; return; } DisplayStrs30547 = DisplayFormats30547.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30547 = DisplayStrs30547.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30547 = DisplayStrs30547.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30547 = DisplayStrs30547.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30547").innerHTML = DisplayStrs30547; if (CountActives30547) //alert(SetTimeOutPeriods30547); setTimeout("CountBacks30547(" + (secs+CountSteppers30547) + ")", SetTimeOutPeriods30547); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30547)=="undefined") BackColors30547 = ""; if (typeof(ForeColors30547)=="undefined") ForeColors30547= "white"; if (typeof(TargetDates30547)=="undefined") TargetDates30547 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30547)=="undefined") DisplayFormats30547 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30547)=="undefined") CountActives30547 = true; if (typeof(FinishMessages30547)=="undefined") FinishMessages30547 = ""; if (typeof(CountSteppers30547)!="number") CountSteppers30547 = -1; if (typeof(LeadingZeros30547)=="undefined") LeadingZeros30547 = true; CountSteppers30547 = Math.ceil(CountSteppers30547); if (CountSteppers30547 == 0) CountActives30547 = false; var SetTimeOutPeriods30547 = (Math.abs(CountSteppers30547)-1)*1000 + 990; puti(BackColors30547, ForeColors30547); var dthens30547 = new Date(TargetDates30547); var dnows30547 = new Date("10/18/2024 6:38:47 AM"); if(CountSteppers30547>0) ddiffs30547 = new Date(dnows30547-dthens30547); else ddiffs30547 = new Date(dthens30547-dnows30547); gsecss30547 = Math.floor(ddiffs30547.valueOf()/1000); CountBacks30547(gsecss30547);