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 (LeadingZeros31652 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31652(secs) { if (secs < 0) { document.getElementById("cntdwns31652").innerHTML = FinishMessages31652; return; } DisplayStrs31652 = DisplayFormats31652.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31652 = DisplayStrs31652.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31652 = DisplayStrs31652.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31652 = DisplayStrs31652.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31652").innerHTML = DisplayStrs31652; if (CountActives31652) //alert(SetTimeOutPeriods31652); setTimeout("CountBacks31652(" + (secs+CountSteppers31652) + ")", SetTimeOutPeriods31652); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31652)=="undefined") BackColors31652 = ""; if (typeof(ForeColors31652)=="undefined") ForeColors31652= "white"; if (typeof(TargetDates31652)=="undefined") TargetDates31652 = "02/03/2025 10:00:00 PM"; if (typeof(DisplayFormats31652)=="undefined") DisplayFormats31652 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31652)=="undefined") CountActives31652 = true; if (typeof(FinishMessages31652)=="undefined") FinishMessages31652 = ""; if (typeof(CountSteppers31652)!="number") CountSteppers31652 = -1; if (typeof(LeadingZeros31652)=="undefined") LeadingZeros31652 = true; CountSteppers31652 = Math.ceil(CountSteppers31652); if (CountSteppers31652 == 0) CountActives31652 = false; var SetTimeOutPeriods31652 = (Math.abs(CountSteppers31652)-1)*1000 + 990; puti(BackColors31652, ForeColors31652); var dthens31652 = new Date(TargetDates31652); var dnows31652 = new Date("02/01/2025 7:44:19 AM"); if(CountSteppers31652>0) ddiffs31652 = new Date(dnows31652-dthens31652); else ddiffs31652 = new Date(dthens31652-dnows31652); gsecss31652 = Math.floor(ddiffs31652.valueOf()/1000); CountBacks31652(gsecss31652);