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 (LeadingZeros29751 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29751(secs) { if (secs < 0) { document.getElementById("cntdwns29751").innerHTML = FinishMessages29751; return; } DisplayStrs29751 = DisplayFormats29751.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29751 = DisplayStrs29751.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29751 = DisplayStrs29751.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29751 = DisplayStrs29751.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29751").innerHTML = DisplayStrs29751; if (CountActives29751) //alert(SetTimeOutPeriods29751); setTimeout("CountBacks29751(" + (secs+CountSteppers29751) + ")", SetTimeOutPeriods29751); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29751)=="undefined") BackColors29751 = ""; if (typeof(ForeColors29751)=="undefined") ForeColors29751= "white"; if (typeof(TargetDates29751)=="undefined") TargetDates29751 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats29751)=="undefined") DisplayFormats29751 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29751)=="undefined") CountActives29751 = true; if (typeof(FinishMessages29751)=="undefined") FinishMessages29751 = ""; if (typeof(CountSteppers29751)!="number") CountSteppers29751 = -1; if (typeof(LeadingZeros29751)=="undefined") LeadingZeros29751 = true; CountSteppers29751 = Math.ceil(CountSteppers29751); if (CountSteppers29751 == 0) CountActives29751 = false; var SetTimeOutPeriods29751 = (Math.abs(CountSteppers29751)-1)*1000 + 990; puti(BackColors29751, ForeColors29751); var dthens29751 = new Date(TargetDates29751); var dnows29751 = new Date("05/09/2024 4:25:28 PM"); if(CountSteppers29751>0) ddiffs29751 = new Date(dnows29751-dthens29751); else ddiffs29751 = new Date(dthens29751-dnows29751); gsecss29751 = Math.floor(ddiffs29751.valueOf()/1000); CountBacks29751(gsecss29751);