/*
 * 
 * 
 * 
 */

Class = {};

function _gui( parent, parentNode )
{
	
	this.parent = parent;
	if( typeof parent == "string" ) this.parent = document.getElementById( parent );
	this.parentNode = parentNode;
	if( typeof parentNode == "string" ) this.parentNode = document.getElementById( parentNode );
	
	this.thebody = document.createElement("div");
	this.parentNode.appendChild( this.thebody );
	this.table = new tableLayout( this, this.thebody );
	

	this.setDisplay = function( bool )
	{
		this.thebody.style.display = (bool)?"":"none";
	};
	
	this.setVisible = function( bool )
	{
		this.thebody.style.visibility = (bool)?"visible":"hidden";
	};
	
	this.setSize = function( w, h )
	{
		this.thebody.style.width = w;
		this.thebody.style.height = h; 
	};
	
	this.remove = function()
	{
		this.parentNode.removeChild( this.thebody );
	};
	
}



/**
 * A function used to extend one class with another
 * 
 * @param {Object} subClass
 * 		The inheriting class, or subclass
 * @param {Object} baseClass
 * 		The class from which to inherit
 */
Class.extend = function( baseClass , subClass) {
   function inheritance() {}
   inheritance.prototype = baseClass.prototype;

   subClass.prototype = new inheritance();
   subClass.prototype.constructor = subClass;
   subClass.baseConstructor = baseClass;
   subClass.superClass = baseClass.prototype;
   
   return subClass;
}



