  function swapSub(theId) {
    if (document.getElementById(theId).className == 'submenu show') hideSub(theId);
    else showSub(theId);
  }
  
  function showSub(theId) {
    resetMenu(theId);
    objh = document.getElementById('h_' + theId);
    objh.style.backgroundPosition='0px 32px';
    objh.style.color = '#d6c9c1';
    document.getElementById(theId).className='submenu show';
  }
  
  function hideSub(theId) {
    objh = document.getElementById('h_' + theId);
    objh.style.backgroundPosition='0px 0px';
    objh.style.color = '#ffffff';
    document.getElementById(theId).className='submenu hide';
  }
  
  function getScreenWidth() {
    isNetscape = (navigator.appName == "Netscape");
    available = (isNetscape) ? window.innerWidth : document.body.clientWidth;
    return available;
  }

  function getScreenHeight() {
    isNetscape = (navigator.appName == "Netscape");
    available = (isNetscape) ? window.innerHeight : screen.availHeight;
    return available;
  }
  
  function setHeights(corr) {
    var ver = navigator.appVersion;
    if (ver.indexOf("MSIE") != -1) ie = true;
    else ie = false;
    mai = document.getElementById('main');
    men = document.getElementById('menu');
    con = document.getElementById('content');
    bot = document.getElementById('bottom');
    rig = document.getElementById('right');
    ban = document.getElementById('banner');
    lod = document.getElementById('loading');
    ct = Math.round(con.style.top.replace('px',''));
    ws = getScreenWidth();
    hs = getScreenHeight();
    if (corr > 0) {co = 147; cb = 200;}
    else {co = 0; cb = 1000;}
    h = con.offsetHeight + 50;
    c = 656 - co;
    if (h > c) {
      h = h + 20 ;
      bh = bot.style.height;
      bh = Math.round(bh.replace('px',''));
      rh = h + bh;
      if (rh + co > hs - 70 && !ie) cb = cb + 16;
      rig.style.height = rh + 'px';
    } else {
      h = c;
      rig.style.height = (ct + h - co + 15) + 'px';
    }
    con.style.height = h + 'px';
    men.style.height = ct + h - 75 + 'px';
    bot.style.top = ct + h + 'px';
    ban.style.width = (ws - cb) + 'px';
    if (corr) rig.style.width = (ws - cb - 500) + 'px';
    else rig.style.width = (ws - cb + 300) + 'px';
    lod.className = 'hide';
    mai.className = 'a1';
  }

