function search() {
    var value = document.form.w.value;
    value = value.replace(/　+/g, " ").replace(/ +/g, " ").replace(/^ /, "").replace(/ $/, "").replace(/\//g, "%2F");
    var values = value.split(" ");
    for (var i = 0; i < values.length; i++) {
        values[i] = encodeURIComponent(values[i]).toUpperCase();
    }
    location.href = location.protocol + '//' + location.host + '/w/' + values.join('+');
}