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 (LeadingZeros27811 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks27811(secs) { if (secs < 0) { document.getElementById("cntdwns27811").innerHTML = FinishMessages27811; return; } DisplayStrs27811 = DisplayFormats27811.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs27811 = DisplayStrs27811.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs27811 = DisplayStrs27811.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs27811 = DisplayStrs27811.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns27811").innerHTML = DisplayStrs27811; if (CountActives27811) //alert(SetTimeOutPeriods27811); setTimeout("CountBacks27811(" + (secs+CountSteppers27811) + ")", SetTimeOutPeriods27811); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors27811)=="undefined") BackColors27811 = ""; if (typeof(ForeColors27811)=="undefined") ForeColors27811= "white"; if (typeof(TargetDates27811)=="undefined") TargetDates27811 = "04/18/2024 11:00:00 PM"; if (typeof(DisplayFormats27811)=="undefined") DisplayFormats27811 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives27811)=="undefined") CountActives27811 = true; if (typeof(FinishMessages27811)=="undefined") FinishMessages27811 = ""; if (typeof(CountSteppers27811)!="number") CountSteppers27811 = -1; if (typeof(LeadingZeros27811)=="undefined") LeadingZeros27811 = true; CountSteppers27811 = Math.ceil(CountSteppers27811); if (CountSteppers27811 == 0) CountActives27811 = false; var SetTimeOutPeriods27811 = (Math.abs(CountSteppers27811)-1)*1000 + 990; puti(BackColors27811, ForeColors27811); var dthens27811 = new Date(TargetDates27811); var dnows27811 = new Date("04/29/2024 8:24:26 PM"); if(CountSteppers27811>0) ddiffs27811 = new Date(dnows27811-dthens27811); else ddiffs27811 = new Date(dthens27811-dnows27811); gsecss27811 = Math.floor(ddiffs27811.valueOf()/1000); CountBacks27811(gsecss27811);