﻿// JScript File

    var baseIcon = new GIcon();
    baseIcon.image = "http://www.firstnight.org/Resources/Images/pin2.png";
    baseIcon.iconSize = new GSize(10, 10);
    baseIcon.iconAnchor = new GPoint(6, 6);
    baseIcon.infoWindowAnchor = new GPoint(6, 6);
    
    function createMarker(point, message) {
        // TODO: Use marker management???
    
        var icon = new GIcon(baseIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }


    var EventIcon = new GIcon();
    EventIcon.image = "http://www.firstnight.org/Resources/Images/EventPin.png";
    EventIcon.iconSize = new GSize(20, 20);
    EventIcon.iconAnchor = new GPoint(10, 10);
    EventIcon.infoWindowAnchor = new GPoint(10, 10);
    
    function createEventMarker(point, message) {
        var icon = new GIcon(EventIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }
    
    
    
    var FirstMonthIcon = new GIcon();
    FirstMonthIcon.image = "http://www.firstnight.org/Resources/Images/FirstMonthPin.png";
    FirstMonthIcon.iconSize = new GSize(20, 20);
    FirstMonthIcon.iconAnchor = new GPoint(10, 10);
    FirstMonthIcon.infoWindowAnchor = new GPoint(10, 10);
    
    function createFirstMonthMarker(point, message) {
        var icon = new GIcon(FirstMonthIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }
    
    
    
    var HotelIcon = new GIcon();
    HotelIcon.image = "http://www.firstnight.org/Resources/Images/HotelPin.png";
    HotelIcon.iconSize = new GSize(20, 20);
    HotelIcon.iconAnchor = new GPoint(10, 10);
    HotelIcon.infoWindowAnchor = new GPoint(10, 10);
    
    function createHotelMarker(point, message) {
        var icon = new GIcon(HotelIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }    
    
    
    
    var ParkingIcon = new GIcon();
    ParkingIcon.image = "http://www.firstnight.org/Resources/Images/ParkingPin.png";
    ParkingIcon.iconSize = new GSize(20, 20);
    ParkingIcon.iconAnchor = new GPoint(10, 10);
    ParkingIcon.infoWindowAnchor = new GPoint(10, 10);
    
    function createParkingMarker(point, message) {
        var icon = new GIcon(ParkingIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }    
    
    
    
    var RetailerIcon = new GIcon();
    RetailerIcon.image = "http://www.firstnight.org/Resources/Images/RetailerPin.png";
    RetailerIcon.iconSize = new GSize(20, 20);
    RetailerIcon.iconAnchor = new GPoint(10, 10);
    RetailerIcon.infoWindowAnchor = new GPoint(10, 10);
    
    function createRetailerMarker(point, message) {
        var icon = new GIcon(RetailerIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }    
     
     
     
    var TheTIcon = new GIcon();
    TheTIcon.image = "http://www.firstnight.org/Resources/Images/TheTPin.png";
    TheTIcon.iconSize = new GSize(20, 20);
    TheTIcon.iconAnchor = new GPoint(10, 10);
    TheTIcon.infoWindowAnchor = new GPoint(10, 10);
    
    function createTheTMarker(point, message) {
        var icon = new GIcon(TheTIcon);
        var marker = new GMarker(point, icon);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(message);
        });
        return marker;
    }    
          