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 (LeadingZeros31004 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31004(secs) { if (secs < 0) { document.getElementById("cntdwns31004").innerHTML = FinishMessages31004; return; } DisplayStrs31004 = DisplayFormats31004.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31004 = DisplayStrs31004.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31004 = DisplayStrs31004.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31004 = DisplayStrs31004.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31004").innerHTML = DisplayStrs31004; if (CountActives31004) //alert(SetTimeOutPeriods31004); setTimeout("CountBacks31004(" + (secs+CountSteppers31004) + ")", SetTimeOutPeriods31004); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31004)=="undefined") BackColors31004 = ""; if (typeof(ForeColors31004)=="undefined") ForeColors31004= "white"; if (typeof(TargetDates31004)=="undefined") TargetDates31004 = "11/09/2024 8:00:00 PM"; if (typeof(DisplayFormats31004)=="undefined") DisplayFormats31004 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31004)=="undefined") CountActives31004 = true; if (typeof(FinishMessages31004)=="undefined") FinishMessages31004 = ""; if (typeof(CountSteppers31004)!="number") CountSteppers31004 = -1; if (typeof(LeadingZeros31004)=="undefined") LeadingZeros31004 = true; CountSteppers31004 = Math.ceil(CountSteppers31004); if (CountSteppers31004 == 0) CountActives31004 = false; var SetTimeOutPeriods31004 = (Math.abs(CountSteppers31004)-1)*1000 + 990; puti(BackColors31004, ForeColors31004); var dthens31004 = new Date(TargetDates31004); var dnows31004 = new Date("11/08/2024 1:25:59 AM"); if(CountSteppers31004>0) ddiffs31004 = new Date(dnows31004-dthens31004); else ddiffs31004 = new Date(dthens31004-dnows31004); gsecss31004 = Math.floor(ddiffs31004.valueOf()/1000); CountBacks31004(gsecss31004);