function Topic (name) {
    this.name = name;
    this.bag = true;
    this.type = "";
}

Array.prototype.indexOfTopic = function(name) {
    for (var i = 0; i < this.length; i++)
        if (this[i].name == name)
            return i;
    return -1;
}
