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

  1. <search function="mb">
  2.   <name>MapBlast maps and and driving directions</name>
  3.   <description>
  4.     Get driving directions and maps for the USA and many other countries. Uses MapBlast LineDrive directions and USA, by default.<br/>
  5.    <div class="helpboxDescLabels">Usage:</div>
  6.    <table class="helpboxDescTable">
  7.     <tr><td>mb <I>[street,] city, state</I> [to <I>[street,] city, state</I>]</td></tr>
  8.    </table>
  9.    <div class="helpboxDescLabels">Examples:</div>
  10.    <table class="helpboxDescTable">
  11.     <tr><td>mb Lebanon, KS</td></tr>
  12.     <tr><td>mb Port Orford, OR to Lubec, ME</td></tr>
  13.     <tr><td>mb 1600 Pennsylvania Ave, Washington, DC to Rockefeller Plaza, New York, NY</td></tr>
  14.    </table>
  15.   </description>
  16.   <category>Travel</category>
  17.   <link>http://www.mapblast.com</link>
  18.   <contributor>Gregory Krohne, from Peter Heath's mapquest directions</contributor>
  19.   
  20.   <script><![CDATA[
  21.       function mb(q)
  22.       {
  23.         if (q=="") {
  24.             openSearchWindow("http://www.mapblast.com/myblastd/driveStart.dsp");
  25.             return;
  26.         }
  27.  
  28.         //DEFAULTS
  29.         var StartCountry="USA";
  30.         var EndCountry="USA";
  31.         var StartZip="";
  32.         var EndZip="";
  33.   
  34.         if ( nullArgs("mb", q) )
  35.               return false;
  36.           else
  37.           {
  38.                 var start = "";
  39.                 var finish = "";
  40.  
  41.             parseddirs = q.split(" to ");
  42.             start = parseddirs[0];
  43.             finish = parseddirs[1];
  44.  
  45.             parsedloc = start.split(",");
  46.             if (typeof parsedloc[2] == 'undefined'){ //has no Street
  47.                 StartState = (parsedloc[1] ? parsedloc[1] : "");
  48.                 StartCity  = (parsedloc[0] ? parsedloc[0] : "");
  49.                 StartStreet = "";
  50.             } else { //has street
  51.                 StartState = (parsedloc[2] ? parsedloc[2] : "");
  52.                 StartCity  = (parsedloc[1] ? parsedloc[1] : "");
  53.                 StartStreet= (parsedloc[0] ? parsedloc[0] : "");
  54.             }
  55.             if (typeof parseddirs[1] == 'undefined'){ //has only 1 location
  56.                 SearchPage = "http://www.mapblast.com/myblastd/createmap.d?&AD4=" + StartCountry + "&AD2=" + StartStreet + "&AD3=" + StartCity + "%2C" + StartState + "+" + StartZip + "&AIR=&selCategory=defaultCat&x=0&y=0&E=ahV-jzkx2zJTnra7fjG_bW2-V_heUmgKXcekupd2aH3M9J3rOZn2wrXMp_fRUH5lL9nv_T8Sl6R6pjM";
  57.                 openSearchWindow(SearchPage);
  58.             } else {    //has 2 locations
  59.                 parsedloc = finish.split(",");
  60.                 if (typeof parsedloc[2] == 'undefined'){ //has no Street
  61.                     EndState = (parsedloc[1] ? parsedloc[1] : "");
  62.                     EndCity  = (parsedloc[0] ? parsedloc[0] : "");
  63.                     EndStreet = "";
  64.                 } else { //has street
  65.                     EndState = (parsedloc[2] ? parsedloc[2] : "");
  66.                     EndCity  = (parsedloc[1] ? parsedloc[1] : "");
  67.                     EndStreet= (parsedloc[0] ? parsedloc[0] : "");
  68.                 }
  69.                     
  70.                 var SearchPage="http://www.mapblast.com/myblastd/getdd.d?AD4_1=" + StartCountry + "&AD2_1=" + StartStreet + "&AD3_1=" + StartCity + "%2C" + StartState + StartZip + "&AIR_1=" + "&AD4_2=" + EndCountry + "&AD2_2=" + EndStreet + "&AD3_2=" + EndCity + "%2C" + EndState + "+" + EndZip + "&mapstyle=line&E=ahV-jzkx2zJTnra7fjG_bW2-V_heUmgKXcekupd2aH3M9J3rOZn2wrXMr2cZXSM9-yfiUvXVxTz-UvnEw";
  71.                      openSearchWindow(SearchPage);
  72.               }
  73.  
  74.           }
  75.       }
  76.   ]]></script>
  77.  
  78.   <copyright>
  79.     Copyright (c) 2002 David Bau
  80.     Distributed under the terms of the
  81.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  82.   </copyright>
  83. </search>
  84.  
  85.