﻿Date.prototype.addDays = function(numOfDays) {
    var newDate = new Date(this.toString());
    newDate.setDate(this.getDate() + numOfDays);
    return newDate;
} 


function Collection() {
    this.list = new Array();
    
    this.add = function(item) {
        this.list[this.list.length] = item;
    }
    
    this.clear = function(index) {
        this.list.length = 0;
    }
    
    this.removeAt = function(index) {
        this.list.splice(index, 1);
    }
    
    this.getCount = function() {
        return this.list.length;
    }
    
    this.getItem = function(index) {
        return this.list[index];
    }
}

