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 (LeadingZeros30125 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30125(secs) { if (secs < 0) { document.getElementById("cntdwns30125").innerHTML = FinishMessages30125; return; } DisplayStrs30125 = DisplayFormats30125.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30125 = DisplayStrs30125.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30125 = DisplayStrs30125.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30125 = DisplayStrs30125.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30125").innerHTML = DisplayStrs30125; if (CountActives30125) //alert(SetTimeOutPeriods30125); setTimeout("CountBacks30125(" + (secs+CountSteppers30125) + ")", SetTimeOutPeriods30125); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30125)=="undefined") BackColors30125 = ""; if (typeof(ForeColors30125)=="undefined") ForeColors30125= "white"; if (typeof(TargetDates30125)=="undefined") TargetDates30125 = "04/01/2024 11:00:00 PM"; if (typeof(DisplayFormats30125)=="undefined") DisplayFormats30125 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30125)=="undefined") CountActives30125 = true; if (typeof(FinishMessages30125)=="undefined") FinishMessages30125 = ""; if (typeof(CountSteppers30125)!="number") CountSteppers30125 = -1; if (typeof(LeadingZeros30125)=="undefined") LeadingZeros30125 = true; CountSteppers30125 = Math.ceil(CountSteppers30125); if (CountSteppers30125 == 0) CountActives30125 = false; var SetTimeOutPeriods30125 = (Math.abs(CountSteppers30125)-1)*1000 + 990; puti(BackColors30125, ForeColors30125); var dthens30125 = new Date(TargetDates30125); var dnows30125 = new Date("04/29/2024 5:42:29 AM"); if(CountSteppers30125>0) ddiffs30125 = new Date(dnows30125-dthens30125); else ddiffs30125 = new Date(dthens30125-dnows30125); gsecss30125 = Math.floor(ddiffs30125.valueOf()/1000); CountBacks30125(gsecss30125);