function errorMsg(name,ext,cat)  {
  f=document.createElement("form");
  f.setAttribute("name","installform");
  f.setAttribute("method","post");
  f.setAttribute("action","http://mycroft.mozdev.org/error.html");
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","name");
  fe.setAttribute("value",name);
  f.appendChild(fe);
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","ext");
  fe.setAttribute("value",ext);
  f.appendChild(fe);
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","cat");
  fe.setAttribute("value",cat);
  f.appendChild(fe);
  document.getElementsByTagName("body")[0].appendChild(f);
  if (document.installform) {
    document.installform.submit();
  }  else  {
    //hack for DOM-incompatible browsers
    location.href="http://mycroft.mozdev.org/error.html";
  }
}
	
function addEngine(name,ext,cat)   {
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))   {
    window.sidebar.addSearchEngine(
      "http://hacks.atrus.org/RIAA_Radar/mycroft/"+name+".src",
      "http://hacks.atrus.org/RIAA_Radar/mycroft/"+name+"."+ext,
      name,
      cat );
  }  else  {
    errorMsg(name,ext,cat);
  }
}
