home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd1.bin / software / dave / dqsd.exe / searches / tr.xml < prev    next >
Text File  |  2003-01-21  |  3KB  |  77 lines

  1. <search function="tr">
  2.   <name>Thomas Register</name>
  3.   <category>Search the Web</category>
  4.   <contributor>Brent Beardsley</contributor>
  5.   <link>http://www.thomasregister.com/</link>
  6.   <email></email>
  7.   <description>
  8.   Search ThomasRegister.com - the most comprehensive online resource for finding companies and products manufactured in North America
  9.     <div class="helpboxDescLabels">Switches:</div>
  10.     <table class="helpboxDescTable">
  11.       <tr><td>/product</td><td> - </td><td>Search for products</td></tr>
  12.       <tr><td>/service</td><td> - </td><td>Search for services</td></tr>
  13.       <tr><td>/company</td><td> - </td><td>Search for companies</td></tr>
  14.       <tr><td>/brand</td><td> - </td><td>Search for brands</td></tr>
  15.     </table>
  16.   </description>
  17.   <form name="trf"
  18.         method="post"
  19.         action="http://www.thomasregister.com/red_search.fnc">
  20.     <input type="hidden" name="search_string" value="" />
  21.     <input type="hidden" name="browser_stat" value="" />
  22.     <input type="hidden" name="json" value="n" />
  23.     <input type="hidden" name="indexpage" value="n" />
  24.     <input type="hidden" name="script_name" value="TRpsrch.cgi" />
  25.     <input type="hidden" name="search_type"     value="product" />
  26.     <COMMENT>
  27.       The input element above, "script_name" was a set of radio buttons with the following options...
  28.       "TRpsrch.cgi", "TRcsrch.cgi", "TRbsrch.cgi"
  29.     </COMMENT>
  30.   </form>
  31.   <script><![CDATA[
  32.     function tr(q)
  33.     {
  34.       if( nullArgs("tr", q) )
  35.         return;
  36.  
  37.       var args = parseArgs(q, "brand, company, product, service");
  38.       var scriptName = "TRpsrch.cgi";
  39.       var searchType = "product";
  40.       if (args.switches.length > 0)
  41.       {
  42.         switch( args.switches[0].name )
  43.         {
  44.           case "product":
  45.             scriptName = "TRpsrch.cgi";
  46.             searchType = "product";
  47.             break;
  48.           case "service":
  49.             scriptName = "TRpsrch.cgi";
  50.             searchType = "product";
  51.             break;
  52.           case "company":
  53.             scriptName = "TRcsrch.cgi";
  54.             searchType = "company";
  55.             break;
  56.           case "brand":
  57.             scriptName = "TRbsrch.cgi";
  58.             searchType = "brand";
  59.             break;
  60.           default:
  61.             scriptName = "TRpsrch.cgi";
  62.             searchType = "product";
  63.             break;
  64.         }
  65.       }
  66.  
  67.       document.trf.search_string.value = args.q;
  68.       document.trf.search_type.value = searchType;
  69.       document.trf.script_name.value = scriptName;
  70.  
  71.       submitForm(trf);
  72.     }
  73.   ]]></script>
  74.   <copyright>
  75.     Copyright (c) 2003 Brent Beardsley; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  76.   </copyright>
  77. </search>