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 (LeadingZeros30242 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30242(secs) { if (secs < 0) { document.getElementById("cntdwns30242").innerHTML = FinishMessages30242; return; } DisplayStrs30242 = DisplayFormats30242.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30242 = DisplayStrs30242.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30242 = DisplayStrs30242.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30242 = DisplayStrs30242.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30242").innerHTML = DisplayStrs30242; if (CountActives30242) //alert(SetTimeOutPeriods30242); setTimeout("CountBacks30242(" + (secs+CountSteppers30242) + ")", SetTimeOutPeriods30242); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30242)=="undefined") BackColors30242 = ""; if (typeof(ForeColors30242)=="undefined") ForeColors30242= "white"; if (typeof(TargetDates30242)=="undefined") TargetDates30242 = "04/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30242)=="undefined") DisplayFormats30242 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30242)=="undefined") CountActives30242 = true; if (typeof(FinishMessages30242)=="undefined") FinishMessages30242 = ""; if (typeof(CountSteppers30242)!="number") CountSteppers30242 = -1; if (typeof(LeadingZeros30242)=="undefined") LeadingZeros30242 = true; CountSteppers30242 = Math.ceil(CountSteppers30242); if (CountSteppers30242 == 0) CountActives30242 = false; var SetTimeOutPeriods30242 = (Math.abs(CountSteppers30242)-1)*1000 + 990; puti(BackColors30242, ForeColors30242); var dthens30242 = new Date(TargetDates30242); var dnows30242 = new Date("05/14/2024 1:12:14 PM"); if(CountSteppers30242>0) ddiffs30242 = new Date(dnows30242-dthens30242); else ddiffs30242 = new Date(dthens30242-dnows30242); gsecss30242 = Math.floor(ddiffs30242.valueOf()/1000); CountBacks30242(gsecss30242);