//ver 2.01.0000001-beta-alfa

var pwcAktualny = null;
var pwcInterval = null;
     
function zmazMenu() 
  {
    if (null != pwcAktualny)
      pwcAktualny.style.display = "";
    pwcAktualny = null;
  }
  
function zhasniMenu()
  {
    if (pwcInterval != null)
      clearTimeout(pwcInterval); 
    pwcInterval = setTimeout("zmazMenu()",500);
  }  

function nezhasniMenu()
  {
    if (pwcInterval != null)
      { 
        clearTimeout(pwcInterval); 
        pwcInterval = null;
      }
  }
         
function zobrazMenu(iditem,idsubitem,relx,rely)
  {
    nezhasniMenu();
    zmazMenu();
            
    if (idsubitem == null)
      return;                        
      
    if (rely<=0)
      rely = 0;
                                
    var submenu = document.getElementById(idsubitem);
    var menu = document.getElementById(iditem);
                 
    var x = relx;               
    var y = parseInt(menu.scrollHeight) + rely;
//    submenu.style.left = x + "px";
//    submenu.style.top = y + "px";
    submenu.style.display = "block";
//    submenu.style.position = "absolute";
    pwcAktualny = submenu;
    event.cancelBubble = true;
  }
