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 (LeadingZeros30313 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30313(secs) { if (secs < 0) { document.getElementById("cntdwns30313").innerHTML = FinishMessages30313; return; } DisplayStrs30313 = DisplayFormats30313.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30313 = DisplayStrs30313.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30313 = DisplayStrs30313.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30313 = DisplayStrs30313.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30313").innerHTML = DisplayStrs30313; if (CountActives30313) //alert(SetTimeOutPeriods30313); setTimeout("CountBacks30313(" + (secs+CountSteppers30313) + ")", SetTimeOutPeriods30313); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30313)=="undefined") BackColors30313 = ""; if (typeof(ForeColors30313)=="undefined") ForeColors30313= "white"; if (typeof(TargetDates30313)=="undefined") TargetDates30313 = "04/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30313)=="undefined") DisplayFormats30313 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30313)=="undefined") CountActives30313 = true; if (typeof(FinishMessages30313)=="undefined") FinishMessages30313 = ""; if (typeof(CountSteppers30313)!="number") CountSteppers30313 = -1; if (typeof(LeadingZeros30313)=="undefined") LeadingZeros30313 = true; CountSteppers30313 = Math.ceil(CountSteppers30313); if (CountSteppers30313 == 0) CountActives30313 = false; var SetTimeOutPeriods30313 = (Math.abs(CountSteppers30313)-1)*1000 + 990; puti(BackColors30313, ForeColors30313); var dthens30313 = new Date(TargetDates30313); var dnows30313 = new Date("05/05/2024 8:36:47 PM"); if(CountSteppers30313>0) ddiffs30313 = new Date(dnows30313-dthens30313); else ddiffs30313 = new Date(dthens30313-dnows30313); gsecss30313 = Math.floor(ddiffs30313.valueOf()/1000); CountBacks30313(gsecss30313);