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 (LeadingZeros31420 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31420(secs) { if (secs < 0) { document.getElementById("cntdwns31420").innerHTML = FinishMessages31420; return; } DisplayStrs31420 = DisplayFormats31420.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31420 = DisplayStrs31420.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31420 = DisplayStrs31420.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31420 = DisplayStrs31420.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31420").innerHTML = DisplayStrs31420; if (CountActives31420) //alert(SetTimeOutPeriods31420); setTimeout("CountBacks31420(" + (secs+CountSteppers31420) + ")", SetTimeOutPeriods31420); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31420)=="undefined") BackColors31420 = ""; if (typeof(ForeColors31420)=="undefined") ForeColors31420= "white"; if (typeof(TargetDates31420)=="undefined") TargetDates31420 = "02/02/2025 10:00:00 PM"; if (typeof(DisplayFormats31420)=="undefined") DisplayFormats31420 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31420)=="undefined") CountActives31420 = true; if (typeof(FinishMessages31420)=="undefined") FinishMessages31420 = ""; if (typeof(CountSteppers31420)!="number") CountSteppers31420 = -1; if (typeof(LeadingZeros31420)=="undefined") LeadingZeros31420 = true; CountSteppers31420 = Math.ceil(CountSteppers31420); if (CountSteppers31420 == 0) CountActives31420 = false; var SetTimeOutPeriods31420 = (Math.abs(CountSteppers31420)-1)*1000 + 990; puti(BackColors31420, ForeColors31420); var dthens31420 = new Date(TargetDates31420); var dnows31420 = new Date("01/31/2025 8:01:17 PM"); if(CountSteppers31420>0) ddiffs31420 = new Date(dnows31420-dthens31420); else ddiffs31420 = new Date(dthens31420-dnows31420); gsecss31420 = Math.floor(ddiffs31420.valueOf()/1000); CountBacks31420(gsecss31420);