code: function clearSearch() {
      var value = document.getElementById('search').value;
      marks = [];
      marksIndex = 0;
      for (var key in markers) {
          if ( (~(key.toLowerCase()).indexOf(value.toLowerCase())) && (mb.contains(markers[key].getLatLng()))) {
              marks.push(markers[key]);
          }
      }
      removeMarks();
      if (lockit) {
          document.getElementById('searchResult').innerHTML = "";
      }
      else {
          document.getElementById('searchResult').innerHTML = "";
      }
  }
docs: Clear Search With Marker names