var tocItems = [["Introduction", "./files/WSfacf1429558a55deec72d01041a27344f-7ffe.htm", "book-closed", ["What This Guide Covers", "./files/WSfacf1429558a55de6df1401049e287764-7f3e.htm", "page"],
["Essential Concepts", "./files/WS1a9193826455f5ff9110c71085341391d-4182.htm", "page"],
["Preparing to Run the Examples", "./files/WS73099cc142f487555e01641096cb1c9da-7fd4.htm", "page"],
["Application Development", "./files/WS73099cc142f487555a82b2111d48f3663-61f7.htm", "page"],
["Resources and Repositories", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-4eaf.htm", "book-closed", ["Library and Session", "./files/WS73099cc142f4875517f0e73109db1799f2-7edb.htm", "page"],
["Maps", "./files/WS1a9193826455f5ff4d2e22109db342701-7df1.htm", "page"],
],
["Hello, Map – Displaying a Web Layout", "./files/WS1a9193826455f5ff1955f1510a86ab16de-61cb.htm", "page"],
["Hello, Map 2 – Adding a Custom Command", "./files/WS1a9193826455f5ff13ee121107bdda7722-66ee.htm", "book-closed", ["Web Layouts and MapGuide Server Pages", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-52ef.htm", "page"],
["MapGuide Page Flow", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-52ee.htm", "page"],
["Example Code", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-52ed.htm", "page"],
["How This Page Works", "./files/WS1a9193826455f5ff9110c71085341391d-62a5.htm", "page"],
],
["Understanding Services", "./files/WS1a9193826455f5ff9110c71085341391d-62a4.htm", "page"],
],
["The MapGuide Viewer", "./files/WS73099cc142f48755f31ec6111b3cb055b760.htm", "book-closed", ["Introduction", "./files/WS73099cc142f48755f31ec6111b3cb055b761.htm", "book-closed", ["Custom Commands", "./files/WS73099cc142f487555a82b2111d48f3663-7f20.htm", "page"],
],
["Understanding Viewer Frames", "./files/WS1a9193826455f5ff9110c71085341391d-62a2.htm", "page"],
["MapGuide Viewer API", "./files/WS1a9193826455f5ff9110c71085341391d-3649.htm", "book-closed", ["Calling the Viewer API with an Invoke Script Command", "./files/WS73099cc142f487555e01641096cb1c9da-7fd2.htm", "page"],
["Calling the Viewer API from the Script Frame", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-501e.htm", "page"],
["Calling the Viewer API from the Task Pane", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-501f.htm", "page"],
["Extending Map Initialization Functionality", "./files/WS73099cc142f487555a82b2111d48f3663-7fb8.htm", "page"],
["The Hello Viewer Sample", "./files/WS73099cc142f487555a82b2111d48f3663-7f15.htm", "page"],
],
["Embedding a Viewer in Your Own Page", "./files/WS1a9193826455f5ff9110c71085341391d-6954.htm", "page"],
],
["Interacting With Layers", "./files/WSfacf1429558a55de6812d1041fa83470-7a73.htm", "book-closed", ["Overview of Layers", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7fb8.htm", "book-closed", ["Basic Layer Properties", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7c3a.htm", "page"],
["Layer Groups", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7fb7.htm", "book-closed", ["Base Layer Groups", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7fb6.htm", "page"],
],
["Layer Style", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7c38.htm", "page"],
["Layer Visibility", "./files/WS1a9193826455f5ff9110c71085341391d-725f.htm", "book-closed", ["Example: Actual Visibility", "./files/WS1a9193826455f5ff9110c71085341391d-6b71.htm", "page"],
],
],
["Enumerating Map Layers", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7fb3.htm", "book-closed", ["Example", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-71ff.htm", "page"],
],
["Manipulating Layers", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7fb2.htm", "book-closed", ["Changing Basic Properties", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7c37.htm", "book-closed", ["Example", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-6fbb.htm", "page"],
],
["Changing Visibility", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-7fb1.htm", "page"],
],
],
["Working With Feature Data", "./files/WSfacf1429558a55de6df1401049e287764-7f40.htm", "book-closed", ["Overview of Features", "./files/WS1a9193826455f5ff9110c71085341391d-5858.htm", "page"],
["Querying Feature Data", "./files/WS73099cc142f487551050d24109644a14d7-7ece.htm", "book-closed", ["Feature Readers", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-687d.htm", "page"],
["Selecting with the Web API", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-687c.htm", "book-closed", ["Basic Filters", "./files/WS1a9193826455f5ff9110c71085341391d-4bcc.htm", "book-closed", ["Examples", "./files/WS1a9193826455f5ff9110c71085341391d-4bca.htm", "page"],
],
["Spatial Filters", "./files/WS1a9193826455f5ff9110c71085341391d-4bc9.htm", "book-closed", ["Creating Geometry Objects From Features", "./files/WS1a9193826455f5ff9110c71085341391d-4849.htm", "page"],
["Examples", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-5d76.htm", "page"],
],
],
["Example: Selection", "./files/WS1a9193826455f5ff9110c71085341391d-2eac.htm", "page"],
],
["Active Selections", "./files/WSfacf1429558a55de6df1401049e287764-7f3f.htm", "book-closed", ["Selecting with the Viewer", "./files/WS1a9193826455f5ff9110c71085341391d-5857.htm", "page"],
["Passing Viewer Information to the Web Server", "./files/WS1a9193826455f5ff1955f1510a86ab16de-56df.htm", "book-closed", ["Additional Parameters to an Invoke URL Command", "./files/WS1a9193826455f5ff1955f1510a86ab16de-56dd.htm", "page"],
["Passing Parameters From an Invoke Script command", "./files/WS1a9193826455f5ff1955f1510a86ab16de-56dc.htm", "page"],
["Passing Parameters From the Task Pane Frame", "./files/WS1a9193826455f5ff1955f1510a86ab16de-56db.htm", "page"],
],
["Working With the Active Selection", "./files/WS1a9193826455f5ff9110c71085341391d-5855.htm", "book-closed", ["Example: Listing Selected Parcels (AJAX or DWF Viewer)", "./files/WS1a9193826455f5ff4d2e22109db342701-7d8a.htm", "page"],
["Example: Listing Selected Parcels (AJAX Viewer only)", "./files/WS1a9193826455f5ff9110c71085341391d-5852.htm", "page"],
],
["Setting the Active Selection With the Web API", "./files/WS1a9193826455f5ff9110c71085341391d-4848.htm", "page"],
["Example: Setting the Active Selection", "./files/WS1a9193826455f5ff9110c71085341391d-4846.htm", "page"],
],
],
["Modifying Maps and Layers", "./files/WS1a9193826455f5ff9110c71085341391d-4d63.htm", "book-closed", ["Introduction", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-5474.htm", "page"],
["Adding An Existing Layer To A Map", "./files/WS1a9193826455f5ff9110c71085341391d-4d62.htm", "page"],
["Creating Layers By Modifying XML", "./files/WS1a9193826455f5ff9110c71085341391d-4d2a.htm", "page"],
["Another Way To Create Layers", "./files/WS1a9193826455f5ff9110c71085341391d-4d29.htm", "book-closed", ["Example - Creating A Layer That Uses Area Rules", "./files/WS1a9193826455f5ff9110c71085341391d-4d27.htm", "page"],
["Example - Using Line Rules", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-5bf4.htm", "page"],
["Example - Using Point Rules", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-5bf3.htm", "page"],
],
["Adding Layers To A Map", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-546d.htm", "page"],
["Making Changes Permanent", "./files/WS73099cc142f487551e5a0cb10850d4cd7c-546b.htm", "page"],
],
["Analyzing Features", "./files/WS1a9193826455f5ff4d2e22109db342701-6dd2.htm", "book-closed", ["Introduction", "./files/WS1a9193826455f5ff4d2e22109db342701-6dd1.htm", "page"],
["Representation of Geometry", "./files/WS1a9193826455f5ff1955f1510a86ab16de-6439.htm", "book-closed", ["Geometry Objects", "./files/WS1a9193826455f5ff1955f1510a86ab16de-638d.htm", "page"],
["Comparing Geometry Objects", "./files/WS1a9193826455f5ff1955f1510a86ab16de-638a.htm", "page"],
],
["Coordinate Systems", "./files/WS1a9193826455f5ff1955f1510a86ab16de-7f7b.htm", "page"],
["Measuring Distance", "./files/WS1a9193826455f5ff1955f1510a86ab16de-7f77.htm", "page"],
["Temporary Feature Sources", "./files/WS1a9193826455f5ff1955f1510a86ab16de-6631.htm", "book-closed", ["Inserting, Deleting, and Updating Features", "./files/WS1a9193826455f5ff1955f1510a86ab16de-662e.htm", "page"],
],
["Creating a Buffer", "./files/WS1a9193826455f5ff1955f1510a86ab16de-7f6f.htm", "page"],
["Example", "./files/WS1a9193826455f5ff1955f1510a86ab16de-63da.htm", "page"],
],
["Digitizing and Redlining", "./files/WS1a9193826455f5ff4d2e22109db342701-6dfd.htm", "book-closed", ["Introduction", "./files/WS1a9193826455f5ff4d2e22109db342701-6dfc.htm", "page"],
["Digitizing", "./files/WS1a9193826455f5ff4d2e22109db342701-6df9.htm", "page"],
["Redlining", "./files/WS1a9193826455f5ff4d2e22109db342701-6de8.htm", "book-closed", ["Passing Coordinates", "./files/WS1a9193826455f5ff4d2e22109db342701-6de6.htm", "page"],
["Creating a Feature Source", "./files/WS1a9193826455f5ff4d2e22109db342701-6de5.htm", "page"],
["Creating A Layer", "./files/WS1a9193826455f5ff4d2e22109db342701-6de4.htm", "page"],
],
],
["Custom Output", "./files/WS1a9193826455f5ff1955f1510a86ab16de-5887.htm", "book-closed", ["Introduction", "./files/WS1a9193826455f5ff1955f1510a86ab16de-5886.htm", "page"],
["Rendering Service", "./files/WS1a9193826455f5ff1955f1510a86ab16de-585a.htm", "page"],
["Mapping Service", "./files/WS1a9193826455f5ff1955f1510a86ab16de-5859.htm", "page"],
],
];
            var fileItems = getTOCFileItems(tocItems);

            function getTOCFileItems(tocItems)
            {
               var fItems = [];
               if(!tocItems) return fItems;
               for (var i = 0; i < tocItems.length; i++)
               {
                  if (typeof(tocItems[i]) == "object")
                  {
                     var childFItems = getTOCFileItems(tocItems[i]);
                     for (var j = 0; j < childFItems.length; j++)
                         fItems[fItems.length] = childFItems[j];
                  }
                  else if(i == 1) fItems[fItems.length] = tocItems[i];
               }
               return fItems;
            }
            