Hello All hope some one can help

I got a room open in a tab witch is lightirc and it allows you to have as many rooms as you like but in the tab that already open
so you cant have room in so many tabs it got to be the tab that already got room open
so if I got room open in one tab and in second tab a link for second room I want to join how would I do it beacause I tried
Code:
<a href="javascript:sendCommand('/join #<?php echo $groupname; ?>');">join Room</a><br />
but that only works if it in the same tab as room not in new tab.

as always thank you for your help