You don't even have to create the function first, but can pass all vars for the window in the url:
<A HREF="#" onMouseOver="window.status='This is a status message';return true;"
onMouseOut="window.status='';return true;" onClick="window.open('myscript.php','windowname',
'width=200,height=300,menubar=no,scrollbars=no,status=no,
toolbar=no,resizable=yes,left=50,top=50,
screenx=50,screeny=50');return false;">Long link!</a>
knutm :-)