var announceWidth = 380; var announcements = Array(); function cycleAnnouncements(announcement) { if (announcements.length == 0) { var announcementBox = document.getElementById('announcement-box'); var announcementCells = announcementBox.getElementsByTagName('td'); for(i=0; i 1) { var lastAnnouncement = document.createElement('td'); lastAnnouncement.innerHTML = announcementCells[0].innerHTML; document.getElementById('tblAnnouncements').getElementsByTagName('tr')[0].appendChild(lastAnnouncement); announcements[i] = lastAnnouncement; } } if (announcements.length > 1) { if (announceWidth > 0) { announceWidth = announceWidth - 5; if (window.navigator.userAgent.indexOf("IE") != -1) { document.getElementById('tblAnnouncements').style.marginLeft = parseInt(document.getElementById('tblAnnouncements').style.marginLeft) - 5 + 'px'; } else { announcements[announcement].style.width = announceWidth+'px'; announcements[announcement].style.maxWidth = announceWidth+'px'; } var increment = 10; /* if (announceWidth < 10) { increment = 100; } else if (announceWidth < 25) { increment = 50; } else if (announceWidth < 45) { increment = 40; } else if (announceWidth < 70) { increment = 30; } else if (announceWidth < 100) { increment = 20; }*/ window.setTimeout("cycleAnnouncements("+ announcement +");", increment); } else { if (window.navigator.userAgent.indexOf("IE") != -1) { } else { announcements[announcement].style.width = 0; announcements[announcement].style.maxWidth = 0; } announceWidth = 380; if (announcement < announcements.length - 2) { window.setTimeout("cycleAnnouncements("+ ++announcement +");", 9000); } else { if (window.navigator.userAgent.indexOf("IE") != -1) { document.getElementById('tblAnnouncements').style.marginLeft = 0; } else { for(i=0; i 1) { var lastAnnouncement = document.createElement('td'); lastAnnouncement.innerHTML = announcementCells[0].innerHTML; document.getElementById('tblAnnouncements').getElementsByTagName('tr')[0].appendChild(lastAnnouncement); announcements[i] = lastAnnouncement; } } if (announcements.length > 1) { if (announceWidth > 0) { var decrement = 5; var increment = 10; if (announceWidth < 5) { decrement = 1; } else if (announceWidth < 10) { increment = 50; } else if (announceWidth < 20) { decrement = 2 } else if (announceWidth < 30) { increment = 40; } else if (announceWidth < 40) { decrement = 3; } else if (announceWidth < 50) { increment = 30; } else if (announceWidth < 60) { decrement = 4; } announceWidth = announceWidth - decrement; if (window.navigator.userAgent.indexOf("IE") != -1) { document.getElementById('tblAnnouncements').style.marginLeft = parseInt(document.getElementById('tblAnnouncements').style.marginLeft) - decrement + 'px'; } else { announcements[announcement].style.width = announceWidth+'px'; announcements[announcement].style.maxWidth = announceWidth+'px'; } window.setTimeout("cycleAnnouncementsTest("+ announcement +");", increment); } else { if (window.navigator.userAgent.indexOf("IE") != -1) { } else { announcements[announcement].style.width = 0; announcements[announcement].style.maxWidth = 0; } announceWidth = 380; if (announcement < announcements.length - 2) { window.setTimeout("cycleAnnouncementsTest("+ ++announcement +");", 1000); } else { if (window.navigator.userAgent.indexOf("IE") != -1) { document.getElementById('tblAnnouncements').style.marginLeft = 0; } else { for(i=0; i 1) { var lastAnnouncement = document.createElement('td'); lastAnnouncement.innerHTML = announcementCells[0].innerHTML; document.getElementById('tblAnnouncements').getElementsByTagName('tr')[0].appendChild(lastAnnouncement); announcements[i] = lastAnnouncement; } } if (announcements.length > 1) { if (announceWidth > 0) { var decrement = 5; var increment = 10; if (announceWidth < 5) { decrement = 1; } else if (announceWidth < 10) { increment = 50; } else if (announceWidth < 20) { decrement = 2 } else if (announceWidth < 30) { increment = 40; } else if (announceWidth < 40) { decrement = 3; } else if (announceWidth < 50) { increment = 30; } else if (announceWidth < 60) { decrement = 4; } announceWidth = announceWidth - decrement; if (window.navigator.userAgent.indexOf("IE") != -1) { document.getElementById('tblAnnouncements').style.marginLeft = parseInt(document.getElementById('tblAnnouncements').style.marginLeft) - decrement + 'px'; } else { announcements[announcement].style.width = announceWidth+'px'; announcements[announcement].style.maxWidth = announceWidth+'px'; } window.setTimeout("cycleAnnouncementsTest2("+ announcement +");", increment); } else { if (window.navigator.userAgent.indexOf("IE") != -1) { } else { announcements[announcement].style.width = 0; announcements[announcement].style.maxWidth = 0; } announceWidth = 380; if (announcement < announcements.length - 2) { window.setTimeout("cycleAnnouncementsTest2("+ ++announcement +");", 1000); } else { if (window.navigator.userAgent.indexOf("IE") != -1) { document.getElementById('tblAnnouncements').style.marginLeft = 0; } else { for(i=0; i