var casovac;
var menux=new Array();

function OpenHMenu(cislo,pozice)
{
  menux[cislo]=pozice;

  window.clearTimeout(casovac);
  Hide();

//poz=NactiStyl('hmenu1','left');
//window.alert(poz);

  if (pozice > 1)
  {
    if (document.body.clientWidth > 699)
    {
      eval('hmenu2_'+ cislo + '.style.left=' + pozice);
      eval('hmenu2_'+ cislo + '.style.visibility=\'visible\'');
    }
    else 
    {
      eval('hmenu2_'+ cislo + '.style.left=' + pozice);
      eval('hmenu2_'+ cislo + '.style.visibility=\'visible\'');
    }
  }	
}

function CloseHMenu()
{
  window.clearTimeout(casovac);
  casovac=window.setTimeout("Hide()", 500);    // Start odpocitavani casu
}

function Hide()
{
  for (var i=1;i<menux.length+1;i++)
  {
    if (menux[i] > 1)
    {
      eval('hmenu2_'+ i + '.style.visibility=\'hidden\'');
    }
  }
}

function NactiStyl(element,cssVlastnost)
{
  if(document.defaultView) hodnota=window.document.defaultView.getComputedStyle(element,null).getPropertyValue(cssVlastnost); // Mozilla
  else if(element + ".currentStyle") hodnota=eval(element + ".currentStyle." + cssVlastnost); // IE

  return hodnota;
}
