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 (LeadingZeros29675 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29675(secs) { if (secs < 0) { document.getElementById("cntdwns29675").innerHTML = FinishMessages29675; return; } DisplayStrs29675 = DisplayFormats29675.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29675 = DisplayStrs29675.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29675 = DisplayStrs29675.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29675 = DisplayStrs29675.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29675").innerHTML = DisplayStrs29675; if (CountActives29675) //alert(SetTimeOutPeriods29675); setTimeout("CountBacks29675(" + (secs+CountSteppers29675) + ")", SetTimeOutPeriods29675); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29675)=="undefined") BackColors29675 = ""; if (typeof(ForeColors29675)=="undefined") ForeColors29675= "white"; if (typeof(TargetDates29675)=="undefined") TargetDates29675 = "04/22/2024 11:00:00 PM"; if (typeof(DisplayFormats29675)=="undefined") DisplayFormats29675 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29675)=="undefined") CountActives29675 = true; if (typeof(FinishMessages29675)=="undefined") FinishMessages29675 = ""; if (typeof(CountSteppers29675)!="number") CountSteppers29675 = -1; if (typeof(LeadingZeros29675)=="undefined") LeadingZeros29675 = true; CountSteppers29675 = Math.ceil(CountSteppers29675); if (CountSteppers29675 == 0) CountActives29675 = false; var SetTimeOutPeriods29675 = (Math.abs(CountSteppers29675)-1)*1000 + 990; puti(BackColors29675, ForeColors29675); var dthens29675 = new Date(TargetDates29675); var dnows29675 = new Date("05/03/2024 7:53:45 AM"); if(CountSteppers29675>0) ddiffs29675 = new Date(dnows29675-dthens29675); else ddiffs29675 = new Date(dthens29675-dnows29675); gsecss29675 = Math.floor(ddiffs29675.valueOf()/1000); CountBacks29675(gsecss29675);