

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(36.54893,-87.332213, 58);
        CreateMarker(35.585756,-88.815241, 79);
        

}

google.setOnLoadCallback(LoadMap);
