/**
 * Load JHBF (prepend this to any Custom Buttons code using JHBF!)
 * You need to set the JHBFPATH environment variable on your computer
 * to the path where you placed JHBF.jsm to make this work.
 * @author Jens Hatlak <jh@junetz.de>
 * @version 2010-07-15
 */
let envSvc = Components.classes["@mozilla.org/process/environment;1"]
                       .getService(Components.interfaces.nsIEnvironment);
let file = Components.classes["@mozilla.org/file/local;1"]
                     .createInstance(Components.interfaces.nsILocalFile);
if (!envSvc.exists("JHBFPATH"))
  throw {message: "Environment variable JHBFPATH undefined"};
file.initWithPath(envSvc.get("JHBFPATH"));
file.append("JHBF.jsm");
if (!file.exists())
  throw {message: "File not found: " + file.path};
let ios = Components.classes["@mozilla.org/network/io-service;1"]
                    .getService(Components.interfaces.nsIIOService);
let uri = ios.newFileURI(file);
Components.utils.import(uri.spec);

