Help with link_to_function and creating pull down menu

Hi. I'm trying to create a pull down menu, but I'm not sure how to do
it using the link_to_function in my view. When the user clicks on the
select01.gif, the submenu on the side should display, else if should
be hidden. Any help please. Thank you.

<%= link_to_function( image_tag("graphics/
select01.gif", :alt=>'Programming', :size=>'100x20', :border=>0),
                         :update => "select01_div",
                         :url =>{ :action => :select01_action }) %>

<div id="select01_div">
  <%= image_tag 'graphics/
select01.gif', :alt=>'Programming', :size=>'100x20' %>

hi there
you could use link_to_remote(link_to) and there :onclick => remote_funcion()
to change the div you want
I hope it helps

Thanks. I also got this from the Internet, but I wonder if you or
anybody knows how I can get the value of an element after setting it.
The following will close a divider, but I want it to toggle so that if
the user clicks on the "Close" again, the menu will reappear. To do
that, I need to get the page[div].??? state of the divider somehow.

In the helper, I have
module VideosHelper
  def hide_and_reset(div)
    update_page do |page|

Then in the view, I have

<tr><td align="center">
<%= link_to_function "Close", hide_and_reset(:select02_div) %>
<div id="select02_div">