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 (LeadingZeros28266 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28266(secs) { if (secs < 0) { document.getElementById("cntdwns28266").innerHTML = FinishMessages28266; return; } DisplayStrs28266 = DisplayFormats28266.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28266 = DisplayStrs28266.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28266 = DisplayStrs28266.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28266 = DisplayStrs28266.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28266").innerHTML = DisplayStrs28266; if (CountActives28266) //alert(SetTimeOutPeriods28266); setTimeout("CountBacks28266(" + (secs+CountSteppers28266) + ")", SetTimeOutPeriods28266); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28266)=="undefined") BackColors28266 = ""; if (typeof(ForeColors28266)=="undefined") ForeColors28266= "white"; if (typeof(TargetDates28266)=="undefined") TargetDates28266 = "06/05/2023 10:00:00 PM"; if (typeof(DisplayFormats28266)=="undefined") DisplayFormats28266 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28266)=="undefined") CountActives28266 = true; if (typeof(FinishMessages28266)=="undefined") FinishMessages28266 = ""; if (typeof(CountSteppers28266)!="number") CountSteppers28266 = -1; if (typeof(LeadingZeros28266)=="undefined") LeadingZeros28266 = true; CountSteppers28266 = Math.ceil(CountSteppers28266); if (CountSteppers28266 == 0) CountActives28266 = false; var SetTimeOutPeriods28266 = (Math.abs(CountSteppers28266)-1)*1000 + 990; puti(BackColors28266, ForeColors28266); var dthens28266 = new Date(TargetDates28266); var dnows28266 = new Date("05/11/2025 2:14:17 PM"); if(CountSteppers28266>0) ddiffs28266 = new Date(dnows28266-dthens28266); else ddiffs28266 = new Date(dthens28266-dnows28266); gsecss28266 = Math.floor(ddiffs28266.valueOf()/1000); CountBacks28266(gsecss28266);