		var thischild='';
		var object;

    function TreeItem(ID, parentID, label, filename, filenameencoded, parentRef, obj)
    {
      this.ID = ID;
      this.parentID = parentID;
      this.label = label;
      this.filename = filename;
      this.filenameencoded = filenameencoded;
      this.childs = new Array();
      this.parentRef = parentRef;
      this.obj = obj;

      			if (ID == -1) thischild = this;
      /** in case genjstree.php is called without treeitemID: */
      if (typeof(treeitemID) != 'undefined')
      {
  			if (-1 == -1 && ID == treeitemID) thischild = this;
      }
      			FlatTree[ID] = this;
    }
    
    var CatTree = Array();    
    var FlatTree = Array();    


    /** javascript part tree functions */
    
    function HasChilds(current)
    {
      return current.childs.length;
    }
    
    function HasSiblings(current)
    {
      if (current.parentRef.childs.length > 1) return true;
      else return false;
    }
    
    function GetLocationList(current)
    {
      var loclist = new Array();
      
      
      var i = 0;
      while (current.parentRef != null && current.parentRef.ID != -1 && i < 100)
      {
        loclist[i] = GetIndexInParent(current);
        current = current.parentRef;
        i++;
      }
      loclist = loclist.reverse();
      return loclist;
    }
    
    
    function GetIndexInParent(current)
    {
      /** get index in parent */
      if (current.parentRef != null && current.parentRef.ID != -1)
      {
        i = 0;
        while (i < current.parentRef.childs.length)
        {
          if (current.parentRef.childs[i].ID == current.ID) return i;
          i++;
        }
      }
    
      return -1;
    }
    
    /** Start_of_the_Tree - used for sitemap.php on the actual site. */
            CatTree[0] = new TreeItem(7200, 
                                                                              -1, 
                                                                              "Home", 
                                                                              'Home-7200.html', 
                                                                              'Home-7200.html', 
                                                                              null,
                                                                              null);
              CatTree[1] = new TreeItem(7202, 
                                                                              -1, 
                                                                              "Contact", 
                                                                              'Contact-7202.html', 
                                                                              'Contact-7202.html', 
                                                                              null,
                                                                              null);
              CatTree[2] = new TreeItem(7201, 
                                                                              -1, 
                                                                              "Informatie", 
                                                                              'Informatie-7201.html', 
                                                                              'Informatie-7201.html', 
                                                                              null,
                                                                              null);
      	/** End_of_the_Tree - used for sitemap.php on the actual site. */
	

