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 (LeadingZeros29115 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29115(secs) { if (secs < 0) { document.getElementById("cntdwns29115").innerHTML = FinishMessages29115; return; } DisplayStrs29115 = DisplayFormats29115.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29115 = DisplayStrs29115.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29115 = DisplayStrs29115.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29115 = DisplayStrs29115.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29115").innerHTML = DisplayStrs29115; if (CountActives29115) //alert(SetTimeOutPeriods29115); setTimeout("CountBacks29115(" + (secs+CountSteppers29115) + ")", SetTimeOutPeriods29115); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29115)=="undefined") BackColors29115 = ""; if (typeof(ForeColors29115)=="undefined") ForeColors29115= "white"; if (typeof(TargetDates29115)=="undefined") TargetDates29115 = "09/25/2023 10:00:00 PM"; if (typeof(DisplayFormats29115)=="undefined") DisplayFormats29115 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29115)=="undefined") CountActives29115 = true; if (typeof(FinishMessages29115)=="undefined") FinishMessages29115 = ""; if (typeof(CountSteppers29115)!="number") CountSteppers29115 = -1; if (typeof(LeadingZeros29115)=="undefined") LeadingZeros29115 = true; CountSteppers29115 = Math.ceil(CountSteppers29115); if (CountSteppers29115 == 0) CountActives29115 = false; var SetTimeOutPeriods29115 = (Math.abs(CountSteppers29115)-1)*1000 + 990; puti(BackColors29115, ForeColors29115); var dthens29115 = new Date(TargetDates29115); var dnows29115 = new Date("05/09/2025 12:53:03 PM"); if(CountSteppers29115>0) ddiffs29115 = new Date(dnows29115-dthens29115); else ddiffs29115 = new Date(dthens29115-dnows29115); gsecss29115 = Math.floor(ddiffs29115.valueOf()/1000); CountBacks29115(gsecss29115);