It's a bad idea to simulate a button click, and a known anti-patten in UI development.
You will see the right approach if you consider the purpose of it. You don't really need "to fire a specific button". What you really need to do, it
to call same function as the one called when the user clicks a button.
Just take it and make it — exactly in this way. Define some function and call it from two (or more) different places of the code. One would be from the event handler of some button click, another one — elsewhere. Only in this way you will achieve reasonable UI consistency in invocation of some actions.
[EDIT]
One of the ways to get a focused element is described here:
http://stackoverflow.com/questions/7329141/how-to-get-current-focused-element-in-javascript[
^].
Also, pay attention for jQuery: it can help you a lot:
http://en.wikipedia.org/wiki/Jquery[
^],
http://jquery.com/[
^].
—SA