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 (LeadingZeros31768 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31768(secs) { if (secs < 0) { document.getElementById("cntdwns31768").innerHTML = FinishMessages31768; return; } DisplayStrs31768 = DisplayFormats31768.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31768 = DisplayStrs31768.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31768 = DisplayStrs31768.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31768 = DisplayStrs31768.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31768").innerHTML = DisplayStrs31768; if (CountActives31768) //alert(SetTimeOutPeriods31768); setTimeout("CountBacks31768(" + (secs+CountSteppers31768) + ")", SetTimeOutPeriods31768); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31768)=="undefined") BackColors31768 = ""; if (typeof(ForeColors31768)=="undefined") ForeColors31768= "white"; if (typeof(TargetDates31768)=="undefined") TargetDates31768 = "02/01/2025 10:00:00 PM"; if (typeof(DisplayFormats31768)=="undefined") DisplayFormats31768 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31768)=="undefined") CountActives31768 = true; if (typeof(FinishMessages31768)=="undefined") FinishMessages31768 = ""; if (typeof(CountSteppers31768)!="number") CountSteppers31768 = -1; if (typeof(LeadingZeros31768)=="undefined") LeadingZeros31768 = true; CountSteppers31768 = Math.ceil(CountSteppers31768); if (CountSteppers31768 == 0) CountActives31768 = false; var SetTimeOutPeriods31768 = (Math.abs(CountSteppers31768)-1)*1000 + 990; puti(BackColors31768, ForeColors31768); var dthens31768 = new Date(TargetDates31768); var dnows31768 = new Date("01/31/2025 12:25:43 AM"); if(CountSteppers31768>0) ddiffs31768 = new Date(dnows31768-dthens31768); else ddiffs31768 = new Date(dthens31768-dnows31768); gsecss31768 = Math.floor(ddiffs31768.valueOf()/1000); CountBacks31768(gsecss31768);