    function ResultList(resultArea, query, pageSize) {
        this.resultArea = resultArea;
        this.query = query;
        
        this.index = 0;
        this.pageSize = pageSize;
        this.startIndex = 0;
        this.resultCount = 0;
        this.results = null;
        this.queryKey = '';
        this.VC_BASE = '';

        this.resultArea.innerHTML = this.getResultListHtml();

        //findElementById("moveNextButton", this.slideshowArea).onmousedown = delegateCallback(this, this.moveNext);
        //findElementById("movePreviousButton", this.slideshowArea).onmousedown = delegateCallback(this, this.movePrevious);
        this.getData();
    }

    ResultList.prototype.getData = function() {
        findElementById("listArea", this.resultArea).innerHTML = "Loading...";

        var url = "/PortalService?event=getData";
        url += "&" + this.query;
        url += "&query=" + encode(this.queryKey);
        url += "&start=" + this.startIndex + "&end=" + (this.startIndex+this.pageSize);
        sendRequest(url, null, delegateCallback(this, this.processData));
    }

    function delegateCallback(obj, method) {
        if (! (method instanceof Function))
            method = obj[method];

        return function() {
            method.apply(obj, arguments);
        };
    }

    ResultList.prototype.getResultListHtml = function() {
        return '<div id="listArea" class="portletText"></div>';
    }

    ResultList.prototype.processData = function(xhr) {
        var dom = xhr.documentElement;
        this.queryKey = decode(dom.getElementsByTagName("query-key")[0].firstChild.data);
        this.resultCount = dom.getElementsByTagName("result-count")[0].firstChild.data;

        if (this.resultCount == 0) {
            this.slideshowArea.innerHTML = "No Results";
        } else {
            var resultHtml = '<table cellspacing="0" cellpadding="0" id="listArea">';
            this.results = dom.getElementsByTagName("item");
            for (this.index = this.startIndex; this.index < this.startIndex + this.pageSize; this.index++)
                resultHtml += this.renderData();
            resultHtml += '</table>';
            findElementById("listArea", this.resultArea).innerHTML = resultHtml;
        }
    }

    ResultList.prototype.renderData = function() {
/*
        var vState = (this.index >= this.resultCount-1) ? "hidden" : "visible";
        findElementById("moveNextButton", this.slideshowArea).style.visibility = vState;
        vState = (this.index == 0) ? "hidden" : "visible";
        findElementById("movePreviousButton", this.slideshowArea).style.visibility = vState;
*/

        var result = this.results[this.index - this.startIndex];

        var name = decode(result.childNodes[1].firstChild.data);
        name = name.replace(/Travel Guide/, '');
        name = this.wrap(name, 22);
        var text = result.childNodes[2].firstChild;
        if (text)
            text = decode(text.data);
        var link = result.childNodes[0].firstChild;
        if (link)
            link = link.data;
        text = this.wrap(text, 220);
        link = this.VC_BASE + link;
        lastUpdated = result.getAttribute("last-updated");
        lastUpdated = formatDateRecent(parseDate(lastUpdated));

        var videoPath="", imageSrc="";
        var imageHeight = 0;
        var media = result.getElementsByTagName("media");
        if (media.length > 0) {
            media = media[0];
            imageSrc = this.VC_BASE + media.getAttribute("path-medium");
            imageHeight = parseInt(media.getAttribute("height"));
            if (media.getAttribute("type") == "Video")
                videoPath = media.getAttribute("path-video");
        }

        return this.render(name, text, link, imageSrc, imageHeight, videoPath, lastUpdated);
    }

    ResultList.prototype.render = function(name, text, link, imageSrc, imageHeight, videoPath, lastUpdated) {
        return "<tr><td width='160'><a href='" + link + "'>" + name + "</a></td><td style='padding-left:5px'>" + lastUpdated + "</td></tr>";

/*
        if (videoPath) {
            var html = videoPath;
            if (videoPath.indexOf("videoegg.com") >= 0) {
                var VE_api = VE_getPlayerAPI('1.2');
                html = VE_api.getPlayerHTML(videoPath, 250, 210, false, '/ui/media/video-logo.png', '', false,'','');
            }
            imageAnchor.innerHTML = html;
        } else {
            imageHeight = imageHeight * this.maxImageWidth / 250;
            var h;
            if (imageHeight < this.maxImageHeight)
                h = imageHeight;  // use real height
            else
                h = this.maxImageHeight;  // limit to max
            var w = 250 * this.maxImageHeight / imageHeight;
            if (w > this.maxImageWidth)
                w = this.maxImageWidth;

            var image = '<img border="0" src=\"' + imageSrc + '\"';
            image += " height='" + h + "' width='" + w + "'>";
            imageAnchor.innerHTML = image;
        }

        if (imageSrc)
            imageAnchor.style.display = "";
        else
            imageAnchor.style.display = "none";
*/
    }

/*
    ResultList.prototype.moveNext = function(evt) {
        this.index++;
        if (this.index >= this.resultCount)
            this.index = this.resultCount - 1;

        // integration callback
        if (window.slideshowMovedNext)
            window.slideshowMovedNext(this.index);

        if (this.index >= this.startIndex + this.pageSize) {
            this.startIndex += this.pageSize;
            this.getData();
        } else
            this.renderData();
    }
    ResultList.prototype.movePrevious = function(evt) {
        this.index--;
        if (this.index < 0)
            this.index = 0;

        // integration callback
        if (window.slideshowMovedPrevious)
            window.slideshowMovedPrevious(this.index);

        if (this.index < this.startIndex) {
            this.startIndex -= this.pageSize;
            this.getData();
        } else
            this.renderData();
    }
*/

    ResultList.prototype.wrap = function(value, size) {
        if (!value)
            return "";

        if (value.length > size) {
            size = value.lastIndexOf(" ", size);
            value = value.substring(0, size) + "...";
        }
        return value;
    }

