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 (LeadingZeros30178 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30178(secs) { if (secs < 0) { document.getElementById("cntdwns30178").innerHTML = FinishMessages30178; return; } DisplayStrs30178 = DisplayFormats30178.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30178 = DisplayStrs30178.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30178 = DisplayStrs30178.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30178 = DisplayStrs30178.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30178").innerHTML = DisplayStrs30178; if (CountActives30178) //alert(SetTimeOutPeriods30178); setTimeout("CountBacks30178(" + (secs+CountSteppers30178) + ")", SetTimeOutPeriods30178); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30178)=="undefined") BackColors30178 = ""; if (typeof(ForeColors30178)=="undefined") ForeColors30178= "white"; if (typeof(TargetDates30178)=="undefined") TargetDates30178 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats30178)=="undefined") DisplayFormats30178 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30178)=="undefined") CountActives30178 = true; if (typeof(FinishMessages30178)=="undefined") FinishMessages30178 = ""; if (typeof(CountSteppers30178)!="number") CountSteppers30178 = -1; if (typeof(LeadingZeros30178)=="undefined") LeadingZeros30178 = true; CountSteppers30178 = Math.ceil(CountSteppers30178); if (CountSteppers30178 == 0) CountActives30178 = false; var SetTimeOutPeriods30178 = (Math.abs(CountSteppers30178)-1)*1000 + 990; puti(BackColors30178, ForeColors30178); var dthens30178 = new Date(TargetDates30178); var dnows30178 = new Date("05/05/2024 5:07:10 PM"); if(CountSteppers30178>0) ddiffs30178 = new Date(dnows30178-dthens30178); else ddiffs30178 = new Date(dthens30178-dnows30178); gsecss30178 = Math.floor(ddiffs30178.valueOf()/1000); CountBacks30178(gsecss30178);