var pageMaxHeight = 450;

function convertSubmenuAndPageCopyToSameHeight() {
	var menuHeight = xHeight(document.getElementById('CopyWrapper'));
	var copyHeight = xHeight(document.getElementById('SubMenu'));	
	var maxHeight = Math.max(menuHeight, copyHeight);
	var newContentHeight = Math.max(450, maxHeight);
	
	xHeight(document.getElementById('CopyWrapper'), newContentHeight);
	xHeight(document.getElementById('SubMenu'), newContentHeight);
	//xHeight(document.getElementById('ContentWrapper'), maxHeight);
	//xHeight(document.getElementById('SubMenuWrapper'), maxHeight);	
}

function placeElements() {
	//alert((xWidth(document.body) - xWidth(document.getElementById('container'))) / 2);
	var offset = Math.max(((xWidth(document.body) - xWidth(document.getElementById('container'))) / 2), 0);
	document.getElementById("container").style.marginLeft = String(offset + "px");
	
	var newCopyHeight = xHeight(document.getElementById("container")) - xHeight(document.getElementById("Header")) - xHeight(document.getElementById("BreadCrumbs")) - xHeight(document.getElementById("Footer"));
	xHeight(document.getElementById("CopyWrapper"), newCopyHeight);
	
		
}

function initColHeights() {
	convertLeftRightShadowImgsToMainHeight();
	placeElements();		
}

function convertLeftRightShadowImgsToMainHeight() {
	var mainHeight = xHeight(document.getElementById('container'));
	var maxHeight = Math.max(450, mainHeight);
	
	xHeight(document.getElementById('left_img'), maxHeight);
	xHeight(document.getElementById('right_img'), maxHeight);
}

//function convertLeftRightInnerColsToMaxHeight() {
//	var leftColHeight = xHeight(document.getElementById('left_main'));
//	var rightColHeight = xHeight(document.getElementById('right_main'));	
//	var maxHeight = Math.max(leftColHeight, rightColHeight);
//	
//	xHeight(document.getElementById('left_main'), maxHeight);
//	xHeight(document.getElementById('right_main'), maxHeight);
//}
