/** 
* @Class
*/
function Class(obj) {
  var Constructor = function() {
    if (this.initialize) this.initialize.apply(this, arguments);
  }
  Constructor.prototype = obj;
  return Constructor;
}

Function.prototype.mixin = function(obj) {
  // Erweitere die Prototype-Eigenschaft einer Klasse um ein paar Funktionen.
  for (field in obj) this.prototype[field] = obj[field];
  return this;
}

Function.prototype.extend = function(obj) {
  // Baue aus einer bestehenden Klasse eine neue mit erweiterter Prototype-Eigenschaft.
  return Class(new this).mixin(obj);
} 
