/**include
//_javascript/js-wrapper.js;
*/
var menuControl = newClass({

    init : function(sName)
    {
        this.sName = sName;
    },


    onready  : function(evtWr)
    {
        this.winWr.createStyle(".jsHide", "display:none;");
        var h3 = this.$$("#menu_box h3");
        if (h3) {
            h3.aL(this, "onclick");
            h3.aL(this, "onmouseover");
            h3.aL(this, "onmouseout");
        }
        if (this.sName) {
            var ul = this.$("#menu_" + this.sName + " ul");
            if (ul) {
                ul.removeClass("jsHide");
            }
        }
    },

    onclick : function(evtWr)
    {
        var oMenuElm = evtWr.elmWr.getNextSibling();

        evtWr.eventDrop();
		if (oMenuElm && oMenuElm.elm.tagName.toLowerCase() == "ul") {
            if (oMenuElm.isShow()) {
                oMenuElm.addClass("jsHide");
            } else {
                oMenuElm.removeClass("jsHide");
            }

            var currentH3 = this.$("#menu_" + this.sName + " h3");
            if (currentH3) {
                if (oMenuElm.isShow()) {
                    currentH3.removeClass("current");
                } else {
                    currentH3.addClass("current");
                }
            }
        }
    },

    onmouseover : function(evtWr)
    {
        evtWr.elmWr.addClass("over");
    },

    onmouseout : function(evtWr)
    {
		evtWr.elmWr.removeClass("over");
    }
});
