    var map;
    var geocoder;

    function initialize() {
      map = new GMap2(document.getElementById("map_canvas"));
      map.addControl(new google.maps.LocalSearch());
var MyControl = new GSmallMapControl(); 
var MyTypeControl = new GMapTypeControl();

var e_icon = new GIcon();


      map.setCenter(new GLatLng(42.796487, -75.753058), 7);
e_icon.image = "zone_ovrly.png";
//e_icon.shadow = "http://www.mvhcc.org/images/zone_ovrly.png";
e_icon.iconSize = new GSize(120, 120);
//e_icon.shadowSize = new GSize(99, 99);
e_icon.iconAnchor = new GPoint(60, 60);
e_icon.infoWindowAnchor = new GPoint(10, 10);      

var boundaries = new GLatLngBounds(new GLatLng(42.013996, -75.820055) , new GLatLng(42.88497,-74.233958));
var zoom_ovrly = new GGroundOverlay("zoom_ovrly.png", boundaries);
map.addOverlay(zoom_ovrly);
  var whtsup_point = new GLatLng(42.452971, -75.063157);
var marker = new GMarker(whtsup_point, e_icon);
var zone1 = map.addOverlay(marker);
GEvent.bind(marker, "click", this, zone_zoom);



      //zone_ovrly.png
    map.enableDoubleClickZoom();
    map.enableContinuousZoom();
    map.addControl(MyControl);
    map.addControl(MyTypeControl);
    
      geocoder = new GClientGeocoder();
//      disp_pnts();
    }



function zone_zoom()
{
map.clearOverlays();
var boundaries = new GLatLngBounds(new GLatLng(42.013996, -75.820055) , new GLatLng(42.88497,-74.233958));
var zoom_ovrly = new GGroundOverlay("zoom_ovrly.png", boundaries);
map.addOverlay(zoom_ovrly);

//map.removeOverlay(marker)
map.setCenter(new GLatLng(42.452971, -75.063157), 9);

//zoom_map('nysmap', 'images/whatsup_zone1_zoom.gif');
        
//e_icon.iconSize = new GSize(750, 580);
//e_icon.iconAnchor = new GPoint(375, 260);

}
    // addAddressToMap() is called when the geocoder returns an
    // answer.  It adds a marker to the map with an open info window
    // showing the nicely formatted version of the address and the country code.
    
    function addAddressToMap(response) {
//      map.clearOverlays();

      if (response) {
      var dops = document.dispdist.q.options;
      var dist_name = dops[dops.selectedIndex].text;
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],
                            place.Point.coordinates[0]);
        marker = new GMarker(point);
        map.addOverlay(marker);
        
var address_array=place.address.split(",");
var statezip_array=address_array[2].split(" ");
var zip=statezip_array[2];
if(!zip)
{
var statezip_array=address_array[1].split(" ");
var zip=statezip_array[2];
}
              
      var address_p_w_e = document.dispdist.q.value;
      var address_p_w_e_array=address_p_w_e.split("!");
      var phone_web_email_array=address_p_w_e_array[1].split(",");

      var phone=phone_web_email_array[0];
      
      var website=phone_web_email_array[1];
      var ht_part=website.substring(0,4);
      if(ht_part!='http')
      {
      web_link='http://'+website;
      }
      else
      {
      var web_link=website;
      }
      
      var wd_a=web_link.split('//');
      var web_disp=wd_a[1];
      var email=phone_web_email_array[2];      
      var cust_num=phone_web_email_array[3];      
      
      var window_txt='<div><a href=?customer_id='+cust_num+' class=pk_nav>' + dist_name + '</a></div><div class=pk_point_txt>'+ place.address + '</div><div class=pk_point_txt>'+phone+'</div><div><a href=mailto:'+email+' class=pk_nav>'+email+'</a></div><div><a href='+web_link+' target=_blank>'+web_disp+'</a></div>';
            window_txt+='<a href=\"http://www.google.com/maps?source=uds&daddr='+place.address+'\" target=_blank>Get Directions</a>';

        marker.bindInfoWindowHtml(window_txt);
//         +'<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode);        
        
        marker.openInfoWindowHtml(window_txt);
//         + '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode);
      }
    }


    
    // showLocation() is called when you click on the Search button
    // in the form.  It geocodes the address entered into the form
    // and adds a marker to the map at that location.
    function showLocation() {
      var address_email = document.dispdist.q.value;
      var address_email_array=address_email.split("!");
      geocoder.getLocations(address_email_array[0], addAddressToMap);
      
    }
    
    
   // findLocation() is used to enter the sample addresses into the form.
    function findLocation(address) {
    go_top();
      document.forms[0].q.value = address;
      showLocation();
    }
    


function go_top()
{
window.location="#top";
}