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 (LeadingZeros29529 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29529(secs) { if (secs < 0) { document.getElementById("cntdwns29529").innerHTML = FinishMessages29529; return; } DisplayStrs29529 = DisplayFormats29529.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29529 = DisplayStrs29529.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29529 = DisplayStrs29529.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29529 = DisplayStrs29529.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29529").innerHTML = DisplayStrs29529; if (CountActives29529) //alert(SetTimeOutPeriods29529); setTimeout("CountBacks29529(" + (secs+CountSteppers29529) + ")", SetTimeOutPeriods29529); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29529)=="undefined") BackColors29529 = ""; if (typeof(ForeColors29529)=="undefined") ForeColors29529= "white"; if (typeof(TargetDates29529)=="undefined") TargetDates29529 = "04/22/2024 11:00:00 PM"; if (typeof(DisplayFormats29529)=="undefined") DisplayFormats29529 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29529)=="undefined") CountActives29529 = true; if (typeof(FinishMessages29529)=="undefined") FinishMessages29529 = ""; if (typeof(CountSteppers29529)!="number") CountSteppers29529 = -1; if (typeof(LeadingZeros29529)=="undefined") LeadingZeros29529 = true; CountSteppers29529 = Math.ceil(CountSteppers29529); if (CountSteppers29529 == 0) CountActives29529 = false; var SetTimeOutPeriods29529 = (Math.abs(CountSteppers29529)-1)*1000 + 990; puti(BackColors29529, ForeColors29529); var dthens29529 = new Date(TargetDates29529); var dnows29529 = new Date("05/02/2024 10:35:04 PM"); if(CountSteppers29529>0) ddiffs29529 = new Date(dnows29529-dthens29529); else ddiffs29529 = new Date(dthens29529-dnows29529); gsecss29529 = Math.floor(ddiffs29529.valueOf()/1000); CountBacks29529(gsecss29529);