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 (LeadingZeros30358 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30358(secs) { if (secs < 0) { document.getElementById("cntdwns30358").innerHTML = FinishMessages30358; return; } DisplayStrs30358 = DisplayFormats30358.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30358 = DisplayStrs30358.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30358 = DisplayStrs30358.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30358 = DisplayStrs30358.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30358").innerHTML = DisplayStrs30358; if (CountActives30358) //alert(SetTimeOutPeriods30358); setTimeout("CountBacks30358(" + (secs+CountSteppers30358) + ")", SetTimeOutPeriods30358); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30358)=="undefined") BackColors30358 = ""; if (typeof(ForeColors30358)=="undefined") ForeColors30358= "white"; if (typeof(TargetDates30358)=="undefined") TargetDates30358 = "04/20/2024 10:00:00 PM"; if (typeof(DisplayFormats30358)=="undefined") DisplayFormats30358 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30358)=="undefined") CountActives30358 = true; if (typeof(FinishMessages30358)=="undefined") FinishMessages30358 = ""; if (typeof(CountSteppers30358)!="number") CountSteppers30358 = -1; if (typeof(LeadingZeros30358)=="undefined") LeadingZeros30358 = true; CountSteppers30358 = Math.ceil(CountSteppers30358); if (CountSteppers30358 == 0) CountActives30358 = false; var SetTimeOutPeriods30358 = (Math.abs(CountSteppers30358)-1)*1000 + 990; puti(BackColors30358, ForeColors30358); var dthens30358 = new Date(TargetDates30358); var dnows30358 = new Date("05/01/2024 2:24:20 AM"); if(CountSteppers30358>0) ddiffs30358 = new Date(dnows30358-dthens30358); else ddiffs30358 = new Date(dthens30358-dnows30358); gsecss30358 = Math.floor(ddiffs30358.valueOf()/1000); CountBacks30358(gsecss30358);