<!--

/*   top menu - SCRIPT

     The following functions animate the top menu in 2 different ways:

     1. Mouse click menu. Each submenu appears / disappears when clicking on correspondent caption text.

     2. Mouseover menu. Each submenu appears when the mouse is over the caption text.
        All submenus disappear before a menu appear, and when clicking on the document body - caption text included.

   - hideAll () hides all sections. Sections have to be specified explicitly.

     Add / remove lines in function hideAll()
     when adding / removing horizontal menu sections (submenu).

     usage:

     1. by showhideSubmenu() for the mouse click menu

     2. in showSubmenu() for the mouse over menu

        in <body onClick="hideAll()"> for the mouse over menu

   - showhideSubmenu() displays and hides a section when clicking on its caption text.

     usage:

     1. mouse click menu

<td class="hmenu"><div id="menu1"><a class="hmenu" href="#" onClick="showhideSubmenu(1); return false">Caption Text</a> |&nbsp;</div>
<table class="hmenu_1" id="submenu1" border=0 cellspacing=0 cellpadding=0> ...

   - showSubmenu() displays a section when passing the mouse over its caption text.

     usage:

     2. mouse over menu

<td class="hmenu"><div id="menu1"><a class="hmenu" href="#" onMouseOver="showSubmenu(1)" onClick="return false">Caption Text</a> |&nbsp;</div>
<table class="hmenu_1" id="submenu1" border=0 cellspacing=0 cellpadding=0> ...

     Finally add

<script type="text/javascript" language="JavaScript">
<!--
display = 0; // initializes the display variable used in showhideSubmenu()
// -->
</script>

     just after <body>

     and specify

     <body onClick="hideAll()"> for mouse over menu,
     <body> only for mouse click menu.

     In the document, within the menu:

     Add / remove appropriate id="menu#" and id="submenu#" and show[hide]Submenu(#)

     NOTE: use &nbsp; instead of spaces in submenu voices, or lines may break on some browsers

*/

function hideAll () {

    document.getElementById('submenu1').style.display = 'none';
    document.getElementById('submenu2').style.display = 'none';
    document.getElementById('submenu3').style.display = 'none';
    document.getElementById('submenu4').style.display = 'none';
    document.getElementById('submenu5').style.display = 'none';
    document.getElementById('submenu6').style.display = 'none';
    document.getElementById('submenu7').style.display = 'none';
    document.getElementById('submenu8').style.display = 'none';
    document.getElementById('submenu9').style.display = 'none';
    document.getElementById('submenu10').style.display = 'none';

    // add / remove lines here when adding / removing horizontal menu sections

}

function showhideSubmenu (i) {

    // The display variable is initialized at the document beginning, just after <body>

    id = 'submenu' + i;

    if (display != i) {

        hideAll();
        document.getElementById(id).style.display = 'block';
        document.getElementById(id).style.zIndex=100;
        display = i;

    } else {

        document.getElementById(id).style.display = 'none';
        display = 0;

    }

}

function showSubmenu (i) {

    id = 'submenu' + i;

    hideAll();
    document.getElementById(id).style.display = 'block';
     document.getElementById(id).style.zIndex=100;

}

// -->
