/*
 * this is basically an object handle for the body element.
 */
function gui()
{
	/*
	 * private vars
	 */
	var body;

	/*
	 * constructor area
	 */
	body = document.getElementsByTagName('body').item(0);

	/*
	 * methods
	 */

	//add a child to this
	this.addChild = function(child) {
		body.appendChild(child.getElement());
	}
}

/*
 * a paragraph object.
 */
function paragraph()
{
	/*
	 * private vars
	 */
	var element;

	/*
	 * constructor area
	 */
	element = document.createElement('p');

	/*
	 * methods
	 */

	paragraph.prototype.getElement = function() {
		return(element);
	}

	// add a text node
	paragraph.prototype.addText = function(text) {
		var x = document.createTextNode(text);
		element.appendChild(x);
	}

	// set the class
	paragraph.prototype.setClass = function(className) {
		element.className = className;
	}

	//add a child to this
	paragraph.prototype.addChild = function(child) {
		element.appendChild(child.getElement());
	}
}

/*
 * a br object.
 */
function br()
{
	/*
	 * private vars
	 */
	var element;

	/*
	 * constructor area
	 */
	element = document.createElement('br');

	/*
	 * methods
	 */

	this.getElement = function() {
		return(element);
	}
}

