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 (LeadingZeros30959 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30959(secs) { if (secs < 0) { document.getElementById("cntdwns30959").innerHTML = FinishMessages30959; return; } DisplayStrs30959 = DisplayFormats30959.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30959 = DisplayStrs30959.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30959 = DisplayStrs30959.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30959 = DisplayStrs30959.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30959").innerHTML = DisplayStrs30959; if (CountActives30959) //alert(SetTimeOutPeriods30959); setTimeout("CountBacks30959(" + (secs+CountSteppers30959) + ")", SetTimeOutPeriods30959); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30959)=="undefined") BackColors30959 = ""; if (typeof(ForeColors30959)=="undefined") ForeColors30959= "white"; if (typeof(TargetDates30959)=="undefined") TargetDates30959 = "11/11/2024 9:00:00 PM"; if (typeof(DisplayFormats30959)=="undefined") DisplayFormats30959 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30959)=="undefined") CountActives30959 = true; if (typeof(FinishMessages30959)=="undefined") FinishMessages30959 = ""; if (typeof(CountSteppers30959)!="number") CountSteppers30959 = -1; if (typeof(LeadingZeros30959)=="undefined") LeadingZeros30959 = true; CountSteppers30959 = Math.ceil(CountSteppers30959); if (CountSteppers30959 == 0) CountActives30959 = false; var SetTimeOutPeriods30959 = (Math.abs(CountSteppers30959)-1)*1000 + 990; puti(BackColors30959, ForeColors30959); var dthens30959 = new Date(TargetDates30959); var dnows30959 = new Date("11/09/2024 2:20:16 AM"); if(CountSteppers30959>0) ddiffs30959 = new Date(dnows30959-dthens30959); else ddiffs30959 = new Date(dthens30959-dnows30959); gsecss30959 = Math.floor(ddiffs30959.valueOf()/1000); CountBacks30959(gsecss30959);