There are a couple of ways that you could do this, one of which I've done before, the other I haven't, but I have used for XML configuration files.
The first one is to include the variables in a script tag inside the WP header or footer, before the script tag where you include your JS file, for example:
<script type="text/javascript">
var test = "<?php echo "hello world"; /* the relevant PHP code to echo the data you require */ ?>";
var slider_type = "<?php echo "nivo"; /* same again */ ?>";
</script>
<script type="text/javascript" src="<?php bloginfo("template_url"); ?>/js/your_js_here"></script>
The other alternative would be to include the JS inside of a PHP file which is included inside of a script tag.
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/javascripts.php"></script>
Inside this file you would include your javascript, and as PHP would parse it you would be able to include PHP calls in a similar fashion to above, simply echoing out the data/options which you require. One thing to note is that you might need to set the headers for the output as text/javascript
.
Personally I much prefer the first method, and is what I use when I have user changeable settings which affect javascript files.