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 (LeadingZeros30500 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30500(secs) { if (secs < 0) { document.getElementById("cntdwns30500").innerHTML = FinishMessages30500; return; } DisplayStrs30500 = DisplayFormats30500.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30500 = DisplayStrs30500.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30500 = DisplayStrs30500.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30500 = DisplayStrs30500.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30500").innerHTML = DisplayStrs30500; if (CountActives30500) //alert(SetTimeOutPeriods30500); setTimeout("CountBacks30500(" + (secs+CountSteppers30500) + ")", SetTimeOutPeriods30500); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30500)=="undefined") BackColors30500 = ""; if (typeof(ForeColors30500)=="undefined") ForeColors30500= "white"; if (typeof(TargetDates30500)=="undefined") TargetDates30500 = "05/10/2024 10:00:00 PM"; if (typeof(DisplayFormats30500)=="undefined") DisplayFormats30500 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30500)=="undefined") CountActives30500 = true; if (typeof(FinishMessages30500)=="undefined") FinishMessages30500 = ""; if (typeof(CountSteppers30500)!="number") CountSteppers30500 = -1; if (typeof(LeadingZeros30500)=="undefined") LeadingZeros30500 = true; CountSteppers30500 = Math.ceil(CountSteppers30500); if (CountSteppers30500 == 0) CountActives30500 = false; var SetTimeOutPeriods30500 = (Math.abs(CountSteppers30500)-1)*1000 + 990; puti(BackColors30500, ForeColors30500); var dthens30500 = new Date(TargetDates30500); var dnows30500 = new Date("05/19/2024 10:43:47 PM"); if(CountSteppers30500>0) ddiffs30500 = new Date(dnows30500-dthens30500); else ddiffs30500 = new Date(dthens30500-dnows30500); gsecss30500 = Math.floor(ddiffs30500.valueOf()/1000); CountBacks30500(gsecss30500);