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 (LeadingZeros30699 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30699(secs) { if (secs < 0) { document.getElementById("cntdwns30699").innerHTML = FinishMessages30699; return; } DisplayStrs30699 = DisplayFormats30699.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30699 = DisplayStrs30699.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30699 = DisplayStrs30699.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30699 = DisplayStrs30699.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30699").innerHTML = DisplayStrs30699; if (CountActives30699) //alert(SetTimeOutPeriods30699); setTimeout("CountBacks30699(" + (secs+CountSteppers30699) + ")", SetTimeOutPeriods30699); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30699)=="undefined") BackColors30699 = ""; if (typeof(ForeColors30699)=="undefined") ForeColors30699= "white"; if (typeof(TargetDates30699)=="undefined") TargetDates30699 = "07/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30699)=="undefined") DisplayFormats30699 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30699)=="undefined") CountActives30699 = true; if (typeof(FinishMessages30699)=="undefined") FinishMessages30699 = ""; if (typeof(CountSteppers30699)!="number") CountSteppers30699 = -1; if (typeof(LeadingZeros30699)=="undefined") LeadingZeros30699 = true; CountSteppers30699 = Math.ceil(CountSteppers30699); if (CountSteppers30699 == 0) CountActives30699 = false; var SetTimeOutPeriods30699 = (Math.abs(CountSteppers30699)-1)*1000 + 990; puti(BackColors30699, ForeColors30699); var dthens30699 = new Date(TargetDates30699); var dnows30699 = new Date("09/08/2024 2:15:51 AM"); if(CountSteppers30699>0) ddiffs30699 = new Date(dnows30699-dthens30699); else ddiffs30699 = new Date(dthens30699-dnows30699); gsecss30699 = Math.floor(ddiffs30699.valueOf()/1000); CountBacks30699(gsecss30699);