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 (LeadingZeros30209 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30209(secs) { if (secs < 0) { document.getElementById("cntdwns30209").innerHTML = FinishMessages30209; return; } DisplayStrs30209 = DisplayFormats30209.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30209 = DisplayStrs30209.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30209 = DisplayStrs30209.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30209 = DisplayStrs30209.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30209").innerHTML = DisplayStrs30209; if (CountActives30209) //alert(SetTimeOutPeriods30209); setTimeout("CountBacks30209(" + (secs+CountSteppers30209) + ")", SetTimeOutPeriods30209); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30209)=="undefined") BackColors30209 = ""; if (typeof(ForeColors30209)=="undefined") ForeColors30209= "white"; if (typeof(TargetDates30209)=="undefined") TargetDates30209 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats30209)=="undefined") DisplayFormats30209 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30209)=="undefined") CountActives30209 = true; if (typeof(FinishMessages30209)=="undefined") FinishMessages30209 = ""; if (typeof(CountSteppers30209)!="number") CountSteppers30209 = -1; if (typeof(LeadingZeros30209)=="undefined") LeadingZeros30209 = true; CountSteppers30209 = Math.ceil(CountSteppers30209); if (CountSteppers30209 == 0) CountActives30209 = false; var SetTimeOutPeriods30209 = (Math.abs(CountSteppers30209)-1)*1000 + 990; puti(BackColors30209, ForeColors30209); var dthens30209 = new Date(TargetDates30209); var dnows30209 = new Date("05/07/2024 10:34:17 PM"); if(CountSteppers30209>0) ddiffs30209 = new Date(dnows30209-dthens30209); else ddiffs30209 = new Date(dthens30209-dnows30209); gsecss30209 = Math.floor(ddiffs30209.valueOf()/1000); CountBacks30209(gsecss30209);