home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd1.bin / software / dave / dqsd.exe / searches / ostk.xml < prev    next >
Text File  |  2002-10-18  |  5KB  |  119 lines

  1. <search function="ostk">
  2.   <name>Overstock.com</name>
  3.   <category>Shopping</category>
  4.   <contributor>Brent Beardsley</contributor>
  5.   <link>http://www.overstock.com</link>
  6.   <email></email>
  7.   <description>
  8.   Search Overstock.com
  9.     <div class="helpboxDescLabels">Switches:</div>
  10.     <table class="helpboxDescTable">
  11.       <tr><td>/all [default]</td><td> - </td><td>Search all categories</td></tr>
  12.       <tr><td>/apparel</td><td> - </td><td>Search for Apparel items</td></tr>
  13.       <tr><td>/books</td><td> - </td><td>Search for Books</td></tr>
  14.       <tr><td>/computers</td><td> - </td><td>Search for Computer items</td></tr>
  15.       <tr><td>/electronics</td><td> - </td><td>Search for Electronics</td></tr>
  16.       <tr><td>/garden</td><td> - </td><td>Search for Garden items</td></tr>
  17.       <tr><td>/home</td><td> - </td><td>Search for Home items</td></tr>
  18.       <tr><td>/jewelry</td><td> - </td><td>Search for Jewelry</td></tr>
  19.       <tr><td>/movies</td><td> - </td><td>Search for Movies</td></tr>
  20.       <tr><td>/music</td><td> - </td><td>Search for Music items</td></tr>
  21.       <tr><td>/new</td><td> - </td><td>Check for new items - can be used with the rest of the parameters to limit new items to a specific category</td></tr>
  22.       <tr><td>/sports</td><td> - </td><td>Search for Sports items</td></tr>
  23.       <tr><td>/travel</td><td> - </td><td>Search for Travel items</td></tr>
  24.       <tr><td>/toys</td><td> - </td><td>Search for Toys</td></tr>
  25.       <tr><td>/worldstock</td><td> - </td><td>Search for Worldstock items</td></tr>
  26.     </table>
  27.     <div class="helpboxDescLabels">Examples:</div>
  28.     <table class="helpboxDescTable">
  29.       <tr><td>ostk /c clie</td><td> - </td><td>Search the Computer section for clie</td></tr>
  30.       <tr><td>ostk /c /n</td><td> - </td><td>Show the new items in the Computer section</td></tr>
  31.     </table>
  32.   </description>
  33.   <form name="ostkf"
  34.         method="post"
  35.         action="http://www.overstock.com/cgi-bin/d2.cgi">
  36.     <input type="hidden" name="PAGE" value="SEARCH" />
  37.     <input type="hidden" name="SITEAREA" value="0" />
  38.     <COMMENT>
  39.       The input element above, "SITEAREA", was a SELECT element with the following options...
  40.       <select name="SITEAREA">
  41.         <option value="0">All Stores</option>
  42.         <option value="1">Home & Garden</option>
  43.         <option value="2">Electronics & Computers</option>
  44.         <option value="3">Books, Movies & Music</option>
  45.         <option value="4">Jewelry & Apparel</option>
  46.         <option value="5">Sports, Travel & Toys</option>
  47.         <option value="6">Worldstock</option>
  48.       </select>
  49.     </COMMENT>
  50.     <input type="hidden" name="KEYWORD" value="" />
  51.   </form>
  52.   <script><![CDATA[
  53.     function ostk(q)
  54.     {
  55.       if( nullArgs("ostk", q) )
  56.         return;
  57.  
  58.       var newitems = false;
  59.       var sitearea = 0;
  60.       var args = parseArgs(q, "all, apparel, books, computers, electronics, garden, home, jewelry, movies, music, new, sports, travel, toys, worldstock");
  61.       if ( args.switches.length > 0 )
  62.       {
  63.         for (var i=0; i < args.switches.length; i++) {
  64.           switch( args.switches[i].name )
  65.           {
  66.         case "all":
  67.           sitearea = 0;
  68.           break;
  69.             case "home":
  70.             case "garden":
  71.           sitearea = 1;
  72.               break;
  73.             case "electronics":
  74.             case "computers":
  75.             sitearea = 2;
  76.               break;
  77.             case "books":
  78.             case "movies":
  79.             case "music":
  80.           sitearea = 3;
  81.               break;
  82.             case "jewelry":
  83.             case "apparel":
  84.           sitearea = 4;
  85.               break;
  86.             case "sports":
  87.             case "travel":
  88.             case "toys":
  89.           sitearea = 5;
  90.               break;
  91.         case "worldstock":
  92.           sitearea = 6;
  93.           break;
  94.         case "new":
  95.           newitems = true;
  96.           break;
  97.             default:
  98.               break;
  99.           }
  100.         }
  101.       }
  102.       if (newitems) {
  103.         var search_url = "http://www.overstock.com/cgi-bin/d2.cgi?PAGE=HEYWHATSNEW";
  104.         if (sitearea != 0) {
  105.       search_url += "&STO_ID="+sitearea;
  106.     }
  107.     openSearchWindow(search_url);
  108.       } else {
  109.         document.ostkf.SITEAREA.value = sitearea;
  110.     document.ostkf.KEYWORD.value = args.q;
  111.         submitForm(ostkf);
  112.       }
  113.     }
  114.   ]]></script>
  115.   <copyright>
  116.     The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
  117.     Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  118.   </copyright>
  119. </search>