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 (LeadingZeros28753 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks28753(secs) { if (secs < 0) { document.getElementById("cntdwns28753").innerHTML = FinishMessages28753; return; } DisplayStrs28753 = DisplayFormats28753.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs28753 = DisplayStrs28753.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs28753 = DisplayStrs28753.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs28753 = DisplayStrs28753.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns28753").innerHTML = DisplayStrs28753; if (CountActives28753) //alert(SetTimeOutPeriods28753); setTimeout("CountBacks28753(" + (secs+CountSteppers28753) + ")", SetTimeOutPeriods28753); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors28753)=="undefined") BackColors28753 = ""; if (typeof(ForeColors28753)=="undefined") ForeColors28753= "white"; if (typeof(TargetDates28753)=="undefined") TargetDates28753 = "03/31/2024 10:00:00 PM"; if (typeof(DisplayFormats28753)=="undefined") DisplayFormats28753 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives28753)=="undefined") CountActives28753 = true; if (typeof(FinishMessages28753)=="undefined") FinishMessages28753 = ""; if (typeof(CountSteppers28753)!="number") CountSteppers28753 = -1; if (typeof(LeadingZeros28753)=="undefined") LeadingZeros28753 = true; CountSteppers28753 = Math.ceil(CountSteppers28753); if (CountSteppers28753 == 0) CountActives28753 = false; var SetTimeOutPeriods28753 = (Math.abs(CountSteppers28753)-1)*1000 + 990; puti(BackColors28753, ForeColors28753); var dthens28753 = new Date(TargetDates28753); var dnows28753 = new Date("04/28/2024 12:40:48 AM"); if(CountSteppers28753>0) ddiffs28753 = new Date(dnows28753-dthens28753); else ddiffs28753 = new Date(dthens28753-dnows28753); gsecss28753 = Math.floor(ddiffs28753.valueOf()/1000); CountBacks28753(gsecss28753);