I found a simple toggle script which opens and closes a div upon clicking the link. Is there a way for it to toggle without click the designated link.. or in other words, click anywhere on the page.

function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
e.style.display = 'block';

Thank you!