function RenderSearchTabs(searchTabId, showImageTab, hasNews, hasImage, hasWeb) { var searchTab = document.getElementById(searchTabId); if (searchTab != 'undefined') { var searchType = getQueryVariable('st'); var searchTabContent = ''; searchTab.innerHTML = searchTabContent; searchTab.style.display = "block"; } } function BuildItem(searchType, title, itemText, hasResult) { var tabContent; if (hasResult) { tabContent = "
  • " + itemText + "
  • "; } else { tabContent = "
  • " + itemText + "
  • "; } return tabContent; } $(document).ready(function() { if (location.search.indexOf("\u0026st=1") == -1) { return; } var query = RemoveBad($("#q").val() || ""); if (query != "") { $.get("/proxy/proxy.asmx/GetWSString", { DestinationKey: "SearchRelatedTopic_API", Parameters: "entities" + query + "", Passkey: "" }, function(responseXML) { eval("bosun = " + $(responseXML).find('string').text()); var bumf = "The following topic pages collect all latest news about subjects related to your search on \"" + query + "\":"; if (bosun.Total > 1) { title = "Related topics"; } else if (bosun.Total == 1) { title = "Related topic"; } else { return; } $("#newsMAIN").prepend("

    " + title + "

    "); $.each(bosun.Topics, function(i, v) { if (i > 6) { return; } $("#newsMAIN #related_topics ul").append("
  • " + v.TopicName + "

  • "); }); } ); } }); //$(document).ready(function() { //var query = document.getElementById("q").value; //$("#breadcrumbs .item1").text("Search results for \"" + query + "\""); //});