<search function="im">
  <name>Instant Messenger</name>
  <category>Computers</category>
  <description>
    Send a quick message to IM clients, mobile phones or email forwarding system.<br/>
    <div class="helpboxDescLabels">Example:</div>
    <table class="helpboxDescTable">
  		<tr><td>im/ver 987-654-3210; The message to be sent</td></tr>
  		<tr><td>im/eml foo@bar.net; [Reply address; Message subject;] Message Body</td></tr>
  		<tr><td>im/user_defined_nickname The message to be sent</td></tr>
  	</table>
  </description>
  <link></link>
  <contributor>Ryan Carpenter</contributor>
  <email>ryan_carpenter at comcast dot net</email>

  <form name="imf_eml"
        method="post"
        action="http://www.tometheus.com/cgi-bin/Web2Mail.cgi"
        target="_blank">
    <input type="hidden" name="Name" value="" />
    <input type="hidden" name="From" value="" />
    <input type="hidden" name="To" value="" />
    <input type="hidden" name="Subject" value="" />
    <input type="hidden" name="Body" value="" />
  </form>

  <form name="imf_ver"
        method="post"
        action="http://www.vtext.com/customer_site/jsp/messaging_lo.jsp"
        target="_blank">
    <input type="hidden" name="min" value="" />
    <input type="hidden" name="text" value="" />
    <input type="hidden" name="trackResponses" value="No" />
    <input type="hidden" name="Send.x" value="Yes" />
    <input type="hidden" name="showgroup" value="n" />
    <input type="hidden" name="DOMAIN_NAME" value="@vtext.com" />
    <input type="hidden" name="subject" value="" />
    <input type="hidden" name="sender" value="" />
    <input type="hidden" name="callback" value="" />
    <input type="hidden" name="type" value="0" />
    <input type="hidden" name="count" value="160" />
  </form>

  <form name="imf_tmo"
        method="post"
        action="http://www.t-mobile.com/messaging/default.asp"
        target="_blank">
    <input type="hidden" name="To" value="" />
    <input type="hidden" name="txtMessage" value="" />
    <input type="hidden" name="txtNum" value="" />
    <input type="checkbox" name="msgTermsUse" />
    <input type="hidden" name="hdnpublic" value="1" />
    <input type="hidden" name="txtFrom" value="" />
    <input type="hidden" name="counter" value="140" />
  </form>

  <form name="imf_att"
        action=""
        method="post">

  </form>

  <form name="imf_spr"
        action="http://messaging.sprintpcs.com/sml/guestCompose.do"
        method="post">
    <input type="hidden" name="post" value="Send" />
    <input type="hidden" name="recipientsAsString"/>
    <input type="hidden" name="mobileNumber"/>
    <input type="hidden" name="body"/>
    <input type="hidden" name="callback"/>
  </form>

  <script><![CDATA[
    if (!im_contacts) var im_contacts = [];
    var switches = "eml, ver, tmo, att, spr, cin, aol, yho, msn, irc";
    for (i=0;i<im_contacts.length;i++)
    {
      switches = switches + ", " + im_contacts[i][0];
    }
    function im(info)
    {
      if( nullArgs("im",info) ) return false;
      else
      {
        var args = parseArgs(info, switches);
        if (args.switches.length==0) return false;
        switchArr = switches.split(", ");
        if (args.switches.length>1) return false;
        info = info.substring(info.indexOf(' ')+1,1000).split("; ");
        switch(args.switches[0].name) {
          case "eml":
            if (info.length==1 || info.length>4) {openSearchWindow("http://www.tometheus.com/cgi-bin/Web2Mail.cgi"); return false;}
            document.imf_eml.From.value = (info.length==4?info[1]:"tometheus.deletemenow@tometheus.com");
            document.imf_eml.To.value = info[0];
            document.imf_eml.Subject.value = (info.length!=2?info[info.length-2]:"A message sent via Dave's Quick Search Deskbar");
            document.imf_eml.Body.value = info[info.length-1];
            document.imf_eml.submit();
            break;
          case "ver":
            if (info.length==1 || info.length>4) {openSearchWindow("http://www.vtext.com/customer_site/jsp/messaging_lo.jsp"); return false;}
            document.imf_ver.min.value = info[0];
            document.imf_ver.text.value = info[info.length-1];
            document.imf_ver.sender.value = (info.length==4?info[1]:"DQSD");
            document.imf_ver.subject.value = (info.length!=2?info[info.length-2]:"Sent via DQSD");
            document.imf_ver.submit();
            break;
          case "tmo":
            if (info.length==1 || info.length>4) {openSearchWindow("http://www.t-mobile.com/messaging/"); return false;}
            document.imf_tmo.action = "http://www.t-mobile.com/messaging/default.asp?To="+info[0];
            document.imf_tmo.txtNum.value = info[0];
            document.imf_tmo.txtMessage.value = info[info.length-1];
            document.imf_tmo.txtFrom.value = (info.length>2?info[1]:"DQSD");
            document.imf_tmo.msgTermsUse.checked = true;
            document.imf_tmo.submit();
            break;
          case "att":
            
            break;
          case "spr":
            if (info.length==1 || info.length>4) {openSearchWindow("http://messaging.sprintpcs.com"); return false;}
            document.imf_spr.recipientsAsString.value = info[0];
            document.imf_spr.mobileNumber.value = info[0];
            document.imf_spr.body.value = info[info.length-1];
            document.imf_spr.callback.value = (info.length>2?info[1]:"DQSD");
            document.imf_spr.submit();
            break;
          case "cin":
            
            break;
          case "aol":
            openSearchWindow("aim:goim?screenname="+info[0]+"&message="+info[1]);
            break;
          case "yho":
            
            break;
          case "msn":
            
            break;
          default:
            for (i=10;i<switchArr.length;i++)
            {
              if (args.switches[0].name==switchArr[i])
              {
                subj = (info.length!=1?info[info.length-2]+"; ":(im_contacts[i-10].length>4?im_contacts[i-10][4]+"; ":""));
                from = (info.length==3?info[0]+"; ":(im_contacts[i-10].length>3?im_contacts[i-10][3]+"; ":""));
                im("/"+im_contacts[i-10][1]+" "+im_contacts[i-10][2]+"; "+from+subj+info[info.length-1]);
                break;
              }
            }
            return false;
            break;
        }

      }
    }
  ]]></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>
    Ryan Carpenter 9/10/04
  </created_by>
</search>