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 (LeadingZeros30317 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30317(secs) { if (secs < 0) { document.getElementById("cntdwns30317").innerHTML = FinishMessages30317; return; } DisplayStrs30317 = DisplayFormats30317.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30317 = DisplayStrs30317.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30317 = DisplayStrs30317.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30317 = DisplayStrs30317.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30317").innerHTML = DisplayStrs30317; if (CountActives30317) //alert(SetTimeOutPeriods30317); setTimeout("CountBacks30317(" + (secs+CountSteppers30317) + ")", SetTimeOutPeriods30317); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30317)=="undefined") BackColors30317 = ""; if (typeof(ForeColors30317)=="undefined") ForeColors30317= "white"; if (typeof(TargetDates30317)=="undefined") TargetDates30317 = "04/22/2024 10:00:00 PM"; if (typeof(DisplayFormats30317)=="undefined") DisplayFormats30317 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30317)=="undefined") CountActives30317 = true; if (typeof(FinishMessages30317)=="undefined") FinishMessages30317 = ""; if (typeof(CountSteppers30317)!="number") CountSteppers30317 = -1; if (typeof(LeadingZeros30317)=="undefined") LeadingZeros30317 = true; CountSteppers30317 = Math.ceil(CountSteppers30317); if (CountSteppers30317 == 0) CountActives30317 = false; var SetTimeOutPeriods30317 = (Math.abs(CountSteppers30317)-1)*1000 + 990; puti(BackColors30317, ForeColors30317); var dthens30317 = new Date(TargetDates30317); var dnows30317 = new Date("05/03/2024 10:53:40 AM"); if(CountSteppers30317>0) ddiffs30317 = new Date(dnows30317-dthens30317); else ddiffs30317 = new Date(dthens30317-dnows30317); gsecss30317 = Math.floor(ddiffs30317.valueOf()/1000); CountBacks30317(gsecss30317);