//
// 'extend' code from Mozilla
// https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Inheritance
// Used to set up inheritance between JS types.
//
extend: function(childtype, supertype)
{
for (var property in supertype.prototype)
{
if (typeof childtype.prototype[property] == "undefined")
childtype.prototype[property] = supertype.prototype[property];
}
// so you can call this.__super.prototype.METHOD_NAME.apply(this, args[]);
// to call overridden superclass methods
// this.__super.call(this, arg1, arg2, ...) calls the parent constructor
childtype.prototype.__super = supertype;
return childtype;
}