Menu Object lack privacy - How to add w/ out self-executing method?
<p>In C++ I put similar functions in classes.</p>

<p>Final Edit:</p>

<pre><code>var menu = {   

  menu_timer:0,
  menu_element:0,

  /* called when mousing over the top menu item */

  top_mouse_over: function (id) 
    {
    menu.bottom_mouse_over();
    menu.menu_element=document.getElementById(id);
    menu.menu_element.style.visibility='visible';
    },

  /* hide the menu when the timer runs out */

  hide_menu: function()
    {
    if(menu.menu_element)menu.menu_element.style.visibility='hidden';
    },

  /* keeps the menu open by clearing the timer when mousing over the menu items */

  bottom_mouse_over: function() 
    {
    if(menu.menu_timer)
      {
      window.clearTimeout(menu.menu_timer);
      }
    },

  /* set the timer to hide the menu, required by clearTimeout */

  mouse_out: function() 
    {
    menu.menu_timer=window.setTimeout(menu.hide_menu, 1000);
    }
};
</code></pre>
