<!--

var DHTML = (document.getElementById || document.all || document.layers);
var ban_height;
var min_center = 150;

function getObj(name) {
  if (document.getElementById) {
    return document.getElementById(name);
  } else if (document.all) {
    return document.all[name];
  } else if (document.layers) {
    return document.layers[name];
  }
}

function hideAll () {
  if (!DHTML) return;
  var x = getObj ("left");
  var nb = x.childNodes.length;
  for (var i = 1; i <= nb; i++) {
    hide("smenu"+i);
  }
}

function show(id) {
  if (!DHTML) return;
  var x = getObj (id);
  if (x)
    x.style.visibility='visible';
}

function hide(id) {
  if (!DHTML) return;
  var x = getObj (id);
  if (x)
    x.style.visibility='hidden';
}

function windowHeight() {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) {
    return document.documentElement.clientHeight;
  } else if (document.body) {
    return document.body.clientHeight;
  } else return 0;
}

function getStyle(el, styleProp) {
  var x = getObj (el);
  if (!x)
    return;
  if (window.getComputedStyle)
    var y = window.getComputedStyle(x,null).getPropertyValue(styleProp);
  else if (x.currentStyle)
    var y = eval('x.currentStyle.' + styleProp);
  return y;
}

function getHeight (id) {
  return getStyle (id, "height");
}

function windowResize() { 
  var win = windowHeight();
  var center = win - ban_height; 
  center = center < min_center ? min_center : center;
  var x = getObj ("center");
  if (x)
    x.style.height = center + "px";
}

function init() { 
  if (!DHTML) return;

  hideAll();

  var header_height = parseInt (getHeight('header'));
  var footer_height = parseInt (getHeight('footer'));
  /* 40 = 2 * padding size */
  ban_height = header_height + footer_height + 40;
  
  windowResize ();
}


window.onresize = windowResize;

-->

