﻿<search function="gdocs">
  <name>Google Docs</name>
  <category>Login</category>
  <contributor>Tom Corcoran</contributor>
  <link>https://www.google.com/accounts/ServiceLogin?nui=1&amp;service=writely</link>
  <email></email>
 <description>Login to Google docs
   <div class="helpboxDescLabels">Example:</div>
    <table class="helpboxDescTable">
      <tr><td>gdocs</td></tr>
    </table>
    <div class="helpboxDescLabels">Variable:</div>
    <table class="helpboxDescTable">
      <tr><td>This uses the same gmid('user','pwd'); array as defined for your gmail account. In the same way you can set up multiple shortcuts for different google reader accounts.</td></tr>
    </table>
  </description>
 <form name="gdocsf"
       method="post"
       action="https://www.google.com/accounts/ServiceLoginAuth">
    <input type="hidden" name="continue" value="http://docs.google.com" />
    <input type="hidden" name="service" value="writely" />
    <input type="hidden" name="nui" value="1" />
    <input type="hidden" name="Email" value="" />
    <input type="hidden" name="Passwd" value="" />
    <input type="hidden" name="PersistentCookie" value="yes" />
    <input type="hidden" name="rmShown" value="1" />
    <input type="hidden" name="null" value="Sign in" />
  </form>
  <script><![CDATA[
    function gdocs(q)
    {
      if (q=="?"){
        nullArgs("gdocs",q);
        return false;
      }
      var gmids = gmid;
      try{
        eval("var gmids = " + q + ";");
      }catch(e){
        var gmids = gmid;
      }
      try{
        document.gdocsf.Email.value = gmids[0];
        document.gdocsf.Passwd.value = gmids[1];
      }catch(e){}

      // FORM variables for gdocsf
      //document.gdocsf.continue.value = "";
      //document.gdocsf.service.value = "";
      //document.gdocsf.nui.value = "";
      //document.gdocsf.PersistentCookie.value = "";
      //document.gdocsf.rmShown.value = "";
      //document.gdocsf.null.value = "";

      submitForm(gdocsf);
    }
  ]]></script>
</search>