Search filter javascripts modified for generic use