what auto suggest does
it take some values and return some values
in your either case either company or product ,the script should behave same(just querying and returning different values)
else if value==2
so if you do so,you dont need any extra custom scripts and make any autosuggest code work for your requirement...
atleast that is what i do or what i did