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 (LeadingZeros30059 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30059(secs) { if (secs < 0) { document.getElementById("cntdwns30059").innerHTML = FinishMessages30059; return; } DisplayStrs30059 = DisplayFormats30059.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30059 = DisplayStrs30059.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30059 = DisplayStrs30059.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30059 = DisplayStrs30059.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30059").innerHTML = DisplayStrs30059; if (CountActives30059) //alert(SetTimeOutPeriods30059); setTimeout("CountBacks30059(" + (secs+CountSteppers30059) + ")", SetTimeOutPeriods30059); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30059)=="undefined") BackColors30059 = ""; if (typeof(ForeColors30059)=="undefined") ForeColors30059= "white"; if (typeof(TargetDates30059)=="undefined") TargetDates30059 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats30059)=="undefined") DisplayFormats30059 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30059)=="undefined") CountActives30059 = true; if (typeof(FinishMessages30059)=="undefined") FinishMessages30059 = ""; if (typeof(CountSteppers30059)!="number") CountSteppers30059 = -1; if (typeof(LeadingZeros30059)=="undefined") LeadingZeros30059 = true; CountSteppers30059 = Math.ceil(CountSteppers30059); if (CountSteppers30059 == 0) CountActives30059 = false; var SetTimeOutPeriods30059 = (Math.abs(CountSteppers30059)-1)*1000 + 990; puti(BackColors30059, ForeColors30059); var dthens30059 = new Date(TargetDates30059); var dnows30059 = new Date("05/05/2024 1:57:03 PM"); if(CountSteppers30059>0) ddiffs30059 = new Date(dnows30059-dthens30059); else ddiffs30059 = new Date(dthens30059-dnows30059); gsecss30059 = Math.floor(ddiffs30059.valueOf()/1000); CountBacks30059(gsecss30059);