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 (LeadingZeros30846 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30846(secs) { if (secs < 0) { document.getElementById("cntdwns30846").innerHTML = FinishMessages30846; return; } DisplayStrs30846 = DisplayFormats30846.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30846 = DisplayStrs30846.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30846 = DisplayStrs30846.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30846 = DisplayStrs30846.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30846").innerHTML = DisplayStrs30846; if (CountActives30846) //alert(SetTimeOutPeriods30846); setTimeout("CountBacks30846(" + (secs+CountSteppers30846) + ")", SetTimeOutPeriods30846); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30846)=="undefined") BackColors30846 = ""; if (typeof(ForeColors30846)=="undefined") ForeColors30846= "white"; if (typeof(TargetDates30846)=="undefined") TargetDates30846 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30846)=="undefined") DisplayFormats30846 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30846)=="undefined") CountActives30846 = true; if (typeof(FinishMessages30846)=="undefined") FinishMessages30846 = ""; if (typeof(CountSteppers30846)!="number") CountSteppers30846 = -1; if (typeof(LeadingZeros30846)=="undefined") LeadingZeros30846 = true; CountSteppers30846 = Math.ceil(CountSteppers30846); if (CountSteppers30846 == 0) CountActives30846 = false; var SetTimeOutPeriods30846 = (Math.abs(CountSteppers30846)-1)*1000 + 990; puti(BackColors30846, ForeColors30846); var dthens30846 = new Date(TargetDates30846); var dnows30846 = new Date("09/08/2024 2:20:08 AM"); if(CountSteppers30846>0) ddiffs30846 = new Date(dnows30846-dthens30846); else ddiffs30846 = new Date(dthens30846-dnows30846); gsecss30846 = Math.floor(ddiffs30846.valueOf()/1000); CountBacks30846(gsecss30846);