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 (LeadingZeros31699 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31699(secs) { if (secs < 0) { document.getElementById("cntdwns31699").innerHTML = FinishMessages31699; return; } DisplayStrs31699 = DisplayFormats31699.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31699 = DisplayStrs31699.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31699 = DisplayStrs31699.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31699 = DisplayStrs31699.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31699").innerHTML = DisplayStrs31699; if (CountActives31699) //alert(SetTimeOutPeriods31699); setTimeout("CountBacks31699(" + (secs+CountSteppers31699) + ")", SetTimeOutPeriods31699); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31699)=="undefined") BackColors31699 = ""; if (typeof(ForeColors31699)=="undefined") ForeColors31699= "white"; if (typeof(TargetDates31699)=="undefined") TargetDates31699 = "02/01/2025 10:00:00 PM"; if (typeof(DisplayFormats31699)=="undefined") DisplayFormats31699 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31699)=="undefined") CountActives31699 = true; if (typeof(FinishMessages31699)=="undefined") FinishMessages31699 = ""; if (typeof(CountSteppers31699)!="number") CountSteppers31699 = -1; if (typeof(LeadingZeros31699)=="undefined") LeadingZeros31699 = true; CountSteppers31699 = Math.ceil(CountSteppers31699); if (CountSteppers31699 == 0) CountActives31699 = false; var SetTimeOutPeriods31699 = (Math.abs(CountSteppers31699)-1)*1000 + 990; puti(BackColors31699, ForeColors31699); var dthens31699 = new Date(TargetDates31699); var dnows31699 = new Date("01/31/2025 12:09:02 AM"); if(CountSteppers31699>0) ddiffs31699 = new Date(dnows31699-dthens31699); else ddiffs31699 = new Date(dthens31699-dnows31699); gsecss31699 = Math.floor(ddiffs31699.valueOf()/1000); CountBacks31699(gsecss31699);