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 (LeadingZeros29701 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29701(secs) { if (secs < 0) { document.getElementById("cntdwns29701").innerHTML = FinishMessages29701; return; } DisplayStrs29701 = DisplayFormats29701.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29701 = DisplayStrs29701.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29701 = DisplayStrs29701.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29701 = DisplayStrs29701.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29701").innerHTML = DisplayStrs29701; if (CountActives29701) //alert(SetTimeOutPeriods29701); setTimeout("CountBacks29701(" + (secs+CountSteppers29701) + ")", SetTimeOutPeriods29701); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29701)=="undefined") BackColors29701 = ""; if (typeof(ForeColors29701)=="undefined") ForeColors29701= "white"; if (typeof(TargetDates29701)=="undefined") TargetDates29701 = "03/31/2024 10:00:00 PM"; if (typeof(DisplayFormats29701)=="undefined") DisplayFormats29701 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29701)=="undefined") CountActives29701 = true; if (typeof(FinishMessages29701)=="undefined") FinishMessages29701 = ""; if (typeof(CountSteppers29701)!="number") CountSteppers29701 = -1; if (typeof(LeadingZeros29701)=="undefined") LeadingZeros29701 = true; CountSteppers29701 = Math.ceil(CountSteppers29701); if (CountSteppers29701 == 0) CountActives29701 = false; var SetTimeOutPeriods29701 = (Math.abs(CountSteppers29701)-1)*1000 + 990; puti(BackColors29701, ForeColors29701); var dthens29701 = new Date(TargetDates29701); var dnows29701 = new Date("04/29/2024 1:13:05 PM"); if(CountSteppers29701>0) ddiffs29701 = new Date(dnows29701-dthens29701); else ddiffs29701 = new Date(dthens29701-dnows29701); gsecss29701 = Math.floor(ddiffs29701.valueOf()/1000); CountBacks29701(gsecss29701);