 update shortcut links
       var links = document.getElementsByTagName("A");
       var i;
       for (i = 0; i < links.length; i++) {
          var parts = links[i].pathname.split("/");
          parts[1] = branch;
          links[i].pathname = parts.join("/");
       }

       // rebuild searchbox
       var container = document.getElementById("searchbox-container");
       var old_elem = document.getElementById("searchbox");
       container.removeChild(old_elem);
       var new_elem = document.createEl