<script language="javascript" type="text/javascript">
function toggleDivOL( elemID )
{ var elem = document.getElementById( elemID );
if( elem.style.display != 'none' )
{ elem.style.display = 'none';
}
else
{ elem.style.display = 'block';
}
}
</script>
you can call this function like this
onclick=toggleDivOL('elemID')
replace elemID with the id you want to toggle the visibility