
function postSearch(url)
{
  var inputElement;
  if (inputElement = document.getElementById("searchInput"))
  {
    if (trim(inputElement.value) != "")
    {
      window.location.replace(url + "/?q="+inputElement.value);
    }
  }
}

function goTo(url)
{
  if (url != "")
  {
    window.location.replace(url);
  }
}

function trim(str)
{
  return str.replace(/^\s*|\s*$/g,"");
}