The W3C XHTML validator will complain if you've got JavaScript embedded in your markup and you haven't taken steps to make it (X)HTML friendly.
Either move the JavaScript into a file (in this example called script.js):
<script src="script.js" type="text/javascript"></script>
or add CDATA tags around the JavaScript that's embedded in the markup.
<script type="text/javascript"> <![CDATA[ ... unescaped script content ... ]]> </script>
