

google.load("maps", "2.x");

var map;

function CreateMarker(itemLat, itemLng, itemID)
{
    var icon = new GIcon();
    icon.image = "/images/pin.png";
    icon.shadow = "";
    icon.iconSize = new GSize(22, 20);
    icon.shadowSize = new GSize(0, 0);
    icon.iconAnchor = new GPoint(11, 18);
    icon.infoWindowAnchor = new GPoint(11, 18);

    var marker = new GMarker(new GLatLng(itemLat, itemLng), icon);

    GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml("<iframe src='Info.aspx?id=" + itemID + "' width='150' height='90' scrolling='no' frameborder='0'></iframe>");
    });
    
    map.addOverlay(marker);
}

function LoadMap()
{
    map = new GMap2(document.getElementById("gmap"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(35.156298,-91.47542),5);

    CreateMarker(33.1279332,-94.1769515, 57);
        CreateMarker(32.0904062,-96.4569404, 73);
        CreateMarker(33.117458,-96.097047, 81);
        CreateMarker(32.5082,-94.80212, 66);
        CreateMarker(31.34745,-94.720446, 71);
        CreateMarker(33.163207,-94.992427, 72);
        CreateMarker(31.5805228,-94.6701655, 69);
        CreateMarker(31.778936,-95.6205782, 77);
        CreateMarker(33.671567,-95.555579, 70);
        CreateMarker(33.6821973,-96.5851852, 63);
        CreateMarker(33.1179594,-95.5963532, 74);
        CreateMarker(33.4451413,-94.0649762, 13);
        CreateMarker(32.355297,-95.343979, 67);
        CreateMarker(33.8854857,-98.4881793, 65);
        

}

google.setOnLoadCallback(LoadMap);
