//Excerpts from the jsUtilities Library
if(Array.prototype.push == null)
{
	Array.prototype.push = function(item)
	{
		this[this.length] = item;
		return this.length;
	};
};

//Courtesy of Aaron Boodman - http://youngpup.net
if (!Function.prototype.apply)
{
	Function.prototype.apply = function(oScope, args)
	{
		var sarg = [];
		var rtrn, call;
		if (!oScope) oScope = window;
		if (!args) args = [];
		
		for (var i = 0; i < args.length; i++)
			sarg[i] = "args["+i+"]";
		
		call = "oScope.__applyTemp__(" + sarg.join(",") + ");";
		oScope.__applyTemp__ = this;
		rtrn = eval(call);
		oScope.__applyTemp__ = null;
		return rtrn;
	};
};

function inArray(needle)
{
	for (var i=0; i < this.length; i++)
		if (this[i] === needle)
			return i;
	
	return false;
}

function addClass(theClass)
{
	if (this.className != '')
		this.className += ' ' + theClass;
	else
		this.className = theClass;
}