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 (LeadingZeros30085 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30085(secs) { if (secs < 0) { document.getElementById("cntdwns30085").innerHTML = FinishMessages30085; return; } DisplayStrs30085 = DisplayFormats30085.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30085 = DisplayStrs30085.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30085 = DisplayStrs30085.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30085 = DisplayStrs30085.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30085").innerHTML = DisplayStrs30085; if (CountActives30085) //alert(SetTimeOutPeriods30085); setTimeout("CountBacks30085(" + (secs+CountSteppers30085) + ")", SetTimeOutPeriods30085); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30085)=="undefined") BackColors30085 = ""; if (typeof(ForeColors30085)=="undefined") ForeColors30085= "white"; if (typeof(TargetDates30085)=="undefined") TargetDates30085 = "04/22/2024 10:00:00 PM"; if (typeof(DisplayFormats30085)=="undefined") DisplayFormats30085 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30085)=="undefined") CountActives30085 = true; if (typeof(FinishMessages30085)=="undefined") FinishMessages30085 = ""; if (typeof(CountSteppers30085)!="number") CountSteppers30085 = -1; if (typeof(LeadingZeros30085)=="undefined") LeadingZeros30085 = true; CountSteppers30085 = Math.ceil(CountSteppers30085); if (CountSteppers30085 == 0) CountActives30085 = false; var SetTimeOutPeriods30085 = (Math.abs(CountSteppers30085)-1)*1000 + 990; puti(BackColors30085, ForeColors30085); var dthens30085 = new Date(TargetDates30085); var dnows30085 = new Date("05/03/2024 6:18:18 AM"); if(CountSteppers30085>0) ddiffs30085 = new Date(dnows30085-dthens30085); else ddiffs30085 = new Date(dthens30085-dnows30085); gsecss30085 = Math.floor(ddiffs30085.valueOf()/1000); CountBacks30085(gsecss30085);