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 (LeadingZeros29581 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29581(secs) { if (secs < 0) { document.getElementById("cntdwns29581").innerHTML = FinishMessages29581; return; } DisplayStrs29581 = DisplayFormats29581.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29581 = DisplayStrs29581.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29581 = DisplayStrs29581.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29581 = DisplayStrs29581.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29581").innerHTML = DisplayStrs29581; if (CountActives29581) //alert(SetTimeOutPeriods29581); setTimeout("CountBacks29581(" + (secs+CountSteppers29581) + ")", SetTimeOutPeriods29581); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29581)=="undefined") BackColors29581 = ""; if (typeof(ForeColors29581)=="undefined") ForeColors29581= "white"; if (typeof(TargetDates29581)=="undefined") TargetDates29581 = "12/12/2023 10:00:00 PM"; if (typeof(DisplayFormats29581)=="undefined") DisplayFormats29581 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29581)=="undefined") CountActives29581 = true; if (typeof(FinishMessages29581)=="undefined") FinishMessages29581 = ""; if (typeof(CountSteppers29581)!="number") CountSteppers29581 = -1; if (typeof(LeadingZeros29581)=="undefined") LeadingZeros29581 = true; CountSteppers29581 = Math.ceil(CountSteppers29581); if (CountSteppers29581 == 0) CountActives29581 = false; var SetTimeOutPeriods29581 = (Math.abs(CountSteppers29581)-1)*1000 + 990; puti(BackColors29581, ForeColors29581); var dthens29581 = new Date(TargetDates29581); var dnows29581 = new Date("05/09/2025 10:10:28 AM"); if(CountSteppers29581>0) ddiffs29581 = new Date(dnows29581-dthens29581); else ddiffs29581 = new Date(dthens29581-dnows29581); gsecss29581 = Math.floor(ddiffs29581.valueOf()/1000); CountBacks29581(gsecss29581);