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 (LeadingZeros29210 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29210(secs) { if (secs < 0) { document.getElementById("cntdwns29210").innerHTML = FinishMessages29210; return; } DisplayStrs29210 = DisplayFormats29210.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29210 = DisplayStrs29210.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29210 = DisplayStrs29210.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29210 = DisplayStrs29210.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29210").innerHTML = DisplayStrs29210; if (CountActives29210) //alert(SetTimeOutPeriods29210); setTimeout("CountBacks29210(" + (secs+CountSteppers29210) + ")", SetTimeOutPeriods29210); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29210)=="undefined") BackColors29210 = ""; if (typeof(ForeColors29210)=="undefined") ForeColors29210= "white"; if (typeof(TargetDates29210)=="undefined") TargetDates29210 = "12/03/2023 9:00:00 PM"; if (typeof(DisplayFormats29210)=="undefined") DisplayFormats29210 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29210)=="undefined") CountActives29210 = true; if (typeof(FinishMessages29210)=="undefined") FinishMessages29210 = ""; if (typeof(CountSteppers29210)!="number") CountSteppers29210 = -1; if (typeof(LeadingZeros29210)=="undefined") LeadingZeros29210 = true; CountSteppers29210 = Math.ceil(CountSteppers29210); if (CountSteppers29210 == 0) CountActives29210 = false; var SetTimeOutPeriods29210 = (Math.abs(CountSteppers29210)-1)*1000 + 990; puti(BackColors29210, ForeColors29210); var dthens29210 = new Date(TargetDates29210); var dnows29210 = new Date("05/09/2025 12:57:00 PM"); if(CountSteppers29210>0) ddiffs29210 = new Date(dnows29210-dthens29210); else ddiffs29210 = new Date(dthens29210-dnows29210); gsecss29210 = Math.floor(ddiffs29210.valueOf()/1000); CountBacks29210(gsecss29210);