function Component(parent, type)
{
	/** 
	 * Base DOM element for this component.
	 *
	 * Different components may use diferent base element types.
	 * 
	 * @attribute element
	 * @type {Component}
	 */
	this.element = document.createElement(type !== undefined ? type : "div");
	this.element.style.position = "absolute";
	this.element.style.overflow = "hidden";

	/**
	 * Event manager responsible for handling all events attached to this component.
	 *
	 * Allows children object types to expand the events of the object without overlapping event names.
	 *
	 * Only the events of this component should be put here. Avoid mixing events of different components across event handlers.
	 *
	 * @attribute event
	 * @type {EventManager}
	 */
	this.event = new EventManager();

	/** 
	 * The parent element that contains this Component.
	 *
	 * Can be a DOM element or another Component.
	 * 
	 * @attribute parent
	 * @type {Component}
	 */
	this.parent = null;
	if (parent !== undefined)
	{
		this.attachTo(parent);
	}
	
	/** 
	 * True if the element is visible.
	 *
	 * @attribute visible
	 * @type {boolean}
	 */
	this.visible = true;
	
	/**
	 * Size of this component in px.
	 *
	 * @attribute size
	 * @type {Vector2}
	 */
	this.size = new Vector2(0, 0);
	
	/**
	 * Position of this component relatively to its parent in px.
	 *
	 * @attribute position
	 * @type {Vector2}
	 */
	this.position = new Vector2(0, 0);

	/**
	 * Positioning mode, indicates how to anchor the component.
	 *
	 * @attribute mode
	 * @type {number}
	 */
	this._mode = Component.TOP_LEFT;
}
Component is the base object for all GUI elements.

All GUI elements are based on the Component class, components can be inserted into other componens or into DOM elements.

@class Component
@param {Component} parent Parent element.
@param {string} type Type of the based DOM element.