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 (LeadingZeros29990 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29990(secs) { if (secs < 0) { document.getElementById("cntdwns29990").innerHTML = FinishMessages29990; return; } DisplayStrs29990 = DisplayFormats29990.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29990 = DisplayStrs29990.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29990 = DisplayStrs29990.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29990 = DisplayStrs29990.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29990").innerHTML = DisplayStrs29990; if (CountActives29990) //alert(SetTimeOutPeriods29990); setTimeout("CountBacks29990(" + (secs+CountSteppers29990) + ")", SetTimeOutPeriods29990); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29990)=="undefined") BackColors29990 = ""; if (typeof(ForeColors29990)=="undefined") ForeColors29990= "white"; if (typeof(TargetDates29990)=="undefined") TargetDates29990 = "04/19/2024 11:00:00 PM"; if (typeof(DisplayFormats29990)=="undefined") DisplayFormats29990 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29990)=="undefined") CountActives29990 = true; if (typeof(FinishMessages29990)=="undefined") FinishMessages29990 = ""; if (typeof(CountSteppers29990)!="number") CountSteppers29990 = -1; if (typeof(LeadingZeros29990)=="undefined") LeadingZeros29990 = true; CountSteppers29990 = Math.ceil(CountSteppers29990); if (CountSteppers29990 == 0) CountActives29990 = false; var SetTimeOutPeriods29990 = (Math.abs(CountSteppers29990)-1)*1000 + 990; puti(BackColors29990, ForeColors29990); var dthens29990 = new Date(TargetDates29990); var dnows29990 = new Date("04/30/2024 3:09:59 AM"); if(CountSteppers29990>0) ddiffs29990 = new Date(dnows29990-dthens29990); else ddiffs29990 = new Date(dthens29990-dnows29990); gsecss29990 = Math.floor(ddiffs29990.valueOf()/1000); CountBacks29990(gsecss29990);