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 (LeadingZeros30230 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30230(secs) { if (secs < 0) { document.getElementById("cntdwns30230").innerHTML = FinishMessages30230; return; } DisplayStrs30230 = DisplayFormats30230.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30230 = DisplayStrs30230.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30230 = DisplayStrs30230.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30230 = DisplayStrs30230.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30230").innerHTML = DisplayStrs30230; if (CountActives30230) //alert(SetTimeOutPeriods30230); setTimeout("CountBacks30230(" + (secs+CountSteppers30230) + ")", SetTimeOutPeriods30230); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30230)=="undefined") BackColors30230 = ""; if (typeof(ForeColors30230)=="undefined") ForeColors30230= "white"; if (typeof(TargetDates30230)=="undefined") TargetDates30230 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30230)=="undefined") DisplayFormats30230 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30230)=="undefined") CountActives30230 = true; if (typeof(FinishMessages30230)=="undefined") FinishMessages30230 = ""; if (typeof(CountSteppers30230)!="number") CountSteppers30230 = -1; if (typeof(LeadingZeros30230)=="undefined") LeadingZeros30230 = true; CountSteppers30230 = Math.ceil(CountSteppers30230); if (CountSteppers30230 == 0) CountActives30230 = false; var SetTimeOutPeriods30230 = (Math.abs(CountSteppers30230)-1)*1000 + 990; puti(BackColors30230, ForeColors30230); var dthens30230 = new Date(TargetDates30230); var dnows30230 = new Date("05/04/2024 5:13:53 PM"); if(CountSteppers30230>0) ddiffs30230 = new Date(dnows30230-dthens30230); else ddiffs30230 = new Date(dthens30230-dnows30230); gsecss30230 = Math.floor(ddiffs30230.valueOf()/1000); CountBacks30230(gsecss30230);