Passing information into javascript is very easy. Just create the javascript through PHP and place the info accordingly.
<SCRIPT language="JavaScript">
<!--
echo 'var date = ' . time() . "\n";
-->
</SCRIPT>
Or for everyones favorite :
<SCRIPT language="JavaScript">
<!--
<?php
$date = date("Y m d");
echo "alert('Todays date is $date !')";
?>
//-->
</SCRIPT>
And such. I am the last guy that should be talking about javascript usage! Hopefully the above makes sense.