<h3 class='sidebar-title'>
  <label for="q"><%= @sidebar.title %></label>
</h3>
<% form_tag({:controller => 'articles',  :action => 'search'}, {:method => 'get', :id => 'sform'}) do %>
  <input type="text" id="q" name="q" value="" size="15" />
  <%= image_tag "spinner-blue.gif", :id => 'search_spinner', :style => 'display:none;' %>
<% end %>
<%= observe_field "q", :frequency => 1,
    :url => { :controller => "live", :action => "search" },
    :loading => "Element.show('search_spinner')",
    :complete => "Element.hide('search_spinner')",
    :update => "search-results",
    :with => "'q=' + encodeURIComponent($F('q'))" -%>

<div id="search-results" class="results"></div>