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 (LeadingZeros29212 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29212(secs) { if (secs < 0) { document.getElementById("cntdwns29212").innerHTML = FinishMessages29212; return; } DisplayStrs29212 = DisplayFormats29212.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29212 = DisplayStrs29212.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29212 = DisplayStrs29212.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29212 = DisplayStrs29212.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29212").innerHTML = DisplayStrs29212; if (CountActives29212) //alert(SetTimeOutPeriods29212); setTimeout("CountBacks29212(" + (secs+CountSteppers29212) + ")", SetTimeOutPeriods29212); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29212)=="undefined") BackColors29212 = ""; if (typeof(ForeColors29212)=="undefined") ForeColors29212= "white"; if (typeof(TargetDates29212)=="undefined") TargetDates29212 = "12/03/2023 9:00:00 PM"; if (typeof(DisplayFormats29212)=="undefined") DisplayFormats29212 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29212)=="undefined") CountActives29212 = true; if (typeof(FinishMessages29212)=="undefined") FinishMessages29212 = ""; if (typeof(CountSteppers29212)!="number") CountSteppers29212 = -1; if (typeof(LeadingZeros29212)=="undefined") LeadingZeros29212 = true; CountSteppers29212 = Math.ceil(CountSteppers29212); if (CountSteppers29212 == 0) CountActives29212 = false; var SetTimeOutPeriods29212 = (Math.abs(CountSteppers29212)-1)*1000 + 990; puti(BackColors29212, ForeColors29212); var dthens29212 = new Date(TargetDates29212); var dnows29212 = new Date("05/09/2025 12:58:00 PM"); if(CountSteppers29212>0) ddiffs29212 = new Date(dnows29212-dthens29212); else ddiffs29212 = new Date(dthens29212-dnows29212); gsecss29212 = Math.floor(ddiffs29212.valueOf()/1000); CountBacks29212(gsecss29212);