
    var map;
    var BBICRegionsGeoXML; 


    function CreateRegionMarkers()
    {
      // Create Northwest region marker icon
      var NorthwestRegionIcon = new GIcon();
      NorthwestRegionIcon.image = "images/map-northwest.png";
      NorthwestRegionIcon.iconSize = new GSize(132, 96);
      NorthwestRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      NorthwestMarkerOptions = { icon:NorthwestRegionIcon };
      var NorthwestLatLng = new GLatLng(40.546504,-107.939673);
      var NorthwestMarker = new GMarker(NorthwestLatLng,NorthwestMarkerOptions);

      GEvent.addListener(NorthwestMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=25';
      });


      // Create Southwest region marker icon
      var SouthwestRegionIcon = new GIcon();
      SouthwestRegionIcon.image = "images/map-southwest.png";
      SouthwestRegionIcon.iconSize = new GSize(132, 96);
      SouthwestRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      SouthwestMarkerOptions = { icon:SouthwestRegionIcon };
      var SouthwestLatLng = new GLatLng(38.247518,-108.739673);
      var SouthwestMarker = new GMarker(SouthwestLatLng,SouthwestMarkerOptions);

      GEvent.addListener(SouthwestMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=27';
      });


      // Create Frong Range region marker icon
      var FrongRangeRegionIcon = new GIcon();
      FrongRangeRegionIcon.image = "images/map-frontrange.png";
      FrongRangeRegionIcon.iconSize = new GSize(132, 96);
      FrongRangeRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      FrongRangeMarkerOptions = { icon:FrongRangeRegionIcon };
      var FrongRangeLatLng = new GLatLng(40.804665,-105.700708);
      var FrongRangeMarker = new GMarker(FrongRangeLatLng,FrongRangeMarkerOptions);

      GEvent.addListener(FrongRangeMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=148';
      });


      // Create Denver Area region marker icon
      var DenverAreaRegionIcon = new GIcon();
      DenverAreaRegionIcon.image = "images/map-denverarea.png";
      DenverAreaRegionIcon.iconSize = new GSize(132, 96);
      DenverAreaRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      DenverAreaMarkerOptions = { icon:DenverAreaRegionIcon };
      var DenverAreaLatLng = new GLatLng(39.859118,-105.700708);
      var DenverAreaMarker = new GMarker(DenverAreaLatLng,DenverAreaMarkerOptions);

      GEvent.addListener(DenverAreaMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=151';
      });


      // Create South Central region marker icon
      var SouthCentralRegionIcon = new GIcon();
      SouthCentralRegionIcon.image = "images/map-southcentral.png";
      SouthCentralRegionIcon.iconSize = new GSize(132, 96);
      SouthCentralRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      SouthCentralMarkerOptions = { icon:SouthCentralRegionIcon };
      var SouthCentralLatLng = new GLatLng(38.333865,-106.700586);
      var SouthCentralMarker = new GMarker(SouthCentralLatLng,SouthCentralMarkerOptions);

      GEvent.addListener(SouthCentralMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=147';
      });


      // Create Northeast region marker icon
      var NortheastRegionIcon = new GIcon();
      NortheastRegionIcon.image = "images/map-northeast.png";
      NortheastRegionIcon.iconSize = new GSize(132, 96);
      NortheastRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      NortheastMarkerOptions = { icon:NortheastRegionIcon };
      var NortheastLatLng = new GLatLng(40.246504,-103.692334);
      var NortheastMarker = new GMarker(NortheastLatLng,NortheastMarkerOptions);

      GEvent.addListener(NortheastMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=149';
      });


      // Create Southeast region marker icon
      var SoutheastRegionIcon = new GIcon();
      SoutheastRegionIcon.image = "images/map-southeast.png";
      SoutheastRegionIcon.iconSize = new GSize(132, 96);
      SoutheastRegionIcon.iconAnchor = new GPoint(0, 0);
      // Set up our GMarkerOptions object
      SoutheastMarkerOptions = { icon:SoutheastRegionIcon };
      var SoutheastLatLng = new GLatLng(38.144495,-104.277979);
      var SoutheastMarker = new GMarker(SoutheastLatLng,SoutheastMarkerOptions);

      GEvent.addListener(SoutheastMarker,'click',function()
      {
        top.location.href = 'display-attractions.php?region_id=150';
      });


      map.addOverlay(NorthwestMarker);
      map.addOverlay(SouthwestMarker);
      map.addOverlay(FrongRangeMarker);
      map.addOverlay(DenverAreaMarker);
      map.addOverlay(SouthCentralMarker);
      map.addOverlay(NortheastMarker);
      map.addOverlay(SoutheastMarker);
    }


    function initialize_attraction_map()
    {
      if (GBrowserIsCompatible())
      {
        // initialize KML overlay 
        BBICRegionsGeoXML = new GGeoXml("http://www.innsofcolorado.org/google-maps/BBIC-Region-Map.kml");

        // initialize map
        map = new GMap2(document.getElementById("map_canvas")); 

        map.setCenter(new GLatLng(39.13006,-105.59000), 7); 

        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());

        map.addOverlay(BBICRegionsGeoXML);

        CreateRegionMarkers();
      }
    } 

