I writed a file like :

<a href="javascript:showList('m1', 'block');">Menu1</a>|| <a href="javascript:showList('m2', 'block');">Menu2</a>

<script type="text/javascript">
function showList(idl, stl) {
document.getElementById(idl).style.display = stl;
}
</script>



<ul id="m1" style="display:none">
<li>Link1</li>
<li>Link2</li>
</ul>

<ul id="m2" style="display:none">
<li>Link3</li>
<li>Link4</li>
</ul>

When I click "menu1" then it will show "link1, link 2"
When I click "menu2" then it will show "link3, link 4"
I want to when you click 'menu1' will show "link 1, link2" and you click 'menu2' will show 'link 3,link4' and hiden 'link1, link2'


Help me!
Thanks Everyone