Group//The script below sets the div heights of the #nav_menu, #contentwrapper,
//and the #datacontent div's. 

function setNav() {
  var offset = 185;	// offset of div from top of browser window
  var wh = getWindowHeight(); // Window Height
  var n = document.getElementById('nav-menu') // Get div element
  var nh = n.offsetHeight - offset; // div height
  n.style.height = wh - offset; // Set div height to window height
}

function setDataContent() {
  var offset1 = 185;	// offset of div from top of browser window
  var wh = getWindowHeight(); // Window Height
  var c = document.getElementById('datacontent') // Get div element
  var ch = c.offsetHeight - offset1; // div height
  c.style.height = wh - offset1; // Set div height to window height
}

function setContentDiv() {
  var offset2 = 185;	// offset of div from top of browser window
  var wh = getWindowHeight(); // Window Height
  var d = document.getElementById('contentdiv') // Get div element
  var dh = d.offsetHeight - offset2; // div height
  d.style.height = wh - offset2; // Set div height to window height
}

function getWindowHeight() {
  var windowHeight = 0;
	
  if (typeof(window.innerHeight) == 'number')
    windowHeight = window.innerHeight;
	
  else {
		
    if (document.documentElement && document.documentElement.clientHeight)
      windowHeight = document.documentElement.clientHeight;
		
    else {
      if (document.body && document.body.clientHeight)
        windowHeight = document.body.clientHeight; }; };
				
  return windowHeight;
};

