		var thischild='';

    function TreeItem(ID, parentID, label, datestamp, filename, filenameencoded, parentRef)
    {
      this.ID = ID;
      this.parentID = parentID;
      this.label = label;
	  this.datestamp = datestamp;
      this.filename = filename;
      this.filenameencoded = filenameencoded;
      this.childs = new Array();
      this.parentRef = parentRef;

      			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(1910, 
                                                                              -1, 
                                                                              'BMW-Site', 
																			  '30-11-1999', 
                                                                              'BMW-Site-1910.html', 
                                                                              'BMW-Site-1910.html', 
                                                                              null);
              CatTree[0].childs[0] = new TreeItem(1900, 
                                                                              1910, 
                                                                              'Home', 
																			  '30-11-1999', 
                                                                              'Home-1900.php', 
                                                                              'Home-1900.php', 
                                                                              CatTree[0]);
              CatTree[0].childs[1] = new TreeItem(6435, 
                                                                              1910, 
                                                                              'Nieuws', 
																			  '30-11-1999', 
                                                                              'Nieuws-6435.php', 
                                                                              'Nieuws-6435.php', 
                                                                              CatTree[0]);
              CatTree[0].childs[2] = new TreeItem(1901, 
                                                                              1910, 
                                                                              'Specials', 
																			  '30-11-1999', 
                                                                              'Specials-1901.html', 
                                                                              'Specials-1901.html', 
                                                                              CatTree[0]);
              CatTree[0].childs[2].childs[0] = new TreeItem(1930, 
                                                                              1901, 
                                                                              'Over Oolbekkink', 
																			  '30-11-1999', 
                                                                              'OverOolbekkink-1930.html', 
                                                                              'OverOolbekkink-1930.html', 
                                                                              CatTree[0].childs[2]);
              CatTree[0].childs[2].childs[1] = new TreeItem(6819, 
                                                                              1901, 
                                                                              'uw BMW als nieuw', 
																			  '09-07-2008', 
                                                                              'uwBMWalsnieuw-6819.html', 
                                                                              'uwBMWalsnieuw-6819.html', 
                                                                              CatTree[0].childs[2]);
              CatTree[0].childs[2].childs[2] = new TreeItem(6821, 
                                                                              1901, 
                                                                              'EfficientDynamics', 
																			  '10-07-2008', 
                                                                              'EfficientDynamics-6821.html', 
                                                                              'EfficientDynamics-6821.html', 
                                                                              CatTree[0].childs[2]);
              CatTree[0].childs[2].childs[3] = new TreeItem(7250, 
                                                                              1901, 
                                                                              '3 Serie 20% bijtelling', 
																			  '26-03-2010', 
                                                                              '3Serie20_bijtelling-7250.html', 
                                                                              '3Serie20_bijtelling-7250.html', 
                                                                              CatTree[0].childs[2]);
              CatTree[0].childs[3] = new TreeItem(1902, 
                                                                              1910, 
                                                                              'Producten', 
																			  '30-11-1999', 
                                                                              'Producten-1902.html', 
                                                                              'Producten-1902.html', 
                                                                              CatTree[0]);
              CatTree[0].childs[3].childs[0] = new TreeItem(1926, 
                                                                              1902, 
                                                                              'Nieuwe Auto&#39;s', 
																			  '30-11-1999', 
                                                                              'NieuweAutos-1926.html', 
                                                                              'NieuweAutos-1926.html', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[3].childs[1] = new TreeItem(1927, 
                                                                              1902, 
                                                                              'Occasions', 
																			  '30-11-1999', 
                                                                              'Occasions-1927.php', 
                                                                              'Occasions-1927.php', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[3].childs[2] = new TreeItem(7212, 
                                                                              1902, 
                                                                              'Nieuwe auto&#39;s direct leverbaar', 
																			  '20-11-2009', 
                                                                              'Nieuweautosdirectleverbaar-7212.html', 
                                                                              'Nieuweautosdirectleverbaar-7212.html', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[3].childs[3] = new TreeItem(6138, 
                                                                              1902, 
                                                                              'Accesoires', 
																			  '30-11-1999', 
                                                                              'Accesoires-6138.html', 
                                                                              'Accesoires-6138.html', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[3].childs[4] = new TreeItem(7040, 
                                                                              1902, 
                                                                              'BMW Fabrieksauto&#39;s', 
																			  '02-06-2009', 
                                                                              'BMWFabrieksautos-7040.html', 
                                                                              'BMWFabrieksautos-7040.html', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[3].childs[5] = new TreeItem(7191, 
                                                                              1902, 
                                                                              'X1', 
																			  '16-10-2009', 
                                                                              'X1-7191.html', 
                                                                              'X1-7191.html', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[3].childs[6] = new TreeItem(7192, 
                                                                              1902, 
                                                                              '5 Serie Gran Turismo', 
																			  '16-10-2009', 
                                                                              '5SerieGranTurismo-7192.html', 
                                                                              '5SerieGranTurismo-7192.html', 
                                                                              CatTree[0].childs[3]);
              CatTree[0].childs[4] = new TreeItem(1903, 
                                                                              1910, 
                                                                              'Diensten', 
																			  '30-11-1999', 
                                                                              'Diensten-1903.html', 
                                                                              'Diensten-1903.html', 
                                                                              CatTree[0]);
              CatTree[0].childs[4].childs[0] = new TreeItem(1917, 
                                                                              1903, 
                                                                              'BMW Rent', 
																			  '30-11-1999', 
                                                                              'BMWRent-1917.html', 
                                                                              'BMWRent-1917.html', 
                                                                              CatTree[0].childs[4]);
              CatTree[0].childs[4].childs[1] = new TreeItem(1918, 
                                                                              1903, 
                                                                              'Schadeherstel', 
																			  '30-11-1999', 
                                                                              'Schadeherstel-1918.html', 
                                                                              'Schadeherstel-1918.html', 
                                                                              CatTree[0].childs[4]);
              CatTree[0].childs[4].childs[2] = new TreeItem(1919, 
                                                                              1903, 
                                                                              'Financial Services', 
																			  '30-11-1999', 
                                                                              'FinancialServices-1919.html', 
                                                                              'FinancialServices-1919.html', 
                                                                              CatTree[0].childs[4]);
              CatTree[0].childs[4].childs[2].childs[0] = new TreeItem(1920, 
                                                                              1919, 
                                                                              'Particulier', 
																			  '30-11-1999', 
                                                                              'Particulier-1920.html', 
                                                                              'Particulier-1920.html', 
                                                                              CatTree[0].childs[4].childs[2]);
              CatTree[0].childs[4].childs[2].childs[0].childs[0] = new TreeItem(1937, 
                                                                              1920, 
                                                                              'Private Lease', 
																			  '30-11-1999', 
                                                                              'PrivateLease-1937.html', 
                                                                              'PrivateLease-1937.html', 
                                                                              CatTree[0].childs[4].childs[2].childs[0]);
              CatTree[0].childs[4].childs[2].childs[0].childs[1] = new TreeItem(1938, 
                                                                              1920, 
                                                                              'Credit Lease', 
																			  '30-11-1999', 
                                                                              'CreditLease-1938.html', 
                                                                              'CreditLease-1938.html', 
                                                                              CatTree[0].childs[4].childs[2].childs[0]);
              CatTree[0].childs[4].childs[2].childs[0].childs[2] = new TreeItem(1939, 
                                                                              1920, 
                                                                              'Autoplan', 
																			  '30-11-1999', 
                                                                              'Autoplan-1939.html', 
                                                                              'Autoplan-1939.html', 
                                                                              CatTree[0].childs[4].childs[2].childs[0]);
              CatTree[0].childs[4].childs[2].childs[1] = new TreeItem(1921, 
                                                                              1919, 
                                                                              'Zakelijk', 
																			  '30-11-1999', 
                                                                              'Zakelijk-1921.html', 
                                                                              'Zakelijk-1921.html', 
                                                                              CatTree[0].childs[4].childs[2]);
              CatTree[0].childs[4].childs[2].childs[1].childs[0] = new TreeItem(1941, 
                                                                              1921, 
                                                                              'Operationeel Lease', 
																			  '30-11-1999', 
                                                                              'OperationeelLease-1941.html', 
                                                                              'OperationeelLease-1941.html', 
                                                                              CatTree[0].childs[4].childs[2].childs[1]);
              CatTree[0].childs[4].childs[2].childs[1].childs[1] = new TreeItem(1942, 
                                                                              1921, 
                                                                              'Finance Lease', 
																			  '30-11-1999', 
                                                                              'FinanceLease-1942.html', 
                                                                              'FinanceLease-1942.html', 
                                                                              CatTree[0].childs[4].childs[2].childs[1]);
              CatTree[0].childs[4].childs[2].childs[1].childs[2] = new TreeItem(1943, 
                                                                              1921, 
                                                                              'Executive Lease', 
																			  '30-11-1999', 
                                                                              'ExecutiveLease-1943.html', 
                                                                              'ExecutiveLease-1943.html', 
                                                                              CatTree[0].childs[4].childs[2].childs[1]);
              CatTree[0].childs[4].childs[3] = new TreeItem(1922, 
                                                                              1903, 
                                                                              'Onderhoud/Reparatie', 
																			  '30-11-1999', 
                                                                              'Onderhoud-Reparatie-1922.html', 
                                                                              'Onderhoud-Reparatie-1922.html', 
                                                                              CatTree[0].childs[4]);
              CatTree[0].childs[4].childs[3].childs[0] = new TreeItem(1923, 
                                                                              1922, 
                                                                              'Plan nu uw onderhoudsbeurt', 
																			  '30-11-1999', 
                                                                              'Plannuuwonderhoudsbeurt-1923.php', 
                                                                              'Plannuuwonderhoudsbeurt-1923.php', 
                                                                              CatTree[0].childs[4].childs[3]);
              CatTree[0].childs[4].childs[3].childs[1] = new TreeItem(1924, 
                                                                              1922, 
                                                                              'Tarieven vervangend vervoer', 
																			  '30-11-1999', 
                                                                              'Tarievenvervangendvervoer-1924.html', 
                                                                              'Tarievenvervangendvervoer-1924.html', 
                                                                              CatTree[0].childs[4].childs[3]);
              CatTree[0].childs[4].childs[4] = new TreeItem(1925, 
                                                                              1903, 
                                                                              'Verzekeringen', 
																			  '30-11-1999', 
                                                                              'Verzekeringen-1925.html', 
                                                                              'Verzekeringen-1925.html', 
                                                                              CatTree[0].childs[4]);
              CatTree[0].childs[5] = new TreeItem(1909, 
                                                                              1910, 
                                                                              'Contact', 
																			  '30-11-1999', 
                                                                              'Contact-1909.html', 
                                                                              'Contact-1909.html', 
                                                                              CatTree[0]);
              CatTree[0].childs[5].childs[0] = new TreeItem(1913, 
                                                                              1909, 
                                                                              'Onze Vestigingen', 
																			  '30-11-1999', 
                                                                              'OnzeVestigingen-1913.html', 
                                                                              'OnzeVestigingen-1913.html', 
                                                                              CatTree[0].childs[5]);
              CatTree[0].childs[5].childs[1] = new TreeItem(1916, 
                                                                              1909, 
                                                                              'Openingstijden', 
																			  '30-11-1999', 
                                                                              'Openingstijden-1916.html', 
                                                                              'Openingstijden-1916.html', 
                                                                              CatTree[0].childs[5]);
              CatTree[0].childs[5].childs[2] = new TreeItem(1914, 
                                                                              1909, 
                                                                              'Route', 
																			  '30-11-1999', 
                                                                              'Route-1914.html', 
                                                                              'Route-1914.html', 
                                                                              CatTree[0].childs[5]);
              CatTree[0].childs[5].childs[2].childs[0] = new TreeItem(1961, 
                                                                              1914, 
                                                                              'Oolbekkink Zwolle', 
																			  '30-11-1999', 
                                                                              'OolbekkinkZwolle-1961.html', 
                                                                              'OolbekkinkZwolle-1961.html', 
                                                                              CatTree[0].childs[5].childs[2]);
              CatTree[0].childs[5].childs[2].childs[1] = new TreeItem(1962, 
                                                                              1914, 
                                                                              'Oolbekkink Hoogeveen', 
																			  '30-11-1999', 
                                                                              'OolbekkinkHoogeveen-1962.html', 
                                                                              'OolbekkinkHoogeveen-1962.html', 
                                                                              CatTree[0].childs[5].childs[2]);
              CatTree[0].childs[6] = new TreeItem(6426, 
                                                                              1910, 
                                                                              'Vacatures', 
																			  '30-11-1999', 
                                                                              'Vacatures-6426.html', 
                                                                              'Vacatures-6426.html', 
                                                                              CatTree[0]);
              CatTree[1] = new TreeItem(1912, 
                                                                              -1, 
                                                                              'Mini-Site', 
																			  '30-11-1999', 
                                                                              'Mini-Site-1912.html', 
                                                                              'Mini-Site-1912.html', 
                                                                              null);
              CatTree[1].childs[0] = new TreeItem(1983, 
                                                                              1912, 
                                                                              'Home', 
																			  '30-11-1999', 
                                                                              'Home-1983.html', 
                                                                              'Home-1983.html', 
                                                                              CatTree[1]);
              CatTree[1].childs[1] = new TreeItem(1984, 
                                                                              1912, 
                                                                              'MINI Next (occasions)', 
																			  '30-11-1999', 
                                                                              'MININextoccasions-1984.php', 
                                                                              'MININextoccasions-1984.php', 
                                                                              CatTree[1]);
              CatTree[1].childs[2] = new TreeItem(1985, 
                                                                              1912, 
                                                                              'Over MINI', 
																			  '30-11-1999', 
                                                                              'OverMINI-1985.html', 
                                                                              'OverMINI-1985.html', 
                                                                              CatTree[1]);
              CatTree[1].childs[3] = new TreeItem(1986, 
                                                                              1912, 
                                                                              'Contact', 
																			  '30-11-1999', 
                                                                              'Contact-1986.php', 
                                                                              'Contact-1986.php', 
                                                                              CatTree[1]);
              CatTree[1].childs[4] = new TreeItem(2029, 
                                                                              1912, 
                                                                              'Links', 
																			  '30-11-1999', 
                                                                              'Links-2029.html', 
                                                                              'Links-2029.html', 
                                                                              CatTree[1]);
              CatTree[1].childs[5] = new TreeItem(2030, 
                                                                              1912, 
                                                                              'Route', 
																			  '30-11-1999', 
                                                                              'Route-2030.html', 
                                                                              'Route-2030.html', 
                                                                              CatTree[1]);
              CatTree[1].childs[6] = new TreeItem(3959, 
                                                                              1912, 
                                                                              '20% Bijtelling', 
																			  '30-11-1999', 
                                                                              '20_Bijtelling-3959.html', 
                                                                              '20_Bijtelling-3959.html', 
                                                                              CatTree[1]);
              CatTree[1].childs[7] = new TreeItem(7252, 
                                                                              1912, 
                                                                              'MINI ONE MINIMALST', 
																			  '01-04-2010', 
                                                                              'MINIONEMINIMALST-7252.html', 
                                                                              'MINIONEMINIMALST-7252.html', 
                                                                              CatTree[1]);
              CatTree[1].childs[8] = new TreeItem(7253, 
                                                                              1912, 
                                                                              'Business Line', 
																			  '06-04-2010', 
                                                                              'BusinessLine-7253.html', 
                                                                              'BusinessLine-7253.html', 
                                                                              CatTree[1]);
              CatTree[2] = new TreeItem(6433, 
                                                                              -1, 
                                                                              'Nieuwe auto&#39;s overzicht', 
																			  '30-11-1999', 
                                                                              'Nieuweautosoverzicht-6433.php', 
                                                                              'Nieuweautosoverzicht-6433.php', 
                                                                              null);
              CatTree[3] = new TreeItem(6825, 
                                                                              -1, 
                                                                              'Zomeractie', 
																			  '11-07-2008', 
                                                                              'Zomeractie-6825.html', 
                                                                              'Zomeractie-6825.html', 
                                                                              null);
              CatTree[4] = new TreeItem(6850, 
                                                                              -1, 
                                                                              'home_tmp', 
																			  '01-09-2008', 
                                                                              'home_tmp-6850.php', 
                                                                              'home_tmp-6850.php', 
                                                                              null);
              CatTree[5] = new TreeItem(2034, 
                                                                              -1, 
                                                                              'Overig', 
																			  '30-11-1999', 
                                                                              'Overig-2034.html', 
                                                                              'Overig-2034.html', 
                                                                              null);
              CatTree[6] = new TreeItem(6599, 
                                                                              -1, 
                                                                              'Proefrit evenement', 
																			  '13-03-2008', 
                                                                              'Proefritevenement-6599.html', 
                                                                              'Proefritevenement-6599.html', 
                                                                              null);
              CatTree[7] = new TreeItem(1915, 
                                                                              -1, 
                                                                              'Uw reactie', 
																			  '30-11-1999', 
                                                                              'Uwreactie-1915.php', 
                                                                              'Uwreactie-1915.php', 
                                                                              null);
              CatTree[8] = new TreeItem(6603, 
                                                                              -1, 
                                                                              'popup', 
																			  '18-03-2008', 
                                                                              'popup-6603.html', 
                                                                              'popup-6603.html', 
                                                                              null);
      	/** End_of_the_Tree - used for sitemap.php on the actual site. */
	/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------export--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

