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 (LeadingZeros30017 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30017(secs) { if (secs < 0) { document.getElementById("cntdwns30017").innerHTML = FinishMessages30017; return; } DisplayStrs30017 = DisplayFormats30017.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30017 = DisplayStrs30017.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30017 = DisplayStrs30017.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30017 = DisplayStrs30017.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30017").innerHTML = DisplayStrs30017; if (CountActives30017) //alert(SetTimeOutPeriods30017); setTimeout("CountBacks30017(" + (secs+CountSteppers30017) + ")", SetTimeOutPeriods30017); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30017)=="undefined") BackColors30017 = ""; if (typeof(ForeColors30017)=="undefined") ForeColors30017= "white"; if (typeof(TargetDates30017)=="undefined") TargetDates30017 = "04/21/2024 10:00:00 PM"; if (typeof(DisplayFormats30017)=="undefined") DisplayFormats30017 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30017)=="undefined") CountActives30017 = true; if (typeof(FinishMessages30017)=="undefined") FinishMessages30017 = ""; if (typeof(CountSteppers30017)!="number") CountSteppers30017 = -1; if (typeof(LeadingZeros30017)=="undefined") LeadingZeros30017 = true; CountSteppers30017 = Math.ceil(CountSteppers30017); if (CountSteppers30017 == 0) CountActives30017 = false; var SetTimeOutPeriods30017 = (Math.abs(CountSteppers30017)-1)*1000 + 990; puti(BackColors30017, ForeColors30017); var dthens30017 = new Date(TargetDates30017); var dnows30017 = new Date("05/01/2024 6:15:21 PM"); if(CountSteppers30017>0) ddiffs30017 = new Date(dnows30017-dthens30017); else ddiffs30017 = new Date(dthens30017-dnows30017); gsecss30017 = Math.floor(ddiffs30017.valueOf()/1000); CountBacks30017(gsecss30017);