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 (LeadingZeros30040 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30040(secs) { if (secs < 0) { document.getElementById("cntdwns30040").innerHTML = FinishMessages30040; return; } DisplayStrs30040 = DisplayFormats30040.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30040 = DisplayStrs30040.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30040 = DisplayStrs30040.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30040 = DisplayStrs30040.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30040").innerHTML = DisplayStrs30040; if (CountActives30040) //alert(SetTimeOutPeriods30040); setTimeout("CountBacks30040(" + (secs+CountSteppers30040) + ")", SetTimeOutPeriods30040); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30040)=="undefined") BackColors30040 = ""; if (typeof(ForeColors30040)=="undefined") ForeColors30040= "white"; if (typeof(TargetDates30040)=="undefined") TargetDates30040 = "04/21/2024 11:00:00 PM"; if (typeof(DisplayFormats30040)=="undefined") DisplayFormats30040 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30040)=="undefined") CountActives30040 = true; if (typeof(FinishMessages30040)=="undefined") FinishMessages30040 = ""; if (typeof(CountSteppers30040)!="number") CountSteppers30040 = -1; if (typeof(LeadingZeros30040)=="undefined") LeadingZeros30040 = true; CountSteppers30040 = Math.ceil(CountSteppers30040); if (CountSteppers30040 == 0) CountActives30040 = false; var SetTimeOutPeriods30040 = (Math.abs(CountSteppers30040)-1)*1000 + 990; puti(BackColors30040, ForeColors30040); var dthens30040 = new Date(TargetDates30040); var dnows30040 = new Date("05/02/2024 3:48:03 AM"); if(CountSteppers30040>0) ddiffs30040 = new Date(dnows30040-dthens30040); else ddiffs30040 = new Date(dthens30040-dnows30040); gsecss30040 = Math.floor(ddiffs30040.valueOf()/1000); CountBacks30040(gsecss30040);