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 (LeadingZeros28492 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28492(secs) { if (secs < 0) { document.getElementById("cntdwns28492").innerHTML = FinishMessages28492; return; } DisplayStrs28492 = DisplayFormats28492.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28492 = DisplayStrs28492.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28492 = DisplayStrs28492.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28492 = DisplayStrs28492.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28492").innerHTML = DisplayStrs28492; if (CountActives28492) //alert(SetTimeOutPeriods28492); setTimeout("CountBacks28492(" + (secs+CountSteppers28492) + ")", SetTimeOutPeriods28492); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28492)=="undefined") BackColors28492 = ""; if (typeof(ForeColors28492)=="undefined") ForeColors28492= "white"; if (typeof(TargetDates28492)=="undefined") TargetDates28492 = "06/02/2023 10:00:00 PM"; if (typeof(DisplayFormats28492)=="undefined") DisplayFormats28492 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28492)=="undefined") CountActives28492 = true; if (typeof(FinishMessages28492)=="undefined") FinishMessages28492 = ""; if (typeof(CountSteppers28492)!="number") CountSteppers28492 = -1; if (typeof(LeadingZeros28492)=="undefined") LeadingZeros28492 = true; CountSteppers28492 = Math.ceil(CountSteppers28492); if (CountSteppers28492 == 0) CountActives28492 = false; var SetTimeOutPeriods28492 = (Math.abs(CountSteppers28492)-1)*1000 + 990; puti(BackColors28492, ForeColors28492); var dthens28492 = new Date(TargetDates28492); var dnows28492 = new Date("05/09/2025 10:07:50 AM"); if(CountSteppers28492>0) ddiffs28492 = new Date(dnows28492-dthens28492); else ddiffs28492 = new Date(dthens28492-dnows28492); gsecss28492 = Math.floor(ddiffs28492.valueOf()/1000); CountBacks28492(gsecss28492);