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 (LeadingZeros30158 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30158(secs) { if (secs < 0) { document.getElementById("cntdwns30158").innerHTML = FinishMessages30158; return; } DisplayStrs30158 = DisplayFormats30158.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30158 = DisplayStrs30158.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30158 = DisplayStrs30158.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30158 = DisplayStrs30158.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30158").innerHTML = DisplayStrs30158; if (CountActives30158) //alert(SetTimeOutPeriods30158); setTimeout("CountBacks30158(" + (secs+CountSteppers30158) + ")", SetTimeOutPeriods30158); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30158)=="undefined") BackColors30158 = ""; if (typeof(ForeColors30158)=="undefined") ForeColors30158= "white"; if (typeof(TargetDates30158)=="undefined") TargetDates30158 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats30158)=="undefined") DisplayFormats30158 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30158)=="undefined") CountActives30158 = true; if (typeof(FinishMessages30158)=="undefined") FinishMessages30158 = ""; if (typeof(CountSteppers30158)!="number") CountSteppers30158 = -1; if (typeof(LeadingZeros30158)=="undefined") LeadingZeros30158 = true; CountSteppers30158 = Math.ceil(CountSteppers30158); if (CountSteppers30158 == 0) CountActives30158 = false; var SetTimeOutPeriods30158 = (Math.abs(CountSteppers30158)-1)*1000 + 990; puti(BackColors30158, ForeColors30158); var dthens30158 = new Date(TargetDates30158); var dnows30158 = new Date("04/29/2024 5:06:40 PM"); if(CountSteppers30158>0) ddiffs30158 = new Date(dnows30158-dthens30158); else ddiffs30158 = new Date(dthens30158-dnows30158); gsecss30158 = Math.floor(ddiffs30158.valueOf()/1000); CountBacks30158(gsecss30158);