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 (LeadingZeros27812 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27812(secs) { if (secs < 0) { document.getElementById("cntdwns27812").innerHTML = FinishMessages27812; return; } DisplayStrs27812 = DisplayFormats27812.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27812 = DisplayStrs27812.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27812 = DisplayStrs27812.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27812 = DisplayStrs27812.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27812").innerHTML = DisplayStrs27812; if (CountActives27812) //alert(SetTimeOutPeriods27812); setTimeout("CountBacks27812(" + (secs+CountSteppers27812) + ")", SetTimeOutPeriods27812); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27812)=="undefined") BackColors27812 = ""; if (typeof(ForeColors27812)=="undefined") ForeColors27812= "white"; if (typeof(TargetDates27812)=="undefined") TargetDates27812 = "04/18/2024 11:00:00 PM"; if (typeof(DisplayFormats27812)=="undefined") DisplayFormats27812 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27812)=="undefined") CountActives27812 = true; if (typeof(FinishMessages27812)=="undefined") FinishMessages27812 = ""; if (typeof(CountSteppers27812)!="number") CountSteppers27812 = -1; if (typeof(LeadingZeros27812)=="undefined") LeadingZeros27812 = true; CountSteppers27812 = Math.ceil(CountSteppers27812); if (CountSteppers27812 == 0) CountActives27812 = false; var SetTimeOutPeriods27812 = (Math.abs(CountSteppers27812)-1)*1000 + 990; puti(BackColors27812, ForeColors27812); var dthens27812 = new Date(TargetDates27812); var dnows27812 = new Date("04/29/2024 9:37:22 PM"); if(CountSteppers27812>0) ddiffs27812 = new Date(dnows27812-dthens27812); else ddiffs27812 = new Date(dthens27812-dnows27812); gsecss27812 = Math.floor(ddiffs27812.valueOf()/1000); CountBacks27812(gsecss27812);