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 (LeadingZeros29774 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29774(secs) { if (secs < 0) { document.getElementById("cntdwns29774").innerHTML = FinishMessages29774; return; } DisplayStrs29774 = DisplayFormats29774.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29774 = DisplayStrs29774.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29774 = DisplayStrs29774.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29774 = DisplayStrs29774.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29774").innerHTML = DisplayStrs29774; if (CountActives29774) //alert(SetTimeOutPeriods29774); setTimeout("CountBacks29774(" + (secs+CountSteppers29774) + ")", SetTimeOutPeriods29774); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29774)=="undefined") BackColors29774 = ""; if (typeof(ForeColors29774)=="undefined") ForeColors29774= "white"; if (typeof(TargetDates29774)=="undefined") TargetDates29774 = "03/30/2024 10:00:00 PM"; if (typeof(DisplayFormats29774)=="undefined") DisplayFormats29774 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29774)=="undefined") CountActives29774 = true; if (typeof(FinishMessages29774)=="undefined") FinishMessages29774 = ""; if (typeof(CountSteppers29774)!="number") CountSteppers29774 = -1; if (typeof(LeadingZeros29774)=="undefined") LeadingZeros29774 = true; CountSteppers29774 = Math.ceil(CountSteppers29774); if (CountSteppers29774 == 0) CountActives29774 = false; var SetTimeOutPeriods29774 = (Math.abs(CountSteppers29774)-1)*1000 + 990; puti(BackColors29774, ForeColors29774); var dthens29774 = new Date(TargetDates29774); var dnows29774 = new Date("04/29/2024 9:59:18 AM"); if(CountSteppers29774>0) ddiffs29774 = new Date(dnows29774-dthens29774); else ddiffs29774 = new Date(dthens29774-dnows29774); gsecss29774 = Math.floor(ddiffs29774.valueOf()/1000); CountBacks29774(gsecss29774);