addEvent(window, 'load', setheight);

function addEvent(obj, evType, fn, useCapture)
// elm        - element on which to add the event
// evType     - event to watch for
// fn         - function to attach to the event
// useCapture - which
// e.g. addEvent(window, "load", sortables_init);
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  } else {
//    alert("Handler could not be attached");
  }
} 

function setheight() {
  if(document.getElementById) {
    menuheight=parseInt(document.getElementById("menu").offsetHeight);
    mainheight=parseInt(document.getElementById("main").offsetHeight);
    if (menuheight < mainheight) {
      document.getElementById("menu").style.height = mainheight-17 + "px";
    } else if (menuheight > mainheight) {
      document.getElementById("main").style.height = menuheight + "px";
    }
//    document.getElementById("copyright").style.top = (mainheight + 85) + "px";
  }
}