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 (LeadingZeros30946 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30946(secs) { if (secs < 0) { document.getElementById("cntdwns30946").innerHTML = FinishMessages30946; return; } DisplayStrs30946 = DisplayFormats30946.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30946 = DisplayStrs30946.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30946 = DisplayStrs30946.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30946 = DisplayStrs30946.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30946").innerHTML = DisplayStrs30946; if (CountActives30946) //alert(SetTimeOutPeriods30946); setTimeout("CountBacks30946(" + (secs+CountSteppers30946) + ")", SetTimeOutPeriods30946); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30946)=="undefined") BackColors30946 = ""; if (typeof(ForeColors30946)=="undefined") ForeColors30946= "white"; if (typeof(TargetDates30946)=="undefined") TargetDates30946 = "10/26/2024 10:00:00 PM"; if (typeof(DisplayFormats30946)=="undefined") DisplayFormats30946 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30946)=="undefined") CountActives30946 = true; if (typeof(FinishMessages30946)=="undefined") FinishMessages30946 = ""; if (typeof(CountSteppers30946)!="number") CountSteppers30946 = -1; if (typeof(LeadingZeros30946)=="undefined") LeadingZeros30946 = true; CountSteppers30946 = Math.ceil(CountSteppers30946); if (CountSteppers30946 == 0) CountActives30946 = false; var SetTimeOutPeriods30946 = (Math.abs(CountSteppers30946)-1)*1000 + 990; puti(BackColors30946, ForeColors30946); var dthens30946 = new Date(TargetDates30946); var dnows30946 = new Date("10/26/2024 7:52:00 AM"); if(CountSteppers30946>0) ddiffs30946 = new Date(dnows30946-dthens30946); else ddiffs30946 = new Date(dthens30946-dnows30946); gsecss30946 = Math.floor(ddiffs30946.valueOf()/1000); CountBacks30946(gsecss30946);