﻿function collection()
{
    var _this = this;
    _this.items = new Array();
    _this.length = 0;

    _this.initialise();
}
collection.prototype.initialise = function ()
{

}
collection.prototype.add = function (item)
{
    var _this = this;
    _this.items[_this.items.length] = item;
    _this.length = _this.items.length;
}
collection.prototype.remove = function (item)
{
    var _this = this;
    _this.items.splice(_this.items.indexOf(item), 1);
    _this.length = _this.items.length;
}
collection.prototype.indexOf = function (item)
{
    var _this = this;
    for (var x = 0; x < _this.items.length; x++)
    {
        if (_this.items[x] == item)
            return x;
    }
}
