
Class.create = function () {
	var f = function () {
		if (this.initialize) {
			this.initialize.apply (this, arguments) ;
		}
	}
	for (var i = 0 ; i != arguments.length ; i++) {
		Class.extend (f.prototype, arguments[i].prototype ? arguments[i].prototype : arguments[i]) ;
	}
	return f ;
}

Class.extend = function (dst, src) {
	for (var property in src) {
		if ((property == 'initialize') && dst.initialize) {
			var initialize = dst.initialize ;
			dst.initialize = function () {
				initialize.apply (this, arguments) ;
				src.initialize.apply (this, arguments) ;
			}
		} else {
			dst[property] = src[property] ;
		}
	}
}

Object.extend = function (dst, src) {
	for (var property in src) {
		dst[property] = src[property] ;
	}
	return dst ;
}
