Question: I have quite a few js functions

```
mysitename.Nav();
mysitename.Tabs();
mysitename.Overlay();
mysitename.AnimateIntro();

```

Now some of these are triggered on certain pages. How do I include certain functions on specific pages? Of course I could just have different script in the header but wondered if someone had a better way.

Answer: 
The simplest way is include all your functions, check [window.location](https://developer.mozilla.org/en/DOM/window.location) and based on that, call the relevant function.

The more complicated alternative is to check `window.location`, add the `<script type="text/javascript" src="my_js.js"></script>` tag to your DOM, and once it's loaded call the function.
Separate JS do different files and include only those you need.