function JSCollection() {
/*	Title	  :	 JSCollection object
	Written by:  Pete Murphy
	Description: The object behaves Similarly to the VB 6.0 collection object
				 except it is 0 based and does not support keys (yet).
*/

	var lcount = 0;

	this.add = _add;
	this.remove = _remove;
	this.isEmpty = _isEmpty;
	this.clear = _clear;
	this.clone = _clone;
	this.item = _item;
	this.count = _count;

	function _add(newItem) {
	/* --adds a new item to the collection-- */
		if (newItem == null) return;

		lcount++;
		this[(lcount - 1)] = newItem;
	}

	function _remove(index) {
	/* --removes the item at the specified index-- */
		if (index < 0 || index > this.length - 1) return;
		this[index] = null;

		/* --reindex collection-- */
		for (var i = index; i <= lcount; i++)
			this[i] = this[i + 1];

		lcount--;
	}

	function _isEmpty()
	{
		/* --returns boolean if collection is/isn't empty-- */
		return lcount == 0;
	}

	function _clear()
	{
		/* --clears the collection-- */
		for (var i = 0; i < lcount; i++)
			this[i] = null;

		lcount = 0;
	}

	function _clone()
	{
		/* --returns a copy of the collection-- */
		var c = new JSCollection();

		for (var i = 0; i < lcount; i++)
			c.add(this[i]);

		return c;
	}

	function _item(Index)
	{
		/* --adds a new item to the collection-- */
		if (this[Index] == null)
		{
			return;
		}
		else
		{
			return this[Index];
		}
	}

	function _count()
	{
		/* --returns count of collection items-- */
		return lcount;
	}	

}

