function globalNavigationLoad() {
	// width of content space
	var siteWidth = 983;
	// finds teh width of all td's and adds them together for total nav width
	var estTotalWidth = 1;
	var totalWidth = 0;
	$('#middleNavigationTD ul li').each(function(){
		estTotalWidth += $(this).width();
		// if nav with is greater than the site content width then don't add that nav link to the table count - basically hides the remaining links
		if (estTotalWidth <= siteWidth) {
			totalWidth += $(this).width();
		}
	});
	
	// Assigns the global nav td and the div wrapper to the new width
	$('#middleNavigationTD').css('width',totalWidth+'px');
	$('#globalNavigationUlWrapper').css('width',totalWidth+'px');
	
	globalNavigation();
}

function globalNavigationResize() {
	globalNavigation();
}

function globalNavigation() {
	// width of content space
	var siteWidth = 983;
	// width of whole document space
	var documentWidth = $(document).width();
	// finds the width of the left td - to line up correctly on the left - the right is just set to auto
	var leftSideWidth = (documentWidth-siteWidth)/2;
	leftSideWidth = parseInt(leftSideWidth);
	// assigns to left td the new width
	$('#leftNavigationTD').css('width',leftSideWidth+'px');
}
