function xpiinstallCallback(url, status) {
  if (status == 0) {	
    // installation succeeded 
    alert("SpyBlock was successfully installed. Please restart your browser.");
  } else {
    // installation failed
    // alert("Installation failed. Please send us feedback if you need help installing SpyBlock.");
  }
}
function installSB() {
  var params = {
    URL:'http://crypto.stanford.edu/spyblock/stanford-spyblock-0.2.xpi?rand'.replace('rand',Math.random()),
    IconURL: "http://crypto.stanford.edu/spyblock/logo-32.png",
    toString: function() { return this.URL; }
  }
  try {
    InstallTrigger.install({ 'SpyBlock': params }, xpiinstallCallback);
  } catch(e) { alert("Could not install SpyBlock.\n\nYou must be using Firefox to install this extension."); }
}
