TIP - To keep your main (html) - page neat and easy to read, you can put the head or body javascript into an external .js file (minus html tags) and reference it from your page thus -
<script language="JavaScript1.2" src="MY.js"type="text/javascript"></script>

Anylink Horizontal Menu.

Webmaster Links

Right-click - 'select all' (ctrl-a) then copy (ctrl-c) and paste to 'HEAD' of your page.

Right-click - 'select all' (ctrl-a) then copy (ctrl-c) and paste to 'BODY' of your page.

  The dropdownmenu() function inside the code of Step 2 accepts 4 parameters as shown :
  dropdownmenu(this, event, menuarray, 'width').
Only customize the last two parameters (menuarray and 'width'), where :
  3) Menuarray- The array contents you wish the menu to display (see code of Step 1).
  4) Width- The width of the menu, in pixels.
  Useful Information :
  As shown in the demo, this script can be associated not just with a regular link (), but also other elements such as a list <li> as a list, a table cell <td> etc. For non regular links, the trick is to make sure the element that will activate the menu has a width defined somewhere. Lets take the example of the list in the demo above:

<ul class="navlist">
<li><a href="#">Dynamic Drive</a></li>
<li onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()">
<a href="#">JavaScript Kit</a></li>
<li><a href="#">CSS Drive</a></li>
<li><a href="#">Coding Forums</a></li>

Here instead of inserting the onMouseover code inside a standard tag, we add it inside a <li> to activate the menu onMouseover. This works, but only if the <li> has a width defined for it, which if you examine the CSS of step 1, you'll see it does:

.navlist li {width: 135px;""}

A width needs to be defined either for the <li> (or <ul> instead if you like) in this case, since without it, the menu has no way to know how far to display the menu to the right of the element, and typically will display the menu too far away from the element as a result. So simply remember, when using this script on elements other than a text link, make sure the element has a width defined, either explicitly, by way of an external CSS, or its container.