Javascript - Syntax error
<p>I am trying to develop a JavaScript program but I get a JavaScript error :S</p>

<pre><code>&lt;script type="text/javascript"&gt;
        {literal}
        document.onload = function () {
            MousePlayClick();
        }
        {/literal}
    &lt;/script&gt;

    &lt;script type="text/javascript"&gt;
        {literal}

        function cityKeyPress(evt)
        {
            var evtobj=window.event? event : evt;
            switch (evtobj.keyCode) {
                case KEYS.UP:
                   document.write("asdasd");
                    break;
                case KEYS.OK:
                    $cityCode = $cityBox.value;
                    window.location.href = baseUrl+'seance/'+$movieId+'/'+$vPage+'/'+$yPage+'/'+$slot+'/'+$cityCode+'/';
                    break;
                case KEYS.RED:
                    window.location.href = baseUrl+'detail/'+$movieId+'/'+$vPage+'/'+$yPage+'/'+$slot+'/';
            }
        }

        {/literal}
    &lt;/script&gt;

    &lt;script&gt;    

        var $slot = {$cursor};
        var $vPage = {$vPage};
        var $yPage = {$yPage};
        var $page = {$page};
        var $movieId = {$movieId};
        var $mp4Link = '{$mp4Link}';
        {literal}      
        document.onkeyup 

= cityKeyPress;
    {/literal}
&lt;/script&gt;
</code></pre>

<p>I dont think that there is a syntax error because I use this code in another page.</p>

<p>What might be the reason?</p>
