Thanks for the fast help!
I do it like this:
<input type="button" class="buttons_dark" value="Nachricht senden" onClick="FreiChat.create_chat_window_mesg(username,user_id);">
i give the php variables to javascript like this:
<script type="text/javascript"><!--
var username ="<?php echo $username ?>";
var user_id ="<?php echo $user_id ?>";
</script>
Sorry for my bad english.
Thank you and have a nice day 
Thanks for the fast help!
I do it like this:
````
&lt;input type="button" class="buttons_dark" value="Nachricht senden" onClick="FreiChat.create_chat_window_mesg(username,user_id);"&gt;
````
i give the php variables to javascript like this:
````
&lt;script type="text/javascript"&gt;&lt;!--
var username ="&lt;?php echo $username ?&gt;";
var user_id ="&lt;?php echo $user_id ?&gt;";
&lt;/script&gt;
````
Sorry for my bad english.
Thank you and have a nice day :)