You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

814 lines
22KB

  1. // Search script generated by doxygen
  2. // Copyright (C) 2009 by Dimitri van Heesch.
  3. // The code in this file is loosly based on main.js, part of Natural Docs,
  4. // which is Copyright (C) 2003-2008 Greg Valure
  5. // Natural Docs is licensed under the GPL.
  6. var indexSectionsWithContent =
  7. {
  8. 0: "abcdefghijlmnoprstuvw",
  9. 1: "acdfilmops",
  10. 2: "abdfios",
  11. 3: "abcdefghilmnoprstuvw",
  12. 4: "abcdefghijlmnoprstuvw",
  13. 5: "dfilmops",
  14. 6: "s",
  15. 7: "bce",
  16. 8: "adefinpsu",
  17. 9: "fs",
  18. 10: "a"
  19. };
  20. var indexSectionNames =
  21. {
  22. 0: "all",
  23. 1: "classes",
  24. 2: "files",
  25. 3: "functions",
  26. 4: "variables",
  27. 5: "typedefs",
  28. 6: "enums",
  29. 7: "enumvalues",
  30. 8: "defines",
  31. 9: "groups",
  32. 10: "pages"
  33. };
  34. function convertToId(search)
  35. {
  36. var result = '';
  37. for (i=0;i<search.length;i++)
  38. {
  39. var c = search.charAt(i);
  40. var cn = c.charCodeAt(0);
  41. if (c.match(/[a-z0-9\u0080-\uFFFF]/))
  42. {
  43. result+=c;
  44. }
  45. else if (cn<16)
  46. {
  47. result+="_0"+cn.toString(16);
  48. }
  49. else
  50. {
  51. result+="_"+cn.toString(16);
  52. }
  53. }
  54. return result;
  55. }
  56. function getXPos(item)
  57. {
  58. var x = 0;
  59. if (item.offsetWidth)
  60. {
  61. while (item && item!=document.body)
  62. {
  63. x += item.offsetLeft;
  64. item = item.offsetParent;
  65. }
  66. }
  67. return x;
  68. }
  69. function getYPos(item)
  70. {
  71. var y = 0;
  72. if (item.offsetWidth)
  73. {
  74. while (item && item!=document.body)
  75. {
  76. y += item.offsetTop;
  77. item = item.offsetParent;
  78. }
  79. }
  80. return y;
  81. }
  82. /* A class handling everything associated with the search panel.
  83. Parameters:
  84. name - The name of the global variable that will be
  85. storing this instance. Is needed to be able to set timeouts.
  86. resultPath - path to use for external files
  87. */
  88. function SearchBox(name, resultsPath, inFrame, label)
  89. {
  90. if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
  91. // ---------- Instance variables
  92. this.name = name;
  93. this.resultsPath = resultsPath;
  94. this.keyTimeout = 0;
  95. this.keyTimeoutLength = 500;
  96. this.closeSelectionTimeout = 300;
  97. this.lastSearchValue = "";
  98. this.lastResultsPage = "";
  99. this.hideTimeout = 0;
  100. this.searchIndex = 0;
  101. this.searchActive = false;
  102. this.insideFrame = inFrame;
  103. this.searchLabel = label;
  104. // ----------- DOM Elements
  105. this.DOMSearchField = function()
  106. { return document.getElementById("MSearchField"); }
  107. this.DOMSearchSelect = function()
  108. { return document.getElementById("MSearchSelect"); }
  109. this.DOMSearchSelectWindow = function()
  110. { return document.getElementById("MSearchSelectWindow"); }
  111. this.DOMPopupSearchResults = function()
  112. { return document.getElementById("MSearchResults"); }
  113. this.DOMPopupSearchResultsWindow = function()
  114. { return document.getElementById("MSearchResultsWindow"); }
  115. this.DOMSearchClose = function()
  116. { return document.getElementById("MSearchClose"); }
  117. this.DOMSearchBox = function()
  118. { return document.getElementById("MSearchBox"); }
  119. // ------------ Event Handlers
  120. // Called when focus is added or removed from the search field.
  121. this.OnSearchFieldFocus = function(isActive)
  122. {
  123. this.Activate(isActive);
  124. }
  125. this.OnSearchSelectShow = function()
  126. {
  127. var searchSelectWindow = this.DOMSearchSelectWindow();
  128. var searchField = this.DOMSearchSelect();
  129. if (this.insideFrame)
  130. {
  131. var left = getXPos(searchField);
  132. var top = getYPos(searchField);
  133. left += searchField.offsetWidth + 6;
  134. top += searchField.offsetHeight;
  135. // show search selection popup
  136. searchSelectWindow.style.display='block';
  137. left -= searchSelectWindow.offsetWidth;
  138. searchSelectWindow.style.left = left + 'px';
  139. searchSelectWindow.style.top = top + 'px';
  140. }
  141. else
  142. {
  143. var left = getXPos(searchField);
  144. var top = getYPos(searchField);
  145. top += searchField.offsetHeight;
  146. // show search selection popup
  147. searchSelectWindow.style.display='block';
  148. searchSelectWindow.style.left = left + 'px';
  149. searchSelectWindow.style.top = top + 'px';
  150. }
  151. // stop selection hide timer
  152. if (this.hideTimeout)
  153. {
  154. clearTimeout(this.hideTimeout);
  155. this.hideTimeout=0;
  156. }
  157. return false; // to avoid "image drag" default event
  158. }
  159. this.OnSearchSelectHide = function()
  160. {
  161. this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
  162. this.closeSelectionTimeout);
  163. }
  164. // Called when the content of the search field is changed.
  165. this.OnSearchFieldChange = function(evt)
  166. {
  167. if (this.keyTimeout) // kill running timer
  168. {
  169. clearTimeout(this.keyTimeout);
  170. this.keyTimeout = 0;
  171. }
  172. var e = (evt) ? evt : window.event; // for IE
  173. if (e.keyCode==40 || e.keyCode==13)
  174. {
  175. if (e.shiftKey==1)
  176. {
  177. this.OnSearchSelectShow();
  178. var win=this.DOMSearchSelectWindow();
  179. for (i=0;i<win.childNodes.length;i++)
  180. {
  181. var child = win.childNodes[i]; // get span within a
  182. if (child.className=='SelectItem')
  183. {
  184. child.focus();
  185. return;
  186. }
  187. }
  188. return;
  189. }
  190. else if (window.frames.MSearchResults.searchResults)
  191. {
  192. var elem = window.frames.MSearchResults.searchResults.NavNext(0);
  193. if (elem) elem.focus();
  194. }
  195. }
  196. else if (e.keyCode==27) // Escape out of the search field
  197. {
  198. this.DOMSearchField().blur();
  199. this.DOMPopupSearchResultsWindow().style.display = 'none';
  200. this.DOMSearchClose().style.display = 'none';
  201. this.lastSearchValue = '';
  202. this.Activate(false);
  203. return;
  204. }
  205. // strip whitespaces
  206. var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
  207. if (searchValue != this.lastSearchValue) // search value has changed
  208. {
  209. if (searchValue != "") // non-empty search
  210. {
  211. // set timer for search update
  212. this.keyTimeout = setTimeout(this.name + '.Search()',
  213. this.keyTimeoutLength);
  214. }
  215. else // empty search field
  216. {
  217. this.DOMPopupSearchResultsWindow().style.display = 'none';
  218. this.DOMSearchClose().style.display = 'none';
  219. this.lastSearchValue = '';
  220. }
  221. }
  222. }
  223. this.SelectItemCount = function(id)
  224. {
  225. var count=0;
  226. var win=this.DOMSearchSelectWindow();
  227. for (i=0;i<win.childNodes.length;i++)
  228. {
  229. var child = win.childNodes[i]; // get span within a
  230. if (child.className=='SelectItem')
  231. {
  232. count++;
  233. }
  234. }
  235. return count;
  236. }
  237. this.SelectItemSet = function(id)
  238. {
  239. var i,j=0;
  240. var win=this.DOMSearchSelectWindow();
  241. for (i=0;i<win.childNodes.length;i++)
  242. {
  243. var child = win.childNodes[i]; // get span within a
  244. if (child.className=='SelectItem')
  245. {
  246. var node = child.firstChild;
  247. if (j==id)
  248. {
  249. node.innerHTML='&#8226;';
  250. }
  251. else
  252. {
  253. node.innerHTML='&#160;';
  254. }
  255. j++;
  256. }
  257. }
  258. }
  259. // Called when an search filter selection is made.
  260. // set item with index id as the active item
  261. this.OnSelectItem = function(id)
  262. {
  263. this.searchIndex = id;
  264. this.SelectItemSet(id);
  265. var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
  266. if (searchValue!="" && this.searchActive) // something was found -> do a search
  267. {
  268. this.Search();
  269. }
  270. }
  271. this.OnSearchSelectKey = function(evt)
  272. {
  273. var e = (evt) ? evt : window.event; // for IE
  274. if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
  275. {
  276. this.searchIndex++;
  277. this.OnSelectItem(this.searchIndex);
  278. }
  279. else if (e.keyCode==38 && this.searchIndex>0) // Up
  280. {
  281. this.searchIndex--;
  282. this.OnSelectItem(this.searchIndex);
  283. }
  284. else if (e.keyCode==13 || e.keyCode==27)
  285. {
  286. this.OnSelectItem(this.searchIndex);
  287. this.CloseSelectionWindow();
  288. this.DOMSearchField().focus();
  289. }
  290. return false;
  291. }
  292. // --------- Actions
  293. // Closes the results window.
  294. this.CloseResultsWindow = function()
  295. {
  296. this.DOMPopupSearchResultsWindow().style.display = 'none';
  297. this.DOMSearchClose().style.display = 'none';
  298. this.Activate(false);
  299. }
  300. this.CloseSelectionWindow = function()
  301. {
  302. this.DOMSearchSelectWindow().style.display = 'none';
  303. }
  304. // Performs a search.
  305. this.Search = function()
  306. {
  307. this.keyTimeout = 0;
  308. // strip leading whitespace
  309. var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
  310. var code = searchValue.toLowerCase().charCodeAt(0);
  311. var idxChar = searchValue.substr(0, 1).toLowerCase();
  312. if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
  313. {
  314. idxChar = searchValue.substr(0, 2);
  315. }
  316. var resultsPage;
  317. var resultsPageWithSearch;
  318. var hasResultsPage;
  319. var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
  320. if (idx!=-1)
  321. {
  322. var hexCode=idx.toString(16);
  323. resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
  324. resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
  325. hasResultsPage = true;
  326. }
  327. else // nothing available for this search term
  328. {
  329. resultsPage = this.resultsPath + '/nomatches.html';
  330. resultsPageWithSearch = resultsPage;
  331. hasResultsPage = false;
  332. }
  333. window.frames.MSearchResults.location = resultsPageWithSearch;
  334. var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
  335. if (domPopupSearchResultsWindow.style.display!='block')
  336. {
  337. var domSearchBox = this.DOMSearchBox();
  338. this.DOMSearchClose().style.display = 'inline';
  339. if (this.insideFrame)
  340. {
  341. var domPopupSearchResults = this.DOMPopupSearchResults();
  342. domPopupSearchResultsWindow.style.position = 'relative';
  343. domPopupSearchResultsWindow.style.display = 'block';
  344. var width = document.body.clientWidth - 8; // the -8 is for IE :-(
  345. domPopupSearchResultsWindow.style.width = width + 'px';
  346. domPopupSearchResults.style.width = width + 'px';
  347. }
  348. else
  349. {
  350. var domPopupSearchResults = this.DOMPopupSearchResults();
  351. var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
  352. var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
  353. domPopupSearchResultsWindow.style.display = 'block';
  354. left -= domPopupSearchResults.offsetWidth;
  355. domPopupSearchResultsWindow.style.top = top + 'px';
  356. domPopupSearchResultsWindow.style.left = left + 'px';
  357. }
  358. }
  359. this.lastSearchValue = searchValue;
  360. this.lastResultsPage = resultsPage;
  361. }
  362. // -------- Activation Functions
  363. // Activates or deactivates the search panel, resetting things to
  364. // their default values if necessary.
  365. this.Activate = function(isActive)
  366. {
  367. if (isActive || // open it
  368. this.DOMPopupSearchResultsWindow().style.display == 'block'
  369. )
  370. {
  371. this.DOMSearchBox().className = 'MSearchBoxActive';
  372. var searchField = this.DOMSearchField();
  373. if (searchField.value == this.searchLabel) // clear "Search" term upon entry
  374. {
  375. searchField.value = '';
  376. this.searchActive = true;
  377. }
  378. }
  379. else if (!isActive) // directly remove the panel
  380. {
  381. this.DOMSearchBox().className = 'MSearchBoxInactive';
  382. this.DOMSearchField().value = this.searchLabel;
  383. this.searchActive = false;
  384. this.lastSearchValue = ''
  385. this.lastResultsPage = '';
  386. }
  387. }
  388. }
  389. // -----------------------------------------------------------------------
  390. // The class that handles everything on the search results page.
  391. function SearchResults(name)
  392. {
  393. // The number of matches from the last run of <Search()>.
  394. this.lastMatchCount = 0;
  395. this.lastKey = 0;
  396. this.repeatOn = false;
  397. // Toggles the visibility of the passed element ID.
  398. this.FindChildElement = function(id)
  399. {
  400. var parentElement = document.getElementById(id);
  401. var element = parentElement.firstChild;
  402. while (element && element!=parentElement)
  403. {
  404. if (element.nodeName == 'DIV' && element.className == 'SRChildren')
  405. {
  406. return element;
  407. }
  408. if (element.nodeName == 'DIV' && element.hasChildNodes())
  409. {
  410. element = element.firstChild;
  411. }
  412. else if (element.nextSibling)
  413. {
  414. element = element.nextSibling;
  415. }
  416. else
  417. {
  418. do
  419. {
  420. element = element.parentNode;
  421. }
  422. while (element && element!=parentElement && !element.nextSibling);
  423. if (element && element!=parentElement)
  424. {
  425. element = element.nextSibling;
  426. }
  427. }
  428. }
  429. }
  430. this.Toggle = function(id)
  431. {
  432. var element = this.FindChildElement(id);
  433. if (element)
  434. {
  435. if (element.style.display == 'block')
  436. {
  437. element.style.display = 'none';
  438. }
  439. else
  440. {
  441. element.style.display = 'block';
  442. }
  443. }
  444. }
  445. // Searches for the passed string. If there is no parameter,
  446. // it takes it from the URL query.
  447. //
  448. // Always returns true, since other documents may try to call it
  449. // and that may or may not be possible.
  450. this.Search = function(search)
  451. {
  452. if (!search) // get search word from URL
  453. {
  454. search = window.location.search;
  455. search = search.substring(1); // Remove the leading '?'
  456. search = unescape(search);
  457. }
  458. search = search.replace(/^ +/, ""); // strip leading spaces
  459. search = search.replace(/ +$/, ""); // strip trailing spaces
  460. search = search.toLowerCase();
  461. search = convertToId(search);
  462. var resultRows = document.getElementsByTagName("div");
  463. var matches = 0;
  464. var i = 0;
  465. while (i < resultRows.length)
  466. {
  467. var row = resultRows.item(i);
  468. if (row.className == "SRResult")
  469. {
  470. var rowMatchName = row.id.toLowerCase();
  471. rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
  472. if (search.length<=rowMatchName.length &&
  473. rowMatchName.substr(0, search.length)==search)
  474. {
  475. row.style.display = 'block';
  476. matches++;
  477. }
  478. else
  479. {
  480. row.style.display = 'none';
  481. }
  482. }
  483. i++;
  484. }
  485. document.getElementById("Searching").style.display='none';
  486. if (matches == 0) // no results
  487. {
  488. document.getElementById("NoMatches").style.display='block';
  489. }
  490. else // at least one result
  491. {
  492. document.getElementById("NoMatches").style.display='none';
  493. }
  494. this.lastMatchCount = matches;
  495. return true;
  496. }
  497. // return the first item with index index or higher that is visible
  498. this.NavNext = function(index)
  499. {
  500. var focusItem;
  501. while (1)
  502. {
  503. var focusName = 'Item'+index;
  504. focusItem = document.getElementById(focusName);
  505. if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
  506. {
  507. break;
  508. }
  509. else if (!focusItem) // last element
  510. {
  511. break;
  512. }
  513. focusItem=null;
  514. index++;
  515. }
  516. return focusItem;
  517. }
  518. this.NavPrev = function(index)
  519. {
  520. var focusItem;
  521. while (1)
  522. {
  523. var focusName = 'Item'+index;
  524. focusItem = document.getElementById(focusName);
  525. if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
  526. {
  527. break;
  528. }
  529. else if (!focusItem) // last element
  530. {
  531. break;
  532. }
  533. focusItem=null;
  534. index--;
  535. }
  536. return focusItem;
  537. }
  538. this.ProcessKeys = function(e)
  539. {
  540. if (e.type == "keydown")
  541. {
  542. this.repeatOn = false;
  543. this.lastKey = e.keyCode;
  544. }
  545. else if (e.type == "keypress")
  546. {
  547. if (!this.repeatOn)
  548. {
  549. if (this.lastKey) this.repeatOn = true;
  550. return false; // ignore first keypress after keydown
  551. }
  552. }
  553. else if (e.type == "keyup")
  554. {
  555. this.lastKey = 0;
  556. this.repeatOn = false;
  557. }
  558. return this.lastKey!=0;
  559. }
  560. this.Nav = function(evt,itemIndex)
  561. {
  562. var e = (evt) ? evt : window.event; // for IE
  563. if (e.keyCode==13) return true;
  564. if (!this.ProcessKeys(e)) return false;
  565. if (this.lastKey==38) // Up
  566. {
  567. var newIndex = itemIndex-1;
  568. var focusItem = this.NavPrev(newIndex);
  569. if (focusItem)
  570. {
  571. var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
  572. if (child && child.style.display == 'block') // children visible
  573. {
  574. var n=0;
  575. var tmpElem;
  576. while (1) // search for last child
  577. {
  578. tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
  579. if (tmpElem)
  580. {
  581. focusItem = tmpElem;
  582. }
  583. else // found it!
  584. {
  585. break;
  586. }
  587. n++;
  588. }
  589. }
  590. }
  591. if (focusItem)
  592. {
  593. focusItem.focus();
  594. }
  595. else // return focus to search field
  596. {
  597. parent.document.getElementById("MSearchField").focus();
  598. }
  599. }
  600. else if (this.lastKey==40) // Down
  601. {
  602. var newIndex = itemIndex+1;
  603. var focusItem;
  604. var item = document.getElementById('Item'+itemIndex);
  605. var elem = this.FindChildElement(item.parentNode.parentNode.id);
  606. if (elem && elem.style.display == 'block') // children visible
  607. {
  608. focusItem = document.getElementById('Item'+itemIndex+'_c0');
  609. }
  610. if (!focusItem) focusItem = this.NavNext(newIndex);
  611. if (focusItem) focusItem.focus();
  612. }
  613. else if (this.lastKey==39) // Right
  614. {
  615. var item = document.getElementById('Item'+itemIndex);
  616. var elem = this.FindChildElement(item.parentNode.parentNode.id);
  617. if (elem) elem.style.display = 'block';
  618. }
  619. else if (this.lastKey==37) // Left
  620. {
  621. var item = document.getElementById('Item'+itemIndex);
  622. var elem = this.FindChildElement(item.parentNode.parentNode.id);
  623. if (elem) elem.style.display = 'none';
  624. }
  625. else if (this.lastKey==27) // Escape
  626. {
  627. parent.searchBox.CloseResultsWindow();
  628. parent.document.getElementById("MSearchField").focus();
  629. }
  630. else if (this.lastKey==13) // Enter
  631. {
  632. return true;
  633. }
  634. return false;
  635. }
  636. this.NavChild = function(evt,itemIndex,childIndex)
  637. {
  638. var e = (evt) ? evt : window.event; // for IE
  639. if (e.keyCode==13) return true;
  640. if (!this.ProcessKeys(e)) return false;
  641. if (this.lastKey==38) // Up
  642. {
  643. if (childIndex>0)
  644. {
  645. var newIndex = childIndex-1;
  646. document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
  647. }
  648. else // already at first child, jump to parent
  649. {
  650. document.getElementById('Item'+itemIndex).focus();
  651. }
  652. }
  653. else if (this.lastKey==40) // Down
  654. {
  655. var newIndex = childIndex+1;
  656. var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
  657. if (!elem) // last child, jump to parent next parent
  658. {
  659. elem = this.NavNext(itemIndex+1);
  660. }
  661. if (elem)
  662. {
  663. elem.focus();
  664. }
  665. }
  666. else if (this.lastKey==27) // Escape
  667. {
  668. parent.searchBox.CloseResultsWindow();
  669. parent.document.getElementById("MSearchField").focus();
  670. }
  671. else if (this.lastKey==13) // Enter
  672. {
  673. return true;
  674. }
  675. return false;
  676. }
  677. }
  678. function setKeyActions(elem,action)
  679. {
  680. elem.setAttribute('onkeydown',action);
  681. elem.setAttribute('onkeypress',action);
  682. elem.setAttribute('onkeyup',action);
  683. }
  684. function setClassAttr(elem,attr)
  685. {
  686. elem.setAttribute('class',attr);
  687. elem.setAttribute('className',attr);
  688. }
  689. function createResults()
  690. {
  691. var results = document.getElementById("SRResults");
  692. for (var e=0; e<searchData.length; e++)
  693. {
  694. var id = searchData[e][0];
  695. var srResult = document.createElement('div');
  696. srResult.setAttribute('id','SR_'+id);
  697. setClassAttr(srResult,'SRResult');
  698. var srEntry = document.createElement('div');
  699. setClassAttr(srEntry,'SREntry');
  700. var srLink = document.createElement('a');
  701. srLink.setAttribute('id','Item'+e);
  702. setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
  703. setClassAttr(srLink,'SRSymbol');
  704. srLink.innerHTML = searchData[e][1][0];
  705. srEntry.appendChild(srLink);
  706. if (searchData[e][1].length==2) // single result
  707. {
  708. srLink.setAttribute('href',searchData[e][1][1][0]);
  709. if (searchData[e][1][1][1])
  710. {
  711. srLink.setAttribute('target','_parent');
  712. }
  713. var srScope = document.createElement('span');
  714. setClassAttr(srScope,'SRScope');
  715. srScope.innerHTML = searchData[e][1][1][2];
  716. srEntry.appendChild(srScope);
  717. }
  718. else // multiple results
  719. {
  720. srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
  721. var srChildren = document.createElement('div');
  722. setClassAttr(srChildren,'SRChildren');
  723. for (var c=0; c<searchData[e][1].length-1; c++)
  724. {
  725. var srChild = document.createElement('a');
  726. srChild.setAttribute('id','Item'+e+'_c'+c);
  727. setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
  728. setClassAttr(srChild,'SRScope');
  729. srChild.setAttribute('href',searchData[e][1][c+1][0]);
  730. if (searchData[e][1][c+1][1])
  731. {
  732. srChild.setAttribute('target','_parent');
  733. }
  734. srChild.innerHTML = searchData[e][1][c+1][2];
  735. srChildren.appendChild(srChild);
  736. }
  737. srEntry.appendChild(srChildren);
  738. }
  739. srResult.appendChild(srEntry);
  740. results.appendChild(srResult);
  741. }
  742. }