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 (LeadingZeros30187 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30187(secs) { if (secs < 0) { document.getElementById("cntdwns30187").innerHTML = FinishMessages30187; return; } DisplayStrs30187 = DisplayFormats30187.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30187 = DisplayStrs30187.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30187 = DisplayStrs30187.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30187 = DisplayStrs30187.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30187").innerHTML = DisplayStrs30187; if (CountActives30187) //alert(SetTimeOutPeriods30187); setTimeout("CountBacks30187(" + (secs+CountSteppers30187) + ")", SetTimeOutPeriods30187); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30187)=="undefined") BackColors30187 = ""; if (typeof(ForeColors30187)=="undefined") ForeColors30187= "white"; if (typeof(TargetDates30187)=="undefined") TargetDates30187 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30187)=="undefined") DisplayFormats30187 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30187)=="undefined") CountActives30187 = true; if (typeof(FinishMessages30187)=="undefined") FinishMessages30187 = ""; if (typeof(CountSteppers30187)!="number") CountSteppers30187 = -1; if (typeof(LeadingZeros30187)=="undefined") LeadingZeros30187 = true; CountSteppers30187 = Math.ceil(CountSteppers30187); if (CountSteppers30187 == 0) CountActives30187 = false; var SetTimeOutPeriods30187 = (Math.abs(CountSteppers30187)-1)*1000 + 990; puti(BackColors30187, ForeColors30187); var dthens30187 = new Date(TargetDates30187); var dnows30187 = new Date("05/06/2024 11:17:32 AM"); if(CountSteppers30187>0) ddiffs30187 = new Date(dnows30187-dthens30187); else ddiffs30187 = new Date(dthens30187-dnows30187); gsecss30187 = Math.floor(ddiffs30187.valueOf()/1000); CountBacks30187(gsecss30187);