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 (LeadingZeros30505 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30505(secs) { if (secs < 0) { document.getElementById("cntdwns30505").innerHTML = FinishMessages30505; return; } DisplayStrs30505 = DisplayFormats30505.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30505 = DisplayStrs30505.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30505 = DisplayStrs30505.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30505 = DisplayStrs30505.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30505").innerHTML = DisplayStrs30505; if (CountActives30505) //alert(SetTimeOutPeriods30505); setTimeout("CountBacks30505(" + (secs+CountSteppers30505) + ")", SetTimeOutPeriods30505); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30505)=="undefined") BackColors30505 = ""; if (typeof(ForeColors30505)=="undefined") ForeColors30505= "white"; if (typeof(TargetDates30505)=="undefined") TargetDates30505 = "05/10/2024 10:00:00 PM"; if (typeof(DisplayFormats30505)=="undefined") DisplayFormats30505 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30505)=="undefined") CountActives30505 = true; if (typeof(FinishMessages30505)=="undefined") FinishMessages30505 = ""; if (typeof(CountSteppers30505)!="number") CountSteppers30505 = -1; if (typeof(LeadingZeros30505)=="undefined") LeadingZeros30505 = true; CountSteppers30505 = Math.ceil(CountSteppers30505); if (CountSteppers30505 == 0) CountActives30505 = false; var SetTimeOutPeriods30505 = (Math.abs(CountSteppers30505)-1)*1000 + 990; puti(BackColors30505, ForeColors30505); var dthens30505 = new Date(TargetDates30505); var dnows30505 = new Date("05/20/2024 1:52:42 AM"); if(CountSteppers30505>0) ddiffs30505 = new Date(dnows30505-dthens30505); else ddiffs30505 = new Date(dthens30505-dnows30505); gsecss30505 = Math.floor(ddiffs30505.valueOf()/1000); CountBacks30505(gsecss30505);