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 (LeadingZeros29111 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29111(secs) { if (secs < 0) { document.getElementById("cntdwns29111").innerHTML = FinishMessages29111; return; } DisplayStrs29111 = DisplayFormats29111.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29111 = DisplayStrs29111.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29111 = DisplayStrs29111.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29111 = DisplayStrs29111.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29111").innerHTML = DisplayStrs29111; if (CountActives29111) //alert(SetTimeOutPeriods29111); setTimeout("CountBacks29111(" + (secs+CountSteppers29111) + ")", SetTimeOutPeriods29111); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29111)=="undefined") BackColors29111 = ""; if (typeof(ForeColors29111)=="undefined") ForeColors29111= "white"; if (typeof(TargetDates29111)=="undefined") TargetDates29111 = "12/09/2023 9:00:00 PM"; if (typeof(DisplayFormats29111)=="undefined") DisplayFormats29111 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29111)=="undefined") CountActives29111 = true; if (typeof(FinishMessages29111)=="undefined") FinishMessages29111 = ""; if (typeof(CountSteppers29111)!="number") CountSteppers29111 = -1; if (typeof(LeadingZeros29111)=="undefined") LeadingZeros29111 = true; CountSteppers29111 = Math.ceil(CountSteppers29111); if (CountSteppers29111 == 0) CountActives29111 = false; var SetTimeOutPeriods29111 = (Math.abs(CountSteppers29111)-1)*1000 + 990; puti(BackColors29111, ForeColors29111); var dthens29111 = new Date(TargetDates29111); var dnows29111 = new Date("05/11/2025 5:41:14 PM"); if(CountSteppers29111>0) ddiffs29111 = new Date(dnows29111-dthens29111); else ddiffs29111 = new Date(dthens29111-dnows29111); gsecss29111 = Math.floor(ddiffs29111.valueOf()/1000); CountBacks29111(gsecss29111);