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

//windowHeight calculates available screen
function windowHeight(){
	var alto= 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		alto= window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		alto= document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		alto= document.body.clientHeight;
	}
	return alto;
}


function resizeRightCol () {
	//if (!document.getElementById) return false;
	var wHeight, offset, totalHeight
	wHeight = document.getElementById("mid-col").offsetHeight; //get the height of mid-col
	offset = 182; //is the height of the header
	extra = 200; // this is the extra arbitrary height we need to add to make right-col = mid-col
	totalHeight = wHeight - offset + extra +  "px";
	document.getElementById("right-col").style.height = totalHeight;
}


addLoadEvent(resizeRightCol);