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 (LeadingZeros29123 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29123(secs) { if (secs < 0) { document.getElementById("cntdwns29123").innerHTML = FinishMessages29123; return; } DisplayStrs29123 = DisplayFormats29123.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29123 = DisplayStrs29123.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29123 = DisplayStrs29123.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29123 = DisplayStrs29123.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29123").innerHTML = DisplayStrs29123; if (CountActives29123) //alert(SetTimeOutPeriods29123); setTimeout("CountBacks29123(" + (secs+CountSteppers29123) + ")", SetTimeOutPeriods29123); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29123)=="undefined") BackColors29123 = ""; if (typeof(ForeColors29123)=="undefined") ForeColors29123= "white"; if (typeof(TargetDates29123)=="undefined") TargetDates29123 = "09/25/2023 10:00:00 PM"; if (typeof(DisplayFormats29123)=="undefined") DisplayFormats29123 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29123)=="undefined") CountActives29123 = true; if (typeof(FinishMessages29123)=="undefined") FinishMessages29123 = ""; if (typeof(CountSteppers29123)!="number") CountSteppers29123 = -1; if (typeof(LeadingZeros29123)=="undefined") LeadingZeros29123 = true; CountSteppers29123 = Math.ceil(CountSteppers29123); if (CountSteppers29123 == 0) CountActives29123 = false; var SetTimeOutPeriods29123 = (Math.abs(CountSteppers29123)-1)*1000 + 990; puti(BackColors29123, ForeColors29123); var dthens29123 = new Date(TargetDates29123); var dnows29123 = new Date("05/09/2025 10:06:57 AM"); if(CountSteppers29123>0) ddiffs29123 = new Date(dnows29123-dthens29123); else ddiffs29123 = new Date(dthens29123-dnows29123); gsecss29123 = Math.floor(ddiffs29123.valueOf()/1000); CountBacks29123(gsecss29123);