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 (LeadingZeros30045 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30045(secs) { if (secs < 0) { document.getElementById("cntdwns30045").innerHTML = FinishMessages30045; return; } DisplayStrs30045 = DisplayFormats30045.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30045 = DisplayStrs30045.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30045 = DisplayStrs30045.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30045 = DisplayStrs30045.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30045").innerHTML = DisplayStrs30045; if (CountActives30045) //alert(SetTimeOutPeriods30045); setTimeout("CountBacks30045(" + (secs+CountSteppers30045) + ")", SetTimeOutPeriods30045); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30045)=="undefined") BackColors30045 = ""; if (typeof(ForeColors30045)=="undefined") ForeColors30045= "white"; if (typeof(TargetDates30045)=="undefined") TargetDates30045 = "03/30/2024 10:00:00 PM"; if (typeof(DisplayFormats30045)=="undefined") DisplayFormats30045 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30045)=="undefined") CountActives30045 = true; if (typeof(FinishMessages30045)=="undefined") FinishMessages30045 = ""; if (typeof(CountSteppers30045)!="number") CountSteppers30045 = -1; if (typeof(LeadingZeros30045)=="undefined") LeadingZeros30045 = true; CountSteppers30045 = Math.ceil(CountSteppers30045); if (CountSteppers30045 == 0) CountActives30045 = false; var SetTimeOutPeriods30045 = (Math.abs(CountSteppers30045)-1)*1000 + 990; puti(BackColors30045, ForeColors30045); var dthens30045 = new Date(TargetDates30045); var dnows30045 = new Date("04/27/2024 2:15:05 PM"); if(CountSteppers30045>0) ddiffs30045 = new Date(dnows30045-dthens30045); else ddiffs30045 = new Date(dthens30045-dnows30045); gsecss30045 = Math.floor(ddiffs30045.valueOf()/1000); CountBacks30045(gsecss30045);