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 (LeadingZeros29827 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29827(secs) { if (secs < 0) { document.getElementById("cntdwns29827").innerHTML = FinishMessages29827; return; } DisplayStrs29827 = DisplayFormats29827.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29827 = DisplayStrs29827.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29827 = DisplayStrs29827.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29827 = DisplayStrs29827.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29827").innerHTML = DisplayStrs29827; if (CountActives29827) //alert(SetTimeOutPeriods29827); setTimeout("CountBacks29827(" + (secs+CountSteppers29827) + ")", SetTimeOutPeriods29827); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29827)=="undefined") BackColors29827 = ""; if (typeof(ForeColors29827)=="undefined") ForeColors29827= "white"; if (typeof(TargetDates29827)=="undefined") TargetDates29827 = "04/23/2024 11:00:00 PM"; if (typeof(DisplayFormats29827)=="undefined") DisplayFormats29827 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29827)=="undefined") CountActives29827 = true; if (typeof(FinishMessages29827)=="undefined") FinishMessages29827 = ""; if (typeof(CountSteppers29827)!="number") CountSteppers29827 = -1; if (typeof(LeadingZeros29827)=="undefined") LeadingZeros29827 = true; CountSteppers29827 = Math.ceil(CountSteppers29827); if (CountSteppers29827 == 0) CountActives29827 = false; var SetTimeOutPeriods29827 = (Math.abs(CountSteppers29827)-1)*1000 + 990; puti(BackColors29827, ForeColors29827); var dthens29827 = new Date(TargetDates29827); var dnows29827 = new Date("05/03/2024 7:22:09 AM"); if(CountSteppers29827>0) ddiffs29827 = new Date(dnows29827-dthens29827); else ddiffs29827 = new Date(dthens29827-dnows29827); gsecss29827 = Math.floor(ddiffs29827.valueOf()/1000); CountBacks29827(gsecss29827);