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 (LeadingZeros30199 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30199(secs) { if (secs < 0) { document.getElementById("cntdwns30199").innerHTML = FinishMessages30199; return; } DisplayStrs30199 = DisplayFormats30199.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30199 = DisplayStrs30199.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30199 = DisplayStrs30199.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30199 = DisplayStrs30199.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30199").innerHTML = DisplayStrs30199; if (CountActives30199) //alert(SetTimeOutPeriods30199); setTimeout("CountBacks30199(" + (secs+CountSteppers30199) + ")", SetTimeOutPeriods30199); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30199)=="undefined") BackColors30199 = ""; if (typeof(ForeColors30199)=="undefined") ForeColors30199= "white"; if (typeof(TargetDates30199)=="undefined") TargetDates30199 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats30199)=="undefined") DisplayFormats30199 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30199)=="undefined") CountActives30199 = true; if (typeof(FinishMessages30199)=="undefined") FinishMessages30199 = ""; if (typeof(CountSteppers30199)!="number") CountSteppers30199 = -1; if (typeof(LeadingZeros30199)=="undefined") LeadingZeros30199 = true; CountSteppers30199 = Math.ceil(CountSteppers30199); if (CountSteppers30199 == 0) CountActives30199 = false; var SetTimeOutPeriods30199 = (Math.abs(CountSteppers30199)-1)*1000 + 990; puti(BackColors30199, ForeColors30199); var dthens30199 = new Date(TargetDates30199); var dnows30199 = new Date("05/08/2024 11:22:15 PM"); if(CountSteppers30199>0) ddiffs30199 = new Date(dnows30199-dthens30199); else ddiffs30199 = new Date(dthens30199-dnows30199); gsecss30199 = Math.floor(ddiffs30199.valueOf()/1000); CountBacks30199(gsecss30199);