Umm, javascript functions cannot call PHP functions. Javascript is client side which means it gets run on the users computer. PHP is server side which means it gets run by the webserver. Another way of putting it, by the time the javascript gets a chance to run, the php is already done.
What you CAN do is make "dynamic" Javascript customized to different users for example. In that case the PHP would output javascript like this...
<head>
<?
$user = HTTP_POST_VARS["user"];
print "<script language = javascript>";
print "function greetUser(){";
print " alert('Hello " .$user."');";
print "}";
print "</script>";
?>
</head>
<body onload="greetUser();">
This is the body text.
</body>
This will give a different javascript greeting depending on who the user is.
Drew.
?>