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 (LeadingZeros31789 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31789(secs) { if (secs < 0) { document.getElementById("cntdwns31789").innerHTML = FinishMessages31789; return; } DisplayStrs31789 = DisplayFormats31789.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31789 = DisplayStrs31789.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31789 = DisplayStrs31789.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31789 = DisplayStrs31789.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31789").innerHTML = DisplayStrs31789; if (CountActives31789) //alert(SetTimeOutPeriods31789); setTimeout("CountBacks31789(" + (secs+CountSteppers31789) + ")", SetTimeOutPeriods31789); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31789)=="undefined") BackColors31789 = ""; if (typeof(ForeColors31789)=="undefined") ForeColors31789= "white"; if (typeof(TargetDates31789)=="undefined") TargetDates31789 = "02/25/2025 10:00:00 PM"; if (typeof(DisplayFormats31789)=="undefined") DisplayFormats31789 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31789)=="undefined") CountActives31789 = true; if (typeof(FinishMessages31789)=="undefined") FinishMessages31789 = ""; if (typeof(CountSteppers31789)!="number") CountSteppers31789 = -1; if (typeof(LeadingZeros31789)=="undefined") LeadingZeros31789 = true; CountSteppers31789 = Math.ceil(CountSteppers31789); if (CountSteppers31789 == 0) CountActives31789 = false; var SetTimeOutPeriods31789 = (Math.abs(CountSteppers31789)-1)*1000 + 990; puti(BackColors31789, ForeColors31789); var dthens31789 = new Date(TargetDates31789); var dnows31789 = new Date("02/22/2025 9:29:12 PM"); if(CountSteppers31789>0) ddiffs31789 = new Date(dnows31789-dthens31789); else ddiffs31789 = new Date(dthens31789-dnows31789); gsecss31789 = Math.floor(ddiffs31789.valueOf()/1000); CountBacks31789(gsecss31789);