I use this and it passes vairables to a new window i open with javascript. I dont know if it will help.
$bd_string .= "<a href=\"nowlive5.php3?id=$user_id\" onclick=\"NewWindow(this.href,'','700','300','yes');return false\" onMouseOver=\"MM_displayStatusMsg('Join $username');return document.MM_returnValue\" onMouseOut=\"MM_displayStatusMsg('');return document.MM_returnValue\"><img src=\"http://$user_ip/cgi/nph-jpeg.exe?-aw+80+-ah+60+-single+-device+0+-video+0\" alt=< img src=\"pic.gif\"></a><BR>
$username <BR></a>
3 different javascripts used here
Regards
Jules@hunrgybear.co.uk