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 (LeadingZeros30179 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30179(secs) { if (secs < 0) { document.getElementById("cntdwns30179").innerHTML = FinishMessages30179; return; } DisplayStrs30179 = DisplayFormats30179.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30179 = DisplayStrs30179.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30179 = DisplayStrs30179.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30179 = DisplayStrs30179.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30179").innerHTML = DisplayStrs30179; if (CountActives30179) //alert(SetTimeOutPeriods30179); setTimeout("CountBacks30179(" + (secs+CountSteppers30179) + ")", SetTimeOutPeriods30179); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30179)=="undefined") BackColors30179 = ""; if (typeof(ForeColors30179)=="undefined") ForeColors30179= "white"; if (typeof(TargetDates30179)=="undefined") TargetDates30179 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats30179)=="undefined") DisplayFormats30179 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30179)=="undefined") CountActives30179 = true; if (typeof(FinishMessages30179)=="undefined") FinishMessages30179 = ""; if (typeof(CountSteppers30179)!="number") CountSteppers30179 = -1; if (typeof(LeadingZeros30179)=="undefined") LeadingZeros30179 = true; CountSteppers30179 = Math.ceil(CountSteppers30179); if (CountSteppers30179 == 0) CountActives30179 = false; var SetTimeOutPeriods30179 = (Math.abs(CountSteppers30179)-1)*1000 + 990; puti(BackColors30179, ForeColors30179); var dthens30179 = new Date(TargetDates30179); var dnows30179 = new Date("05/05/2024 11:58:26 AM"); if(CountSteppers30179>0) ddiffs30179 = new Date(dnows30179-dthens30179); else ddiffs30179 = new Date(dthens30179-dnows30179); gsecss30179 = Math.floor(ddiffs30179.valueOf()/1000); CountBacks30179(gsecss30179);