In order to run javascript from a separate file:
In the example below I have called my file datafile.js
<script type="text/javascript"
src="datafile.js">
</script>
For a much more in depth look at how to run javascript from a separate file see this helpful tutorial:
http://www.javascript.about.com/library/bltut13.htm
13/02/2009