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 (LeadingZeros30485 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30485(secs) { if (secs < 0) { document.getElementById("cntdwns30485").innerHTML = FinishMessages30485; return; } DisplayStrs30485 = DisplayFormats30485.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30485 = DisplayStrs30485.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30485 = DisplayStrs30485.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30485 = DisplayStrs30485.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30485").innerHTML = DisplayStrs30485; if (CountActives30485) //alert(SetTimeOutPeriods30485); setTimeout("CountBacks30485(" + (secs+CountSteppers30485) + ")", SetTimeOutPeriods30485); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30485)=="undefined") BackColors30485 = ""; if (typeof(ForeColors30485)=="undefined") ForeColors30485= "white"; if (typeof(TargetDates30485)=="undefined") TargetDates30485 = "05/05/2024 10:00:00 PM"; if (typeof(DisplayFormats30485)=="undefined") DisplayFormats30485 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30485)=="undefined") CountActives30485 = true; if (typeof(FinishMessages30485)=="undefined") FinishMessages30485 = ""; if (typeof(CountSteppers30485)!="number") CountSteppers30485 = -1; if (typeof(LeadingZeros30485)=="undefined") LeadingZeros30485 = true; CountSteppers30485 = Math.ceil(CountSteppers30485); if (CountSteppers30485 == 0) CountActives30485 = false; var SetTimeOutPeriods30485 = (Math.abs(CountSteppers30485)-1)*1000 + 990; puti(BackColors30485, ForeColors30485); var dthens30485 = new Date(TargetDates30485); var dnows30485 = new Date("05/17/2024 10:02:53 AM"); if(CountSteppers30485>0) ddiffs30485 = new Date(dnows30485-dthens30485); else ddiffs30485 = new Date(dthens30485-dnows30485); gsecss30485 = Math.floor(ddiffs30485.valueOf()/1000); CountBacks30485(gsecss30485);