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 (LeadingZeros30805 && s.length < 2) s = "0" + s; if (seconds == 1) { var classString = "count-seconds"; } else { var classString = ""; } return "" + s + ""; } function CountBacks30805(secs) { if (secs < 0) { document.getElementById("cntdwns30805").innerHTML = FinishMessages30805; return; } DisplayStrs30805 = DisplayFormats30805.replace(/%%D%%/g, calcage(secs,86400,100000,0)); DisplayStrs30805 = DisplayStrs30805.replace(/%%H%%/g, calcage(secs,3600,24,1)); DisplayStrs30805 = DisplayStrs30805.replace(/%%M%%/g, calcage(secs,60,60,0)); DisplayStrs30805 = DisplayStrs30805.replace(/%%S%%/g, calcage(secs,1,60,0,1)); document.getElementById("cntdwns30805").innerHTML = DisplayStrs30805; if (CountActives30805) //alert(SetTimeOutPeriods30805); setTimeout("CountBacks30805(" + (secs+CountSteppers30805) + ")", SetTimeOutPeriods30805); } function puti(backcolor, forecolor) { document.write("
"); } if (typeof(BackColors30805)=="undefined") BackColors30805 = ""; if (typeof(ForeColors30805)=="undefined") ForeColors30805= "white"; if (typeof(TargetDates30805)=="undefined") TargetDates30805 = "07/29/2024 10:00:00 PM"; if (typeof(DisplayFormats30805)=="undefined") DisplayFormats30805 = " %%H%%:%%M%%:%%S%%"; if (typeof(CountActives30805)=="undefined") CountActives30805 = true; if (typeof(FinishMessages30805)=="undefined") FinishMessages30805 = ""; if (typeof(CountSteppers30805)!="number") CountSteppers30805 = -1; if (typeof(LeadingZeros30805)=="undefined") LeadingZeros30805 = true; CountSteppers30805 = Math.ceil(CountSteppers30805); if (CountSteppers30805 == 0) CountActives30805 = false; var SetTimeOutPeriods30805 = (Math.abs(CountSteppers30805)-1)*1000 + 990; puti(BackColors30805, ForeColors30805); var dthens30805 = new Date(TargetDates30805); var dnows30805 = new Date("10/18/2024 6:11:47 AM"); if(CountSteppers30805>0) ddiffs30805 = new Date(dnows30805-dthens30805); else ddiffs30805 = new Date(dthens30805-dnows30805); gsecss30805 = Math.floor(ddiffs30805.valueOf()/1000); CountBacks30805(gsecss30805);