window.onload = draw_layout;
window.onresize = draw_layout;

function draw_layout() {
	var window_height = 0;
	var window_width = 0;

	var browserName=navigator.appName;
	var border = 0;
	var border_property = "0px";
	var padding = 0;

	if ( window.innerWidth ) {
		window_height = window.innerHeight;
		window_width = window.innerWidth;
	}
	else {
		window_height = document.body.clientHeight;
		window_width = document.body.clientWidth;
	}

	if ( !document.getElementById ) {
		if ( document.all ) {
			document.getElementById=function() {
				if ( typeof document.all[arguments[0]] != "undefined" )
					return document.all[arguments[0]];
				else
					return null;
			}
		}
		else if ( document.layers ) {
			document.getElementById=function() {
				if ( typeof document[arguments[0]] != "undefined" )
					return document[arguments[0]];
				else
					return null;
			}
		}
	}

	// var banner_height = document.getElementById("banner").style.height;
	var banner_toolbar_height = 90;
	var banner_height = 90;
	var banner_width = window_width;

	var body_height = window_height - banner_toolbar_height;
	if ( document.getElementById("banner") ) {
		body_height = window_height - banner_height;
	}
	var body_width = window_width;

	// modify measurments for non IE (i.e. CSS Standard obeying browsers)
	if ( browserName != "Microsoft Internet Explorer" ) {
		banner_toolbar_height = banner_toolbar_height - (border * 2) - (padding * 2);
		banner_height = banner_height - (border * 2) - (padding * 2);
		body_height = body_height - (border * 2) - (padding * 2);
	}

	if ( document.getElementById("banner_toolbar") ){
        	document.getElementById("banner_toolbar").style.height = banner_toolbar_height;
        	document.getElementById("banner_toolbar").style.width = banner_width;
    	}
	if ( document.getElementById("banner") ) {
		document.getElementById("banner").style.height = banner_height;
                document.getElementById("banner").style.width = banner_width;
        }
    	if ( document.getElementById("body_bg") ) {
        	document.getElementById("body_bg").style.height = body_height;
        	document.getElementById("body_bg").style.width = body_width;
    	}
    	if ( document.getElementById("body_nobg") ) {
        	document.getElementById("body_nobg").style.height = body_height;
        	document.getElementById("body_nobg").style.width = body_width;
    	}

	return false;
}


function browserBack(back) 
{
	if (navigator.appName == 'Netscape') {
   		back++;
	}
	history.go(back);	
}
