// Hilfsfunktionen fr die Klasse cl_plugin

function sortPlugins(plugins) {
  var temp = 0;
  var count = plugins.length;
  for (var i= (count-1); i > 0; --i) {
    for (var j = 0; j < i; ++j) {
      if (plugins[j].getName().toUpperCase() > plugins[i].getName().toUpperCase()) {
        temp = plugins[j];
        plugins[j] = plugins[i];
        plugins[i] = temp;
      }
    }
  }
}

function initPlugins() {
  var myPlugins = new Array();
  for (var i=0; i < navigator.plugins.length; ++i) {
    var myPlugin = navigator.plugins[i];
    myPlugins[i] = new cl_plugin(myPlugin.name, myPlugin.filename, myPlugin.description);
  }
  sortPlugins(myPlugins);
  return myPlugins;
}



// Klasse cl_plugin

function getName() {
  return this.name;
}

function getFilename() {
  return this.file;
}

function getDescription() {
  return this.desc;
}

function cl_plugin(name, file, desc) {
  this.name = name;
  this.file = file;
  this.desc = desc;
  this.getName = getName;
  this.getFilename = getFilename;
  this.getDescription = getDescription;
}
