diff --git a/themes/bootstrap3/js/hierarchyTree.js b/themes/bootstrap3/js/hierarchyTree.js
index d6b2990de3ab748208cae7f9b5899c6f6022a7b8..7dd3ea048e77ba3e442c0cb2ccfaec8ee2a5c674 100644
--- a/themes/bootstrap3/js/hierarchyTree.js
+++ b/themes/bootstrap3/js/hierarchyTree.js
@@ -93,21 +93,6 @@ function doTreeSearch()
   }
 }
 
-function buildTreeWithXml(cb)
-{
-  $.ajax({'url': path + '/Hierarchy/GetTree',
-    'data': {
-      'hierarchyID': hierarchyID,
-      'id': recordID,
-      'context': hierarchyContext,
-      'mode': 'Tree'
-    },
-    'success': function(xml) {
-      var nodes = buildJSONNodes($(xml).find('root'));
-      cb.call(this, nodes);
-    }
-  });
-}
 function buildJSONNodes(xml)
 {
   var jsonNode = [];
@@ -131,6 +116,21 @@ function buildJSONNodes(xml)
   });
   return jsonNode;
 }
+function buildTreeWithXml(cb)
+{
+  $.ajax({'url': path + '/Hierarchy/GetTree',
+    'data': {
+      'hierarchyID': hierarchyID,
+      'id': recordID,
+      'context': hierarchyContext,
+      'mode': 'Tree'
+    },
+    'success': function(xml) {
+      var nodes = buildJSONNodes($(xml).find('root'));
+      cb.call(this, nodes);
+    }
+  });
+}
 
 $(document).ready(function()
 {