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 (LeadingZeros29153 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29153(secs) { if (secs < 0) { document.getElementById("cntdwns29153").innerHTML = FinishMessages29153; return; } DisplayStrs29153 = DisplayFormats29153.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29153 = DisplayStrs29153.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29153 = DisplayStrs29153.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29153 = DisplayStrs29153.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29153").innerHTML = DisplayStrs29153; if (CountActives29153) //alert(SetTimeOutPeriods29153); setTimeout("CountBacks29153(" + (secs+CountSteppers29153) + ")", SetTimeOutPeriods29153); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29153)=="undefined") BackColors29153 = ""; if (typeof(ForeColors29153)=="undefined") ForeColors29153= "white"; if (typeof(TargetDates29153)=="undefined") TargetDates29153 = "10/04/2023 10:00:00 PM"; if (typeof(DisplayFormats29153)=="undefined") DisplayFormats29153 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29153)=="undefined") CountActives29153 = true; if (typeof(FinishMessages29153)=="undefined") FinishMessages29153 = ""; if (typeof(CountSteppers29153)!="number") CountSteppers29153 = -1; if (typeof(LeadingZeros29153)=="undefined") LeadingZeros29153 = true; CountSteppers29153 = Math.ceil(CountSteppers29153); if (CountSteppers29153 == 0) CountActives29153 = false; var SetTimeOutPeriods29153 = (Math.abs(CountSteppers29153)-1)*1000 + 990; puti(BackColors29153, ForeColors29153); var dthens29153 = new Date(TargetDates29153); var dnows29153 = new Date("05/09/2025 10:10:30 AM"); if(CountSteppers29153>0) ddiffs29153 = new Date(dnows29153-dthens29153); else ddiffs29153 = new Date(dthens29153-dnows29153); gsecss29153 = Math.floor(ddiffs29153.valueOf()/1000); CountBacks29153(gsecss29153);