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 (LeadingZeros30022 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30022(secs) { if (secs < 0) { document.getElementById("cntdwns30022").innerHTML = FinishMessages30022; return; } DisplayStrs30022 = DisplayFormats30022.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30022 = DisplayStrs30022.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30022 = DisplayStrs30022.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30022 = DisplayStrs30022.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30022").innerHTML = DisplayStrs30022; if (CountActives30022) //alert(SetTimeOutPeriods30022); setTimeout("CountBacks30022(" + (secs+CountSteppers30022) + ")", SetTimeOutPeriods30022); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30022)=="undefined") BackColors30022 = ""; if (typeof(ForeColors30022)=="undefined") ForeColors30022= "white"; if (typeof(TargetDates30022)=="undefined") TargetDates30022 = "03/31/2024 11:00:00 PM"; if (typeof(DisplayFormats30022)=="undefined") DisplayFormats30022 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30022)=="undefined") CountActives30022 = true; if (typeof(FinishMessages30022)=="undefined") FinishMessages30022 = ""; if (typeof(CountSteppers30022)!="number") CountSteppers30022 = -1; if (typeof(LeadingZeros30022)=="undefined") LeadingZeros30022 = true; CountSteppers30022 = Math.ceil(CountSteppers30022); if (CountSteppers30022 == 0) CountActives30022 = false; var SetTimeOutPeriods30022 = (Math.abs(CountSteppers30022)-1)*1000 + 990; puti(BackColors30022, ForeColors30022); var dthens30022 = new Date(TargetDates30022); var dnows30022 = new Date("04/29/2024 4:34:09 AM"); if(CountSteppers30022>0) ddiffs30022 = new Date(dnows30022-dthens30022); else ddiffs30022 = new Date(dthens30022-dnows30022); gsecss30022 = Math.floor(ddiffs30022.valueOf()/1000); CountBacks30022(gsecss30022);