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 (LeadingZeros30139 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30139(secs) { if (secs < 0) { document.getElementById("cntdwns30139").innerHTML = FinishMessages30139; return; } DisplayStrs30139 = DisplayFormats30139.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30139 = DisplayStrs30139.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30139 = DisplayStrs30139.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30139 = DisplayStrs30139.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30139").innerHTML = DisplayStrs30139; if (CountActives30139) //alert(SetTimeOutPeriods30139); setTimeout("CountBacks30139(" + (secs+CountSteppers30139) + ")", SetTimeOutPeriods30139); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30139)=="undefined") BackColors30139 = ""; if (typeof(ForeColors30139)=="undefined") ForeColors30139= "white"; if (typeof(TargetDates30139)=="undefined") TargetDates30139 = "03/31/2024 10:00:00 PM"; if (typeof(DisplayFormats30139)=="undefined") DisplayFormats30139 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30139)=="undefined") CountActives30139 = true; if (typeof(FinishMessages30139)=="undefined") FinishMessages30139 = ""; if (typeof(CountSteppers30139)!="number") CountSteppers30139 = -1; if (typeof(LeadingZeros30139)=="undefined") LeadingZeros30139 = true; CountSteppers30139 = Math.ceil(CountSteppers30139); if (CountSteppers30139 == 0) CountActives30139 = false; var SetTimeOutPeriods30139 = (Math.abs(CountSteppers30139)-1)*1000 + 990; puti(BackColors30139, ForeColors30139); var dthens30139 = new Date(TargetDates30139); var dnows30139 = new Date("04/28/2024 12:14:00 AM"); if(CountSteppers30139>0) ddiffs30139 = new Date(dnows30139-dthens30139); else ddiffs30139 = new Date(dthens30139-dnows30139); gsecss30139 = Math.floor(ddiffs30139.valueOf()/1000); CountBacks30139(gsecss30139);