    function prepareKW() {
        var kw = document.getElementById("kw").value;
        while (kw.indexOf(" ") != -1) {
            kw = kw.replace(" ","-");
        }
        document.getElementById("searchform").action = "/"+kw+".html";
        document.getElementById("searchform").submit();
        return true;
    }
    function trackclick(url, aid, atxt) {
        if(document.images){
            var q = window.top.location.search.substring(1);
            (new Image()).src='/track/trackclick.html?url='+url+'&aid='+aid+'&atxt='+atxt+'&source='+getParameter(q, 'utm_source')+'&medium='+getParameter(q, 'utm_medium')+'&term='+getParameter(q, 'term')+'&loc='+document.location;
        }
        return true;
    }


    function getParameter(queryString, parameterName) {
        // Add "=" to the parameter name (i.e. parameterName=value)
        var parameterName = parameterName + "=";
        if (queryString.length > 0) {
            // Find the beginning of the string
            begin = queryString.indexOf(parameterName);
      // If the parameter name is not found, skip it, otherwise return the value
            if (begin != -1) {
                // Add the length (integer) to the beginning
                begin += parameterName.length;
         // Multiple parameters are separated by the "&" sign
                end = queryString.indexOf("&", begin);
                if (end == -1) {
                    end = queryString.length
                }
      // Return the string
                return unescape(queryString.substring(begin, end));
            }
   // Return "null" if no parameter has been found
            return "null";
        }
    }