// http://prototype.conio.net/dist/prototype-1.4.0.js // http://wanderingken.com/2006/04/01/extending-prototype-classextend/ var Class = { create: function() { return function() { this.initialize.apply(this, arguments); } } } Object.extend = function(destination, source) { for (property in source) { destination[property] = source[property]; } return destination; } Object.extend(Class, { extend: function(source, additions) { var newclass = Class.create(); if ($C(source)) { Object.extend($C(newclass),$C(source)); } Object.extend($C(newclass), additions); return newclass; } }); function $C(object) { return object.prototype; }