﻿//    <!-- Authored by Tim Richards, March 2008 -->
var gmap_map = null;
var gmap_marker00_blue = null;          // The blue marker as options to a new GMarker
var gmap_LatLng_US = null;              // pretty close to the center of the US
var gmap_iZoomUS = 4;                   // pretty close to seeing the entire US
var gmap_iZoomCounty = 14;              // pretty close to seeing a county

function gmap_add() {
    if (!GBrowserIsCompatible()) {
        document.getElementById("divMap").innerHTML = "Google reports that their Maps control will not work with your browser. Please try the latest popular browser.";
        return false;
    } else {
        gmap_map = new GMap2(document.getElementById("divMap"));
        gmap_map.setCenter(gmap_LatLng_US = new GLatLng(41.37680856570233, -100.01953125), gmap_iZoomUS); 
        gmap_map.addControl(new GLargeMapControl());
        gmap_map.addControl(new GScaleControl());
        gmap_map.addControl(new GHierarchicalMapTypeControl());
        gmap_map.addControl(new GOverviewMapControl());
	    gmap_map.enableScrollWheelZoom();

        {
            var iconBlue;
            iconBlue = new GIcon();
            iconBlue.image = 'images/mm_20_blue.png';           // required
//            iconBlue.shadow = 'images/mm_20_shadow.png';          // not required
//            iconBlue.iconSize = new GSize(12, 20);                // not required
//            iconBlue.shadowSize = new GSize(22, 20);              // not required
            iconBlue.iconAnchor = new GPoint(6, 20);            // required
//            iconBlue.infoWindowAnchor = new GPoint(5, 1);         // not required
            gmap_marker00_blue = { 
                icon: iconBlue,
                draggable: false,
                bouncy: false
            };
        }
        return true;
    }
}
