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 (LeadingZeros30101 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30101(secs) { if (secs < 0) { document.getElementById("cntdwns30101").innerHTML = FinishMessages30101; return; } DisplayStrs30101 = DisplayFormats30101.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30101 = DisplayStrs30101.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30101 = DisplayStrs30101.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30101 = DisplayStrs30101.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30101").innerHTML = DisplayStrs30101; if (CountActives30101) //alert(SetTimeOutPeriods30101); setTimeout("CountBacks30101(" + (secs+CountSteppers30101) + ")", SetTimeOutPeriods30101); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30101)=="undefined") BackColors30101 = ""; if (typeof(ForeColors30101)=="undefined") ForeColors30101= "white"; if (typeof(TargetDates30101)=="undefined") TargetDates30101 = "04/26/2024 11:00:00 PM"; if (typeof(DisplayFormats30101)=="undefined") DisplayFormats30101 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30101)=="undefined") CountActives30101 = true; if (typeof(FinishMessages30101)=="undefined") FinishMessages30101 = ""; if (typeof(CountSteppers30101)!="number") CountSteppers30101 = -1; if (typeof(LeadingZeros30101)=="undefined") LeadingZeros30101 = true; CountSteppers30101 = Math.ceil(CountSteppers30101); if (CountSteppers30101 == 0) CountActives30101 = false; var SetTimeOutPeriods30101 = (Math.abs(CountSteppers30101)-1)*1000 + 990; puti(BackColors30101, ForeColors30101); var dthens30101 = new Date(TargetDates30101); var dnows30101 = new Date("05/05/2024 10:39:49 PM"); if(CountSteppers30101>0) ddiffs30101 = new Date(dnows30101-dthens30101); else ddiffs30101 = new Date(dthens30101-dnows30101); gsecss30101 = Math.floor(ddiffs30101.valueOf()/1000); CountBacks30101(gsecss30101);