YAHOO.namespace("sputnik");
YAHOO.sputnik.expander = function(container_id,expanded_id,dots_id,display_type) {


        var link = document.createElement("a");
        YAHOO.util.Dom.addClass(link, "morelink");
        link.appendChild(document.createTextNode('Mere info'));
        link.href = "#";

        link.expanded_id = expanded_id;
        link.dots_id = dots_id;
        link.display_type = display_type;

        YAHOO.util.Event.on(
            link,
            'click',
            function(e) {
                var expanded = document.getElementById(this.expanded_id);
                if (this.dots_id)
                    var dots = document.getElementById(this.dots_id);
                else
                    dots = null;

                if (expanded.style.display == this.display_type) {
                    expanded.style.display = 'none';
                    this.innerHTML = 'Mere info';
                    this.style.backgroundPosition = '0px 1px';
                    if (dots)
                        dots.style.display = 'inline';
                } else {
                    expanded.style.display = this.display_type;
                    this.innerHTML = 'Mindre info';
                    this.style.backgroundPosition = '0px -19px';
                    if (dots)
                        dots.style.display = 'none';
                }
            }
        );


        var container = document.getElementById(container_id);
        container.appendChild(link);


}