Force Javascript Coding to Disassociate with every LI except to specified element
<p>How can the code be modified below such that it does not grab every LI except for the ones in the element specified? Reason being is that I have a seperate horizontal drop down menu on another page and when the code below is applied to the page, my right click menu resembles my drop down menu. How can I make it just apply itself to only the specified element: <code>document.getElementById('Menu')</code></p>

<pre><code>&lt;!DOCTYPE html&gt;

&lt;head&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
        var MenuObj;
        var activeMenuItem = false;

        //Function to highlight menu item
        function highlightMenuItem() {
            this.className = 'MenuHighlighted';
        }

        function deHighlightMenuItem() {
            this.className = '';
        }

        //Function to show menu on click of menu item
        function showMenu(e) {
            var myMouseX = (e || event).clientX;
            var myMouseY = (e || event).clientY;
            MenuObj.style.left = myMouseX + 'px';
            MenuObj.style.top = myMouseY + 'px';
            MenuObj.style.display = 'block';
            return false;
        }

        //Function to hide menu on click of menu item
        function hideMenu(e) {
            if (document.all) e = event;
            if (e.button == 0) {
                MenuObj.style.display = 'none';
            }
        }

        function initMenu() {
            MenuObj = document.getElementById('Menu');
            MenuObj.style.display = 'block';
            var menuItems = MenuObj.getElementsByTagName('LI');
            for (var no = 0; no &lt; menuItems.length; no++) {
                menuItems[no].onmouseover = highlightMenuItem;
                menuItems[no].onmouseout = deHighlightMenuItem;

                var aTag = menuItems[no].getElementsByTagName('A')[0];
                aTag.style.paddingLeft = '5px';
                aTag.style.width = (aTag.offsetWidth) + 'px';
                aTag.onclick = hideMenu;
            }
            MenuObj.style.display = 'none';
        }


    &lt;/script&gt;
    &lt;style type="text/css"&gt;
        #Menu
        {
            /* The menu container */
            border: 1px solid #808080;
            background-color: #EDEDED;
            margin: 0px;
            padding: 0px;
            width: 120px; /* Width of context menu */
            font-family: Trebuchet MS;
            font-size: 8pt;
            background-repeat: repeat-y; /* Never change these two values */
            display: none;
            position: absolute;
        }
        #Menu a
        {
            /* Links in the context menu */
            color: #252525;
            text-decoration: none;
            line-height: 20px;
            vertical-align: middle;
            height: 20px; /* Don't change these 3 values */
            display: block;
            width: 100%;
        }
        #Menu li
        {
            /* Each menu item */
            list-style-type: none;
            padding: 1px;
            margin: 1px;
            cursor: pointer;
        }
        #Menu li div
        {
            /* Dynamically created divs */
            cursor: pointer;
        }
        #Menu .MenuHighlighted
        {
            background-color: #C4D0D4;
        }

    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;select style="width: 250px;" id="refdocs_list"&gt;
  &lt;option value="volvo"&gt;Volvo&lt;/option&gt;
  &lt;option value="saab"&gt;Saab&lt;/option&gt;
  &lt;option value="mercedes"&gt;Mercedes&lt;/option&gt;
  &lt;option value="audi"&gt;Audi&lt;/option&gt;
&lt;/select&gt;

    &lt;div&gt;

                    &lt;ul id="Menu"&gt;
                        &lt;li&gt;&lt;a href="#nogo"&gt;Delete document&lt;/a&gt;&lt;/li&gt;
                        &lt;div style="height:1px; background: #808080;"&gt;&lt;/div&gt;
                        &lt;li style="height: 5px;"&gt;&lt;a href="#nogo"&gt;Clear all&lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt;

        &lt;script type="text/javascript"&gt;
            initMenu();
            MenuObj.style.display = 'none';
            document.getElementById('refdocs_list').oncontextmenu = showMenu;
            document.getElementById('refdocs_list').onclick = hideMenu;
            document.documentElement.onclick = hideMenu;
        &lt;/script&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
