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 (LeadingZeros30422 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30422(secs) { if (secs < 0) { document.getElementById("cntdwns30422").innerHTML = FinishMessages30422; return; } DisplayStrs30422 = DisplayFormats30422.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30422 = DisplayStrs30422.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30422 = DisplayStrs30422.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30422 = DisplayStrs30422.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30422").innerHTML = DisplayStrs30422; if (CountActives30422) //alert(SetTimeOutPeriods30422); setTimeout("CountBacks30422(" + (secs+CountSteppers30422) + ")", SetTimeOutPeriods30422); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30422)=="undefined") BackColors30422 = ""; if (typeof(ForeColors30422)=="undefined") ForeColors30422= "white"; if (typeof(TargetDates30422)=="undefined") TargetDates30422 = "04/26/2024 10:00:00 PM"; if (typeof(DisplayFormats30422)=="undefined") DisplayFormats30422 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30422)=="undefined") CountActives30422 = true; if (typeof(FinishMessages30422)=="undefined") FinishMessages30422 = ""; if (typeof(CountSteppers30422)!="number") CountSteppers30422 = -1; if (typeof(LeadingZeros30422)=="undefined") LeadingZeros30422 = true; CountSteppers30422 = Math.ceil(CountSteppers30422); if (CountSteppers30422 == 0) CountActives30422 = false; var SetTimeOutPeriods30422 = (Math.abs(CountSteppers30422)-1)*1000 + 990; puti(BackColors30422, ForeColors30422); var dthens30422 = new Date(TargetDates30422); var dnows30422 = new Date("05/06/2024 12:47:19 AM"); if(CountSteppers30422>0) ddiffs30422 = new Date(dnows30422-dthens30422); else ddiffs30422 = new Date(dthens30422-dnows30422); gsecss30422 = Math.floor(ddiffs30422.valueOf()/1000); CountBacks30422(gsecss30422);