﻿function OfficeMarker() {
    var me = this;
    this.lat = 0;
    this.lng = 0;
    this.office = null;
    this.gmarker = new Hash();

    // get office marker mouse over
    this.getMouseOverHtml = function() {
        var mouseHtml = "<div class=\"tooltip\">";
        mouseHtml += "Sibcy Cline Realtors: " + this.office.officeName;
        mouseHtml += "</div>";
        return mouseHtml;
    }

    // get office marker info window
    this.getInfoWindowHtml = function() {
        var infoHtml = "<div class=\"mapInfoWindow\" style=\"padding-right:10px;\">";
        infoHtml += "<div class=\"mapInfoWindowOffice\">";
        infoHtml += "Sibcy Cline Realtors: " + this.office.officeName;
        infoHtml += "<br />" + this.office.streetAddress;
        infoHtml += "<br />" + this.office.officeName + ", " + this.office.state + " " + this.office.zip;
        infoHtml += "<br />" + this.office.phone;
        infoHtml += "<a href='" + this.office.imgUrl + "'><img src='" + this.office.imgUrl + "' alt='" + this.office.officeName + "' /></a>";
        infoHtml += "</div>";
        infoHtml += "</div>";
        return infoHtml;
    };

    this.getMarkerIcon = function() {
        var officeIcon = new GIcon();
        officeIcon.image = "includes/map/images/MapLanternIcon.png";
        officeIcon.shadow = "includes/map/images/MapLanternIconShadow.png";
        officeIcon.iconSize = new GSize(27, 42);
        officeIcon.shadowSize = new GSize(48, 42);
        officeIcon.iconAnchor = new GPoint(12, 40);
        officeIcon.infoWindowAnchor = new GPoint(12, 1);
        return officeIcon;
    };  
}
