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 (LeadingZeros30789 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30789(secs) { if (secs < 0) { document.getElementById("cntdwns30789").innerHTML = FinishMessages30789; return; } DisplayStrs30789 = DisplayFormats30789.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30789 = DisplayStrs30789.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30789 = DisplayStrs30789.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30789 = DisplayStrs30789.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30789").innerHTML = DisplayStrs30789; if (CountActives30789) //alert(SetTimeOutPeriods30789); setTimeout("CountBacks30789(" + (secs+CountSteppers30789) + ")", SetTimeOutPeriods30789); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30789)=="undefined") BackColors30789 = ""; if (typeof(ForeColors30789)=="undefined") ForeColors30789= "white"; if (typeof(TargetDates30789)=="undefined") TargetDates30789 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30789)=="undefined") DisplayFormats30789 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30789)=="undefined") CountActives30789 = true; if (typeof(FinishMessages30789)=="undefined") FinishMessages30789 = ""; if (typeof(CountSteppers30789)!="number") CountSteppers30789 = -1; if (typeof(LeadingZeros30789)=="undefined") LeadingZeros30789 = true; CountSteppers30789 = Math.ceil(CountSteppers30789); if (CountSteppers30789 == 0) CountActives30789 = false; var SetTimeOutPeriods30789 = (Math.abs(CountSteppers30789)-1)*1000 + 990; puti(BackColors30789, ForeColors30789); var dthens30789 = new Date(TargetDates30789); var dnows30789 = new Date("10/18/2024 5:48:54 AM"); if(CountSteppers30789>0) ddiffs30789 = new Date(dnows30789-dthens30789); else ddiffs30789 = new Date(dthens30789-dnows30789); gsecss30789 = Math.floor(ddiffs30789.valueOf()/1000); CountBacks30789(gsecss30789);