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, target, attrs) { var html = ""; if (type == 1 || type == 100) { // 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) { if (null != attrs && attrs != "") { // show as popup html += "
" + link_text + "" + frontpage_spot_after_link; } else { // show as normal link html += "
" + link_text + "" + frontpage_spot_after_link; } } html += frontpage_spot_finish; } else if (type == 2) { // right spot with its own formatting html = right_spot_before_icon + icon + right_spot_before_title + title + right_spot_before_content + right_spot_spacer_row + content + right_spot_finish; } else if (type == 3) { // picture spot html = right_spot_before_icon + icon + right_spot_before_title + title + right_spot_before_content + content + right_spot_finish; } else if (type == 1000) { // static right spot - no formatting of its own html = right_spot_before_icon + icon + right_spot_before_title + title + right_spot_before_content + right_spot_spacer_row; html += "
"; html += content; html += ""; if (null != link_text && null != link_url) { html += "
" + link_text + "";// + frontpage_spot_after_link; } html += "
"; html += right_spot_spacer_row; html += right_spot_finish; } else { html = ""; } 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 displayENews() { window.open('/webcm/list4domv2.nsf/Login?OpenForm', 'enews', 'width=500,height=475,scrollbars=yes'); return false; } function displaySitemapEntry(primary_menuitem, secondary_menuitems, menuitem_structure) { document.write("
"); document.write(primary_menuitem); document.write("
"); document.write(secondary_menuitems); document.write("
"); } 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 noQuerySpecified() { // declarations var results_div = getDocumentElement(SEARCH_RESULTS_DIV); // clear previous results results_div.innerHTML = ""; results_div.innerHTML = "No query specified - search aborted..."; } /* * 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); if (null == results_div) return; // 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 var html = "

"; html += ""; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
"; html += " Search results"; html += " "; html += "
"; html += " "; html += " "; html += " " + info.getCount() + " search results for: " + info.getQuery(); html += " "; html += "
"; results_div.innerHTML = html; } else { // show results var html = "

"; html += ""; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; for (var i=0; i < results.length; i++) { var r = results[i]; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; } html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
"; html += " Search results"; html += " "; html += "
"; html += " "; html += " "; html += " " + info.getCount() + " search results for: " + info.getQuery(); html += " "; html += "
"; html += "
"; html += (i + 1); html += " "; html += " " + r.getTitle() + ""; if (r.getAbstract() != "") { html += "
"; html += r.getAbstract(); } html += "
"; html += "
"; html += "
"; if (info.hasPrevPage()) { html += 'Prev    '; } if (info.hasNextPage()) { html += 'Next'; } html += " "; html += "
"; results_div.innerHTML = html; } } /* * This method takes care of displaying the secondary menu if the customer is using * the subform menu (JJ-style). * - results: the secondary menu printed to the document */ function showSecondaryMenu(key_arg, use_cookies) { try { var function_name = null; var key = null; var key_m0 = null; var key_restrict = null; var a = null; var start = -1; var stop = -1; // look in URL - start with the m0 argument var url = document.location.href.toLowerCase(); start = url.indexOf("&m0="); if (start > 0) { stop = url.indexOf("&", start+4); if (stop > -1) { key_m0 = url.substring(start + 4, stop); } else { key_m0 = url.substring(start + 4); } key_m0 = key_m0.toUpperCase(); } // 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(); } if (key_arg == '') { // since key_m0 is the default we store it in 'key' key = key_m0; } else { // use supplied key key = key_arg; } if (use_cookies) { key = getCookieValue(); } // 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) { var found_lookup = new Array(); var count = 1; var found_a = secondary_lookup.getNo(key, count++); while ( null != found_a ) { found_lookup[found_lookup.length] = found_a; found_a = secondary_lookup.getNo(key, count++); } if (found_lookup.length > 1){ if (key_m0 != null && key_m0 != "") { for (var i=0; i -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 -1) { stop = cookie_value.indexOf(";", start+3); if (stop > -1) { key = cookie_value.substring(start + 3, stop); } else { key = cookie_value.substring(start + 3); } } return key; } /* function showSecondaryMenu(key_arg, use_cookies) { try { var function_name = null; var curdoc = new CurrentDocument(key_arg); alert(curdoc.getMenuItemTitle()); var keys = new Array(); var value = ""; while ( null != (value = curdoc.backtrackHierarchy()) ) { keys[keys.length] = value; } for (var i=0; i