function correctLayout()
{
  // *** Find the innerheight of the window. See http://www.quirksmode.org/
  var w, h;
  var IE_heightCorrection = 0;						// MF: height correction in IE strict mode
  if (self.innerHeight) 
  { // all except Explorer
    w = self.innerWidth;
    h = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
  { // Explorer 6 Strict Mode
    w = document.documentElement.clientWidth;
    h = document.documentElement.clientHeight;
    IE_heightCorrection = -155;						// -155: correct the wrong IE height
  }
  else if (document.body) 
  { // other Explorers
    w = document.body.clientWidth;
    h = document.body.clientHeight;
  }

  //alert(document.getElementById('content').offsetHeight);
  //if(document.getElementById('content').offsetheight) {
  if(document.getElementById('content').offsetHeight) {
    // *** Breite angleichen
    document.getElementById('layoutwidth_content').width = 300;		// minimal table width
    width = document.getElementById('content_table').offsetWidth;	// actual table width (if with is greater than 'layoutwidth_content')
    document.getElementById('layoutwidth_frame').width = width-11;	// ADJUST this value, if padding-left or padding-right of id='content' is changes 
    document.getElementById('layoutwidth_content').width = width-6;

    // *** Höhe angleichen
    var height = document.getElementById('content').offsetHeight+45;
    if (height < 450)
      height = 450;							// minimal height: to ensure that menu is displayed completely
    if (height < h)
      height = h;							// if the height of the window is greater than the contents hight
    var style_height;
    style_height = height + IE_heightCorrection + "px";
    document.getElementById('frame').style.height = style_height;
    //document.getElementById('frame').clientHeight = style_height;
  }
}

function openWin(url,winname,width,height,toolb,statb) 
{
  var privateSite;
  var options = 'width=' + width + ',height=' + height + ',toolbar=' + toolb + ',resizable=1,hotkeys=0,status=' + statb;
  privateSite = window.open(url,winname,options);
  privateSite.focus();
}
