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 (LeadingZeros29502 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29502(secs) { if (secs < 0) { document.getElementById("cntdwns29502").innerHTML = FinishMessages29502; return; } DisplayStrs29502 = DisplayFormats29502.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29502 = DisplayStrs29502.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29502 = DisplayStrs29502.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29502 = DisplayStrs29502.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29502").innerHTML = DisplayStrs29502; if (CountActives29502) //alert(SetTimeOutPeriods29502); setTimeout("CountBacks29502(" + (secs+CountSteppers29502) + ")", SetTimeOutPeriods29502); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29502)=="undefined") BackColors29502 = ""; if (typeof(ForeColors29502)=="undefined") ForeColors29502= "white"; if (typeof(TargetDates29502)=="undefined") TargetDates29502 = "12/11/2023 10:00:00 PM"; if (typeof(DisplayFormats29502)=="undefined") DisplayFormats29502 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29502)=="undefined") CountActives29502 = true; if (typeof(FinishMessages29502)=="undefined") FinishMessages29502 = ""; if (typeof(CountSteppers29502)!="number") CountSteppers29502 = -1; if (typeof(LeadingZeros29502)=="undefined") LeadingZeros29502 = true; CountSteppers29502 = Math.ceil(CountSteppers29502); if (CountSteppers29502 == 0) CountActives29502 = false; var SetTimeOutPeriods29502 = (Math.abs(CountSteppers29502)-1)*1000 + 990; puti(BackColors29502, ForeColors29502); var dthens29502 = new Date(TargetDates29502); var dnows29502 = new Date("05/09/2025 6:39:01 AM"); if(CountSteppers29502>0) ddiffs29502 = new Date(dnows29502-dthens29502); else ddiffs29502 = new Date(dthens29502-dnows29502); gsecss29502 = Math.floor(ddiffs29502.valueOf()/1000); CountBacks29502(gsecss29502);