function doSearchClick(searchBoxId, searchFormContainerId, searchPageId)
{
  if ((typeof(document) == "undefined") || (typeof(document.getElementById) == "undefined") || (typeof(document.getElementsByTagName) == "undefined"))
  {
    alert("Your browser offers insufficient DOM support for this function, you will be sent to the search page");
    return true; // insufficient DOM support, let browser handle click
  }

  if ((typeof(searchBoxId) == "undefined") || (typeof(searchFormContainerId) == "undefined") || (typeof(searchPageId) == "undefined"))
    return true; // missing required parameters, let browser handle click

  var searchBox = document.getElementById(searchBoxId);
  if (searchBox == null)
    return true; // could not find search box, let browser handle click

  var searchFormContainer = document.getElementById(searchFormContainerId);
  if (searchFormContainer == null)
    return true; // could not find search form container, let browser handle click

  var forms = searchFormContainer.getElementsByTagName('form');
  if ((forms == null) || (forms.length == 0))
    return true; // could not find any forms, let browser handle click

  var searchForm = forms[0];
  var inputs = searchForm.getElementsByTagName('input');
  if ((inputs == null) || (inputs.length == 0))
    return true; // form does not contain any inputs, let browser handle click

  var searchField = null;
  for (var i=0; i<inputs.length; i++)
  {
    var inp = inputs[i];
    if (inp.name == "keyword")
      searchField = inp;
    if (inp.name == "id")
      inp.value = searchPageId;
  }

  if (searchField == null)
    return true; // could not find search field, let browser handle click

  searchField.value = searchBox.value;
  searchForm.submit();

  return false;
}

