function whenDone(name, result) {

  if ((result != 0) && (result != 999)) {
     // something went wrong
     alert('An error occured installing the package ' + name + '\n' +
           'The error code was ' + result);
  } // aieee!

} // whenDone

function install_foafer() {
/*
  var xpis = {'jsLib':'http://downloads.mozdev.org/jslib/xpi/jslib_current.xpi', 
              'foafer':'http://peoplesdns.com/foafer/foafer.xpi'};
*/
  var xpis = {'Doap-Viewer':'http://crschmidt.net/doap/doaper.xpi'};
  InstallTrigger.install(xpis, whenDone);

} // install_mozcc

function doshit() {
el=document.getElementsByTagName('link');
for(i=0; i < el.length; i++)
{
    if( el[i].title.match('/doap/i') != -1 && el[i].type.indexOf('application/rdf+xml')!=-1)
    {
        newlocation='http://mouettes.balbinus.net/doap-viewer.php?url=';
        doap=el[i].href;
        if (doap.charAt(0)=='/') { doap=location.href+doap.substring(1); }
        location.href=newlocation+doap;
    };
};
}

