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 (LeadingZeros30224 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30224(secs) { if (secs < 0) { document.getElementById("cntdwns30224").innerHTML = FinishMessages30224; return; } DisplayStrs30224 = DisplayFormats30224.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30224 = DisplayStrs30224.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30224 = DisplayStrs30224.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30224 = DisplayStrs30224.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30224").innerHTML = DisplayStrs30224; if (CountActives30224) //alert(SetTimeOutPeriods30224); setTimeout("CountBacks30224(" + (secs+CountSteppers30224) + ")", SetTimeOutPeriods30224); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30224)=="undefined") BackColors30224 = ""; if (typeof(ForeColors30224)=="undefined") ForeColors30224= "white"; if (typeof(TargetDates30224)=="undefined") TargetDates30224 = "04/28/2024 11:00:00 PM"; if (typeof(DisplayFormats30224)=="undefined") DisplayFormats30224 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30224)=="undefined") CountActives30224 = true; if (typeof(FinishMessages30224)=="undefined") FinishMessages30224 = ""; if (typeof(CountSteppers30224)!="number") CountSteppers30224 = -1; if (typeof(LeadingZeros30224)=="undefined") LeadingZeros30224 = true; CountSteppers30224 = Math.ceil(CountSteppers30224); if (CountSteppers30224 == 0) CountActives30224 = false; var SetTimeOutPeriods30224 = (Math.abs(CountSteppers30224)-1)*1000 + 990; puti(BackColors30224, ForeColors30224); var dthens30224 = new Date(TargetDates30224); var dnows30224 = new Date("05/07/2024 2:04:07 AM"); if(CountSteppers30224>0) ddiffs30224 = new Date(dnows30224-dthens30224); else ddiffs30224 = new Date(dthens30224-dnows30224); gsecss30224 = Math.floor(ddiffs30224.valueOf()/1000); CountBacks30224(gsecss30224);