Extended Search Function - Implementation with Javascript