+function show_details()
+{
+ if (xfetchDetails.readyState != 4)
+ return;
+ var xml = xfetchDetails.responseXML;
+ var error = xml.getElementsByTagName("error");
+ if (error[0])
+ {
+ var msg = error[0].childNodes[0].nodeValue;
+ alert(msg);
+ location = "?";
+ return;
+ }
+
+ // This is some ugly display code. Replace with your own ting o'beauty
+
+ var idn = xml.getElementsByTagName('recid');
+ if (!idn[0])
+ return;
+ var id = idn[0].childNodes[0].nodeValue;
+ cur_id = id;
+ cur_rec = xml;
+
+ var body = document.getElementById('rec_' + id);
+ if (!body)
+ return;
+ paint_details(body, xml);
+}
+
+function hyperlink_search(field, obj)
+{
+ var term = obj.getAttribute('term');
+ var queryfield = document.getElementById('query');
+ queryfield.value = field + '=' + term;
+ start_search();
+}
+