    <!--

    function expandToc()
    {
      var loc = trimHost(document.location.toString());
      
      var j = findSelectedList(loc,true); // strict match
      if (j == -1)
        j = findSelectedList(loc,false); // non-strict match
                    
      var i = j;
      var parents = new Array();		//  list of parents, to be built when we want to expand a submenu

			while (i > 0) {
				parents[parents.length] = i;	// push parent onto stack
				i = document.lists[i].parentList.id;			// get next higher parent
			}
			
			// expand the highest parent menu first, then the requested submenu
			while (parents.length > 0) {
				i = parents[parents.length-1];
				if (!document.lists[i].visible)
					xbcl_expand(i);			// expand the highest parent menu left in stack
				parents.length--;		// remove this parent from stack
			}
    }

    function findSelectedList( loc, strictMatch )
    {
      for (var j = 0; j < document.lists.length; j++) 
      {
        if (document.lists[j].strs != null) {
          for (i = 0; i < document.lists[j].strs.length; i++) {
            if ((strictMatch && document.lists[j].strs[i].indexOf(loc) != -1) ||
                (!strictMatch && document.lists[j].strs[i].indexOf(trimFile(loc)) != -1)) 
            {
              // make selected item bold  
     				  document.lists[j].bolds[i] = true;
     				  if (document.lists[j].types[i] == 'list')
       				  xbcl_expand(document.lists[j].lists[i].id);
     				  return j;
     				}
          }
        }
      }
      return -1;
    }                    

    // http://www.cogentex.com/foo ==> /foo
    function trimHost( url )
    {
      ss = url.indexOf("//");
      if (ss != -1)
        url = url.substring(ss + 2); 
      s = url.indexOf("/");
      if (s != -1)
        url = url.substring(s); 
      return url;
    }
    
    function trimFile( url )
    {
      s = url.lastIndexOf("/");
      if (s != -1)
        url = url.substring(0,s);
      return url; 
    }

    function initTOC()
    {
    	var root = addList(null,null);
    	  addListItem(root,"Home","/index.html");

        var productsList = addList(root,"Products","");
/*
        var reporterList = addList(productsList,"Project Reporter","/products/reporter/index.html");
          	addListItem(reporterList,"Reviews","/products/reporter/reviews.html");
          	addListItem(reporterList,"Users","/products/reporter/users.html");
          	addListItem(reporterList,"Features","/products/reporter/features.html");
          	addListItem(reporterList,"Requirements","/products/reporter/requirements.html");
          	addListItem(reporterList,"Product Tour","/products/reporter/tour.html");
          	addListItem(reporterList,"Live Demo","/products/reporter/demo.html");
          	addListItem(reporterList,"Risky Project","/products/reporter/riskyproject.html");
          	addListItem(reporterList,"Download","/products/reporter/download.html");
          	addListItem(reporterList,"Pricing","/products/reporter/pricing.html");
          	addListItem(reporterList,"Support","/products/reporter/support.shtml");

          var explainerList = addList(productsList,"Project Explainer","/products/explainer/index.html");
          	//addListItem(explainerList,"Features","/products/explainer/features.html");
          	addListItem(explainerList,"Product Tour","/products/explainer/tour/tour.html");
          	addListItem(explainerList,"Download","/products/explainer/download.html");
          	addListItem(explainerList,"Pricing","/products/explainer/pricing.html");
*/
          var chartexList = addList(productsList,"Chart Explainer","/products/chartex/index.html");
          	addListItem(chartexList,"FAQ","/products/chartex/faq/index.html");
//          	addListItem(chartexList,"Download","/products/chartex/download.html");

//        	addListItem(productsList,"Product Comparison","/products/comparison.html");

      	var servicesList = addList(root,"Solutions","/solutions/index.html");
          var solutionsList = addList(servicesList,"Portfolio","/solutions/portfolio.html");
        	addListItem(solutionsList,"ARNS","/solutions/arns/index.shtml");
        	addListItem(solutionsList,"Recommender","/solutions/recommender/index.shtml");
        	//addListItem(solutionsList,"Definition Builder","/solutions/defbuilder/index.shtml");
        	addListItem(solutionsList,"FoG","/solutions/fog/index.shtml");
        	addListItem(solutionsList,"EXCLASS","/solutions/exclass/index.shtml");

      	var techList = addList(root,"Technology","/technology/tools.html");
        	addListItem(techList,"Exemplars","/technology/exemplars/index.shtml");
        	addListItem(techList,"RealPro","/technology/realpro/index.shtml");
        	addListItem(techList,"White Papers","/technology/whitepapers.html");
//        	addListItem(techList,"Demos","/technology/demos.shtml");

      	var researchList = addList(root,"Research","/research/index.html");
          var projectsList = addList(researchList,"Projects","");
          	addListItem(projectsList,"AQUAINT","/research/aquaint/index.shtml");
          	addListItem(projectsList,"CogentHelp","/research/cogenthelp/index.shtml");
          	addListItem(projectsList,"DesignExpert","/research/designexpert/index.shtml");
          	addListItem(projectsList,"EMMA","/research/emma/index.shtml");
          	addListItem(projectsList,"LFS","/research/lfs/index.shtml");
          	addListItem(projectsList,"LIDA","/research/lida/index.shtml");
          	addListItem(projectsList,"Machine Translation","/research/mt/index.shtml");
          	addListItem(projectsList,"MeteoCogent","/research/meteocogent/index.shtml");
          	addListItem(projectsList,"ModelExplainer","/research/modex/index.shtml");
          	addListItem(projectsList,"RIPTIDES","/research/tides/index.shtml");
//        	addListItem(researchList,"Papers","/research/papers.shtml");

      	var companyList = addList(root,"Company","/company/index.html");
          var peopleList = addList(companyList,"People","");
          	addListItem(peopleList,"Richard Kittredge","/company/people/kittredge.shtml");
          	addListItem(peopleList,"Ted Caldwell","/company/people/caldwell.shtml");

    	  addListItem(root,"Contact","/contact.html");


    	expandToc();
    	root.build(10, 120);
    }

    function addList(parent,label,url)
    {
    	var width = 180;
    	var height = 22;
    	var bgColor = "white";

    	var expand = (parent == null ? true : false);

    	var theList = new List(expand, width, height, bgColor);
    	theList.setIndent(10);

    	if (parent != null) {
    	  var link = label;
    	  if (url != "")
          var link = "<a class=toc1 href='" + url + "'>" + label + "</a>";
      	parent.addList(theList,link);
      }
    	return theList;
    }

    function addListItem(list,label,url)
    {
      var link = "<a class=toc1 href='" + url + "'>" + label + "</a>";
      list.addItem(link);
    }

    function redo()
    {
      document.location.reload();
    }












    // -->
