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 (LeadingZeros29578 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29578(secs) { if (secs < 0) { document.getElementById("cntdwns29578").innerHTML = FinishMessages29578; return; } DisplayStrs29578 = DisplayFormats29578.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29578 = DisplayStrs29578.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29578 = DisplayStrs29578.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29578 = DisplayStrs29578.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29578").innerHTML = DisplayStrs29578; if (CountActives29578) //alert(SetTimeOutPeriods29578); setTimeout("CountBacks29578(" + (secs+CountSteppers29578) + ")", SetTimeOutPeriods29578); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29578)=="undefined") BackColors29578 = ""; if (typeof(ForeColors29578)=="undefined") ForeColors29578= "white"; if (typeof(TargetDates29578)=="undefined") TargetDates29578 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats29578)=="undefined") DisplayFormats29578 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29578)=="undefined") CountActives29578 = true; if (typeof(FinishMessages29578)=="undefined") FinishMessages29578 = ""; if (typeof(CountSteppers29578)!="number") CountSteppers29578 = -1; if (typeof(LeadingZeros29578)=="undefined") LeadingZeros29578 = true; CountSteppers29578 = Math.ceil(CountSteppers29578); if (CountSteppers29578 == 0) CountActives29578 = false; var SetTimeOutPeriods29578 = (Math.abs(CountSteppers29578)-1)*1000 + 990; puti(BackColors29578, ForeColors29578); var dthens29578 = new Date(TargetDates29578); var dnows29578 = new Date("04/29/2024 4:51:17 AM"); if(CountSteppers29578>0) ddiffs29578 = new Date(dnows29578-dthens29578); else ddiffs29578 = new Date(dthens29578-dnows29578); gsecss29578 = Math.floor(ddiffs29578.valueOf()/1000); CountBacks29578(gsecss29578);