javascript for advanced search interface