For a start, we'd need to see the complete phpinclude tempalte as this may or may not be in contect of other scripting ...
Also, you should ALWAYS use
Code:
<script type="text/javascript" ... >
...
</script>
not
language="Javascript" as the script tag is not valid without the type and is also not valid with the language ...
This alone may be causing your error (but I doubt it)...