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 (LeadingZeros29245 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29245(secs) { if (secs < 0) { document.getElementById("cntdwns29245").innerHTML = FinishMessages29245; return; } DisplayStrs29245 = DisplayFormats29245.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29245 = DisplayStrs29245.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29245 = DisplayStrs29245.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29245 = DisplayStrs29245.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29245").innerHTML = DisplayStrs29245; if (CountActives29245) //alert(SetTimeOutPeriods29245); setTimeout("CountBacks29245(" + (secs+CountSteppers29245) + ")", SetTimeOutPeriods29245); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29245)=="undefined") BackColors29245 = ""; if (typeof(ForeColors29245)=="undefined") ForeColors29245= "white"; if (typeof(TargetDates29245)=="undefined") TargetDates29245 = "12/09/2023 9:00:00 PM"; if (typeof(DisplayFormats29245)=="undefined") DisplayFormats29245 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29245)=="undefined") CountActives29245 = true; if (typeof(FinishMessages29245)=="undefined") FinishMessages29245 = ""; if (typeof(CountSteppers29245)!="number") CountSteppers29245 = -1; if (typeof(LeadingZeros29245)=="undefined") LeadingZeros29245 = true; CountSteppers29245 = Math.ceil(CountSteppers29245); if (CountSteppers29245 == 0) CountActives29245 = false; var SetTimeOutPeriods29245 = (Math.abs(CountSteppers29245)-1)*1000 + 990; puti(BackColors29245, ForeColors29245); var dthens29245 = new Date(TargetDates29245); var dnows29245 = new Date("05/09/2025 10:07:49 AM"); if(CountSteppers29245>0) ddiffs29245 = new Date(dnows29245-dthens29245); else ddiffs29245 = new Date(dthens29245-dnows29245); gsecss29245 = Math.floor(ddiffs29245.valueOf()/1000); CountBacks29245(gsecss29245);