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 (LeadingZeros31705 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31705(secs) { if (secs < 0) { document.getElementById("cntdwns31705").innerHTML = FinishMessages31705; return; } DisplayStrs31705 = DisplayFormats31705.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31705 = DisplayStrs31705.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31705 = DisplayStrs31705.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31705 = DisplayStrs31705.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31705").innerHTML = DisplayStrs31705; if (CountActives31705) //alert(SetTimeOutPeriods31705); setTimeout("CountBacks31705(" + (secs+CountSteppers31705) + ")", SetTimeOutPeriods31705); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31705)=="undefined") BackColors31705 = ""; if (typeof(ForeColors31705)=="undefined") ForeColors31705= "white"; if (typeof(TargetDates31705)=="undefined") TargetDates31705 = "02/01/2025 10:00:00 PM"; if (typeof(DisplayFormats31705)=="undefined") DisplayFormats31705 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31705)=="undefined") CountActives31705 = true; if (typeof(FinishMessages31705)=="undefined") FinishMessages31705 = ""; if (typeof(CountSteppers31705)!="number") CountSteppers31705 = -1; if (typeof(LeadingZeros31705)=="undefined") LeadingZeros31705 = true; CountSteppers31705 = Math.ceil(CountSteppers31705); if (CountSteppers31705 == 0) CountActives31705 = false; var SetTimeOutPeriods31705 = (Math.abs(CountSteppers31705)-1)*1000 + 990; puti(BackColors31705, ForeColors31705); var dthens31705 = new Date(TargetDates31705); var dnows31705 = new Date("01/30/2025 10:20:30 PM"); if(CountSteppers31705>0) ddiffs31705 = new Date(dnows31705-dthens31705); else ddiffs31705 = new Date(dthens31705-dnows31705); gsecss31705 = Math.floor(ddiffs31705.valueOf()/1000); CountBacks31705(gsecss31705);