bug fixes after testing
[Evergreen.git] / Open-ILS / src / extras / opensearchportal.html
1 <html>
2         <head>
3                 <title>mikers experimental opensearch portal</title>
4                 <style>
5
6 * {
7         font-family: verdana,arial,helvetica,sans-serif;
8         font-size: small;
9 }
10
11 #result_sources a {
12         font-size: 8px;
13         color: grey;
14         text-decoration: none;
15 }
16
17 td {
18         vertical-align: top;
19 }
20
21 caption {
22         border: solid black 1px;
23 }
24
25 .header {
26         border: solid lightblue 1px;
27         background-color: lightblue;
28 }
29
30 a {
31         color: blue;
32         text-decoration: none;
33 }
34
35 a:hover {
36         color: blue;
37         text-decoration: underline;
38 }
39
40 a:active {
41         color: red;
42         text-decoration: underline;
43 }
44
45 a:visited {
46         color: blue;
47         text-decoration: none;
48 }
49
50 .title_link {
51         font-size: medium;
52         font-weight: bold;
53 }
54
55 .desc_text {
56         font-size: small;
57 }
58
59 .hide {
60         color: lightgray;
61 }
62
63 .col_tab {
64         border-collapse: collapse;
65         border: solid gray 1px;
66 }
67
68 .res_table {
69         border-collapse: collapse;
70 }
71
72 #col_res {
73         max-width: 300px !important;
74         min-width: 200px !important;
75 }
76
77 #int_res {
78         max-width: 100% !important;
79 }
80
81 #int_res_hide {
82         max-width: 100% !important;
83         min-width: 400px !important;
84 }
85
86 .res_tr {
87         border-bottom: 1px dashed darkgrey;
88 }
89
90 .noshow {
91         display: none;
92         visibility: hidden;
93 }
94
95                 </style>
96                 <script>
97
98 var isIE = false;
99
100 function create_requestor () {
101         var req;
102         try { 
103                 req = new ActiveXObject("Msxml2.XMLHTTP");
104                 isIE = true;
105         } catch (e) {
106                 try { 
107                         req = new ActiveXObject("Microsoft.XMLHTTP");
108                         isIE = true;
109                 } catch (E) {
110                         req = false;
111                 }
112         }
113
114         if (!req && typeof XMLHttpRequest!='undefined') {
115                 req = new XMLHttpRequest();
116         }
117         
118         if(!req) {
119                 alert("NEEDS NEWER JAVASCRIPT for XMLHTTPRequest()");
120                 return null;
121         }
122
123         return req;
124 }
125
126 var proxy = 'http://gapines.org/opensearch/?fetch=';
127
128 var insearch=false;
129
130 var images = [];
131 var search_templates = [];
132 var search_urls = {};
133 var rel_scales = {};
134
135 var current_startPage = 1;
136 var current_startIndex = 1;
137 var current_count = 5;
138
139 function opensearch ( term, reset, single_source ) {
140
141
142         if (reset) {
143                 current_startPage = 1;
144                 rel_scales = {};
145         }
146
147         if (single_source) {
148
149                 create_search(single_source);
150                 var turi = search_templates[single_source].replace(/\{searchTerms\}/,encodeURIComponent(term));
151                 turi = turi.replace(/\{startPage\}/,current_startPage);
152                 turi = turi.replace(/\{startIndex\}/,current_startIndex);
153                 turi = turi.replace(/\{count\}/,current_count);
154                 turi = turi.replace(/\{relevanceScale}/,'0');
155                 search_urls[single_source] = proxy + encodeURIComponent(turi);
156
157                 rel_scales
158                 var cur_src = document.getElementById('result_sources');
159                 for (var i = 1; i < cur_src.childNodes.length; i++) {
160                         if (cur_src.childNodes[i].nodeValue == turi)
161                                 return;
162                 }
163                 cur_src.innerHTML += '<a name="' + single_source + '" href="' + turi + '">' + turi + '</a><br>';
164                 perform_search(single_source);
165                 return;
166         }
167
168         document.getElementById('next_button').className = 'hide';
169
170         if (current_startPage == 1)
171                 document.getElementById('prev_button').className = 'hide';
172         else 
173                 document.getElementById('prev_button').className = '';
174
175         var tot = document.getElementById('total');
176         while (tot.lastChild)
177                         tot.removeChild(tot.lastChild);
178
179         var src = document.getElementById('result_sources');
180         while (src.lastChild)
181                         src.removeChild(src.lastChild);
182
183         document.getElementById('int_res_hide').className = 'noshow';
184         document.getElementById('col_res_hide').className = 'noshow';
185
186         var tab = document.getElementById('int_res');
187         while (tab.lastChild)
188                         tab.removeChild(tab.lastChild);
189
190         tab = document.getElementById('col_res');
191         while (tab.lastChild)
192                         tab.removeChild(tab.lastChild);
193
194         search_count = 0;
195
196         var sources = new Array();
197         var selector = document.getElementsByName('source');
198         for (var i = 0; i < selector.length; i++) {
199                 if (selector[i].checked) {
200                         sources.push(selector[i].value);
201                 }
202         }
203
204         search_templates = [];
205         for (var i in sources) {
206                 create_search( sources[i] );
207         }
208
209         current_startIndex = (current_count * (current_startPage - 1)) + 1; 
210
211         search_urls = [];
212         for (var i in search_templates) {
213                 if (!search_templates[i])
214                         continue;
215
216                 if (!rel_scales[i])
217                         rel_scales[i] = 0;
218
219                 var url = search_templates[i].replace(/\{searchTerms\}/,encodeURIComponent(term));
220                 url = url.replace(/\{startPage\}/,current_startPage);
221                 url = url.replace(/\{startIndex\}/,current_startIndex);
222                 url = url.replace(/\{count\}/,current_count);
223                 url = url.replace(/\{relevanceScale}/,rel_scales[i]);
224                 search_urls[i] = proxy + encodeURIComponent(url);
225
226                 src.innerHTML += '<a name="' + i + '" href="' + url + '">' + url + '</a><br>';
227         }
228
229         for (var i in search_urls) {
230                 if (!search_templates[i])
231                         continue;
232
233                 perform_search(i);
234         }
235
236         document.getElementById('page_label').innerHTML = current_startPage;
237 }
238
239 function perform_search ( source ) {
240         var req = create_requestor();
241
242         var func = function () {
243                 if (req.readyState != 4)
244                         return;
245
246                 var xml = req.responseXML;
247
248                 var desc  = getElementTextNS('','description',xml,0);
249                 var xml_link  = getElementTextNS('','link',xml,0);
250
251                 var total  = getElementFloatNS('openSearch','totalResults',xml,0);
252                 var integratible = (getElementNS('openIll','relevance',xml,0) != null);
253                 var scale = getElementFloatNS('openIll','relevanceScale',xml,0);
254
255                 rel_scales[source]  = scale;
256                 
257                 var tot = document.getElementById('total');
258                 var current_tot = 0;
259                 if (tot.childNodes.length)
260                         current_tot = parseFloat(tot.childNodes[0].nodeValue);
261
262                 var res_type = document.getElementById('res_type');
263
264                 if (res_type.options[res_type.selectedIndex].value == 'col')
265                         integratible = 0;
266
267                 if (!current_tot)
268                         current_tot = 0;
269
270                 if (total > (current_startPage * current_count))
271                         document.getElementById('next_button').className = '';
272
273                 current_tot += total
274                 tot.innerHTML = current_tot;
275
276                 var list = xml.getElementsByTagName('item');
277                 for (var i = 0; i < list.length; i++) {
278
279                         if ( typeof list[i] != 'object')
280                                         continue;
281
282                         var tab;
283                         if (!integratible) {
284
285                                 tab = document.getElementById('col_res');
286                                 document.getElementById('col_res_hide').className = '';
287
288                                 var col = document.getElementById(encodeURI(source));
289                                 if (col) {
290                                         if (col.nodeName != 'TABLE')
291                                                 col = null;
292                                 }
293
294                                 if (!col) {
295                                         var row = tab.rows[0];
296                                         if (!row)
297                                                 row = tab.insertRow(0);
298
299                                         col = document.createElement('td');
300                                         row.appendChild(col);
301
302                                         tab = document.createElement('table');
303                                         tab.id = encodeURI(source);
304                                         tab.name = encodeURI(source);
305                                         tab.setAttribute('id',encodeURI(source));
306                                         tab.setAttribute('name',encodeURI(source));
307
308                                         tab.setAttribute('valign','top');
309                                         tab.className ='col_tab';
310
311                                         if(!isIE) {
312                                                 var cap = document.createElement('caption');
313                                                 tab.appendChild(cap);
314                                                 cap.innerHTML = desc + ' -- <a href="' + xml_link + '">XML</a>';
315                                         }
316
317                                         col.appendChild(tab);
318
319                                         var per = parseInt(100 / (search_urls.length * 2)) - 1;
320                                         col.setAttribute('valign','top');
321                                         col.setAttribute('width', + per + '%');
322
323                                 } else {
324                                         tab = col;
325                                 }
326                         } else {
327                                 tab = document.getElementById('int_res');
328                                 document.getElementById('int_res_hide').className = '';
329                         }
330
331                         if (tab.nodeName != 'TABLE')
332                                 alert(tab.href);
333
334                         if (!tab.rows || !tab.rows.length) {
335                                 add_result_row(tab, 0, list[i], source);
336                         } else {
337                                 for (var j = 0; j < tab.rows.length; j++) {
338                                         if ( typeof tab.rows[j] != 'object')
339                                                 continue;
340
341                                         var rank;
342                                         try {
343                                                 rank = getElementFloatNS('openIll','relevance',list[i],0);
344                                         } catch (e) {
345                                                 alert("error getting float relevance: " + e);
346                                                 rank = 0;
347                                         }
348
349                                         var curr_rank;
350                                         if (tab.rows[j] && tab.rows[j].firstChild && tab.rows[j].firstChild.firstChild) {
351                                                 if (tab.rows[j].firstChild.firstChild.childNodes.length)
352                                                         curr_rank = parseFloat(tab.rows[j].firstChild.firstChild.childNodes[0].nodeValue);
353                                         } else {
354                                                 curr_rank = 0.0;
355                                         }
356
357                                         if ( rank < curr_rank ) {
358                                                 if ( (j + 1) == tab.rows.length) {
359                                                         add_result_row(tab, tab.rows.length, list[i], source);
360                                                         break
361                                                 }
362                                                 continue;
363                                         }
364                                         add_result_row(tab, j, list[i], source);
365                                         break;
366                                 }
367                         }
368                 }
369         };
370
371         req.onreadystatechange = func;
372         req.open('GET', proxy + encodeURIComponent(search_urls[source]), true);
373         req.send(null);
374 }
375
376
377 // retrieve float of an XML document element, including
378 // elements using namespaces
379 function getElementFloatNS(prefix, local, parentElem, index) {
380     var result = getElementNS(prefix, local, parentElem, index);
381     if (result) {
382         // get text, accounting for possible
383         // whitespace (carriage return) text nodes 
384         if (result.childNodes.length > 1) {
385             return parseFloat(result.childNodes[1].nodeValue);
386         } else {
387             return parseFloat(result.childNodes[0].nodeValue);                  
388         }
389     } else {
390         return 0;
391     }
392 }
393
394 function getElementNS(prefix, local, parentElem, index) {
395     var result = "";
396     if (prefix && isIE) {
397         // IE/Windows way of handling namespaces
398         return parentElem.getElementsByTagName(prefix + ":" + local)[index];
399     } else {
400         // the namespace versions of this method 
401         // (getElementsByTagNameNS()) operate
402         // differently in Safari and Mozilla, but both
403         // return value with just local name, provided 
404         // there aren't conflicts with non-namespace element
405         // names
406         return parentElem.getElementsByTagName(local)[index];
407     }
408 }
409
410 // retrieve text of an XML document element, including
411 // elements using namespaces
412 function getElementTextNS(prefix, local, parentElem, index) {
413     var result = getElementNS(prefix, local, parentElem, index);
414     if (result) {
415         // get text, accounting for possible
416         // whitespace (carriage return) text nodes 
417         if (result.childNodes.length > 1) {
418             return result.childNodes[1].nodeValue;
419         } else {
420             return result.firstChild.nodeValue;                 
421         }
422     } else {
423         return '';
424     }
425 }
426
427 function add_result_row (tab, index, xml, source) {
428         var img = images[source];
429         var rank,title,tlink,desc;
430
431         try {
432                 rank = getElementFloatNS('openIll','relevance',xml,0);
433         } catch (e) {
434                 alert("error getting relevance: " + e);
435                 rank = '0';
436         }
437         
438         try {
439                 title = getElementTextNS('','title',xml,0);
440         } catch (e) {
441                 title = '';
442         }
443         
444         try {
445                 tlink = getElementTextNS('','link',xml,0);
446         } catch (e) {
447                 tlink = '';
448         }
449
450         try {
451                 description = getElementTextNS('','description',xml,0);
452         } catch (e) {
453                 description = '';
454         }
455
456         var row = tab.insertRow(index);
457
458         row.name = encodeURI(source);
459         row.setAttribute('name',encodeURI(source));
460         row.className = 'res_tr';
461
462         var c1 = row.insertCell(0);
463         c1.style.padding = "4px";
464
465         var d1 = document.createElement('div');
466         d1.style.display = "none";
467         d1.style.visibility = "hidden";
468         d1.appendChild(document.createTextNode(rank));
469
470         c1.appendChild(d1);
471
472         var s1 = document.createElement('span');
473         s1.className='title_link';
474
475         var a1 = document.createElement('a');
476         a1.href=tlink;
477         a1.appendChild(document.createTextNode(title));
478
479         s1.appendChild(a1);
480         c1.appendChild(s1);
481         c1.appendChild(document.createElement('br'));
482         
483         var s2 = document.createElement('span');
484         s2.className='desc_text';
485         s2.innerHTML = description;
486
487         c1.appendChild(s2);
488
489         var c2 = row.insertCell(1);
490         
491         var i1 = document.createElement('img');
492         i1.title= parseInt(rank) + '% Relevant';
493         i1.src=img;
494         i1.setAttribute('width','32');
495         i1.setAttribute('height','32');
496         i1.width=32;
497         i1.height=32;
498
499         c2.appendChild(i1);
500 }
501
502 function create_search ( s ) {
503         var req = create_requestor();
504
505
506         req.open('GET',proxy +  encodeURIComponent(s),false);
507         req.send(null);
508
509         try {
510                 var xml = req.responseXML;
511                 var u = xml.getElementsByTagName('Url');
512                 if (u.length)
513                         search_templates[s] = u[0].childNodes[0].nodeValue;
514
515                 var i =  xml.getElementsByTagName('Image');
516                 if (i.length)
517                         images[s] = i[0].childNodes[0].nodeValue;
518
519                 return search_templates[s];
520         } catch (e) {
521                 alert('BAD XML!\n\n' + e + '\n\n' + req.responseText);
522                 search_templates[s] = null;
523                 images[s] = null;
524         }
525
526 }
527
528 function remove_by_name( src ) {
529         var list = document.getElementsByName(encodeURI(src));
530
531         var len = list.length;
532
533         while (list.length)
534                 list[0].parentNode.removeChild(list[0]);
535 }
536
537 function do_submit(evt) {
538         evt = (evt) ? evt : ((window.event) ? event : null);
539         var obj = (evt && evt.srcElement)? evt.srcElement : evt.target;
540         var code = grabCharCode(evt);
541         if(code==13||code==3) {
542                 insearch=true;
543                 opensearch(obj.form['term'].value, true);
544         }
545         return false;
546 }
547
548
549 function attach_listeners () {
550         for (var i in listening_elements) {
551                 if (document.firstChild.addEventListener)
552                         document.getElementById(listening_elements[i]).addEventListener('keydown',do_submit,true);
553                 else
554                         document.getElementById(listening_elements[i]).attachEvent('onkeydown',do_submit,true);
555         }
556 }
557
558 function grabCharCode(evt) {
559         evt = (evt) ? evt : ((window.event) ? event : null); /* for mozilla and IE */
560         if( evt ) {
561                 return (evt.charCode ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode ));
562         } else {
563                 return -1;
564         }
565 }
566
567 var listening_elements = ['term','gobutton','res_count_per','res_type'];
568
569                 </script>
570         </head>
571         <body onload="attach_listeners();">
572                 <br/>
573                 <form>
574                 <table style="border-collapse: collapse; margin: 5px;" width="100%">
575                         <tr style="border-bottom: dotted black 1px;" valign="top">
576                                 <td align="right">Keyword Search: </td>
577                                 <td align="left">
578                                         <input type="text" name="term" id="term" value="javascript"/>
579                                         <input type="button" id="gobutton" value="Go!" onclick="insearch=true; opensearch(document.getElementById('term').value, true); return false;"/>
580                                 </td>
581                                 <td align="left">Hits per Source for each page: 
582                                         <select onchange="current_count=this.options[this.selectedIndex].value;" id="res_count_per">
583                                                 <option value="5" selected>5</option>
584                                                 <option value="10">10</option>
585                                                 <option value="25">25</option>
586                                         </select>
587                                 </td>
588                                 <td align="left">Display style: 
589                                         <select id="res_type">
590                                                 <option value="int" selected>Merged Results</option>
591                                                 <option value="col">Separate Columns</option>
592                                         </select>
593                                 </td>
594                         </tr>
595                         <tr style="border-bottom: dotted black 1px;" valign="top">
596                                 <td align="right">Sources: </td>
597                                 <td colspan=3>
598                                         <table width="100%" style="border-collapse: collapse;">
599                                                 <tr>
600                                                         <td>
601                                                                 <label class="source_input">
602                                                                         <input
603                                                                                 onclick="
604                                                                                         if(insearch) {
605                                                                                                 if(this.checked) {
606                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
607                                                                                                 } else {
608                                                                                                         remove_by_name(this.value);
609                                                                                                 }
610                                                                                         }"
611                                                                                 name="source"
612                                                                                 type="checkbox"
613                                                                                 value="http://gapines.org/opensearch.xml"
614                                                                                 checked>GPLS Pines
615                                                                 </label>
616                                                         </td>
617                                                         <td>
618                                                                 <label class="source_input">
619                                                                         <input
620                                                                                 onclick="
621                                                                                         if(insearch) {
622                                                                                                 if(this.checked) {
623                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
624                                                                                                 } else {
625                                                                                                         remove_by_name(this.value);
626                                                                                                 }
627                                                                                         }"
628                                                                                 name="source"
629                                                                                 type="checkbox"
630                                                                                 value="http://search.athenscounty.lib.oh.us/cgi-bin/koha/opensearchdescription">NPL/Koha
631                                                                 </label>
632                                                         </td>
633                                                         <td>
634                                                                 <label class="source_input">
635                                                                         <input
636                                                                                 onclick="
637                                                                                         if(insearch) {
638                                                                                                 if(this.checked) {
639                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
640                                                                                                 } else {
641                                                                                                         remove_by_name(this.value);
642                                                                                                 }
643                                                                                         }"
644                                                                                 name="source"
645                                                                                 type="checkbox"
646                                                                                 value="http://www.koders.com/search/KodersSourceCodeSearchDescription.xml">Koders Source Code
647                                                                 </label>
648                                                         </td>
649                                                         <td>
650                                                 </tr>
651                                                 <tr>
652                                                         <td>
653                                                                 <label class="source_input">
654                                                                         <input
655                                                                                 onclick="
656                                                                                         if(insearch) {
657                                                                                                 if(this.checked) {
658                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
659                                                                                                 } else {
660                                                                                                         remove_by_name(this.value);
661                                                                                                 }
662                                                                                         }"
663                                                                                 name="source"
664                                                                                 type="checkbox"
665                                                                                 value="http://search.library.gatech.edu/opensearch/osdd-gil.xml"
666                                                                                 checked>GIL Universal Catalog
667                                                                 </label>
668                                                         </td>
669                                                         <td>
670                                                                 <label class="source_input">
671                                                                         <input
672                                                                                 onclick="
673                                                                                         if(insearch) {
674                                                                                                 if(this.checked) {
675                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
676                                                                                                 } else {
677                                                                                                         remove_by_name(this.value);
678                                                                                                 }
679                                                                                         }"
680                                                                                 name="source"
681                                                                                 type="checkbox"
682                                                                                 value="http://redlightgreen.com/ucwprod/web/opensearchDescription.xml">RedLightGreen
683                                                                 </label>
684                                                         </td>
685                                                         <td>
686                                                                 <label class="source_input">
687                                                                         <input
688                                                                                 onclick="
689                                                                                         if(insearch) {
690                                                                                                 if(this.checked) {
691                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
692                                                                                                 } else {
693                                                                                                         remove_by_name(this.value);
694                                                                                                 }
695                                                                                         }"
696                                                                                 name="source"
697                                                                                 type="checkbox"
698                                                                                 value="http://www.itpapers.com/itpaperssearchdescription.xml">ITPapers
699                                                                 </label>
700                                                         </td>
701                                         <!-- <input name="source" type="checkbox" value="http://www.webdevref.com/blog/opensearchdescription.xml">WebDefRef -->
702                                                 </tr>
703                                                 <tr>
704                                                         <td>
705                                                                 <label class="source_input">
706                                                                         <input
707                                                                                 onclick="
708                                                                                         if(insearch) {
709                                                                                                 if(this.checked) {
710                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
711                                                                                                 } else {
712                                                                                                         remove_by_name(this.value);
713                                                                                                 }
714                                                                                         }"
715                                                                                 name="source"
716                                                                                 checked
717                                                                                 type="checkbox"
718                                                                                 value="http://search.library.gatech.edu/opensearch/osdd.xml">Georgia Tech Catalog
719                                                                 </label>
720                                                         </td>
721                                                         <td>
722                                                                 <label class="source_input">
723                                                                         <input
724                                                                                 onclick="
725                                                                                         if(insearch) {
726                                                                                                 if(this.checked) {
727                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
728                                                                                                 } else {
729                                                                                                         remove_by_name(this.value);
730                                                                                                 }
731                                                                                         }"
732                                                                                 name="source"
733                                                                                 type="checkbox"
734                                                                                 value="http://cnx.rice.edu/content/opensearchdescription">rice.edu Connexions
735                                                                 </label>
736                                                         </td>
737                                                         <td>
738                                                                 <label class="source_input">
739                                                                         <input
740                                                                                 onclick="
741                                                                                         if(insearch) {
742                                                                                                 if(this.checked) {
743                                                                                                         opensearch(document.getElementById('term').value, false, this.value);
744                                                                                                 } else {
745                                                                                                         remove_by_name(this.value);
746                                                                                                 }
747                                                                                         }"
748                                                                                 name="source"
749                                                                                 type="checkbox"
750                                                                                 value="http://lib-cufts.lib.sfu.ca/CUFTS/opensearchjournal.xml">SFU CUFTS
751                                                                 </label>
752                                                         </td>
753                                                 </tr>
754                                         </table>
755                                 </td>
756                         </tr>
757                         <tr>
758                                 <td>Total results: </td>
759                                 <td colspan=2 id="total"></td>
760                         </tr>
761                         <tr>
762                                 <td>Current page: </td>
763                                 <td id="page_label"></td>
764                                 <td>
765                                         <button
766                                                 class='hide'
767                                                 id='prev_button'
768                                                 onclick="
769                                                         if (this.className != 'hide') {
770                                                                 current_startPage -= 1;
771                                                                 opensearch(document.getElementById('term').value);
772                                                         }
773                                                         return false;">Previous Page
774                                         </button> ...
775                                         <button
776                                                 class='hide'
777                                                 id='next_button'
778                                                 onclick="
779                                                         if (this.className != 'hide') {
780                                                                 current_startPage += 1;
781                                                                 opensearch(document.getElementById('term').value);
782                                                         }
783                                                         return false;">Next Page
784                                         </button>
785                                 </td>
786                         </tr>
787                 </table>
788                 </form>
789
790                 <hr/>
791                 <br/>
792                 <table id="results" width="100%">
793                         <tr>
794                                 <td id="int_res_hide" class="noshow" width="100%">
795                                         <table width="100%">
796                                                 <caption class="header">Merged search results</caption>
797                                                 <tr>
798                                                         <td width="100%">
799                                                                 <table id='int_res' class="res_table" width="100%"></table>
800                                                         </td>
801                                                 </tr>
802                                         </table>
803                                 </td>
804                                 <td id='col_res_hide' class="noshow">
805                                         <table>
806                                                 <caption class="header">Unranked search results</caption>
807                                                 <tr>
808                                                         <td>
809                                                                 <table id='col_res' class="res_table"></table>
810                                                         </td>
811                                                 </tr>
812                                         </table>
813                                 </td>
814                         </tr>
815                 </table>
816                 <div id="result_sources"></div>
817                 <br/>
818         </body>
819 </html>