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 (LeadingZeros30111 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30111(secs) { if (secs < 0) { document.getElementById("cntdwns30111").innerHTML = FinishMessages30111; return; } DisplayStrs30111 = DisplayFormats30111.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30111 = DisplayStrs30111.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30111 = DisplayStrs30111.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30111 = DisplayStrs30111.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30111").innerHTML = DisplayStrs30111; if (CountActives30111) //alert(SetTimeOutPeriods30111); setTimeout("CountBacks30111(" + (secs+CountSteppers30111) + ")", SetTimeOutPeriods30111); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30111)=="undefined") BackColors30111 = ""; if (typeof(ForeColors30111)=="undefined") ForeColors30111= "white"; if (typeof(TargetDates30111)=="undefined") TargetDates30111 = "04/19/2024 11:00:00 PM"; if (typeof(DisplayFormats30111)=="undefined") DisplayFormats30111 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30111)=="undefined") CountActives30111 = true; if (typeof(FinishMessages30111)=="undefined") FinishMessages30111 = ""; if (typeof(CountSteppers30111)!="number") CountSteppers30111 = -1; if (typeof(LeadingZeros30111)=="undefined") LeadingZeros30111 = true; CountSteppers30111 = Math.ceil(CountSteppers30111); if (CountSteppers30111 == 0) CountActives30111 = false; var SetTimeOutPeriods30111 = (Math.abs(CountSteppers30111)-1)*1000 + 990; puti(BackColors30111, ForeColors30111); var dthens30111 = new Date(TargetDates30111); var dnows30111 = new Date("04/30/2024 4:08:46 AM"); if(CountSteppers30111>0) ddiffs30111 = new Date(dnows30111-dthens30111); else ddiffs30111 = new Date(dthens30111-dnows30111); gsecss30111 = Math.floor(ddiffs30111.valueOf()/1000); CountBacks30111(gsecss30111);