/*
 * DON'T REMOVE THE FOLLOWING LICENSE
 *           INFORMATION!
 * ----------------------------------
 * Copyright by
 * Dennis Ritz
 * Author: Dennis Ritz
 * dennis.ritz@gmx.net
 * 2007-2008
 * ----------------------------------
 */

function trim(str){
	while(str.substring(0,1)==' ')str=str.substring(1,str.length);
	while(str.substring(str.length-1,str.length)==' ')str=str.substring(0,str.length-1);
	return str;
}

function xonresize() {

	var main = Browser.getElementById('main');
	var head = Browser.getElementById('head');
	var toolbar = Browser.getElementById('toolbar');
	var body = Browser.getElementById('body');
	var leftbar = Browser.getElementById('leftbar');
	var leftdivider = Browser.getElementById('leftdivider');

	Browser.setHeight(leftdivider,Browser.getHeight(body)-Browser.getHeight(head)-2*Browser.getHeight(toolbar)+2);
	Browser.setHeight(leftbar,Browser.getHeight(body)-Browser.getHeight(head)-2*Browser.getHeight(toolbar)+2);
	Browser.setWidth(Browser.getElementById("navContainer"),Browser.getWidth(leftbar));
	Browser.setHeight(Browser.getElementById("navContainer"),Browser.getHeight(leftbar));
	Browser.setLeft(main,Browser.getWidth(leftbar)+Browser.getWidth(leftdivider));
	Browser.setWidth(main,Browser.getWidth(body)-Browser.getWidth(leftbar)-Browser.getWidth(leftdivider));
	Browser.setHeight(main,Browser.getHeight(body)-Browser.getHeight(head)-2*Browser.getHeight(toolbar)+2);
	Browser.setDisplay(body,false);
	Browser.setDisplay(body,true);
}
window.onresize = xonresize;