var show_catalogue = {
    init : function (sPref, sSuf, winWr)
    {
        this.winWr = winWr ? winWr : _wrapper;
        this.sPref = sPref;
        this.sSuf = sSuf;

        this.winWr.createStyle(".jsHide", "display:none;");

        //this.winWr.createStyle("", "");

        this.winWr.setOnloadListener(this);
    },

    onload : function(evtWr)
    {
        var mainContent, li, id, currentLi, aSpan;
        var leftContent = this.winWr.getElement('columnL');
        var li = leftContent.elm.getElementsByTagName("li");

        for (var i=0; i<li.length; i++) {
            id = li[i].getAttribute("id");
            if (id && id.substr(0, this.sPref.length) == this.sPref){
                currentLi = this.winWr.getElmWrapper();
                aSpan = li[i].getElementsByTagName('span');
                for (var j=0; j<aSpan.length; j++){
                    var wrSpan = this.winWr.getElmWrapper(aSpan[j]);
                    wrSpan.addListener(this, "onclick", "onclickVacType");
                    wrSpan.addListener(this, "onmouseover", "onmouseover");
                    wrSpan.addListener(this, "onmouseout", "onmouseout");
                }
            }
        }

    },

    onmouseover : function(evtWr)
    {
        evtWr.elmWr.addClass("hoverCurrent");
    },

    onmouseout : function(evtWr)
    {
        evtWr.elmWr.removeClass("hoverCurrent");
    },

    onclickVacType : function(evtWr)
    {
        var span = this.winWr.getElmWrapper(evtWr.elmWr.elm.nextSibling);
        var parent = this.winWr.getElmWrapper(evtWr.elmWr.elm.parentNode);
        span.invDisplay();
        if(span.isDisplay()){
            parent.addClass("current_catalogue");
        } else {
            parent.removeClass("current_catalogue");
        }
    }

}
