var mapSelector = {
    imageId : null,
    maps : [],
    i : 0,
    map : null,
    setImageId : function (id) {
        this.imageId = id;
    },
    addMap : function (map) {
        this.maps.push(map);
    },
    find : function (mapName) {
        for (this.i = 0; this.i < this.maps.length; this.i += 1) {
            if (mapName === this.maps[this.i].name) {
                return this.maps[this.i];
            }
        }
    },
    show : function (market, mapName) {
        this.map = this.find(mapName);
        document.getElementById(this.imageId).src = "/ms/" + market + "/img/preindex_location/" + this.map.image;
    }
};
