function _geodata()
{
    this._maptips = function () {
        this.hoverVisible = false;
        this.currentMapTipsLayer = null;
        this.currentMapTipsWindow = null;
        this.allLayers = new Array();
        this.currentHighlightRow = null;

        // create a definition object for a MapTips control instance
        this.setupMapTips = function (map) {
            if (map.infoWindow) {
                // Move info window container from map root div to document body
                // so that the info window displays on top of everything else and is
                // not cropped by the map div.
                document.body.appendChild(map.infoWindow.domNode);
                // Apply our custom styling of the info window:
                dojo.addClass(document.body, "custom");
                // Add event handler for info window mouse out:
                dojo.connect(map.infoWindow._window, "onmouseout", gdInfoWindowMouseOut);
                dojo.connect(map.infoWindow._pointer, "onmouseout", gdInfoWindowMouseOut);
            }
            this.currentMapTipsWindow = new geodata.maptips.MapTipWindow();
            this.currentMapTipsWindow.createDivs();
            this.currentMapTipsLayer = new geodata.maptips.MapTipsLayer(map);
            this.allLayers[this.currentMapTipsLayer.id] = this.currentMapTipsLayer;
            dojo.connect(map, "onZoomStart", gdMapTipZoomStart);
            dojo.connect(map, "onPanStart", gdMapTipPanStart);
            dojo.connect(map, "onMouseDragStart", gdMapTipDragStart);
            dojo.connect(map, "onMouseDragEnd", gdMapTipDragEnd);
            map.graphics.enableMouseEvents();
            dojo.connect(map.graphics, "onMouseOver", gdMapTipMouseOver);
            dojo.connect(map.graphics, "onMouseOut", gdMapTipMouseOut);
            dojo.connect(map.graphics, "onClick", gdMapTipClick);
        }

        this.MapTipListMouseOver = function (divId, name, x, y, productId, isMultiList) {
            var elem = dojo.byId(divId);
            if (elem) {

                if (this.currentHighlightRow)
                    dojo.removeClass(this.currentHighlightRow, "mapmultilistview_mo");

                if (gdClientData.hasRoutePlanner) {
                    dojo.addClass(elem, "mapmultilistview_mo");
                    this.currentHighlightRow = elem;
                }
            }

            var routeLinksPanelBaseId = isMultiList ? "multiple_list_route_links" : "list_route_links";
            this.currentMapTipsWindow.showRouteLinksPopup(divId, name, x, y, productId, routeLinksPanelBaseId);
        }

        this.MapTipListMouseOut = function (divId) {
            var elem = dojo.byId(divId);
            if ((elem) && (dojo.hasClass(elem, "mapmultilistview_mo")))
                dojo.removeClass(elem, "mapmultilistview_mo");
        }

        // mouseover in product list (under poi-filter on the left side..)
        this.PoiListItemMouseOver = function (id, index, categories, productID) {
            dojo.addClass(dojo.byId(id), "PoiListItemHover");
            var poi = geodata.maptips.currentMapTipsLayer.showTip(index, null, productID);

            if (poi != null && poi.contentByCategory != null && poi.contentByCategory.length > 0) {
                var catIndex = this.getCatIndex(categories, poi.contentByCategory);
                mapHoverFunctions.multiCatMouseOver(catIndex, index, productID);
            }
            else {
                var divID = "mapmultilistview_pid" + productID;
                this.MapTipListMouseOver(divID, "", 0, 0, productID, false);
            }
        }

        this.getCatIndex = function (categories, contentByCategory) {
            for (var i = 0, len = contentByCategory.length; i < len; i++) {
                for (var j = 0, jlen = categories.length; j < jlen; j++) {
                    if (categories[j] == contentByCategory[i].categoryId)
                        return i;
                }
            }
            return -1;
        }

        this.PoiListItemMouseOut = function (id, index) {
            dojo.removeClass(dojo.byId(id), "PoiListItemHover");
            geodata.maptips.currentMapTipsLayer.hideCurrentItem();
        }

    }
    this.maptips = new this._maptips();
}
var geodata = new _geodata();

