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 (LeadingZeros30716 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30716(secs) { if (secs < 0) { document.getElementById("cntdwns30716").innerHTML = FinishMessages30716; return; } DisplayStrs30716 = DisplayFormats30716.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30716 = DisplayStrs30716.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30716 = DisplayStrs30716.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30716 = DisplayStrs30716.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30716").innerHTML = DisplayStrs30716; if (CountActives30716) //alert(SetTimeOutPeriods30716); setTimeout("CountBacks30716(" + (secs+CountSteppers30716) + ")", SetTimeOutPeriods30716); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30716)=="undefined") BackColors30716 = ""; if (typeof(ForeColors30716)=="undefined") ForeColors30716= "white"; if (typeof(TargetDates30716)=="undefined") TargetDates30716 = "11/15/2024 9:00:00 PM"; if (typeof(DisplayFormats30716)=="undefined") DisplayFormats30716 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30716)=="undefined") CountActives30716 = true; if (typeof(FinishMessages30716)=="undefined") FinishMessages30716 = ""; if (typeof(CountSteppers30716)!="number") CountSteppers30716 = -1; if (typeof(LeadingZeros30716)=="undefined") LeadingZeros30716 = true; CountSteppers30716 = Math.ceil(CountSteppers30716); if (CountSteppers30716 == 0) CountActives30716 = false; var SetTimeOutPeriods30716 = (Math.abs(CountSteppers30716)-1)*1000 + 990; puti(BackColors30716, ForeColors30716); var dthens30716 = new Date(TargetDates30716); var dnows30716 = new Date("11/13/2024 1:46:20 AM"); if(CountSteppers30716>0) ddiffs30716 = new Date(dnows30716-dthens30716); else ddiffs30716 = new Date(dthens30716-dnows30716); gsecss30716 = Math.floor(ddiffs30716.valueOf()/1000); CountBacks30716(gsecss30716);