function initialize() {
  TargetizeExternalLinks();
}

/*
Adds ' target="_blank" ' attribute to all <a> tags with class="external"
*/
function TargetizeExternalLinks() {
  if (document.links) {
    for (var i=0; i < document.links.length; i++) {
      if (document.links[i].className == "external") {
        document.links[i].target = "_blank";
      }
    }
  }
}

/*
extends the bottom of <div> with id="navigation" to the bottom of <div> with id="content" if necessary
*/
function extendNavigationArea() {
  var navigation = document.getElementById('navigation');
  var content = document.getElementById('content');
  if (navigation && content) {
    var navigationHeight = navigation.offsetHeight;
	var contentHeight = content.offsetHeight;
	if (navigationHeight < contentHeight)
	  navigation.style.height = contentHeight + "px";
  }
}

function getElementHeight(element) {
  var vw = document.defaultView;
  var currStyle = vw.getComputedStyle(element, "");
  var height = parseInt(currStyle.getPropertyValue("height"));
  //height = height - parseInt(currStyle.getPropertyValue("margin-top"));
  return height;
}