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 (LeadingZeros31115 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31115(secs) { if (secs < 0) { document.getElementById("cntdwns31115").innerHTML = FinishMessages31115; return; } DisplayStrs31115 = DisplayFormats31115.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31115 = DisplayStrs31115.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31115 = DisplayStrs31115.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31115 = DisplayStrs31115.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31115").innerHTML = DisplayStrs31115; if (CountActives31115) //alert(SetTimeOutPeriods31115); setTimeout("CountBacks31115(" + (secs+CountSteppers31115) + ")", SetTimeOutPeriods31115); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31115)=="undefined") BackColors31115 = ""; if (typeof(ForeColors31115)=="undefined") ForeColors31115= "white"; if (typeof(TargetDates31115)=="undefined") TargetDates31115 = "02/02/2025 10:00:00 PM"; if (typeof(DisplayFormats31115)=="undefined") DisplayFormats31115 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31115)=="undefined") CountActives31115 = true; if (typeof(FinishMessages31115)=="undefined") FinishMessages31115 = ""; if (typeof(CountSteppers31115)!="number") CountSteppers31115 = -1; if (typeof(LeadingZeros31115)=="undefined") LeadingZeros31115 = true; CountSteppers31115 = Math.ceil(CountSteppers31115); if (CountSteppers31115 == 0) CountActives31115 = false; var SetTimeOutPeriods31115 = (Math.abs(CountSteppers31115)-1)*1000 + 990; puti(BackColors31115, ForeColors31115); var dthens31115 = new Date(TargetDates31115); var dnows31115 = new Date("01/31/2025 3:38:47 AM"); if(CountSteppers31115>0) ddiffs31115 = new Date(dnows31115-dthens31115); else ddiffs31115 = new Date(dthens31115-dnows31115); gsecss31115 = Math.floor(ddiffs31115.valueOf()/1000); CountBacks31115(gsecss31115);