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 (LeadingZeros29170 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks29170(secs) { if (secs < 0) { document.getElementById("cntdwns29170").innerHTML = FinishMessages29170; return; } DisplayStrs29170 = DisplayFormats29170.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs29170 = DisplayStrs29170.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs29170 = DisplayStrs29170.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs29170 = DisplayStrs29170.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns29170").innerHTML = DisplayStrs29170; if (CountActives29170) //alert(SetTimeOutPeriods29170); setTimeout("CountBacks29170(" + (secs+CountSteppers29170) + ")", SetTimeOutPeriods29170); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors29170)=="undefined") BackColors29170 = ""; if (typeof(ForeColors29170)=="undefined") ForeColors29170= "white"; if (typeof(TargetDates29170)=="undefined") TargetDates29170 = "03/30/2024 9:00:00 PM"; if (typeof(DisplayFormats29170)=="undefined") DisplayFormats29170 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives29170)=="undefined") CountActives29170 = true; if (typeof(FinishMessages29170)=="undefined") FinishMessages29170 = ""; if (typeof(CountSteppers29170)!="number") CountSteppers29170 = -1; if (typeof(LeadingZeros29170)=="undefined") LeadingZeros29170 = true; CountSteppers29170 = Math.ceil(CountSteppers29170); if (CountSteppers29170 == 0) CountActives29170 = false; var SetTimeOutPeriods29170 = (Math.abs(CountSteppers29170)-1)*1000 + 990; puti(BackColors29170, ForeColors29170); var dthens29170 = new Date(TargetDates29170); var dnows29170 = new Date("04/27/2024 2:55:36 PM"); if(CountSteppers29170>0) ddiffs29170 = new Date(dnows29170-dthens29170); else ddiffs29170 = new Date(dthens29170-dnows29170); gsecss29170 = Math.floor(ddiffs29170.valueOf()/1000); CountBacks29170(gsecss29170);