Index: trunk/doc/Flair/search/search.js
===================================================================
--- trunk/doc/Flair/search/search.js	(revision 14)
+++ trunk/doc/Flair/search/search.js	(revision 26)
@@ -1,37 +1,2 @@
-// Search script generated by doxygen
-// Copyright (C) 2009 by Dimitri van Heesch.
-
-// The code in this file is loosly based on main.js, part of Natural Docs,
-// which is Copyright (C) 2003-2008 Greg Valure
-// Natural Docs is licensed under the GPL.
-
-var indexSectionsWithContent =
-{
-  0: "abcdefghijklmnopqrstuvwxyz~",
-  1: "abcdefghijklmnopqrstuvwx",
-  2: "fpq",
-  3: "abcdefghijlmnopqrstuvwx",
-  4: "abcdefghijklmnopqrstuvwxyz~",
-  5: "abcdefghiklmnopqrstvwxyz",
-  6: "t",
-  7: "cfmnptu",
-  8: "abdefgimnpqrstuvwxy",
-  9: "abcdefghiklmnopqrstuvwxyz"
-};
-
-var indexSectionNames =
-{
-  0: "all",
-  1: "classes",
-  2: "namespaces",
-  3: "files",
-  4: "functions",
-  5: "variables",
-  6: "typedefs",
-  7: "enums",
-  8: "enumvalues",
-  9: "properties"
-};
-
 function convertToId(search)
 {
@@ -45,9 +10,9 @@
       result+=c;
     }
-    else if (cn<16) 
+    else if (cn<16)
     {
       result+="_0"+cn.toString(16);
     }
-    else 
+    else
     {
       result+="_"+cn.toString(16);
@@ -88,5 +53,5 @@
 
    Parameters:
-   name - The name of the global variable that will be 
+   name - The name of the global variable that will be
           storing this instance.  Is needed to be able to set timeouts.
    resultPath - path to use for external files
@@ -95,5 +60,5 @@
 {
   if (!name || !resultsPath) {  alert("Missing parameters to SearchBox."); }
-   
+
   // ---------- Instance variables
   this.name                  = name;
@@ -172,5 +137,5 @@
 
     // stop selection hide timer
-    if (this.hideTimeout) 
+    if (this.hideTimeout)
     {
       clearTimeout(this.hideTimeout);
@@ -201,5 +166,5 @@
       {
         this.OnSearchSelectShow();
-        var win=this.DOMSearchSelectWindow(); 
+        var win=this.DOMSearchSelectWindow();
         for (i=0;i<win.childNodes.length;i++)
         {
@@ -252,5 +217,5 @@
   {
     var count=0;
-    var win=this.DOMSearchSelectWindow(); 
+    var win=this.DOMSearchSelectWindow();
     for (i=0;i<win.childNodes.length;i++)
     {
@@ -267,5 +232,5 @@
   {
     var i,j=0;
-    var win=this.DOMSearchSelectWindow(); 
+    var win=this.DOMSearchSelectWindow();
     for (i=0;i<win.childNodes.length;i++)
     {
@@ -371,5 +336,5 @@
     }
 
-    window.frames.MSearchResults.location = resultsPageWithSearch;  
+    window.frames.MSearchResults.location = resultsPageWithSearch;
     var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
 
@@ -405,10 +370,10 @@
   // -------- Activation Functions
 
-  // Activates or deactivates the search panel, resetting things to 
-  // their default values if necessary. 
+  // Activates or deactivates the search panel, resetting things to
+  // their default values if necessary.
   this.Activate = function(isActive)
   {
     if (isActive || // open it
-        this.DOMPopupSearchResultsWindow().style.display == 'block' 
+        this.DOMPopupSearchResultsWindow().style.display == 'block'
        )
     {
@@ -418,6 +383,6 @@
 
       if (searchField.value == this.searchLabel) // clear "Search" term upon entry
-      {  
-        searchField.value = '';  
+      {
+        searchField.value = '';
         this.searchActive = true;
       }
@@ -458,10 +423,10 @@
 
         if (element.nodeName == 'DIV' && element.hasChildNodes())
-        {  
-           element = element.firstChild;  
+        {
+           element = element.firstChild;
         }
         else if (element.nextSibling)
-        {  
-           element = element.nextSibling;  
+        {
+           element = element.nextSibling;
         }
         else
@@ -474,6 +439,6 @@
 
           if (element && element!=parentElement)
-          {  
-            element = element.nextSibling;  
+          {
+            element = element.nextSibling;
           }
         }
@@ -528,5 +493,5 @@
           rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
 
-          if (search.length<=rowMatchName.length && 
+          if (search.length<=rowMatchName.length &&
              rowMatchName.substr(0, search.length)==search)
           {
@@ -599,5 +564,5 @@
     this.ProcessKeys = function(e)
     {
-      if (e.type == "keydown") 
+      if (e.type == "keydown")
       {
         this.repeatOn = false;
@@ -620,5 +585,5 @@
     }
 
-    this.Nav = function(evt,itemIndex) 
+    this.Nav = function(evt,itemIndex)
     {
       var e  = (evt) ? evt : window.event; // for IE
@@ -634,5 +599,5 @@
           var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
           if (child && child.style.display == 'block') // children visible
-          { 
+          {
             var n=0;
             var tmpElem;
@@ -727,5 +692,5 @@
         {
           elem.focus();
-        } 
+        }
       }
       else if (this.lastKey==27) // Escape
@@ -810,2 +775,17 @@
 }
 
+function init_search()
+{
+  var results = document.getElementById("MSearchSelectWindow");
+  for (var key in indexSectionLabels)
+  {
+    var link = document.createElement('a');
+    link.setAttribute('class','SelectItem');
+    link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
+    link.href='javascript:void(0)';
+    link.innerHTML='<span class="SelectionMark">&#160;</span>'+indexSectionLabels[key];
+    results.appendChild(link);
+  }
+  searchBox.OnSelectItem(0);
+}
+
