function __changeSearch()
{
  var oSpan = document.getElementById("__searchDrop");
  // TODO: come up with a better term for this (this term is also used on search.aspx.cs)
  if (oSpan.innerHTML == "website")
  {
    oSpan.innerHTML = "products";
    document.getElementById("ctl00___txtSearchTypeHeader").value = "1";
  }
  else if (oSpan.innerHTML == "products")
  {
    oSpan.innerHTML = "website";
    document.getElementById("ctl00___txtSearchTypeHeader").value = "0";
  }
  else
  {
    oSpan.innerHTML = "products";
    document.getElementById("ctl00___txtSearchTypeHeader").value = "1";
  }
}

function __AJAXOptionSelected(li)
{
  document.getElementById("ctl00___txtSearchExtraHeader").value = "";
  document.getElementById("ctl00___txtSearchIDHeader").value = "";
  if (typeof(li) != "undefined")
  {
    // we used to have separate properties for stype and id, however browsers like FireFox are VERY HTML compliant and if
    //  those properties and not *real* properties, it will ignore them and not include them. so insead we combine them in the id
    // innerText does not work in FireFox and Opera
    if (document.all)
    {
      document.getElementById("ctl00___txtSearchHeader").value = li.innerText;
    }
    else
    {
      document.getElementById("ctl00___txtSearchHeader").value = li.textContent;
    }

    if (typeof(li.id) != "undefined")
    {
      var stype = li.id.substring(0, 1);
      var id = li.id.substring(1);
      document.getElementById("ctl00___txtSearchExtraHeader").value = stype;
      document.getElementById("ctl00___txtSearchIDHeader").value = id;
    }
  }

  // automatically fire off search
  document.getElementById('ctl00___btnSearch').click();
}
