function onBody() {
	var oCont=document.getElementById("container");
	var oTop=document.getElementById("top");
	var oBottom=document.getElementById("bottom");
	// Firefox only
	if (document.getElementById && !document.all)
		var ch=window.innerHeight-oTop.clientHeight-oBottom.clientHeight-21;
	else	// IE
		var ch=document.body.clientHeight-oTop.clientHeight-oBottom.clientHeight-24;
		
	document.getElementById("left").style.height=ch+"px";
	document.getElementById("right").style.height=ch+"px";

	// Compute height of left and right scrolling div
	cch=ch-30+"px";
	document.getElementById("leftscroll").style.height=cch;
	document.getElementById("rightscroll").style.height=cch;
	onWidth(numSplit);
}

function onWidth(ns) {
	
	if (ns==11) {
		// Increase left pane
		if (numSplit==3) {
			alert("Already at maximum width");
			return;
		}
		ns=numSplit+1;
	}
	else if (ns==12) {
		// Increase right pane
		if (numSplit==1) {
			alert("Already at maximum width");
			return;
		}
		ns=numSplit-1;
	}
	var oCont=document.getElementById("container");
	var cw=(oCont.clientWidth-44)/4;	// oCont.clientWidth-46
	switch (ns) {
	case 1:
		document.getElementById("left").style.width=cw+"px";
		document.getElementById("right").style.width=cw+cw+cw+"px";
		break;
	case 2:
		document.getElementById("left").style.width=cw+cw+"px";
		document.getElementById("right").style.width=cw+cw+"px";
		break;
	case 3:
		document.getElementById("left").style.width=cw+cw+cw+"px";
		document.getElementById("right").style.width=cw+"px";
		break;
	case 11:	
		
	case 12:
	}
	numSplit=ns;
	if (document.getElementById("bmap")) {
		if (document.getElementById("bmap").clientWidth < document.getElementById("leftscroll").clientWidth)
			createMap(0,0,0);
	}
}
