  function getDocWidth() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollWidth, D.documentElement.scrollWidth),
        Math.max(D.body.offsetWidth, D.documentElement.offsetWidth),
        Math.max(D.body.clientWidth, D.documentElement.clientWidth)
    );
}
    function dd(id,barva,kam)
    {
      if (kam==0)
      document.getElementById('id'+id).style.color='gray';
      else
      document.getElementById('id'+id).style.color=barva;
    }
    function kk()
    {
    document.getElementById('menu').style.height='auto';
        var jsvyska = document.getElementById('menu').offsetHeight;
     document.getElementById('menu').style.height='100%';
    
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    myHeight = document.body.clientHeight;
  }

  myWidth = getDocWidth();

if (myWidth>865)
{
  ss1=(myWidth-175)/230;
  ss2=(Math.floor(ss1)*230)+175;
  ss=myWidth-ss2;
  document.getElementById('index').style.marginRight=ss+'px';
}
else
{
document.getElementById('index').style.marginRight='0px';
}

if (myHeight>jsvyska)
{
  document.getElementById('menu').style.position='fixed';
}
else
{
  document.getElementById('menu').style.position='absolute';
}
//alert (jsvyska);
    }
