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 (LeadingZeros30218 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30218(secs) { if (secs < 0) { document.getElementById("cntdwns30218").innerHTML = FinishMessages30218; return; } DisplayStrs30218 = DisplayFormats30218.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30218 = DisplayStrs30218.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30218 = DisplayStrs30218.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30218 = DisplayStrs30218.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30218").innerHTML = DisplayStrs30218; if (CountActives30218) //alert(SetTimeOutPeriods30218); setTimeout("CountBacks30218(" + (secs+CountSteppers30218) + ")", SetTimeOutPeriods30218); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30218)=="undefined") BackColors30218 = ""; if (typeof(ForeColors30218)=="undefined") ForeColors30218= "white"; if (typeof(TargetDates30218)=="undefined") TargetDates30218 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30218)=="undefined") DisplayFormats30218 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30218)=="undefined") CountActives30218 = true; if (typeof(FinishMessages30218)=="undefined") FinishMessages30218 = ""; if (typeof(CountSteppers30218)!="number") CountSteppers30218 = -1; if (typeof(LeadingZeros30218)=="undefined") LeadingZeros30218 = true; CountSteppers30218 = Math.ceil(CountSteppers30218); if (CountSteppers30218 == 0) CountActives30218 = false; var SetTimeOutPeriods30218 = (Math.abs(CountSteppers30218)-1)*1000 + 990; puti(BackColors30218, ForeColors30218); var dthens30218 = new Date(TargetDates30218); var dnows30218 = new Date("05/05/2024 12:38:43 AM"); if(CountSteppers30218>0) ddiffs30218 = new Date(dnows30218-dthens30218); else ddiffs30218 = new Date(dthens30218-dnows30218); gsecss30218 = Math.floor(ddiffs30218.valueOf()/1000); CountBacks30218(gsecss30218);