Popular Search : Javascript Array Indexof String Not Working