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 (LeadingZeros29222 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29222(secs) { if (secs < 0) { document.getElementById("cntdwns29222").innerHTML = FinishMessages29222; return; } DisplayStrs29222 = DisplayFormats29222.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29222 = DisplayStrs29222.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29222 = DisplayStrs29222.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29222 = DisplayStrs29222.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29222").innerHTML = DisplayStrs29222; if (CountActives29222) //alert(SetTimeOutPeriods29222); setTimeout("CountBacks29222(" + (secs+CountSteppers29222) + ")", SetTimeOutPeriods29222); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29222)=="undefined") BackColors29222 = ""; if (typeof(ForeColors29222)=="undefined") ForeColors29222= "white"; if (typeof(TargetDates29222)=="undefined") TargetDates29222 = "10/04/2023 10:00:00 PM"; if (typeof(DisplayFormats29222)=="undefined") DisplayFormats29222 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29222)=="undefined") CountActives29222 = true; if (typeof(FinishMessages29222)=="undefined") FinishMessages29222 = ""; if (typeof(CountSteppers29222)!="number") CountSteppers29222 = -1; if (typeof(LeadingZeros29222)=="undefined") LeadingZeros29222 = true; CountSteppers29222 = Math.ceil(CountSteppers29222); if (CountSteppers29222 == 0) CountActives29222 = false; var SetTimeOutPeriods29222 = (Math.abs(CountSteppers29222)-1)*1000 + 990; puti(BackColors29222, ForeColors29222); var dthens29222 = new Date(TargetDates29222); var dnows29222 = new Date("05/09/2025 12:56:00 PM"); if(CountSteppers29222>0) ddiffs29222 = new Date(dnows29222-dthens29222); else ddiffs29222 = new Date(dthens29222-dnows29222); gsecss29222 = Math.floor(ddiffs29222.valueOf()/1000); CountBacks29222(gsecss29222);