/*For Mac with layout manager issues where css is loaded AFTER javascript load, this should resolve the
js css style change event*/

/*
 *	This is the function for adjusting the right and left navigation bar so the color will extend to the bottom
 *  of the page.
 *
 *	Author: Huming Tang
 */
function adjustNavigation()
{
	var staticHeight;
	var textH = document.getElementById("cvs-left-links-container").clientHeight;
	var imageH = document.getElementById("cvs-main-image-container").clientHeight;
	
	if (textH>imageH)
		staticHeight=textH;
	else
		staticHeight=imageH;
	
	document.getElementById("cvs-left-links-container").style.height = (staticHeight) + "px";
	document.getElementById("cvs-right-links-container").style.height = (staticHeight) + "px";
}


function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}


addLoadEvent(adjustNavigation);

addLoadEvent(function() {
  /* more code to run on page load */ 
});



