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 (LeadingZeros31620 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31620(secs) { if (secs < 0) { document.getElementById("cntdwns31620").innerHTML = FinishMessages31620; return; } DisplayStrs31620 = DisplayFormats31620.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31620 = DisplayStrs31620.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31620 = DisplayStrs31620.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31620 = DisplayStrs31620.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31620").innerHTML = DisplayStrs31620; if (CountActives31620) //alert(SetTimeOutPeriods31620); setTimeout("CountBacks31620(" + (secs+CountSteppers31620) + ")", SetTimeOutPeriods31620); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31620)=="undefined") BackColors31620 = ""; if (typeof(ForeColors31620)=="undefined") ForeColors31620= "white"; if (typeof(TargetDates31620)=="undefined") TargetDates31620 = "02/01/2025 10:00:00 PM"; if (typeof(DisplayFormats31620)=="undefined") DisplayFormats31620 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31620)=="undefined") CountActives31620 = true; if (typeof(FinishMessages31620)=="undefined") FinishMessages31620 = ""; if (typeof(CountSteppers31620)!="number") CountSteppers31620 = -1; if (typeof(LeadingZeros31620)=="undefined") LeadingZeros31620 = true; CountSteppers31620 = Math.ceil(CountSteppers31620); if (CountSteppers31620 == 0) CountActives31620 = false; var SetTimeOutPeriods31620 = (Math.abs(CountSteppers31620)-1)*1000 + 990; puti(BackColors31620, ForeColors31620); var dthens31620 = new Date(TargetDates31620); var dnows31620 = new Date("01/30/2025 6:55:53 PM"); if(CountSteppers31620>0) ddiffs31620 = new Date(dnows31620-dthens31620); else ddiffs31620 = new Date(dthens31620-dnows31620); gsecss31620 = Math.floor(ddiffs31620.valueOf()/1000); CountBacks31620(gsecss31620);