<search function="isp">
  <name>Reverse Phone Lookup</name>
  <description>
    Find a person and address in Canada by telephone number.<br/>
    <div class="helpboxDescLabels">Example:</div>
    <table class="helpboxDescTable">
      <tr><td>isp 902-555-1212</td></tr>
    </table>
  </description>
  <category>People and Places</category>
  <link>http://www.infospace.com/canada/reverse_ca.htm</link>
  <contributor>Sarah Sweeney</contributor>
  <email>sarah@designshift.com</email>
  <form name="reversephoneform"
    action="http://ypng.infospace.com/canada/ypv3ca/redir.htm"
    method="get">
    <input type="hidden" name="searchtype" value="all" />
    <input type="hidden" name="fromform" value="revphone" />
    <input type="hidden" name="ClickTRK" value="REVRP3" />
    <input type="hidden" name="QP" />
    <input type="hidden" name="wqp" />
  </form>
  <script><![CDATA[
    function isp(q)
    {
      if( nullArgs("isp", q) )
        return false;

      if (q == "")
      {  
        openSearchWindow("http://www.infospace.com/canada.widept/reverse_ca.htm");
      }
      else
      {
        // detect strings that look like phone numbers
        res = phone_regex.exec(q);
        if (res)
        {
          if (res[1])
          {
            ac=res[1].replace( / /, "", "g");
            pn=res[2].replace( / /, "", "g");
          }
          else
          {
            ac=res[3].replace( / /, "", "g");
            pn=res[4].replace( / /, "", "g");;
          }
          document.reversephoneform.QP.value=ac + "-" + pn;
          //1=home, blank=work
          document.reversephoneform.wqp.value="1";
          submitForm(reversephoneform);
        }
        else
        {
          return false;
        }
      }
    }
    ]]></script>

  <copyright>
	Copyright (c) 2002 David Bau
	Distributed under the terms of the
	GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
</search>

