//====================================================================
// Function : nvh_mainnavigation_displaynode
// Comments : this method draws the navigation elements for the supplied
//            node and all its children (if appropriate)
//====================================================================
function nvh_mainnavigation_displaynode(path, node, strFragRoot)
{
   var strClass, strClassHover, strShowPopup = "", strHidePopup = "";

   if (path[node.m_level] == node.m_id)
   {
      strClass      = "dynamic_left_nav-level" + node.m_level + "selected";
      strClassHover = "dynamic_left_nav-level" + node.m_level + "selectedhover";
   }
   else
   {
      strClass      = "dynamic_left_nav-level" + node.m_level;
      strClassHover = "dynamic_left_nav-level" + node.m_level + "hover";

      if (((node.m_level == 1) || (node.m_level == 2)) && (node.m_subNodes.length > 0))
      {
         if (g_objBrowserDetection.is_ie5up) // only bother with popups in IE5 and up
         {
            strShowPopup = "dynamic_left_nav" + node.m_id + ".style.display='inline';";
            strHidePopup = "dynamic_left_nav" + node.m_id + ".style.display='none';";
         }
      }
   }

   var strIcon = (customSectionPropertyExists(node.cp_MainNavIcon) ? "<img border=0 width=16 height=16 src='" + node.cp_MainNavIcon + "'>&nbsp;" : "");

   document.write("<tr>");
 <!--  document.write("   <td width='1%' class='" + strClass + "Lead'\">");-->
   document.write("   <td class='" + strClass + "' onmouseover=\"className='" + strClassHover + "';" + strShowPopup + "\" onmouseout=\"className='" + strClass + "';" + strHidePopup + "\">");
   document.write("      <table cellspacing=0 cellpadding=0>");
   document.write("         <tr>");
   document.write("            <td width='100%'><a href='" + node.m_href + "'>" + strIcon + node.m_label + "</a></td>");
   document.write("            <td>");

   if (((node.m_level == 1) || (node.m_level == 2)) &&
      (node.m_subNodes.length > 0))
  {
     if (path[node.m_level] == node.m_id)
     {
       <!-- document.write("<img src='" + strFragRoot + "/dynamic_left_nav-level" + node.m_level + "-downarrow.gif'></img>");-->
     }
     else
     {
       <!-- document.write("<img src='" + strFragRoot + "/dynamic_left_nav-level" + node.m_level + "-rightarrow.gif'></img>");-->

         if (g_objBrowserDetection.is_ie5up) // only bother with popups in IE5 and up
         {
            document.write("<table style='border: 1px solid black;background-color:black;' id='dynamic_left_nav" + node.m_id + "' style='position:absolute;display:none;' cellspacing=1 cellpadding=0 width=1%");
            for (var i = 0 ; i < node.m_subNodes.length ; i++)
               nvh_mainnavigation_displaynode(path, node.m_subNodes[i], strFragRoot);
            document.write("</table>");
         }
      }
   }
   else
   {
      document.write("&nbsp;");
   }

   document.write("            </td>");
   document.write("         </tr>");
   document.write("      </table>");
   document.write("   </td>");
   document.write("</tr>");

   if ((node.m_level <= 2) && (path[node.m_level] == node.m_id))
      for (var i = 0 ; i < node.m_subNodes.length ; i++)
         nvh_mainnavigation_displaynode(path, node.m_subNodes[i], strFragRoot);
}

//====================================================================
// Function : nvh_mainnavigation_display
// Comments : this method draws the main navigation fragment
//====================================================================
function nvh_mainnavigation_display(path, node, strFragRoot, bDisplayRoot)
{
   document.write("<table cellspacing=1 cellpadding=0 width=160px><tr><td><img src='" + strFragRoot + "/navTop.gif'></img></td></tr>");

   if (bDisplayRoot)
   {
      nvh_mainnavigation_displaynode(path, node, strFragRoot);
   }
   else
   {
      for (var i = 0 ; i < node.m_subNodes.length ; i++)
         nvh_mainnavigation_displaynode(path, node.m_subNodes[i], strFragRoot);
   }



   document.write("<tr><td><img src='" + strFragRoot + "/navBottom.gif'></img></td></tr></table>");
}
