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 (LeadingZeros28907 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28907(secs) { if (secs < 0) { document.getElementById("cntdwns28907").innerHTML = FinishMessages28907; return; } DisplayStrs28907 = DisplayFormats28907.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28907 = DisplayStrs28907.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28907 = DisplayStrs28907.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28907 = DisplayStrs28907.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28907").innerHTML = DisplayStrs28907; if (CountActives28907) //alert(SetTimeOutPeriods28907); setTimeout("CountBacks28907(" + (secs+CountSteppers28907) + ")", SetTimeOutPeriods28907); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28907)=="undefined") BackColors28907 = ""; if (typeof(ForeColors28907)=="undefined") ForeColors28907= "white"; if (typeof(TargetDates28907)=="undefined") TargetDates28907 = "03/31/2024 10:00:00 PM"; if (typeof(DisplayFormats28907)=="undefined") DisplayFormats28907 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28907)=="undefined") CountActives28907 = true; if (typeof(FinishMessages28907)=="undefined") FinishMessages28907 = ""; if (typeof(CountSteppers28907)!="number") CountSteppers28907 = -1; if (typeof(LeadingZeros28907)=="undefined") LeadingZeros28907 = true; CountSteppers28907 = Math.ceil(CountSteppers28907); if (CountSteppers28907 == 0) CountActives28907 = false; var SetTimeOutPeriods28907 = (Math.abs(CountSteppers28907)-1)*1000 + 990; puti(BackColors28907, ForeColors28907); var dthens28907 = new Date(TargetDates28907); var dnows28907 = new Date("04/27/2024 9:54:11 PM"); if(CountSteppers28907>0) ddiffs28907 = new Date(dnows28907-dthens28907); else ddiffs28907 = new Date(dthens28907-dnows28907); gsecss28907 = Math.floor(ddiffs28907.valueOf()/1000); CountBacks28907(gsecss28907);