function WAMapRef(mapObj)  {
  this.obj = mapObj;
  this.directions = false;
  this.icons = [];
  this.markers = [];
  this.addresses = [];
  this.points = [];
  this.getPointByAddress = getPointByAddressFunc;
  return this;
}

function waitForGeo()  {
  var startDate = new Date();
  var endDate = new Date();
  while ((endDate-startDate) < 200)  {
    endDate = new Date();
  }
}

function WAMapPoint(theMarker, theAddress, theIcon)  {
  this.icon = theIcon;
  this.marker = theMarker;
  this.address = theAddress;
  return this;
}

function getPointByAddressFunc(value,attname)  {
  if (!attname) attname = "street";
  for (var x=0; x < this.addresses.length; x++) {
    if (eval("this.addresses[x]."+attname) == value)  {
      return WAMapPoint(this.markers[x],this.addresses[x],this.icons[x]);
    }
  }
  return false;
}


function wagmp_map_6() {
  if(GBrowserIsCompatible()) {
    if(!document.getElementById('wagmp_map_6')) return false;
    var map = new GMap2(document.getElementById('wagmp_map_6'));
    wagmp_map_6_obj = new WAMapRef(map);
    map.enableContinuousZoom();
    map.enableDoubleClickZoom();
    map.addControl(new GLargeMapControl());
    map.addControl(new GScaleControl());
    map.addControl(new GMapTypeControl());
    map.addControl(new GOverviewMapControl());
    var geocoder = new GClientGeocoder();
    
    var fromAddress = {
      enabled: false,
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      full: ''
    };

    var icon_0 = new GIcon();
    icon_0.image = 'http://google.webassist.com/google/markers/star/deepjungle.png';
    icon_0.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_0.iconSize = new GSize(29,39);
    icon_0.shadowSize = new GSize(29,39);
    icon_0.iconAnchor = new GPoint(15,15);
    icon_0.infoWindowAnchor = new GPoint(19,7);
    icon_0.printImage = 'http://google.webassist.com/google/markers/star/deepjungle.gif';
    icon_0.mozPrintImage = 'http://google.webassist.com/google/markers/star/deepjungle_mozprint.png';
    icon_0.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_0.transparent = 'http://google.webassist.com/google/markers/star/deepjungle_transparent.png';
    
    var address_0 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Dundas Bay</strong><br />We\'ll spend an entire day exploring the spectacular<br /> wilderness and erratic boulder fields of Dundas Bay.<br /> Otters, black and brown bears, wolves, moose, and<br /> hoary marmots can be seen grazing these<br /> wildflower-filled meadows. Next, we’ll hike through a<br /> rainforest of Sitka spruce, skunk cabbage, and<br /> ferns, to explore and learn about a mature muskeg.</span>',
      full: '58.433536,-136.509589',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.433536',
      longitude: '-136.509589',
      markerStyle: 'Star',
      markerColor: 'Deep Jungle'      
    };
    
    var point_0 = new GLatLng(address_0.latitude, address_0.longitude);
      var marker_0 = new GMarker(point_0, icon_0);
      GEvent.addListener(marker_0, 'click', function() {
        marker_0.openInfoWindowHtml(address_0.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_0' != 'address_8') {
            map.setCenter(point_0, 13);
            map.addOverlay(marker_0);
            marker_0.openInfoWindowHtml(address_0.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_0);
      wagmp_map_6_obj.addresses.push(address_0);
      wagmp_map_6_obj.icons.push(icon_0);
      wagmp_map_6_obj.points.push(point_0);

    var icon_1 = new GIcon();
    icon_1.image = 'http://google.webassist.com/google/markers/star/nautica.png';
    icon_1.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_1.iconSize = new GSize(29,39);
    icon_1.shadowSize = new GSize(29,39);
    icon_1.iconAnchor = new GPoint(15,15);
    icon_1.infoWindowAnchor = new GPoint(19,7);
    icon_1.printImage = 'http://google.webassist.com/google/markers/star/nautica.gif';
    icon_1.mozPrintImage = 'http://google.webassist.com/google/markers/star/nautica_mozprint.png';
    icon_1.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_1.transparent = 'http://google.webassist.com/google/markers/star/nautica_transparent.png';
    
    var address_1 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>George Island</strong><br />This dynamic group of small islands includes our<br /> protected anchorage at remote George Island,<br /> where we\'ll hear whales blowing, sea lions barking,<br /> and waterfalls rushing. We’ll explore George Island<br /> by foot and by kayak, and we’re certain to see lots<br /> of sea otters and humpback whales.</span>',
      full: '58.194958,-136.388053',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.194958',
      longitude: '-136.388053',
      markerStyle: 'Star',
      markerColor: 'Nautica'      
    };
    
    var point_1 = new GLatLng(address_1.latitude, address_1.longitude);
      var marker_1 = new GMarker(point_1, icon_1);
      GEvent.addListener(marker_1, 'click', function() {
        marker_1.openInfoWindowHtml(address_1.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_1' != 'address_8') {
            map.setCenter(point_1, 13);
            map.addOverlay(marker_1);
            marker_1.openInfoWindowHtml(address_1.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_1);
      wagmp_map_6_obj.addresses.push(address_1);
      wagmp_map_6_obj.icons.push(icon_1);
      wagmp_map_6_obj.points.push(point_1);

    var icon_2 = new GIcon();
    icon_2.image = 'http://google.webassist.com/google/markers/star/slate.png';
    icon_2.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_2.iconSize = new GSize(29,39);
    icon_2.shadowSize = new GSize(29,39);
    icon_2.iconAnchor = new GPoint(15,15);
    icon_2.infoWindowAnchor = new GPoint(19,7);
    icon_2.printImage = 'http://google.webassist.com/google/markers/star/slate.gif';
    icon_2.mozPrintImage = 'http://google.webassist.com/google/markers/star/slate_mozprint.png';
    icon_2.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_2.transparent = 'http://google.webassist.com/google/markers/star/slate_transparent.png';
    
    var address_2 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Auke Bay</strong><br />Participants should have ample time to settle into a<br /> hotel in bustling downtown Juneau, or catch an<br /> evening flight from Juneau Airport.</span>',
      full: '58.384314,-134.648758',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.384314',
      longitude: '-134.648758',
      markerStyle: 'Star',
      markerColor: 'Slate'      
    };
    
    var point_2 = new GLatLng(address_2.latitude, address_2.longitude);
      var marker_2 = new GMarker(point_2, icon_2);
      GEvent.addListener(marker_2, 'click', function() {
        marker_2.openInfoWindowHtml(address_2.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_2' != 'address_8') {
            map.setCenter(point_2, 13);
            map.addOverlay(marker_2);
            marker_2.openInfoWindowHtml(address_2.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_2);
      wagmp_map_6_obj.addresses.push(address_2);
      wagmp_map_6_obj.icons.push(icon_2);
      wagmp_map_6_obj.points.push(point_2);

    var icon_3 = new GIcon();
    icon_3.image = 'http://google.webassist.com/google/markers/star/poppy.png';
    icon_3.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_3.iconSize = new GSize(29,39);
    icon_3.shadowSize = new GSize(29,39);
    icon_3.iconAnchor = new GPoint(15,15);
    icon_3.infoWindowAnchor = new GPoint(19,7);
    icon_3.printImage = 'http://google.webassist.com/google/markers/star/poppy.gif';
    icon_3.mozPrintImage = 'http://google.webassist.com/google/markers/star/poppy_mozprint.png';
    icon_3.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_3.transparent = 'http://google.webassist.com/google/markers/star/poppy_transparent.png';
    
    var address_3 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Pleasant Island</strong><br />Past the western point of Pleasant Island is a string<br /> of lovely sandy beaches. This is where we’ll land our<br /> kayaks or skiff, and enjoy a lunch of locally smoked<br /> salmon, fresh veggies and fruit. While ashore, we\'ll<br /> explore the moist interior of the forest, home to a<br /> variety of ferns, mushrooms and wildflowers. Moss<br /> carpets the forest floor, and drapes off the<br /> branches. This is truly old growth forest, and was<br /> not covered by recent glacial advances. We\'ll hike<br /> into open areas of bog muskeg, and soak up the<br /> ambience of this beautifully unique place.</span>',
      full: '58.346083,-135.517903',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.346083',
      longitude: '-135.517903',
      markerStyle: 'Star',
      markerColor: 'Poppy'      
    };
    
    var point_3 = new GLatLng(address_3.latitude, address_3.longitude);
      var marker_3 = new GMarker(point_3, icon_3);
      GEvent.addListener(marker_3, 'click', function() {
        marker_3.openInfoWindowHtml(address_3.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_3' != 'address_8') {
            map.setCenter(point_3, 13);
            map.addOverlay(marker_3);
            marker_3.openInfoWindowHtml(address_3.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_3);
      wagmp_map_6_obj.addresses.push(address_3);
      wagmp_map_6_obj.icons.push(icon_3);
      wagmp_map_6_obj.points.push(point_3);

    var icon_4 = new GIcon();
    icon_4.image = 'http://google.webassist.com/google/markers/star/cabosunset.png';
    icon_4.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_4.iconSize = new GSize(29,39);
    icon_4.shadowSize = new GSize(29,39);
    icon_4.iconAnchor = new GPoint(15,15);
    icon_4.infoWindowAnchor = new GPoint(19,7);
    icon_4.printImage = 'http://google.webassist.com/google/markers/star/cabosunset.gif';
    icon_4.mozPrintImage = 'http://google.webassist.com/google/markers/star/cabosunset_mozprint.png';
    icon_4.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_4.transparent = 'http://google.webassist.com/google/markers/star/cabosunset_transparent.png';
    
    var address_4 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Funter Bay</strong><br />Off the northwest coast of Admiralty Island,<br /> humpback whales often catch herring and other small<br /> fish using a technique called bubble net feeding.<br /> Unique to humpbacks, bubble-net feeding requires a<br /> group of whales to work cooperatively.</span>',
      full: '58.303761,-134.956569',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.303761',
      longitude: '-134.956569',
      markerStyle: 'Star',
      markerColor: 'Cabo Sunset'      
    };
    
    var point_4 = new GLatLng(address_4.latitude, address_4.longitude);
      var marker_4 = new GMarker(point_4, icon_4);
      GEvent.addListener(marker_4, 'click', function() {
        marker_4.openInfoWindowHtml(address_4.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_4' != 'address_8') {
            map.setCenter(point_4, 13);
            map.addOverlay(marker_4);
            marker_4.openInfoWindowHtml(address_4.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_4);
      wagmp_map_6_obj.addresses.push(address_4);
      wagmp_map_6_obj.icons.push(icon_4);
      wagmp_map_6_obj.points.push(point_4);

    var icon_5 = new GIcon();
    icon_5.image = 'http://google.webassist.com/google/markers/star/desertspice.png';
    icon_5.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_5.iconSize = new GSize(29,39);
    icon_5.shadowSize = new GSize(29,39);
    icon_5.iconAnchor = new GPoint(15,15);
    icon_5.infoWindowAnchor = new GPoint(19,7);
    icon_5.printImage = 'http://google.webassist.com/google/markers/star/desertspice.gif';
    icon_5.mozPrintImage = 'http://google.webassist.com/google/markers/star/desertspice_mozprint.png';
    icon_5.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_5.transparent = 'http://google.webassist.com/google/markers/star/desertspice_transparent.png';
    
    var address_5 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Pt. Adolphus</strong><br />At Pt. Adolphus, we\'ll observe the movement of<br /> feeding humpback whales, as we paddle our sea<br /> kayaks or cruise in our inflatable boat along the<br /> shore of Chichagof Island. From the 1,000 foot<br /> depths of Icy Strait to the rocky shorelines, this is a<br /> sea kayaking paradise of immense scale and<br /> beauty, and offers us the opportunity to view and<br /> photograph the amazing humpback whales, stellar<br /> sea lions, and harbor seals that congregate here to<br /> feed each summer.</span>',
      full: '58.284411,-135.799769',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.284411',
      longitude: '-135.799769',
      markerStyle: 'Star',
      markerColor: 'Desert Spice'      
    };
    
    var point_5 = new GLatLng(address_5.latitude, address_5.longitude);
      var marker_5 = new GMarker(point_5, icon_5);
      GEvent.addListener(marker_5, 'click', function() {
        marker_5.openInfoWindowHtml(address_5.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_5' != 'address_8') {
            map.setCenter(point_5, 13);
            map.addOverlay(marker_5);
            marker_5.openInfoWindowHtml(address_5.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_5);
      wagmp_map_6_obj.addresses.push(address_5);
      wagmp_map_6_obj.icons.push(icon_5);
      wagmp_map_6_obj.points.push(point_5);

    var icon_6 = new GIcon();
    icon_6.image = 'http://google.webassist.com/google/markers/star/moab.png';
    icon_6.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_6.iconSize = new GSize(29,39);
    icon_6.shadowSize = new GSize(29,39);
    icon_6.iconAnchor = new GPoint(15,15);
    icon_6.infoWindowAnchor = new GPoint(19,7);
    icon_6.printImage = 'http://google.webassist.com/google/markers/star/moab.gif';
    icon_6.mozPrintImage = 'http://google.webassist.com/google/markers/star/moab_mozprint.png';
    icon_6.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_6.transparent = 'http://google.webassist.com/google/markers/star/moab_transparent.png';
    
    var address_6 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Mud Bay</strong><br />We’ll take the skiff up Mud River to explore for brown<br /> bears, examine the forest wilderness, view flocks of<br /> ducks and geese in the open meadows, and<br /> photograph the vivid displays of lupine, irises, river<br /> beauties, chocolate lilies, bog orchids and Indian<br /> paintbrush. Bears in this area forage on the<br /> abundance of berries, and pink salmon make a<br /> mid-season run up the river. For those who are<br /> interested, stream fishing for Dolly Varden in the<br /> Mud River is world-class.</span>',
      full: '58.176044,-135.971775',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.176044',
      longitude: '-135.971775',
      markerStyle: 'Star',
      markerColor: 'Moab'      
    };
    
    var point_6 = new GLatLng(address_6.latitude, address_6.longitude);
      var marker_6 = new GMarker(point_6, icon_6);
      GEvent.addListener(marker_6, 'click', function() {
        marker_6.openInfoWindowHtml(address_6.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_6' != 'address_8') {
            map.setCenter(point_6, 13);
            map.addOverlay(marker_6);
            marker_6.openInfoWindowHtml(address_6.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_6);
      wagmp_map_6_obj.addresses.push(address_6);
      wagmp_map_6_obj.icons.push(icon_6);
      wagmp_map_6_obj.points.push(point_6);

    var icon_7 = new GIcon();
    icon_7.image = 'http://google.webassist.com/google/markers/star/deepjungle.png';
    icon_7.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_7.iconSize = new GSize(29,39);
    icon_7.shadowSize = new GSize(29,39);
    icon_7.iconAnchor = new GPoint(15,15);
    icon_7.infoWindowAnchor = new GPoint(19,7);
    icon_7.printImage = 'http://google.webassist.com/google/markers/star/deepjungle.gif';
    icon_7.mozPrintImage = 'http://google.webassist.com/google/markers/star/deepjungle_mozprint.png';
    icon_7.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_7.transparent = 'http://google.webassist.com/google/markers/star/deepjungle_transparent.png';
    
    var address_7 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Idaho Inlet</strong><br />As we cruise past Idaho Inlet, we’ll see small groups<br /> of adorable sea otters, and we\'ll observe them<br /> silently from the bow. Otters keep their fur<br /> immaculately clean, and their constant grooming is<br /> highly entertaining.</span>',
      full: '58.159928,-136.218967',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.159928',
      longitude: '-136.218967',
      markerStyle: 'Star',
      markerColor: 'Deep Jungle'      
    };
    
    var point_7 = new GLatLng(address_7.latitude, address_7.longitude);
      var marker_7 = new GMarker(point_7, icon_7);
      GEvent.addListener(marker_7, 'click', function() {
        marker_7.openInfoWindowHtml(address_7.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_7' != 'address_8') {
            map.setCenter(point_7, 13);
            map.addOverlay(marker_7);
            marker_7.openInfoWindowHtml(address_7.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_7);
      wagmp_map_6_obj.addresses.push(address_7);
      wagmp_map_6_obj.icons.push(icon_7);
      wagmp_map_6_obj.points.push(point_7);

    var icon_8 = new GIcon();
    icon_8.image = 'http://google.webassist.com/google/markers/star/pacifica.png';
    icon_8.shadow = 'http://google.webassist.com/google/markers/star/shadow.png';
    icon_8.iconSize = new GSize(29,39);
    icon_8.shadowSize = new GSize(29,39);
    icon_8.iconAnchor = new GPoint(15,15);
    icon_8.infoWindowAnchor = new GPoint(19,7);
    icon_8.printImage = 'http://google.webassist.com/google/markers/star/pacifica.gif';
    icon_8.mozPrintImage = 'http://google.webassist.com/google/markers/star/pacifica_mozprint.png';
    icon_8.printShadow = 'http://google.webassist.com/google/markers/star/shadow.gif';
    icon_8.transparent = 'http://google.webassist.com/google/markers/star/pacifica_transparent.png';
    
    var address_8 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'custom',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Alaska\'s Wildlife</strong><br />Five-day and seven-day sailing adventures which focus on two of<br /> Southeast Alaska’s greatest attractions – whales and<br /> wildlife. We’ll spend ample time watching both. The<br /> views we\'ll see during these expeditions are<br /> unbelievable. We hope to observe fantastic whale<br /> behaviors, and a great variety of wildlife.</span>',
      full: '58.278815,-135.566547',
      isdefault: true,
      addressType: 'coordinates',
      loop: '',
      latitude: '58.278815',
      longitude: '-135.566547',
      markerStyle: 'Star',
      markerColor: 'Pacifica'      
    };
    
    var point_8 = new GLatLng(address_8.latitude, address_8.longitude);
      var marker_8 = new GMarker(point_8, icon_8);
      GEvent.addListener(marker_8, 'click', function() {
        marker_8.openInfoWindowHtml(address_8.infowindowtext);
      });
      if(!fromAddress.enabled || 'address_8' != 'address_8') {
            map.setCenter(point_8, 9);
            map.addOverlay(marker_8);
            marker_8.openInfoWindowHtml(address_8.infowindowtext);
      }
      wagmp_map_6_obj.markers.push(marker_8);
      wagmp_map_6_obj.addresses.push(address_8);
      wagmp_map_6_obj.icons.push(icon_8);
      wagmp_map_6_obj.points.push(point_8);


  }
}
