// Toolbar button and Ctrl-F handler.
function toggleFindbar() {
  if((document.getElementById('FindToolbar')).hidden == true) {
    gFindBar.onFindCommand();
  }
  else gFindBar.close();
}
document.getElementById("cmd_find").setAttribute("oncommand", "toggleFindbar();");