<search function="nb">
  <name>NicheBot</name>
  <category>Search the Web</category>
  <contributor>Brent Beardsley</contributor>
  <link>http://www.nichebot.com/</link>
  <description>
  NicheBOT - Find what people are searching for based on your keywords
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td>/count</td><td> - </td><td>Specify the number of google results to look in (default: 100 - can also be specified in localprefs.js - see Preferences)</td></tr>
      <tr><td>/domain</td><td> - </td><td>Perform a Google keyword ranking for a given domain</td></tr>
	</table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td>nb search toolbar</td></tr>
      <tr><td>nb /d:dqsd.net search toolbar</td></tr>
      <tr><td>nb /c:1000 /d:dqsd.net search toolbar</td></tr>
    </table>
    <div class="helpboxDescLabels">Preferences: (define in localprefs.js)</div>
    <table class="helpboxDescTable">
      <tr><td>nbCount (Integer: default is 100) - specify the number of google results to look in</td></tr>
    </table>

  </description>
  <form name="nbf"
        method="get"
        action="http://www.nichebot.com/">
    <input type="hidden" name="term" value="" />
  </form>
  <form name="nbgrf"
        method="get"
        action="http://www.nichebot.com/ranking/">
    <input type="hidden" name="terms" value="" />
    <input type="hidden" name="address" value="" />
    <input type="hidden" name="search_phrase" value="noquotes" />
    <input type="hidden" name="maxresults" value="100" />
  </form>

  <script><![CDATA[
    function nb(q)
    {
      if( nullArgs("nb", q) )
        return;

	  var domain = "";
	  var count = (typeof nbCount != "undefined") ? nbCount : "100";

      var args = parseArgs(q, "count, domain");
      for (var i = 0; i < args.switches.length; i++) {
          sw = args.switches[i];
          switch(sw.name) {
			case 'domain': domain = sw.value; break;
			case 'count': count = sw.value; break;
		  }
	  }
	  if (domain != "") {
		  document.nbgrf.address.value = domain;
		  document.nbgrf.terms.value = args.q;
		  document.nbgrf.maxresults.value = count;
		  submitForm(nbgrf);
	  } else {
	      document.nbf.term.value = args.q;
	      submitForm(nbf);
	  }
    }
  ]]></script>
  <copyright>
    Copyright (c) 2004 Brent Beardsley; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
</search>
