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 (LeadingZeros29758 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29758(secs) { if (secs < 0) { document.getElementById("cntdwns29758").innerHTML = FinishMessages29758; return; } DisplayStrs29758 = DisplayFormats29758.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29758 = DisplayStrs29758.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29758 = DisplayStrs29758.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29758 = DisplayStrs29758.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29758").innerHTML = DisplayStrs29758; if (CountActives29758) //alert(SetTimeOutPeriods29758); setTimeout("CountBacks29758(" + (secs+CountSteppers29758) + ")", SetTimeOutPeriods29758); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29758)=="undefined") BackColors29758 = ""; if (typeof(ForeColors29758)=="undefined") ForeColors29758= "white"; if (typeof(TargetDates29758)=="undefined") TargetDates29758 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats29758)=="undefined") DisplayFormats29758 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29758)=="undefined") CountActives29758 = true; if (typeof(FinishMessages29758)=="undefined") FinishMessages29758 = ""; if (typeof(CountSteppers29758)!="number") CountSteppers29758 = -1; if (typeof(LeadingZeros29758)=="undefined") LeadingZeros29758 = true; CountSteppers29758 = Math.ceil(CountSteppers29758); if (CountSteppers29758 == 0) CountActives29758 = false; var SetTimeOutPeriods29758 = (Math.abs(CountSteppers29758)-1)*1000 + 990; puti(BackColors29758, ForeColors29758); var dthens29758 = new Date(TargetDates29758); var dnows29758 = new Date("05/08/2024 11:47:02 AM"); if(CountSteppers29758>0) ddiffs29758 = new Date(dnows29758-dthens29758); else ddiffs29758 = new Date(dthens29758-dnows29758); gsecss29758 = Math.floor(ddiffs29758.valueOf()/1000); CountBacks29758(gsecss29758);