var mTime = [];

function mInit()
{
  var ul = document.getElementById('hMenu').getElementsByTagName('ul');
  for(a = 0; a < ul.length; a++) {

/*    ul.item(a).onmouseover = new Function('zobr(\'' + ul.item(a).id + '\');');
    ul.item(a).onmouseout = new Function('schov(\'' + ul.item(a).id + '\');');*/

    ul.item(a).parentNode.onmouseover = new Function('zobr(\'' + ul.item(a).id + '\');');
    ul.item(a).parentNode.onmouseout = new Function('schov(\'' + ul.item(a).id + '\');');
  }
}


function zobr(id)
{
  if (mTime[id]) {
    clearTimeout(mTime[id]);
    mTime[id] = null;
  }
  document.getElementById(id).style.display = 'block';
}


function schov(id)
{
  mTime[id] = setTimeout('sh(\''+ id +'\');', 20);
}


function sh(id) {
  document.getElementById(id).style.display = 'none';
}


function smaz(jmeno, def)
{
  var inp = document.getElementById(jmeno);
  if(inp.value == def) inp.value = '';
}
