Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this,
  "LoginManagerContent", "resource://gre/modules/LoginManagerContent.jsm");

function KLoginManager() { }

KLoginManager.prototype = {
  //classDescription: "My Hello World Javascript XPCOM Component",
  classID:          Components.ID("{121F4C54-619C-11E3-A003-FF636188709B}"),
  contractID:       "kmeleon/login;1",
  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIKLoginManager]),
  init: function(browser) { 
    browser.addEventListener("DOMContentLoaded", function(event) {
      LoginManagerContent.onContentLoaded(event);
    });
    browser.addEventListener("DOMAutoComplete", function(event) {
      LoginManagerContent.onUsernameInput(event);
    });
    browser.addEventListener("blur", function(event) {
      LoginManagerContent.onUsernameInput(event);
    });
  }
};

var components = [KLoginManager];
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);  