How can I make a menu for the following code

<div id="sidebar">

	<li><a href="#">Master link</a>
			<li><a href="#">Link to be revealed</a></li>
	<li><a href="">Master Link 2</a>
			<li><a href="#">Sublink</a></li>


Wit this CSS, I m hiding the second level of the menu, that is ul > ul

#sidebar ul li {list-style:none;}
#sidebar ul li ul {position:relative;left:20px;display:none;}

When I click on "master link" then I want all the subitems to be revealed and when clicked again then hide. I m really noob at javascript, so I dont even know what to look from google.

Thanks in advance