When you call toggle(button) you'll have to send a specific object already created (e.g. )document.getElementById('element_id_here'). Therefore try alerting (e.g. alert(button); and alert(typeof button)) in the first line of that function.
Good job for opting to use the DOM. :)