function selectNavBarItem(cell)
{
	// Nav bar highlighting supported in IE 5.0 and up, Netscape 6 and up, Firefox, 
	// Opera
	
	if (is_ie5up || is_nav6up || is_fx || is_opera)
	{
		// The table containing the navigation bar
		var table = document.getElementById('navigation');
		// The row index of the row after the current one
		var nextRowIndex = cell.parentNode.rowIndex + 1;
		
		// clear all highlighting
		clearNavBarItems();
		
		// highlight the selected nav bar item
		cell.className = 'SelectedNavBar';
		
		// If there is a row after the current row
		if (nextRowIndex < table.rows.length)
		{
			// Apply special formatting to the next cell
			table.rows[nextRowIndex].cells[cell.cellIndex].className = 'SelectedNavBarNext';
		}
		
		// Show an appropriate message on the statusbar
		window.status='Click to follow the link';
	}
}

function clearNavBarItems()
{
	// Nav bar highlighting supported in IE 5.0 and up, Netscape 6 and up, Firefox,
	// Opera
	
	if (is_ie5up || is_nav6up || is_fx || is_opera)
	{
		var table = document.getElementById('navigation');
		var i;
		var col = 0;
		
		// Change the CSS class name of each nav bar item
		for (i=0; i < table.rows.length; i++)
		{
			table.rows[i].cells[col].className = 'NavBar';
		}
	}
}

function clickNavBarItem(id, newWindow)
{
	// Should work in all major browsers
	
	var url;

	// based on the nav bar item id, determine which hyperlink to use
	switch (id)
	{
		case 0: url = '/Dean.aspx'; break;
		case 1: url = '/FacultyDirectory.aspx'; break;
		case 2: url = '/Departments/'; break;
		case 3: url = '/Majors/'; break;
		case 4: url = '/Students/'; break;
		case 8: url = 'http://www.troy.edu'; break;
		case 9: url = '/Publications/'; break;
		case 10: url = 'http://spectrum.troy.edu/~gradbus/'; break;
		case 11: url = '/Default.aspx'; break;
		case 12: url = '/Contact.aspx'; break;
		case 13: url = '/Sitemap.aspx'; break;
		case 14: url = '/Courses/Schedule.aspx'; break;
		case 15: url = 'http://www.troy.edu/business/'; break;
		case 16: url = '/Majors/GraduateMajors.aspx'; break;
		case 17: url = '/PublicServices.aspx';break;
		default: url = location.href;
	}

	// display the new page
	if (newWindow && !is_opera)
		window.open(url);
	else
		location.href = url;
}