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 (LeadingZeros30222 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30222(secs) { if (secs < 0) { document.getElementById("cntdwns30222").innerHTML = FinishMessages30222; return; } DisplayStrs30222 = DisplayFormats30222.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30222 = DisplayStrs30222.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30222 = DisplayStrs30222.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30222 = DisplayStrs30222.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30222").innerHTML = DisplayStrs30222; if (CountActives30222) //alert(SetTimeOutPeriods30222); setTimeout("CountBacks30222(" + (secs+CountSteppers30222) + ")", SetTimeOutPeriods30222); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30222)=="undefined") BackColors30222 = ""; if (typeof(ForeColors30222)=="undefined") ForeColors30222= "white"; if (typeof(TargetDates30222)=="undefined") TargetDates30222 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats30222)=="undefined") DisplayFormats30222 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30222)=="undefined") CountActives30222 = true; if (typeof(FinishMessages30222)=="undefined") FinishMessages30222 = ""; if (typeof(CountSteppers30222)!="number") CountSteppers30222 = -1; if (typeof(LeadingZeros30222)=="undefined") LeadingZeros30222 = true; CountSteppers30222 = Math.ceil(CountSteppers30222); if (CountSteppers30222 == 0) CountActives30222 = false; var SetTimeOutPeriods30222 = (Math.abs(CountSteppers30222)-1)*1000 + 990; puti(BackColors30222, ForeColors30222); var dthens30222 = new Date(TargetDates30222); var dnows30222 = new Date("05/07/2024 9:17:16 PM"); if(CountSteppers30222>0) ddiffs30222 = new Date(dnows30222-dthens30222); else ddiffs30222 = new Date(dthens30222-dnows30222); gsecss30222 = Math.floor(ddiffs30222.valueOf()/1000); CountBacks30222(gsecss30222);