Prototype - toggle function doesn't complete.


I'm trying to create a list menu. When the user clicks on the list
header the other elements should appear. My function looks like this:

<script type="text/javascript">
  Event.observe('female_header', 'click', function() {

  function toggle_div(element) {
    Effect.toggle(element, 'blind');
    return false;

My list menu looks like this:

  <li class="header" id="female_header" ><%= link_to "Dam", :action =>
category=('female') %></li><br />
<div style="display: none" id="female_categories">
    <li class="li_content"><%= link_to "Accessoarer", :action =>
category=('female_accessories') %></li><br />

The function starts but when the page has loaded it stops.

The function works when I try this:

Event.observe(window, 'load', function() {

So I think the problem is in my Event.observe.

Any tips would be greatly appreciated!

// Anders