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 (LeadingZeros30138 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30138(secs) { if (secs < 0) { document.getElementById("cntdwns30138").innerHTML = FinishMessages30138; return; } DisplayStrs30138 = DisplayFormats30138.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30138 = DisplayStrs30138.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30138 = DisplayStrs30138.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30138 = DisplayStrs30138.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30138").innerHTML = DisplayStrs30138; if (CountActives30138) //alert(SetTimeOutPeriods30138); setTimeout("CountBacks30138(" + (secs+CountSteppers30138) + ")", SetTimeOutPeriods30138); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30138)=="undefined") BackColors30138 = ""; if (typeof(ForeColors30138)=="undefined") ForeColors30138= "white"; if (typeof(TargetDates30138)=="undefined") TargetDates30138 = "04/29/2024 11:00:00 PM"; if (typeof(DisplayFormats30138)=="undefined") DisplayFormats30138 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30138)=="undefined") CountActives30138 = true; if (typeof(FinishMessages30138)=="undefined") FinishMessages30138 = ""; if (typeof(CountSteppers30138)!="number") CountSteppers30138 = -1; if (typeof(LeadingZeros30138)=="undefined") LeadingZeros30138 = true; CountSteppers30138 = Math.ceil(CountSteppers30138); if (CountSteppers30138 == 0) CountActives30138 = false; var SetTimeOutPeriods30138 = (Math.abs(CountSteppers30138)-1)*1000 + 990; puti(BackColors30138, ForeColors30138); var dthens30138 = new Date(TargetDates30138); var dnows30138 = new Date("05/08/2024 10:55:36 PM"); if(CountSteppers30138>0) ddiffs30138 = new Date(dnows30138-dthens30138); else ddiffs30138 = new Date(dthens30138-dnows30138); gsecss30138 = Math.floor(ddiffs30138.valueOf()/1000); CountBacks30138(gsecss30138);