<search function="gmail">
  <name>gmail</name>
  <category>Email</category>
  <contributor>Tom Corcoran</contributor>
  <link>http://mail.google.com/mail</link>
  <email></email>
  <description>Login to Gmail
  <div class="helpboxDescLabels">Example:</div>
  <table class="helpboxDescTable">
    <tr><td>gmail</td></tr>
    <tr><td>gmail myid</td></tr>
    <tr><td>gmail myotherid</td></tr>
  </table>
  <div class="helpboxDescLabels">Variables:</div>
  <table class="helpboxDescTable">
    <tr><td>gmid('user','pwd');</td><td>An array storing a user and password profile for Gmail.
	You SHOULD provide the <em>gmid()</em> variable, however, you may also provide as many other 
	profiles as necessary to account for your Gmail ID's. If you were to create a 'second' profile 
	you would need only to pass the variable name on the command line: <br />
	<strong>gmail otherVariable</strong><br />
	These variables are, however, case sensitive. If the variable passed does not exist (misspelled, 
	incorrect case...), this search will 'default' to using the <em>gmid</em> variable.<br />
	Simplifying this add an alias in your LocalAliases file, like, gm|gmail mygmid</td></tr>
  </table>
  </description>
  <form name="gmailf"
        method="post"
        action="https://www.google.com/accounts/ServiceLoginAuth">
    <input type="hidden" name="ltmpl" value="yj_blanco" /> 
    <input type="hidden" name="ltmplcache" value="2" />
    <input type="hidden" name="rm" value="false" />     
    <input type="hidden" name="continue" value="http://gmail.google.com/gmail" />
    <input type="hidden" name="service" value="mail" />
    <input type="hidden" name="Email" value="" />
    <input type="hidden" name="Passwd" value="" />
    <input type="hidden" name="PersistentCookie" value="yes" />
    <input type="hidden" name="null" value="Sign in" />
  </form>
  <script><![CDATA[
    function gmail(q)
    {
      if (q=="?"){
        nullArgs("gmail",q);
        return false;
      }
      var gmids = gmid;
      try{
        eval("var gmids = " + q + ";");
      }catch(e){
        var gmids = gmid;
      }
      try{
        document.gmailf.Email.value = gmids[0];
        document.gmailf.Passwd.value = gmids[1];
      }catch(e){}

      // FORM variables for gmailf
      //document.gmailf.continue.value = "";
      //document.gmailf.service.value = "";
      //document.gmailf.PersistentCookie.value = "";
      //document.gmailf.null.value = "";

      submitForm(gmailf);
    }
  ]]></script>
</search>