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 (LeadingZeros31781 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31781(secs) { if (secs < 0) { document.getElementById("cntdwns31781").innerHTML = FinishMessages31781; return; } DisplayStrs31781 = DisplayFormats31781.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31781 = DisplayStrs31781.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31781 = DisplayStrs31781.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31781 = DisplayStrs31781.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31781").innerHTML = DisplayStrs31781; if (CountActives31781) //alert(SetTimeOutPeriods31781); setTimeout("CountBacks31781(" + (secs+CountSteppers31781) + ")", SetTimeOutPeriods31781); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31781)=="undefined") BackColors31781 = ""; if (typeof(ForeColors31781)=="undefined") ForeColors31781= "white"; if (typeof(TargetDates31781)=="undefined") TargetDates31781 = "02/25/2025 10:00:00 PM"; if (typeof(DisplayFormats31781)=="undefined") DisplayFormats31781 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31781)=="undefined") CountActives31781 = true; if (typeof(FinishMessages31781)=="undefined") FinishMessages31781 = ""; if (typeof(CountSteppers31781)!="number") CountSteppers31781 = -1; if (typeof(LeadingZeros31781)=="undefined") LeadingZeros31781 = true; CountSteppers31781 = Math.ceil(CountSteppers31781); if (CountSteppers31781 == 0) CountActives31781 = false; var SetTimeOutPeriods31781 = (Math.abs(CountSteppers31781)-1)*1000 + 990; puti(BackColors31781, ForeColors31781); var dthens31781 = new Date(TargetDates31781); var dnows31781 = new Date("02/22/2025 10:29:42 PM"); if(CountSteppers31781>0) ddiffs31781 = new Date(dnows31781-dthens31781); else ddiffs31781 = new Date(dthens31781-dnows31781); gsecss31781 = Math.floor(ddiffs31781.valueOf()/1000); CountBacks31781(gsecss31781);