// JavaScript Document
/**
* @author Cody Swann
* @version 1.0 sept, 2004
*/
Function.prototype.method = function (name, func) 
{
	this.prototype[name] = func;
	return this;
};



Function.method('inherits', function (parent) 
{
	var d = 0;
	var p = (this.prototype = new parent());
	
	var uber = function(name)
	{
		var f; 
		var r;
		var t = d;
		var v = parent.prototype;
		
        if(t) 
		{
           	while (t) 
			{
           		v = v.constructor.prototype;
           		t -= 1;
           	}
           	f = v[name];
        } 
		else 
		{
           	f = p[name];
           	if (f == this[name]) 
			{
               	f = v[name];
           	}
        }
        d += 1;
        r = f.apply(this, Array.prototype.slice.apply(arguments, [1]));
        d -= 1;
        return r;
	}
	this.method('uber', uber);
	
    return this;
});
