function OMenu(strTitle, actTitle, aryStr, aryAction, left, top, width)
{
    this.m_Left = left;
    this.m_Top = top;
    this.m_Width = width;
    this.m_Height = (aryStr.length + 1) * 20;

    this.m_aryOptions = [];

    this.MakeMenu = OMenu.MakeMenu;

    this.m_Title = MakeDiv('menu' + left + '-' + top, 'outmenutitle');
    SetPos(this.m_Left, top, width, 14, this.m_Title);
    //    this.m_Title.onclick = function() { document.location = actTitle; };
    this.m_Title.innerHTML = strTitle;
    this.m_Title.setAttribute('onmouseover', OMenu.OverTitle);
    this.m_Title.setAttribute('onmouseout', OMenu.OutTitle);
    this.m_Title.m_Parent = this;
    SetVisible(this.m_Title, true);

    for(var i = 0; i < aryStr.length; i++)
	{
		this.MakeMenu(aryStr[i], aryAction[i], (i + 1) * 20);
	}

    return this;
}

OMenu.MakeMenu = function(str, action, y_pos)
{
    var oDiv = MakeDiv('menuitem' + this.m_Left + '-' + y_pos, 'outmenu', this.m_Title);

    SetPos(0, y_pos, this.m_Width - 2, 20, oDiv);
    SetVisible(oDiv, false);
    oDiv.innerHTML = str;
    oDiv.setAttribute('onmouseover', OMenu.Over);
    oDiv.setAttribute('onmouseout', OMenu.Out);
    oDiv.onclick = function() {  document.location = action;  };

    this.m_aryOptions.push(oDiv);

    return oDiv;
};

OMenu.Over = function()
{
    this.className = 'overmenu';
};

OMenu.Out = function()
{
    this.className = 'outmenu';
};

OMenu.OverTitle = function()
{
    this.className = 'overmenutitle';
    SetPos(this.m_Parent.m_Left, this.m_Parent.m_Top, this.m_Parent.m_Width, this.m_Parent.m_Height, this);
    for(var i = 0; i < this.m_Parent.m_aryOptions.length; i++)
    {
	    SetVisible(this.m_Parent.m_aryOptions[i], true);
    }
};

OMenu.OutTitle = function()
{
    this.className = 'outmenutitle';
    SetPos(this.m_Parent.m_Left, this.m_Parent.m_Top, this.m_Parent.m_Width, 14, this);
    for(var i = 0; i < this.m_Parent.m_aryOptions.length; i++)
    {
	    SetVisible(this.m_Parent.m_aryOptions[i], false);
    }
};


