//This function resets the page width to a larger size if a table within the body is detected to be larger than the screen.
//This is to account for right-hand teasers existing on the same page as a table that is wider than the screen.
function setPageWidth() {
	var objTables = document.getElementsByTagName("table");
	
	intLength = objTables.length;
	
	if (intLength > 0) {
		intScreenWidth = document.body.clientWidth;
		intMainBodyWidth = document.getElementById('content').clientWidth
		intNavWidth = document.getElementById('left_nav').clientWidth
		
		if (document.getElementById('expanding_menu')) {
			intExpandingMenu = document.getElementById('expanding_menu').clientWidth
		}
		
		//intScreenWidth holds the actual amount of pixels left over the middle content when you subtract the space
		//taken up by the left had navigation and the right hand teasers.
		for (intCounter = 0; intCounter < intLength; intCounter++) {
			if (intCounter < 2) {
				intTableWidth = objTables[intCounter].clientWidth;
				intRequiredWidth = (intTableWidth + intNavWidth + intExpandingMenu);
				
				if (intRequiredWidth > intScreenWidth) {
					document.getElementById('mid_container').style.width =  intRequiredWidth + 200 + "px";
					document.getElementById('content').style.width = intTableWidth + intExpandingMenu + 190 +"px";
					document.getElementById('content').style.position = "absolute";
					document.getElementById('content').style.left = "3px";
					document.getElementById('content').style.top = "109px";
				}
			}
		}
	}
}