I'm not sure why you are looking for mouse clicks.
It seems a bit backwards to me.
You should consider simply using the onmouseout and onmouseover events for your menu instead.
Here is a quick example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Menu Test</title>
</head>
<body>
<script type="text/javascript">
function displayMenu(menuListBlockID, menuTextBlockID) {
var menuTextBlock = document.getElementById(menuTextBlockID)
menuTextBlock.style.backgroundColor = "green";
var menuListBlock = document.getElementById(menuListBlockID);
menuListBlock.style.display = "block";
}
function hideMenu(menuListBlockID, menuTextBlockID) {
var menuTextBlock = document.getElementById(menuTextBlockID)
menuTextBlock.style.backgroundColor = "#C00000";
var menuListBlock = document.getElementById(menuListBlockID);
menuListBlock.style.display = "none";
}
</script>
<div id="menu">
<div id="firstMenuItem" onmouseover="displayMenu('firstMenuItemList','firstMenuItemText')" onmouseout="hideMenu('firstMenuItemList','firstMenuItemText')" style="float:left">
<span id="firstMenuItemText" style="display:block; background-color:#C00000; color:#FFFFFF;" >Menu Item 1 |</span>
<div id="firstMenuItemList" style="display:none;color:White; border:solid 1px green; padding:2px;">
<a href="Test.Html">One</a><br />
<a href="Test.Html">Two</a>
</div>
</div>
<div id="secondMenuItem" onmouseover="displayMenu('secondMenuItemList','secondMenuItemText')" onmouseout="hideMenu('secondMenuItemList','secondMenuItemText')" style="float:left">
<span id="secondMenuItemText" style="display:block; background-color:#C00000; color:#FFFFFF;">Menu Item 2</span>
<div id="secondMenuItemList" style="display:none;color:White; border:solid 1px green;">
<a href="Test.Html">Three</a><br />
<a href="Test.Html">Four</a>
</div>
</div>
</div>
</div>
</body>
</html>
Please take note of how I've grouped the menu items. I have a main menu DIV to group all of the menu items together. Each menu item has it's own DIV to group the title for the item and the actual menu links together. The onmouseover and onmouseout events are applied to the menu item block. This means that whenever the end user hovers over anything within the menu item block it will remain open.