// JavaScript Document

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}



function getheight() {
	if(!document.getElementById("left")) return false;
	var left = document.getElementById("left");
	var right = document.getElementById("right");
	var foot = document.getElementById("foot");
	var leftheight = left.clientHeight;
	var rightheight = right.clientHeight;
	if ( leftheight > rightheight) {
		foot.style.top = leftheight + 157 + "px";
	}
	else {
		foot.style.top = rightheight + 157 + "px";
	}
	if (parseInt(foot.style.top) + 90 < document.documentElement.offsetHeight) {
		foot.style.top = document.documentElement.offsetHeight - 90 + "px";
	}
	if (parseInt(foot.style.top) + 90 < window.innerHeight) {
		foot.style.top = window.innerHeight - 90 + "px";
	}
}

addLoadEvent(getheight);




