Hi,
The business roles are shown in page fragment selectBusinessRole.htm of BSP application crm_ui_start.
I am not sure how javascript works but in SAP's code they are using client click event to login to web UI after the business role is selected.
Below is the line of code setting this client click event handler.
onClientClick="javascript:crmuif.createIFrame( '<%= <profile_nested>-profile_name %>');htmlbevent.returnValue=false;return false;"
I hope you will be able to make use of this code to compose the URL which you need.