But the reason your code was not working is because you use echo "...";
So you can't put double quotes within the string, unless you escape them, like: echo "...\"...";
But I prefer using single quotes for php echos and javascript and double quotes for html attributes:
{source}
<?php
$link = 'Link';
$title = 'New Window';
$url = 'http://www.google.de';
echo 'A new Window <a href="'.$url.'" target="_blank"'
.' onclick="window.open( \''.$url.'\', \''.$title.'\', \'scrollbars=yes,width=500,height=500\' );return false;">'
.$link.'</a>';
?>
{/source}