/* <focus setter> */
function set_focus()
{
  // sets the focus to the first element in the dom tree, wich has
  // the css class "set-focus" (among others)
  var selected_cand = null;
  $$("*[class~=set-focus]").each(function(cand) {
    if(!cand.disabled && !selected_cand)
    {
      selected_cand = cand;
    }
  });
  if(selected_cand)
  {
    selected_cand.focus();
  }
}
/* </focus setter> */
