Not processing javascript in smarty templates
Use {literal}...{/literal} tags around the javascript within your smarty template:
{literal} <script language="text/javascript"> ... script> {/literal}