etAttribute("id", "searchresults");
       new_elem.setAttribute("class", "gcse-searchresults");
       container.appendChild(new_elem);
    };

    var event_handler = function(){
        change_branch();
        google.search.cse.element.go();
        document.getElementsByName("search")[0].focus();
    }

    var set_focus = function(){
       var inputs = document.getElementsByName("search");
       if(inputs.length>0) inputs[0].focus();
    }

    // read cookie and setup branch accordingly
    if(docu