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 (LeadingZeros29046 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29046(secs) { if (secs < 0) { document.getElementById("cntdwns29046").innerHTML = FinishMessages29046; return; } DisplayStrs29046 = DisplayFormats29046.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29046 = DisplayStrs29046.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29046 = DisplayStrs29046.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29046 = DisplayStrs29046.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29046").innerHTML = DisplayStrs29046; if (CountActives29046) //alert(SetTimeOutPeriods29046); setTimeout("CountBacks29046(" + (secs+CountSteppers29046) + ")", SetTimeOutPeriods29046); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29046)=="undefined") BackColors29046 = ""; if (typeof(ForeColors29046)=="undefined") ForeColors29046= "white"; if (typeof(TargetDates29046)=="undefined") TargetDates29046 = "10/05/2023 10:00:00 PM"; if (typeof(DisplayFormats29046)=="undefined") DisplayFormats29046 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29046)=="undefined") CountActives29046 = true; if (typeof(FinishMessages29046)=="undefined") FinishMessages29046 = ""; if (typeof(CountSteppers29046)!="number") CountSteppers29046 = -1; if (typeof(LeadingZeros29046)=="undefined") LeadingZeros29046 = true; CountSteppers29046 = Math.ceil(CountSteppers29046); if (CountSteppers29046 == 0) CountActives29046 = false; var SetTimeOutPeriods29046 = (Math.abs(CountSteppers29046)-1)*1000 + 990; puti(BackColors29046, ForeColors29046); var dthens29046 = new Date(TargetDates29046); var dnows29046 = new Date("05/12/2025 9:21:33 PM"); if(CountSteppers29046>0) ddiffs29046 = new Date(dnows29046-dthens29046); else ddiffs29046 = new Date(dthens29046-dnows29046); gsecss29046 = Math.floor(ddiffs29046.valueOf()/1000); CountBacks29046(gsecss29046);