My javascript skills are pretty rubbish, so can't help that much, but if you can get the ID of the control you want to fire, you can use something like
var fireThis = document.getElementById('**ELEMENT HERE**');
if( document.createEventObject ) {
fireThis.fireEvent('click');
} replace **ELEMENT HERE** for the element ID you want you can replace 'click' for any JS event, so onchange, mouseup, mousedown etc etc