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 (LeadingZeros29500 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29500(secs) { if (secs < 0) { document.getElementById("cntdwns29500").innerHTML = FinishMessages29500; return; } DisplayStrs29500 = DisplayFormats29500.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29500 = DisplayStrs29500.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29500 = DisplayStrs29500.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29500 = DisplayStrs29500.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29500").innerHTML = DisplayStrs29500; if (CountActives29500) //alert(SetTimeOutPeriods29500); setTimeout("CountBacks29500(" + (secs+CountSteppers29500) + ")", SetTimeOutPeriods29500); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29500)=="undefined") BackColors29500 = ""; if (typeof(ForeColors29500)=="undefined") ForeColors29500= "white"; if (typeof(TargetDates29500)=="undefined") TargetDates29500 = "12/11/2023 10:00:00 PM"; if (typeof(DisplayFormats29500)=="undefined") DisplayFormats29500 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29500)=="undefined") CountActives29500 = true; if (typeof(FinishMessages29500)=="undefined") FinishMessages29500 = ""; if (typeof(CountSteppers29500)!="number") CountSteppers29500 = -1; if (typeof(LeadingZeros29500)=="undefined") LeadingZeros29500 = true; CountSteppers29500 = Math.ceil(CountSteppers29500); if (CountSteppers29500 == 0) CountActives29500 = false; var SetTimeOutPeriods29500 = (Math.abs(CountSteppers29500)-1)*1000 + 990; puti(BackColors29500, ForeColors29500); var dthens29500 = new Date(TargetDates29500); var dnows29500 = new Date("05/09/2025 6:39:01 AM"); if(CountSteppers29500>0) ddiffs29500 = new Date(dnows29500-dthens29500); else ddiffs29500 = new Date(dthens29500-dnows29500); gsecss29500 = Math.floor(ddiffs29500.valueOf()/1000); CountBacks29500(gsecss29500);