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 (LeadingZeros30172 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30172(secs) { if (secs < 0) { document.getElementById("cntdwns30172").innerHTML = FinishMessages30172; return; } DisplayStrs30172 = DisplayFormats30172.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30172 = DisplayStrs30172.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30172 = DisplayStrs30172.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30172 = DisplayStrs30172.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30172").innerHTML = DisplayStrs30172; if (CountActives30172) //alert(SetTimeOutPeriods30172); setTimeout("CountBacks30172(" + (secs+CountSteppers30172) + ")", SetTimeOutPeriods30172); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30172)=="undefined") BackColors30172 = ""; if (typeof(ForeColors30172)=="undefined") ForeColors30172= "white"; if (typeof(TargetDates30172)=="undefined") TargetDates30172 = "04/22/2024 11:00:00 PM"; if (typeof(DisplayFormats30172)=="undefined") DisplayFormats30172 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30172)=="undefined") CountActives30172 = true; if (typeof(FinishMessages30172)=="undefined") FinishMessages30172 = ""; if (typeof(CountSteppers30172)!="number") CountSteppers30172 = -1; if (typeof(LeadingZeros30172)=="undefined") LeadingZeros30172 = true; CountSteppers30172 = Math.ceil(CountSteppers30172); if (CountSteppers30172 == 0) CountActives30172 = false; var SetTimeOutPeriods30172 = (Math.abs(CountSteppers30172)-1)*1000 + 990; puti(BackColors30172, ForeColors30172); var dthens30172 = new Date(TargetDates30172); var dnows30172 = new Date("05/03/2024 4:17:37 AM"); if(CountSteppers30172>0) ddiffs30172 = new Date(dnows30172-dthens30172); else ddiffs30172 = new Date(dthens30172-dnows30172); gsecss30172 = Math.floor(ddiffs30172.valueOf()/1000); CountBacks30172(gsecss30172);