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 (LeadingZeros30231 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30231(secs) { if (secs < 0) { document.getElementById("cntdwns30231").innerHTML = FinishMessages30231; return; } DisplayStrs30231 = DisplayFormats30231.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30231 = DisplayStrs30231.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30231 = DisplayStrs30231.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30231 = DisplayStrs30231.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30231").innerHTML = DisplayStrs30231; if (CountActives30231) //alert(SetTimeOutPeriods30231); setTimeout("CountBacks30231(" + (secs+CountSteppers30231) + ")", SetTimeOutPeriods30231); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30231)=="undefined") BackColors30231 = ""; if (typeof(ForeColors30231)=="undefined") ForeColors30231= "white"; if (typeof(TargetDates30231)=="undefined") TargetDates30231 = "04/27/2024 11:00:00 PM"; if (typeof(DisplayFormats30231)=="undefined") DisplayFormats30231 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30231)=="undefined") CountActives30231 = true; if (typeof(FinishMessages30231)=="undefined") FinishMessages30231 = ""; if (typeof(CountSteppers30231)!="number") CountSteppers30231 = -1; if (typeof(LeadingZeros30231)=="undefined") LeadingZeros30231 = true; CountSteppers30231 = Math.ceil(CountSteppers30231); if (CountSteppers30231 == 0) CountActives30231 = false; var SetTimeOutPeriods30231 = (Math.abs(CountSteppers30231)-1)*1000 + 990; puti(BackColors30231, ForeColors30231); var dthens30231 = new Date(TargetDates30231); var dnows30231 = new Date("05/05/2024 11:29:12 PM"); if(CountSteppers30231>0) ddiffs30231 = new Date(dnows30231-dthens30231); else ddiffs30231 = new Date(dthens30231-dnows30231); gsecss30231 = Math.floor(ddiffs30231.valueOf()/1000); CountBacks30231(gsecss30231);