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 (LeadingZeros29321 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29321(secs) { if (secs < 0) { document.getElementById("cntdwns29321").innerHTML = FinishMessages29321; return; } DisplayStrs29321 = DisplayFormats29321.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29321 = DisplayStrs29321.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29321 = DisplayStrs29321.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29321 = DisplayStrs29321.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29321").innerHTML = DisplayStrs29321; if (CountActives29321) //alert(SetTimeOutPeriods29321); setTimeout("CountBacks29321(" + (secs+CountSteppers29321) + ")", SetTimeOutPeriods29321); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29321)=="undefined") BackColors29321 = ""; if (typeof(ForeColors29321)=="undefined") ForeColors29321= "white"; if (typeof(TargetDates29321)=="undefined") TargetDates29321 = "12/04/2023 9:00:00 PM"; if (typeof(DisplayFormats29321)=="undefined") DisplayFormats29321 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29321)=="undefined") CountActives29321 = true; if (typeof(FinishMessages29321)=="undefined") FinishMessages29321 = ""; if (typeof(CountSteppers29321)!="number") CountSteppers29321 = -1; if (typeof(LeadingZeros29321)=="undefined") LeadingZeros29321 = true; CountSteppers29321 = Math.ceil(CountSteppers29321); if (CountSteppers29321 == 0) CountActives29321 = false; var SetTimeOutPeriods29321 = (Math.abs(CountSteppers29321)-1)*1000 + 990; puti(BackColors29321, ForeColors29321); var dthens29321 = new Date(TargetDates29321); var dnows29321 = new Date("05/11/2025 10:57:20 AM"); if(CountSteppers29321>0) ddiffs29321 = new Date(dnows29321-dthens29321); else ddiffs29321 = new Date(dthens29321-dnows29321); gsecss29321 = Math.floor(ddiffs29321.valueOf()/1000); CountBacks29321(gsecss29321);