need help with a wacky menu?

Discussion in 'JavaScript' started by stompergames, Nov 20, 2008.

  1. #1
    What is wrong with the menu on the leftbar of the site below? It takes two clicks to activate the menu, and then the "onMouseOut" of the div the button expands flashes when you move your mouse over it. Whats the problem, is there some onLoad thing I need to do? Code and site below:

    www.hcsauxiliary.org

    Javascript
    
    function expand(objId)
    {
    	if(document.getElementById(objId).style['display']=="none")
    		document.getElementById(objId).style['display']="block";
    	else
    		document.getElementById(objId).style['display']="none";
    }
    
    Code (markup):
    HTML
    
    <div class="menu">
    			<a href="javascript:expand('seasonal');">Holiday Updates ></a>
        			<div id="seasonal" onMouseOut="expand('seasonal')">
    				        <a href="#">Thanksgiving Dinner Gift</a><br />
             				<a href="#">Adopt a Family</a><br />
    					<a href="#">Holiday Store Gift Giving</a>
          			</div>
        			<br />
    			<a href="javascript:expand('volunteer');">Volunteer ></a>
    			<div id="volunteer" onMouseOut="expand('volunteer')">
    				     	<a href="#">Red Kettle Bell Ringing</a><br />
              				<a href="#">Ornament Program</a><br />
                      	</div>
          		</div>
    
    Code (markup):
    Any help is greatly appreciated! Thanks!
     
    stompergames, Nov 20, 2008 IP