// File: /include/js/Shared/Extensions/Object.js
// Desc: Object extension
// $Revision: 4$
// $Date: 5/14/2007 12:10:36 PM$
// $Author: Donnie Tognazzini$
// $NoKeywords$


/******************************************************************************
  Extend function to support inheritance.

  A child class extends a base class by invoking extend( ) in its constructor,
  passing itself and an instance of the base class as a parameter to the extend
  function.

  E.g.

    function BaseClass( parameter1 )
    {
        this.m_attribute1 = parameter1;
    }

    function ChildClass( parameter1, parameter2 )
    {
        EXT_extend( this, new BaseClassConstructor( parameter1 ) );

        this.m_attribute2 = parameter2;
    }

 ******************************************************************************/
function EXT_extend( child, base )
{
    var p;
    for ( p in base )
    {
        if ( p !== 'constructor' )
        {
            child[ p ] = base[ p ];
        }
    }
}

