    // -----------------------------------------------------------------------------------------
    // google maps ftc object
    var ftc_map = {};

    ftc_map.map               = false;          // the global google maps handle
    ftc_map.map_container     = "map_canvas";   // the dom container id
    ftc_map.map_container_obj = false;          // the dom container object
    ftc_map.center_coords     = {};             // coords.lat, coords.lon


    // array container for markers
    // markers are objects like this:
    // .. marker.G_obj          the gmap object handle
    // .. marker.G_coords       the gmap corresponding coordinates (lat,long)
    // .. marker.label          the simple label on mouse over
    // .. marker.html           the info window on click
    // .. marker.reference_id   a custom id working as implementation reference

    ftc_map.markers           = new Array();
  
    // GMap-Control handles
    try {
      ftc_map.map_type_control  = new GMapTypeControl();
      ftc_map.navi_control      = new GLargeMapControl();
      ftc_map.map_scale_control = new GScaleControl();
    }catch(e){}

    // can be called when set a new marker by mouseclick
    ftc_map.click_callback    = false;

    ftc_map.markers_draggable = true;
    ftc_map.markers_removable = true;

    // default settings that can be changed by user interaction
    //
    // when changing these by user interface, access this properties
    // .. and then call the corresponding method like:
    // .. ftc_map.navi_on = true; ftc_map.set_navi_ctrl();

    ftc_map.width             = 640;
    ftc_map.height            = 480;
    
    ftc_map.map_zoom          = 4;

    // default center coords => Europe
    ftc_map.center_coords.lat = 49.468124067331644;
    ftc_map.center_coords.lon = 6.6357421875;

    ftc_map.map_type          = "G_SATELLITE_MAP";

    ftc_map.navi_on           = true;
    ftc_map.type_on           = true;
    ftc_map.wheelzoom_on      = true;
    ftc_map.mousenavi_on      = true;

    // language dependent strings
    ftc_map.strings = {}
    ftc_map.strings.remove_marker = "Markierung von der Karte entfernen";
    ftc_map.strings.goto_album    = "Zum Album";

    // ------------------------------------------------------
    // --   F U N C T I O N S   --
    // ------------------------------------------------------ 

      ftc_map.init = function() {
        ftc_map.map_type_control  = new GMapTypeControl();
        ftc_map.navi_control      = new GLargeMapControl();
        ftc_map.map_scale_control = new GScaleControl();
      }


    ftc_map.set_size = function() {
      ftc_map.map_container_obj.style.width = ftc_map.width;
      ftc_map.map_container_obj.style.height = ftc_map.height;
      ftc_map.init_map();
    }

    // ------------------------------------------------------
    // Sat/Map/Hyprid
    ftc_map.set_type = function() {
      ftc_map.map.setMapType(eval(ftc_map.map_type));
    }

    // ------------------------------------------------------
    // navigation cross and slide bar
    ftc_map.set_navi_ctrl = function() {
      if(ftc_map.navi_on) {
        ftc_map.map.addControl(ftc_map.navi_control);
      } else {
        ftc_map.map.removeControl(ftc_map.navi_control);
      }
    }

    // ------------------------------------------------------
    // allow type switching (sat/map/hybrid)
    ftc_map.set_type_ctrl = function() {
      if(ftc_map.type_on) {
        ftc_map.map.addControl(ftc_map.map_type_control);
      } else {
        ftc_map.map.removeControl(ftc_map.map_type_control);
      }
    }
    
    // ------------------------------------------------------
    // allow zooming by mouse wheel
    ftc_map.set_wheel_zoom = function() {
      if(ftc_map.wheelzoom_on) {
        ftc_map.map.enableScrollWheelZoom();
      } else {
        ftc_map.map.disableScrollWheelZoom();
      }
    }

    // ------------------------------------------------------
    // allow navigating by dragging the mouse
    ftc_map.set_mouse_navi = function() {
      if(ftc_map.mousenavi_on) {
        ftc_map.map.enableDragging();
      } else {
        ftc_map.map.disableDragging();
      }
    }

    // ------------------------------------------------------
    // draw map to container
    // also used by set-size to re-init. therefore we re-init the controls here too.
    ftc_map.init_map = function() {
      if(!ftc_map.map_container_obj) {
        ftc_map.map_container_obj = document.getElementById(ftc_map.map_container);
      }
      try {
        ftc_map.map = new GMap2(document.getElementById(ftc_map.map_container));
        ftc_map.map.setCenter(new GLatLng(ftc_map.center_coords.lat, ftc_map.center_coords.lon), ftc_map.map_zoom);
      } catch(e) {
        return false;
      }
      
      ftc_map.init_map_controls();
      GEvent.addListener(ftc_map.map, 'click', ftc_map.click_map);

      // if we have markers re-set them onto map
      if(ftc_map.markers.length > 0) {
        for(i in ftc_map.markers) {
          ftc_map.map.addOverlay(ftc_map.markers[i].G_obj);
        }
      }
      return true;
    }

    // ------------------------------------------------------
    // initialize the map controls depending on object properties
    ftc_map.init_map_controls = function() {
      ftc_map.set_mouse_navi();
      ftc_map.set_wheel_zoom();
      ftc_map.set_type_ctrl();
      ftc_map.set_navi_ctrl();
      ftc_map.set_type();
    }

    // ------------------------------------------------------
    // set new marker on click of the map
    ftc_map.click_map = function(dummy, point) {

      // no callback means no click action
      if(!ftc_map.click_callback) return;

      // only if clicked on a free area of the map null is returned
      if(dummy != null) return;
      
      

      // build and store marker object
      var marker = {};
      marker.G_obj    = new GMarker(point, {draggable: ftc_map.markers_draggable});
      marker.G_coords = marker.G_obj.getPoint();
      ftc_map.markers.push(marker);

      // display the marker
      ftc_map.map.addOverlay(marker.G_obj);

      // if a click-callback for each marker is set call it with the marker-id
      if(ftc_map.click_callback) {
        ftc_map.click_callback(ftc_map.markers.length - 1);
      }
    }
    
    // ------------------------------------------------------
    // set marker info window html
    ftc_map.set_marker_html = function(marker_idx, html, add_close_link) {

      // add a close link if desired
      if(add_close_link) {
        html += "<p><br/><u style=\"cursor:pointer; color:#FF771F;\" onclick=\"ftc_map.remove_marker(" + marker_idx + ")\">" + ftc_map.strings.remove_marker + "</u></p>";
      }
      
      // store html
      ftc_map.markers[marker_idx].html = html;

      // click event: open info window
      GEvent.addListener(ftc_map.markers[marker_idx].G_obj, "click", function() {
        ftc_map.markers[marker_idx].G_obj.openInfoWindowHtml(html);
        
        // clear all mousout listeners - when 
        GEvent.clearListeners(ftc_map.markers[marker_idx].G_obj,  "mouseout");
      });

      // dragend event: remove opened info window when stopping dragging
      GEvent.addListener(ftc_map.markers[marker_idx].G_obj, "dragend", function() {
        ftc_map.markers[marker_idx].G_obj.closeInfoWindow();
        ftc_map.markers[marker_idx].G_coords = ftc_map.markers[marker_idx].G_obj.getPoint();
      });
    }

    // ------------------------------------------------------
    // remove marker by its IDX
    ftc_map.remove_marker = function(marker_idx) {
      var new_markers = new Array();

      ftc_map.map.removeOverlay(ftc_map.markers[marker_idx].G_obj);
      ftc_map.markers[marker_idx].deleted = true;
      /*
      for(i in ftc_map.markers) {
        if(i != marker_idx) {
          new_markers.push(ftc_map.markers[i]);
        }
      }      
      ftc_map.markers = new_markers;
      */
    }

    // ------------------------------------------------------
    // add a simple mouseover label to marker
    ftc_map.set_marker_label = function(marker_idx, label) {

      // store label 
      ftc_map.markers[marker_idx].label = label;

      GEvent.addListener(ftc_map.markers[marker_idx].G_obj, "mouseover", function() {
        ftc_map.markers[marker_idx].G_obj.openInfoWindowHtml(label);
        var out = GEvent.addListener(ftc_map.markers[marker_idx].G_obj, "mouseout", function() {
          ftc_map.markers[marker_idx].G_obj.closeInfoWindow();
          GEvent.removeListener(out);
        });
      });
    }

    // ------------------------------------------------------
    // set a custom reference id for a marker
    ftc_map.set_reference_id = function(marker_idx, ref_id) {
      ftc_map.markers[marker_idx].reference_id = ref_id
    }

    // ------------------------------------------------------
    // register current map position an zoom level
    ftc_map.set_current_map_pos = function() {

      // get current map position and zoom
      var coords                = ftc_map.map.getCenter();
      ftc_map.center_coords.lat = coords.lat();
      ftc_map.center_coords.lon = coords.lng();

      ftc_map.map_zoom      = ftc_map.map.getZoom();
    }

    // ------------------------------------------------------
    // set a marker by coords / when initializing an already created map ...
    ftc_map.set_marker = function(lat, lon, html, label, ref_id) {


      if(!ftc_map.map) return;

      var marker = {};
      var coords = new GLatLng(lat, lon);
      var idx = -1;
      
      marker.G_obj    = new GMarker(coords, {draggable: ftc_map.markers_draggable});
      marker.G_coords = marker.G_obj.getPoint();
      marker.deleted  = false;
      ftc_map.map.addOverlay(marker.G_obj);

      ftc_map.markers.push(marker);
      idx = ftc_map.markers.length - 1;

      ftc_map.set_marker_html(idx, html, ftc_map.markers_removable);
      ftc_map.set_marker_label(idx, label);
      ftc_map.set_reference_id(idx, ref_id);

    }
    // -----------------------------------------------------------------------------------------   
    ftc_map.show_marker_info = function(marker_idx, html, add_close_link) {
      // add a close link if desired
      if(add_close_link) {
        html += "<p><br/><u style=\"cursor:pointer\" onclick=\"ftc_map.remove_marker(" + marker_idx + ")\">" + ftc_map.strings.remove_marker + "</u></p>";
      }
      ftc_map.markers[marker_idx].G_obj.openInfoWindowHtml(html);
    }



