function update_page_size() {
    // Update the map size.
    var left_width = get_windowWidth() - 254 - 42;
    var leftdiv = document.getElementById("leftside");
    if (leftdiv) {
      leftdiv.style.width = left_width + 'px';
    }
      
    var mappanediv = document.getElementById("mappane");
    if (mappanediv) {
      mappanediv.style.width = left_width + 'px';
    }

    var mapdiv = document.getElementById("map");
    if (mapdiv) {
      var map_height = Math.floor(0.66 * left_width);
      if (map_height > map_max_height) { map_height = map_max_height; }
      var inner_map = left_width - 46;
      mapdiv.style.height = map_height + 'px';
      mapdiv.style.width = inner_map + 'px';
    }
    return(left_width);
}

function get_windowWidth() {
	var myWidth = 0;
	if (typeof( window.innerWidth ) == 'number') {
		// Non-IE
		myWidth = window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientWidth) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	} else if (document.body && document.body.clientWidth) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
//alert(myWidth);
	return myWidth;
}
