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 (LeadingZeros31520 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31520(secs) { if (secs < 0) { document.getElementById("cntdwns31520").innerHTML = FinishMessages31520; return; } DisplayStrs31520 = DisplayFormats31520.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31520 = DisplayStrs31520.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31520 = DisplayStrs31520.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31520 = DisplayStrs31520.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31520").innerHTML = DisplayStrs31520; if (CountActives31520) //alert(SetTimeOutPeriods31520); setTimeout("CountBacks31520(" + (secs+CountSteppers31520) + ")", SetTimeOutPeriods31520); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31520)=="undefined") BackColors31520 = ""; if (typeof(ForeColors31520)=="undefined") ForeColors31520= "white"; if (typeof(TargetDates31520)=="undefined") TargetDates31520 = "02/02/2025 10:00:00 PM"; if (typeof(DisplayFormats31520)=="undefined") DisplayFormats31520 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31520)=="undefined") CountActives31520 = true; if (typeof(FinishMessages31520)=="undefined") FinishMessages31520 = ""; if (typeof(CountSteppers31520)!="number") CountSteppers31520 = -1; if (typeof(LeadingZeros31520)=="undefined") LeadingZeros31520 = true; CountSteppers31520 = Math.ceil(CountSteppers31520); if (CountSteppers31520 == 0) CountActives31520 = false; var SetTimeOutPeriods31520 = (Math.abs(CountSteppers31520)-1)*1000 + 990; puti(BackColors31520, ForeColors31520); var dthens31520 = new Date(TargetDates31520); var dnows31520 = new Date("01/30/2025 6:25:10 PM"); if(CountSteppers31520>0) ddiffs31520 = new Date(dnows31520-dthens31520); else ddiffs31520 = new Date(dthens31520-dnows31520); gsecss31520 = Math.floor(ddiffs31520.valueOf()/1000); CountBacks31520(gsecss31520);