    function headSearchUrl() {
        var url='/texte/suche/0/10/';
        url += document.getElementById('suchetext').value != '' ? document.getElementById('suchetext').value+'/' : '';
        window.location.href = url;

    }
    
    function headSearchCheckEnter(e) {
        var keynum;
        
        if(window.event) {
            // IE
            keynum = e.keyCode;
        } else if(e.which) {
            // Netscape/Firefox/Opera
            keynum = e.which;
        }
        if (keynum == 13) {
            headSearchUrl();
        }
    }
    
        function headLoginCheckEnter(e) {
        var keynum;
        
        if(window.event) {
            // IE
            keynum = e.keyCode;
        } else if(e.which) {
            // Netscape/Firefox/Opera
            keynum = e.which;
        }
        if (keynum == 13) {
            document.ajaxLogin.submit();
        }
    }

    /**
     * Support Y!'s ability to override spaceID/propertyID
     * for specific pages by adding a hash tag to the page's
     * URL:
     *
     * <pre><code>
     * http://sueddeutsche.de/page1.html#spaceid=space2
     * http://sueddeutsche.de/page2.html#propertyid=prop1
     * http://sueddeutsche.de/page2.html#propertyid=prop1&spaceid=space2
     * </code></pre>
     *
     * @method generateOverride
     * @return {Object} Returns an object with two properties: `spaceID` and `propertyID`
     */
    function generateOverride() {
        var override = { spaceID: null, propertyID: null },
            spaceid = location.hash.match( /spaceid=([a-zA-Z0-9]+)/ ),
            propertyid = location.hash.match( /propertyid=([a-zA-Z0-9]+)/ );
        if ( spaceid && spaceid[ 1 ] ) {
            override.spaceID = spaceid[ 1 ];
        }
        if ( propertyid && propertyid[ 1 ] ) {
            override.propertyID = propertyid[ 1 ];
        }
        return override;
    }

