Using this Javascript function you can toggle the visibility of HTML items by their ID.
Include the following in the <head> of your web page :
<script type="text/javascript">
<!--
function toggleID(id) {
if (document.getElementById(id).style.display=='none') {
document.getElementById(id).style.display='block';
} else {
document.getElementById(id).style.display='none';
}
}
// -->
</script>
<div id="my_div">This is an example DIV</div>
<a href="#" onclick="javascript:toggleID('my_div');return false;">Click here</a>