function resizePanel() {
	reloadDimensions();
		
	var height = dimensions.getViewportHeight; 
	var width  = dimensions.getViewportWidth; 
	var content = document.getElementById("content_td");

	var left = document.getElementById("left_panel");
	var right = document.getElementById("right_panel");
	var bottom = document.getElementById("bottom_panel");
	var top = document.getElementById("top_panel");	

	var panelsHeight= height;

	if (bottom != undefined) {
		bottom.style.height= bottom.getAttribute("maxwidth") + "px";
		height = height - parseInt(bottom.getAttribute("maxwidth"));
	}
		
	if (top != undefined) {
		var topHeight = parseInt(top.getAttribute("maxwidth"));
		top.style.height= topHeight + "px";
		height = height - topHeight;
		top.style.overflow= "hidden";
	}
	
	if (document.getElementById("internal").value == "1") {
		panelsHeight= height;	
	}
	
	if (left != undefined) {
		left.style.height = panelsHeight + "px";
		width= width - parseInt(left.getAttribute("maxwidth"));
		
		document.getElementById("left_td").style.verticalAlign="top";
		document.getElementById("left_td").removeAttribute('height');
		left.style.overflow = "hidden";
	}

	if (right != undefined) {
		right.style.height = panelsHeight + "px";
		width= width - parseInt(right.getAttribute("maxwidth"));

		document.getElementById("right_td").style.verticalAlign="top";
		document.getElementById("right_td").removeAttribute('height');
		right.style.overflow = "hidden";
		
	}

	content.style.height= height + 'px';
	content.style.width= width + 'px';

	if(document.getElementById("shopping") != undefined) document.getElementById("shopping").scrolling = "no";
}


