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 (LeadingZeros29001 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29001(secs) { if (secs < 0) { document.getElementById("cntdwns29001").innerHTML = FinishMessages29001; return; } DisplayStrs29001 = DisplayFormats29001.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29001 = DisplayStrs29001.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29001 = DisplayStrs29001.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29001 = DisplayStrs29001.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29001").innerHTML = DisplayStrs29001; if (CountActives29001) //alert(SetTimeOutPeriods29001); setTimeout("CountBacks29001(" + (secs+CountSteppers29001) + ")", SetTimeOutPeriods29001); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29001)=="undefined") BackColors29001 = ""; if (typeof(ForeColors29001)=="undefined") ForeColors29001= "white"; if (typeof(TargetDates29001)=="undefined") TargetDates29001 = "10/05/2023 10:00:00 PM"; if (typeof(DisplayFormats29001)=="undefined") DisplayFormats29001 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29001)=="undefined") CountActives29001 = true; if (typeof(FinishMessages29001)=="undefined") FinishMessages29001 = ""; if (typeof(CountSteppers29001)!="number") CountSteppers29001 = -1; if (typeof(LeadingZeros29001)=="undefined") LeadingZeros29001 = true; CountSteppers29001 = Math.ceil(CountSteppers29001); if (CountSteppers29001 == 0) CountActives29001 = false; var SetTimeOutPeriods29001 = (Math.abs(CountSteppers29001)-1)*1000 + 990; puti(BackColors29001, ForeColors29001); var dthens29001 = new Date(TargetDates29001); var dnows29001 = new Date("05/11/2025 9:03:19 PM"); if(CountSteppers29001>0) ddiffs29001 = new Date(dnows29001-dthens29001); else ddiffs29001 = new Date(dthens29001-dnows29001); gsecss29001 = Math.floor(ddiffs29001.valueOf()/1000); CountBacks29001(gsecss29001);