var frontpage_spot_before_icon = "
"; var frontpage_spot_content_table = ""; var frontpage_spot_finish = "
"; var frontpage_spot_before_content = "
"; var frontpage_spot_before_link = "
"; var frontpage_spot_after_link = "
"; var right_spot_before_icon = "
"; var right_spot_spacer_row = ""; var right_spot_finish = "
"; var right_spot_before_content = "
"; function getSpotHTML(type, title, icon, link_text, link_url, content) { var html = ""; if (type == 1) { // frontpage, small spot html = frontpage_spot_before_icon + icon + frontpage_spot_before_title + title + frontpage_spot_before_content + frontpage_spot_content_table + content; if (null != link_text && null != link_url) { html += "
" + link_text + "" + frontpage_spot_after_link; } html += frontpage_spot_finish; } else if (type == 2) { html = right_spot_before_icon + icon + right_spot_before_title + title + right_spot_before_content + right_spot_spacer_row + content + right_spot_finish; } else { html = right_spot_before_icon + icon + right_spot_before_title + title + right_spot_before_content + content + right_spot_finish; } return html; } function noDocumentsFound(name) { var view = document.getElementById('$$ViewBody_EmptyView'); var no_documents = true; if (view.style.visibility == 'hidden') { no_documents = false; } if (no_documents == true) { if (name == "htmlAllReferences") { view.innerHTML = "No references found..."; } } } function displayPrinterFriendly(url) { window.open(url, "webcm_printer_friendly", "height=300,width=600,resizable=yes,scrollbars=yes"); } function displayEmailFriend(url) { window.open(url, "webcm_email_friend", "height=300,width=450,resizable=no,scrollbars=no"); } function displaySitemapEntry(primary_menuitem, secondary_menuitems, menuitem_structure) { document.write("
"); document.write(primary_menuitem); document.write("
"); document.write(secondary_menuitems); document.write("
"); } /* * This is the only method the client should need to change. The method * controls the way the results are displayed to the user. * - results: an array of SearchResult objects * - info: a ResultSetInfo object with information about the query, number of results etc. */ function presentResults(results, info) { // declarations var results_div = document.getElementById(SEARCH_RESULTS_DIV); // clear previous results results_div.innerHTML = ""; // what to present if (null == results) { // some error occured results_div.innerHTML = "Some error occured while searching - we appologize for any inconvenience this may cause..."; } else if (results.length == 0) { // no results results_div.innerHTML = "No results found - we're sorry..."; } else { // show results results_div.innerHTML = "Your search for '" + info.getQuery() + "' gave " + info.getCount() + " results.
Now showing result " + info.getStart() + " to " + info.getStop() + " (page " + info.getPage() + " of " + info.getPages() + ")

"; if (info.hasPrevPage()) { results_div.innerHTML = results_div.innerHTML + 'Previous Page  '; } if (info.hasNextPage()) { results_div.innerHTML = results_div.innerHTML + 'Next Page'; } results_div.innerHTML = results_div.innerHTML + '

'; for (var i=0; i' + r.getTitle() + '
' + r.getAbstract() + '
'; results_div.innerHTML = results_div.innerHTML + entry; } results_div.innerHTML = results_div.innerHTML + '

'; if (info.hasPrevPage()) { results_div.innerHTML = results_div.innerHTML + 'Previous Page  '; } if (info.hasNextPage()) { results_div.innerHTML = results_div.innerHTML + 'Next Page'; } } } function selectMenuItem(key) { try { // see if we can find the object on the page var obj = document.getElementById(key + "_LINK"); if (obj) { // change the CSS class of item obj.className = obj.className + "_active"; // expand the menu showMenuItems(key); } } catch (exception) { window.status = "Error in routine 'selectMenuItem': " + exception.message; } } function showPrimaryMenu() { try { for (var i=0; i'; m_html += m.getName() + ' | '; document.write(m_html); } } catch (exception) { } } function xxx_showSecondaryMenu(key_arg, use_cookies) { try { var function_name = null; var curdoc = new CurrentDocument(key_arg); curdoc.getMenuItemTitle(); var keys = new Array(); var value = ""; while ( null != (value = curdoc.backtrackHierarchy()) ) { keys[keys.length] = value; } // get the main menu function function_name = keys[keys.length - 1]; // run the main secondary menu function try { eval("x" + function_name + "()"); } catch (exception) { } // expand menu if applicable for (var i=0; i 0) { stop = url.indexOf("&", start+4); if (stop > -1) { key_m0 = url.substring(start + 4, stop); } else { key_m0 = url.substring(start + 4); } // since key_m0 is the default we store it in 'key' key = key_m0; } // look for restricttocategory start = url.indexOf("&restricttocategory="); if (start > 0) { stop = url.indexOf("&", start+20); if (stop > -1) { key_restrict = url.substring(start + 20, stop); } else { key_restrict = url.substring(start + 20); } key_restrict = key_restrict.toUpperCase(); } } else { // use supplied key key = key_arg; } // convert the key to upper case try { key = key.toUpperCase(); } catch (exception) { key = key_restrict.toUpperCase(); } // lookup in hashtable a = secondary_lookup.get(key); if (a == null) { // unable to locate a hashtable entry - if we have a key_restrict try that one if (key_restrict != null) { a = secondary_lookup.get(key_restrict); if (a == null) return; } else { return; } } // get the main menu function function_name = a[0]; // run the main secondary menu function try { eval("x" + function_name + "()"); } catch (exception) { } if (use_cookies) { var cookie_value = document.cookie; start = cookie_value.indexOf("m0="); if (start > -1) { stop = cookie_value.indexOf(";", start+3); if (stop > -1) { key = cookie_value.substring(start + 3, stop); } else { key = cookie_value.substring(start + 3); } selectMenuItem(key); } } // expand menu if applicable for (var i=0; i