

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(37.3264,-89.5635, 45);
        CreateMarker(37.178576,-94.322596, 46);
        CreateMarker(38.9663761,-92.3417144, 83);
        CreateMarker(37.7877479,-90.4226273, 89);
        CreateMarker(38.579005,-92.1942037, 80);
        CreateMarker(37.0840074,-94.4682692, 47);
        CreateMarker(37.6566522,-92.6675873, 104);
        CreateMarker(36.8675098,-94.3808705, 68);
        CreateMarker(36.7509943,-90.4097407, 49);
        CreateMarker(38.6834035,-93.2513099, 93);
        CreateMarker(37.183543,-93.344747, 99);
        CreateMarker(37.235027,-93.260752, 48);
        CreateMarker(36.7461088,-91.8726161, 85);
        

}

google.setOnLoadCallback(LoadMap);
