/**
 * @author bposner
 */

var map;
var point = new Array();

function initMap(lat,lng)
{
    try {
        var mapEl = document.getElementById("map");
        if (mapEl == null) return;
    }
    catch (e) {
        return;
    }
    if (GBrowserIsCompatible()) {
        map = new GMap2(mapEl);
        map.setUIToDefault();
        map.disableScrollWheelZoom();
		point[0] = new GLatLng(lat,lng);
        //map.setCenter(point[0], 15);
    }
}

function addPin(id,lat,lng)
{
	point[id] = new GLatLng(lat,lng);
    if (!map.isLoaded()) map.setCenter(point[id],15)
	map.addOverlay(new GMarker(point[id]));
}

function scrollTo(id)
{
    map.panTo(point[id], 15);
}

