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 (LeadingZeros30099 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30099(secs) { if (secs < 0) { document.getElementById("cntdwns30099").innerHTML = FinishMessages30099; return; } DisplayStrs30099 = DisplayFormats30099.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30099 = DisplayStrs30099.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30099 = DisplayStrs30099.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30099 = DisplayStrs30099.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30099").innerHTML = DisplayStrs30099; if (CountActives30099) //alert(SetTimeOutPeriods30099); setTimeout("CountBacks30099(" + (secs+CountSteppers30099) + ")", SetTimeOutPeriods30099); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30099)=="undefined") BackColors30099 = ""; if (typeof(ForeColors30099)=="undefined") ForeColors30099= "white"; if (typeof(TargetDates30099)=="undefined") TargetDates30099 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats30099)=="undefined") DisplayFormats30099 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30099)=="undefined") CountActives30099 = true; if (typeof(FinishMessages30099)=="undefined") FinishMessages30099 = ""; if (typeof(CountSteppers30099)!="number") CountSteppers30099 = -1; if (typeof(LeadingZeros30099)=="undefined") LeadingZeros30099 = true; CountSteppers30099 = Math.ceil(CountSteppers30099); if (CountSteppers30099 == 0) CountActives30099 = false; var SetTimeOutPeriods30099 = (Math.abs(CountSteppers30099)-1)*1000 + 990; puti(BackColors30099, ForeColors30099); var dthens30099 = new Date(TargetDates30099); var dnows30099 = new Date("04/29/2024 4:38:54 PM"); if(CountSteppers30099>0) ddiffs30099 = new Date(dnows30099-dthens30099); else ddiffs30099 = new Date(dthens30099-dnows30099); gsecss30099 = Math.floor(ddiffs30099.valueOf()/1000); CountBacks30099(gsecss30099);