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 (LeadingZeros30362 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30362(secs) { if (secs < 0) { document.getElementById("cntdwns30362").innerHTML = FinishMessages30362; return; } DisplayStrs30362 = DisplayFormats30362.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30362 = DisplayStrs30362.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30362 = DisplayStrs30362.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30362 = DisplayStrs30362.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30362").innerHTML = DisplayStrs30362; if (CountActives30362) //alert(SetTimeOutPeriods30362); setTimeout("CountBacks30362(" + (secs+CountSteppers30362) + ")", SetTimeOutPeriods30362); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30362)=="undefined") BackColors30362 = ""; if (typeof(ForeColors30362)=="undefined") ForeColors30362= "white"; if (typeof(TargetDates30362)=="undefined") TargetDates30362 = "04/22/2024 10:00:00 PM"; if (typeof(DisplayFormats30362)=="undefined") DisplayFormats30362 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30362)=="undefined") CountActives30362 = true; if (typeof(FinishMessages30362)=="undefined") FinishMessages30362 = ""; if (typeof(CountSteppers30362)!="number") CountSteppers30362 = -1; if (typeof(LeadingZeros30362)=="undefined") LeadingZeros30362 = true; CountSteppers30362 = Math.ceil(CountSteppers30362); if (CountSteppers30362 == 0) CountActives30362 = false; var SetTimeOutPeriods30362 = (Math.abs(CountSteppers30362)-1)*1000 + 990; puti(BackColors30362, ForeColors30362); var dthens30362 = new Date(TargetDates30362); var dnows30362 = new Date("05/02/2024 2:01:06 PM"); if(CountSteppers30362>0) ddiffs30362 = new Date(dnows30362-dthens30362); else ddiffs30362 = new Date(dthens30362-dnows30362); gsecss30362 = Math.floor(ddiffs30362.valueOf()/1000); CountBacks30362(gsecss30362);