<search function="cs">
  <COMMENT>

    Even though this XML search will probably load and is a good start
    toward a completed search, please be aware that this search will probably
    not work as is and will probably require some changes.

  </COMMENT>
  <name>Consumer Search</name>
  <category>Shopping</category>
  <contributor>Gregory Krohne</contributor>
  <link>http://www.consumersearch.com/www/search.html</link>
  <email>Gregory.Krohne@afrc.af.mil</email>
  <description>
  Search Consumer Search's meta-reviews of other reviews.
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td>/match:all</td><td> - </td><td>Search pages based on type of match. Use
        <div style="padding: 0 0 0 20px">
          /match:all - all search terms<br/>   
          /match:any - any search terms<br/>   
          /match:boolean - boolean match of terms
        </div> 
      </td></tr>
      <tr><td>/format</td><td> - </td><td>Search format to return. Use
        <div style="padding: 0 0 0 20px">
          /format:long - long form<br/>   
          /format:short - short form
        </div> 
      </td></tr>
      <tr><td>/sort</td><td> - </td><td>Order of pages returned. Use
        <div style="padding: 0 0 0 20px">
          /sort:relevancy - most relevant results first<br/>   
          /sort:date - newest results first<br/>   
          /sort:title - closest title matches first
        </div> 
      </td></tr>
    </table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td>cs /sort:date mutual funds</td></tr>
      <tr><td>cs washing machines /match:all /form:short</td></tr>
      <tr><td>cs TV and (DVD or VCR) /match:boolean</td></tr>
    </table>
  </description>
  <form name="csf"
        method="get"
        action="http://www.consumersearch.com/perl/htwrap.cgi">
    <input type="hidden" name="config" value="htdig-www" />
    <input type="hidden" name="restrict" value="" />
    <input type="hidden" name="exclude" value="" />

    <COMMENT> The following field was active (i.e. had focus) when the search was generated. </COMMENT>

    <input type="hidden" name="words" value="" />
    <input type="hidden" name="method" value="and" />
    <COMMENT>
      The input element above, "method", was a SELECT element with the following options...
      <select name="method">
        <option value="and">All</option>
        <option value="or">Any</option>
        <option value="boolean">Boolean</option>
      </select>
    </COMMENT>

    <input type="hidden" name="format" value="builtin-long" />
    <COMMENT>
      The input element above, "format", was a SELECT element with the following options...
      <select name="format">
        <option value="builtin-long">Long</option>
        <option value="builtin-short">Short</option>
      </select>
    </COMMENT>

    <input type="hidden" name="sort" value="score" />
    <COMMENT>
      The input element above, "sort", was a SELECT element with the following options...
      <select name="sort">
        <option value="score">Relevancy</option>
        <option value="time">Date</option>
        <option value="title">Title</option>
      </select>
    </COMMENT>

  </form>
  <script><![CDATA[
    function cs(q)
    {
      var args = parseArgs(q, "match, format, sort");
      if( nullArgs("cs", q) )
        return;

      // Parse switches with parseArgs:

      // parseArgs usage:
      // Arguments:
      //    q                - string from the search function
      //    expectedSwitches - list or array of the expected switch values
      //    expandSwitches   - optional parameter [default = true] used to determine 
      //                       if the switch shortcuts should be expanded (i.e. /f becomes /foo)
      // Returns an object with these properties:
      //    q        - the input string with the switches removed
      //    switches - array of objects with these two properties:
      //                  name:   expanded name of the matched switch (i.e. foo as in /foo:bar)
      //                  value:  value of switch (i.e. bar as in /foo:bar)
      //    switch_val - associative array with the switch name as the key with the switch value 
      //                 as the value. (i.e. switch_val["foo"] = "bar" as in /foo:bar)

      for (var iSwitch = 0; iSwitch < args.switches.length; iSwitch++)
      {
        switch( args.switches[iSwitch].name )
        {
          case "match":
		  	switch( args.switches[iSwitch].value )
			{
				case "all":
					document.csf.method.value = "and";
					break;
				case "any":
					document.csf.method.value = "or";
					break;
				case "boolean":
					document.csf.method.value = "boolean";
					break;
			}
            break;
          case "format":
		  	switch( args.switches[iSwitch].value )
			{
				case "long":
					document.csf.format.value = "builtin-long";
					break;
				case "short":
					document.csf.format.value = "builtin-short";
					break;
			}
            break;
          case "sort":
		  	switch( args.switches[iSwitch].value )
			{
				case "relevancy":
					document.csf.sort.value = "score";
					break;
				case "date":
					document.csf.sort.value = "time";
					break;
				case "title":
					document.csf.sort.value = "title";
					break;
			}
            break;
          default:
            break;
        }
      }

      // FORM variables for csf
      //document.csf.config.value = "";
      //document.csf.restrict.value = "";
      //document.csf.exclude.value = "";

      // The wizard assigned the search string to this form field value because
      // this field was the active element when the search file was generated.
      // Change this to args.q if the search string is parsed with parseArgs.
      document.csf.words.value = args.q;
      //document.csf.method.value = "";
      //document.csf.format.value = "";
      //document.csf.sort.value = "";

      submitForm(csf);
    }
  ]]></script>
  <copyright>
    The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
    Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
  <created_by>
    This search file was initially created on 12/17/02 at 14:25:18
    by Dave's Quick Search Deskbar Search Wizard version 1.0.1 ,
    Copyright (c) 2002 Glenn Carr; Distributed under the terms of the GNU General Public License, Version 2
  </created_by>
</search>