Well, the following would be valid PHP syntax, but whether it is actually of any use is an entirely different question, since JavaScript runs on the client while PHP runs on the server, so I'm not sure that the function would ever actually get called unless you have other PHP code to execute it.
<?php
function wrap_img ($s_file, $s_title) {
return "<table cellpadding=1 bgcolor=black style='border:1px solid #777777'><tr><td><img src='images/img1.jpg' class='picI'></td></tr><tr><td align=center><font color=yellow><b>" .
$s_title . "</b></font></td></tr></table>";
}
?>
Also, the s_file parameter is not used at all in your JavaScript code, so I have no idea why it's in there.