    var contextPath = "/images/";    // defines where the images directory is
    var menuSectionArray = new Array(7);        // an array holding each section name
    var menuSectionContentArray = new Array(7); // an array of arrays holding the names and address of the contents of the menu sections
    var selectedSectionIndex = 7; // this is the default value to make all sections appear collapsed 
	var selectedSubsectionIndex = -1; // a negative value will cause no subsections to be designated as the current page
	
    // security levels : 0=not signed in visitors, online training sign ins, online support sign ins; 1=signed in clients; 2=signed in employees; 3=admin; 5=online training sign ins; 100=extra variable to make single security restrictions work correctly--may be able to fix this some other way
    var SEC_GENERAL = 0;
    var SEC_CLIENT = 1;
    var SEC_EMPLOYEE = 2;
    //var SEC_ADMIN = 3; ' 1/28/08 removed this security setting; superseded by OSC individual un/pw (ldap)
	var SEC_TRAINING = 5;
	var SEC_EXTRA = 100;
    

	var COLOR_Beige = "#FFF5DF";
	var COLOR_Red_Dark = "#971C1F";
	var COLOR_Red_Light = "#F0D5CE";
	var COLOR_Fuchsia_Dark = "#6A247B";
	var COLOR_Fuchsia_Light = "#E4D3E0";
	var COLOR_Purple_Dark = "#31008C";
	var COLOR_Purple_Light = "#CCC2CF";
	var COLOR_Teal_Dark = "#397380";
	var COLOR_Teal_Light = "#C5D6D3";
	var COLOR_Green_Dark = "#3A6730";
	var COLOR_Green_Light = "#C5D2B7";
	var COLOR_Gold_Dark = "#AF9B31";
	var COLOR_Gold_Light = "#F3EDB6";
	var COLOR_Brown_Dark = "#663300";
	var COLOR_Brown_Light = "#FFF5DF";
    
    // menuSectionArray content:
    // index 0 : Section Name
    // index 1 : Link address if clicking on section should navigate to another page
    // index 2 : an array of allowed security levels
    // index 3 : Color of the section's button
    // index 4 : Color of the section's content background (color of the background behind that section's links under the button)

    //menuSectionContentArray contains an array of subsection arrays
    // subsection array content:
    // index 0 : Subsection Name
    // index 1 : Link address if clicking on subsection should navigate to another page
    // index 2 : an array of allowed security levels
       
    
    // Enter your menu entries HERE
    menuSectionArray[0] = new Array("Products", "/product/product.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING, SEC_TRAINING), COLOR_Red_Dark, COLOR_Red_Light);
    // Enter the subsection name, the web address for each entry, and then the allowed security levels
    menuSectionContentArray[0] = new Array(new Array("Our Products", "/product/product.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Harvest LIS", "/product/harvestlis.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Harvest Webstation", "/product/h_webOutreach.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Orchard Pathology", "/product/pathology.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Copia", "/product/copia.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("Veterinary Support", "/product/vetSupport.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("Implementation Methodology", "/product/h_implementation.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)));
    menuSectionArray[1] = new Array("Request Information", "/request/requestinfo.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING), COLOR_Fuchsia_Dark, COLOR_Fuchsia_Light);
    menuSectionContentArray[1] = new Array(new Array("Request Information", "/request/requestinfo.html", new Array(SEC_GENERAL, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("New to Orchard Products", "/request/requestInfoNew.asp", new Array(SEC_GENERAL, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Product Demonstration", "/request/requestDemo.asp", new Array(SEC_GENERAL, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Product Information", "/request/requestInfoNew.asp", new Array(SEC_GENERAL, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Request for Proposal", "/request/rfp/rfp.html", new Array(SEC_GENERAL, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Current Customers", "/request/requestInfoCurrent.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Product Information", "/request/requestInfoCurrent.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Interface Request", "/request/requestInterface.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Training Information", "/request/requestTraining.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Support Information", "/request/requestSupport.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Orchard Symposiums", "/request/symposiumsRequest.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("Sign up for e-news", "/request/requestENews.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)));
    menuSectionArray[2] = new Array("Support, Training, & Feedback", "/support/support.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING), COLOR_Purple_Dark, COLOR_Purple_Light);
    menuSectionContentArray[2] = new Array(new Array("Welcome", "/customer_area/main/main.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
										   new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Download Center", "/customer_area/main/download/download_center.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Online Forums", "/customer_area/main/online_groups/groups.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;OSC Doc Library", "/customer_area/document_library/documentlibrary.asp", new Array(SEC_EMPLOYEE, SEC_EMPLOYEE)),
                                           
										   new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Orchard Museum", "/customer_area/main/museum/overview.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Report Software Problem", "/customer_area/main/create_ticket/createTicket.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Request Software &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Modification (RFM)", "/customer_area/main/request_mod/requestMod.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Request Upgrade", "/customer_area/main/request_upgrade/requestUpgrade.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
										   new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;ACO Tips", "/customer_area/main/aco_tips/acotips.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Tech Tips", "/customer_area/main/techtips/techtips.asp", new Array(SEC_CLIENT, SEC_EMPLOYEE)),
                                           new Array("Support & Feedback", "/support/support.asp", new Array(SEC_GENERAL, SEC_EXTRA, SEC_CLIENT, SEC_EMPLOYEE)),
                                           
										   new Array("ARRA/HITECH Info", "/meaningfulUse.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("ICD-10 Info", "/icd-10.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("LOINC Info", "/loinc.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   
										   new Array("Support Regions", "/support/supportRegions.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Support Options", "/support/supportOptions.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Customer Feedback", "/support/feedback/feedback.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Training", "/support/training/training.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Holiday Hours", "/support/holidaySupport.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("KLAS Ranking", "/support/klasSupport.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Awards & Recognitions", "/support/awardsSupport.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Symposiums", "/support/symposiums/symposiumsSupport.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)));
    menuSectionArray[3] = new Array("News, Links, & Articles", "/news_links/oscnews/oscnews.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING), COLOR_Teal_Dark, COLOR_Teal_Light);
	menuSectionContentArray[3] = new Array(new Array("Orchard Software News", "/news_links/oscnews/oscnews.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Awards & Recognitions", "/news_links/awardsNews.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Newsletter", "/news_links/newsletter/newsletter.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("HIPAA News", "/news_links/hipaanews/hipaanews.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Related Healthcare Links", "/news_links/links/relatedlinks.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("LIS-Related Articles", "/news_links/LISarticles.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Trade Shows", "/news_links/conferences/conferences.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Symposiums", "/news_links/symposiumsNews.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)));
    menuSectionArray[4] = new Array("About Orchard Software", "/about_us/about.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING), COLOR_Green_Dark, COLOR_Green_Light);
    menuSectionContentArray[4] = new Array(new Array("About Orchard Software", "/about_us/about.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Management Team", "/about_us/management.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Account Managers", "/about_us/accountmgrsAbout.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("Sales Contacts", "/about_us/salesAbout.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("Career Opportunities", "/about_us/careerops/careerops.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Partnerships", "/about_us/partners/partners.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Awards & Recognitions", "/about_us/awards.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("KLAS Ranking", "/about_us/klasAbout.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)));
    menuSectionArray[5] = new Array("Contact Us", "/contact/contact.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING), COLOR_Gold_Dark, COLOR_Gold_Light);
    menuSectionContentArray[5] = new Array(new Array("Contact Us", "/contact/contact.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Directions", "/contact/directions.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Account Managers", "/contact/sales/accountmgrs/accountmgrs.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
                                           new Array("Sales Contacts", "/contact/sales/sales/sales.html", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)),
										   new Array("Support Regions", "/support/supportRegions.asp", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING)));
    menuSectionArray[6] = new Array("Home", "http://www.orchardsoft.com/", new Array(SEC_GENERAL, SEC_CLIENT, SEC_EMPLOYEE, SEC_TRAINING), COLOR_Brown_Dark, COLOR_Brown_Light);
    menuSectionContentArray[6] = new Array();
                                           
    // This method will return a cell containing the entire menu
    function getNavigationCell(currentUserSecurityLevel)
    {
       var returnStringBuffer = "";
       var index = 0;
       
       returnStringBuffer = returnStringBuffer + "<td id=navCell2 ><table cellspacing=0>";
       for(index=0;index<menuSectionArray.length;index++)
       {      
           if(arrayContains(currentUserSecurityLevel, menuSectionArray[index][2]))
           {
             returnStringBuffer = returnStringBuffer + getNavigationMenuSection(index, menuSectionArray[index], menuSectionContentArray[index], currentUserSecurityLevel);
           }
       }
       returnStringBuffer = returnStringBuffer + "<tr width=180><td><img src=\""+contextPath+"/space.gif\" width=180 height=0><br></td></tr>";
       returnStringBuffer = returnStringBuffer + "</table></td></tr>";
       returnStringBuffer = returnStringBuffer + "</table></td>";      /* end of row 2 col 1 */
       return returnStringBuffer;
    
    }  /* end of method for generating menu HTML  */


    // This method will return three rows which will make up a single section of the menu
    function getNavigationMenuSection(sectionIndex, sectionArray, sectionContentArray, currentUserSecurityLevel)
    {
        var returnStringBuffer = "";
        var navLinkId = "";
        var navStyleSectionHeader = "cursor: pointer; background: "+sectionArray[3]+"; border: 1px solid black; color: #333333;";
        var navStyleSectionLink = "background: "+sectionArray[3]+"; color: #FFF5DF;";
        var navLinkClass = "nav2";
        var sectionLinkHrefText = "javascript:enableMenuSection("+sectionIndex+")";
        var sectionLinkOnClickText = "javascript:enableMenuSection("+sectionIndex+")";
        var sectionCellOnClickText = "enableMenuSection("+sectionIndex+");";
        if(selectedSectionIndex != sectionIndex && sectionArray[1].length>0)
        { 
          sectionLinkHrefText = sectionArray[1];
          sectionCellOnClickText = "document.location='"+sectionArray[1]+"'";
          sectionLinkOnClickText = "";
        }
        
        // First Row
        returnStringBuffer = returnStringBuffer + "<tr id='spacer_"+sectionIndex+"' ><td><img src=\""+contextPath+"/space.gif\" width=1 height=2></td></tr>";
        // Second Row
        returnStringBuffer = returnStringBuffer + "<tr id='header_"+sectionIndex+"' valign=middle><td style=\""+navStyleSectionHeader+"\" onClick=\""+sectionCellOnClickText+"\">";
        returnStringBuffer = returnStringBuffer + "<table cellspacing=0 cellpadding=0><tr><td><img src=\""+contextPath+"/space.gif\" width=5 height=20></td>";
        returnStringBuffer = returnStringBuffer + "<td><a class="+navLinkClass+" style=\""+navStyleSectionLink+"\" id=\""+navLinkId+"\" href=\""+sectionLinkHrefText+"\" onClick=\"" + sectionLinkOnClickText + "\">"+sectionArray[0]+"</a></td>";
        returnStringBuffer = returnStringBuffer + "</tr></table></td></tr>";
        // Third Row
        returnStringBuffer = returnStringBuffer + "<tr id=section_"+sectionIndex+" style='display: none;'><td style=\"background: "+sectionArray[4]+";\"><table style=\"border-spacing: 2;\">";
        returnStringBuffer = returnStringBuffer + "<tr><td><img src=\""+contextPath+"/space.gif\" width=1 height=1></td></tr>";
        var contentIndex = 0;
        for (contentIndex= 0; contentIndex<sectionContentArray.length; contentIndex++)
        {
           if(arrayContains(currentUserSecurityLevel, sectionContentArray[contentIndex][2]))
           {
             returnStringBuffer = returnStringBuffer + "<tr><td ><img src=\""+contextPath+"/space.gif\" width=1 height=2></td></tr>";
             returnStringBuffer = returnStringBuffer + "<tr><td align=right ><img src=\""+contextPath+"/"+((false) ? "rt_ptr.gif" : "space.gif")+"\" width=10 height=7></td>";
             if(selectedSectionIndex == sectionIndex && selectedSubsectionIndex == contentIndex)  
             {   
               // This determines the look of the menu link for the current page we are on.  
               returnStringBuffer = returnStringBuffer + "<td><a style=\"background-color: #FFF5DF;\" class="+navLinkClass+" id=\"nav"+sectionContentArray[contentIndex][0]+"\" href=\""+sectionContentArray[contentIndex][1]+"\">"+sectionContentArray[contentIndex][0]+"</a></td>";  
             }  
             else  
             {  
               returnStringBuffer = returnStringBuffer + "<td ><a class="+navLinkClass+" id=\"nav"+sectionContentArray[contentIndex][0]+"\" href=\""+sectionContentArray[contentIndex][1]+"\">"+sectionContentArray[contentIndex][0]+"</a></td>";  
             }  
             returnStringBuffer = returnStringBuffer + "</tr>"; 
           }
        }
        returnStringBuffer = returnStringBuffer + "</table></td></tr>";
        return returnStringBuffer
     }

     // this method will expand the section with the index that is passed in
     function enableMenuSection(selectedSectionIndex)
     {
       if(selectedSectionIndex==null)
       {
         return;
       }
       var doNotExpand = false;
       for(i = 0; i < menuSectionArray.length; i++)
       {
         if(selectedSectionIndex == i && document.getElementById('section_'+selectedSectionIndex) && document.getElementById('section_'+selectedSectionIndex).style.display=="")
         {
           doNotExpand = true;
         }
         if(document.getElementById('section_'+i))
         {
            document.getElementById('section_'+i).style.display="none";
         }
       }
       
       if(doNotExpand){return;}
       
       if(document.getElementById('section_'+selectedSectionIndex))
       {
           document.getElementById('section_'+selectedSectionIndex).style.display="";
       }
     }
     
     function arrayContains(value, array)
     {
       if(array==null)
       {
         return false;
       }
       var i=0;
       for(i=0;i<array.length; i++)
       {
         if(array[i] == value)
         {
           return true;
         }
       }
       return false;
     }
	 
	 
	

	var currentURL = document.location.href;
	
	if(currentURL.indexOf("/product/", 0)>-1)
	
	{ selectedSectionIndex = 0; }
	
	else if(currentURL.indexOf("/request/", 0)>-1)
	
	{ selectedSectionIndex = 1; }
	
	else if(currentURL.indexOf("/support/", 0)>-1)
	
	{ selectedSectionIndex = 2; }
	
	else if(currentURL.indexOf("/customer_area/", 0)>-1)
	
	{ selectedSectionIndex = 2; }
	
	else if(currentURL.indexOf("/news_links/", 0)>-1)
	
	{ selectedSectionIndex = 3; }
	
	else if(currentURL.indexOf("/about_us/", 0)>-1)
	
	{ selectedSectionIndex = 4; }
	
	else if(currentURL.indexOf("/contact/", 0)>-1)
	
	{ selectedSectionIndex = 5; }
		
	
	if(selectedSectionIndex>-1 && selectedSectionIndex<7)    
       {    
         var menuSubsectionArray = menuSectionContentArray[selectedSectionIndex];    
         var menuSubsectionArrayIndex=0;    
         for(menuSubsectionArrayIndex=0;menuSubsectionArrayIndex<menuSubsectionArray.length; menuSubsectionArrayIndex++)    
         {    
            if(currentURL.indexOf(menuSubsectionArray[menuSubsectionArrayIndex][1]) > -1)    
            {    
              selectedSubsectionIndex = menuSubsectionArrayIndex;    
            }    
         }    
         if(selectedSubsectionIndex == -1)  
         {  
              var menuSubsectionLinkPath = "";  
              var menuSubsectionLinkPathEndIndex = -1;  
              var maxMenuSubsectionLinkPathEndIndex = -1; 
              for(menuSubsectionArrayIndex=0;menuSubsectionArrayIndex<menuSubsectionArray.length; menuSubsectionArrayIndex++)    
              {    
                  menuSubsectionLinkPath = menuSubsectionArray[menuSubsectionArrayIndex][1];  
                  menuSubsectionLinkPathEndIndex = menuSubsectionLinkPath.lastIndexOf('/');  
                  if(menuSubsectionLinkPathEndIndex > -1)  
                  {  
                    menuSubsectionLinkPath = menuSubsectionLinkPath.substring(0, (menuSubsectionLinkPathEndIndex+1));  
                  }  
                  if(currentURL.indexOf(menuSubsectionLinkPath) > -1 && (menuSubsectionLinkPathEndIndex > maxMenuSubsectionLinkPathEndIndex))    
                  {    
                    maxMenuSubsectionLinkPathEndIndex = menuSubsectionLinkPathEndIndex; 
                    selectedSubsectionIndex = menuSubsectionArrayIndex;    
                  }    
              } 
              if(selectedSubsectionIndex > -1) 
              { 
                 //alert('Should pick the subsection with the name '+ menuSubsectionArray[selectedSubsectionIndex][0]); 
              }    
          }  
       }
	
	
	          
