basic text searching javaScript