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 (LeadingZeros29733 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29733(secs) { if (secs < 0) { document.getElementById("cntdwns29733").innerHTML = FinishMessages29733; return; } DisplayStrs29733 = DisplayFormats29733.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29733 = DisplayStrs29733.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29733 = DisplayStrs29733.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29733 = DisplayStrs29733.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29733").innerHTML = DisplayStrs29733; if (CountActives29733) //alert(SetTimeOutPeriods29733); setTimeout("CountBacks29733(" + (secs+CountSteppers29733) + ")", SetTimeOutPeriods29733); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29733)=="undefined") BackColors29733 = ""; if (typeof(ForeColors29733)=="undefined") ForeColors29733= "white"; if (typeof(TargetDates29733)=="undefined") TargetDates29733 = "04/21/2024 11:00:00 PM"; if (typeof(DisplayFormats29733)=="undefined") DisplayFormats29733 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29733)=="undefined") CountActives29733 = true; if (typeof(FinishMessages29733)=="undefined") FinishMessages29733 = ""; if (typeof(CountSteppers29733)!="number") CountSteppers29733 = -1; if (typeof(LeadingZeros29733)=="undefined") LeadingZeros29733 = true; CountSteppers29733 = Math.ceil(CountSteppers29733); if (CountSteppers29733 == 0) CountActives29733 = false; var SetTimeOutPeriods29733 = (Math.abs(CountSteppers29733)-1)*1000 + 990; puti(BackColors29733, ForeColors29733); var dthens29733 = new Date(TargetDates29733); var dnows29733 = new Date("05/02/2024 7:37:15 AM"); if(CountSteppers29733>0) ddiffs29733 = new Date(dnows29733-dthens29733); else ddiffs29733 = new Date(dthens29733-dnows29733); gsecss29733 = Math.floor(ddiffs29733.valueOf()/1000); CountBacks29733(gsecss29733);