﻿function setNavigationHighlight(pageTitle)
{
  
    var children = document.getElementById("uxLeftNavigation").childNodes;
   
    for(var i=0;i<children.length;i++)
    {
      var el =children[i].firstChild;
      alert(el.firstChild.nodeValue)
      if(el.firstChild.nodeValue==pageTitle)
      {
      
        children[i].firstChild.style.fontWeight="bold";
      }
      
      var grandChildren = children[i].childNodes;     
      
      if (grandChildren.length >1)
      {
        var secondLevelEl= grandChildren[1].childNodes;
        
        for (var i=0;i<secondLevelEl.length;i++)
        {
            var secondLevelChild= secondLevelEl[i].firstChild;
        
            if(secondLevelChild.firstChild.nodeValue==pageTitle)
            {
                secondLevelEl[i].firstChild.style.fontWeight="bold";
            }
        }
      }
      
    }
}


