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 (LeadingZeros31034 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks31034(secs) { if (secs < 0) { document.getElementById("cntdwns31034").innerHTML = FinishMessages31034; return; } DisplayStrs31034 = DisplayFormats31034.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs31034 = DisplayStrs31034.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs31034 = DisplayStrs31034.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs31034 = DisplayStrs31034.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns31034").innerHTML = DisplayStrs31034; if (CountActives31034) //alert(SetTimeOutPeriods31034); setTimeout("CountBacks31034(" + (secs+CountSteppers31034) + ")", SetTimeOutPeriods31034); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors31034)=="undefined") BackColors31034 = ""; if (typeof(ForeColors31034)=="undefined") ForeColors31034= "white"; if (typeof(TargetDates31034)=="undefined") TargetDates31034 = "11/02/2024 9:00:00 PM"; if (typeof(DisplayFormats31034)=="undefined") DisplayFormats31034 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives31034)=="undefined") CountActives31034 = true; if (typeof(FinishMessages31034)=="undefined") FinishMessages31034 = ""; if (typeof(CountSteppers31034)!="number") CountSteppers31034 = -1; if (typeof(LeadingZeros31034)=="undefined") LeadingZeros31034 = true; CountSteppers31034 = Math.ceil(CountSteppers31034); if (CountSteppers31034 == 0) CountActives31034 = false; var SetTimeOutPeriods31034 = (Math.abs(CountSteppers31034)-1)*1000 + 990; puti(BackColors31034, ForeColors31034); var dthens31034 = new Date(TargetDates31034); var dnows31034 = new Date("10/31/2024 11:07:58 AM"); if(CountSteppers31034>0) ddiffs31034 = new Date(dnows31034-dthens31034); else ddiffs31034 = new Date(dthens31034-dnows31034); gsecss31034 = Math.floor(ddiffs31034.valueOf()/1000); CountBacks31034(gsecss31034);