function cbumenu(node)
{

	//this.m_NavPath = g_navNode_Path;
    //this.node = menu_node;
	cbumenu.prototype.makeMenu = cbumenu_makeMenu;
  //  cbumenu.prototype.makeList = cbumenu_makeList;
    this.makeMenu(node);
}

function cbumenu_makeMenu (node)
{

  document.write('<ul id="cbumenu">');

  for( var i=0; i < node.m_subNodes.length; i++ )
  {
    var subnode = node.m_subNodes[i];
    var label = subnode.m_label;
    var href = subnode.m_href;

    if ( href.substring(0,1) == "/")
    {
	href = "http://www2.cbu.edu" + href;
    }

    document.write('<li><a href=' + href + '>' + label + '</a>');
    //document.write('<li><a href=http://www2.cbu.edu' + href + '>' + label + '</a>');

    if ((subnode.m_subNodes != null) && (subnode.m_subNodes.length > 0) )
    {
        document.write('<ul>');

        for( var j=0; j < subnode.m_subNodes.length; j++ )
        {
            var subnode1 = subnode.m_subNodes[j];
            var label1 = subnode1.m_label;
            var href1 = subnode1.m_href;

   	    if ( href1.substring(0,1) == "/")
    	    {
		href1 = "http://www2.cbu.edu" + href1;
    	    }	

            if ((subnode1.m_subNodes != null) && (subnode1.m_subNodes.length > 0) )
            {
                document.write('<li><a href=' + href1 + ' class="daddy">' + label1 + '</a>');
                //document.write('<li><a href=http://www2.cbu.edu' + href1 + ' class="daddy">' + label1 + '</a>');
	        document.write('<ul>');

                for( var k=0; k < subnode1.m_subNodes.length; k++ )
                {
                    var subnode2 = subnode1.m_subNodes[k];
                    var label2 = subnode2.m_label;
                    var href2 = subnode2.m_href;

		    if ( href2.substring(0,1) == "/")
    	    	    {
		    	href2 = "http://www2.cbu.edu" + href2;
    	    	    }

                    document.write('<li><a href=' + href2 + '>' + label2 + '</a>');
		    //document.write('<li><a href=http://www2.cbu.edu' + href2 + '>' + label2 + '</a>');
                    document.write('</li>');
                }
                document.write('</ul>');
            }
            else
            {
              document.write('<li><a href=' + href1 + '>' + label1 + '</a>');
              //document.write('<li><a href=http://www2.cbu.edu' + href1 + '>' + label1 + '</a>');
            }
            document.write('</li>');
        }
        document.write('</ul>');
    }
    document.write('</li>');
  }
  document.write('</ul>');

}