function csMapPicker(){
  
  this.options = {};
  this.gButton = false;
  
  var _this = this;
  var oWin = false;
  
  function _init(){
    if (_this.options.dislpalyButton){
      _this.gButton = new sComponent();
      _this.gButton._element = document.getElementById(_this.options.dislpalyButton);
      _this.gButton._event = new sEvent(_this.gButton._element); 
      _this.gButton.addEvent("click", function(){
        if (!oWin)
          _this.displayMap();
      })
    }
  }
  
  this.init = function(opt){ 
    this.options = opt;
    
    if (window.addEventListener)
      window.addEventListener("load", _init, false);
    else if (window.attachEvent)
      window.attachEvent( "onload", _init );
  }
  
  
  this.displayMap = function(longitude, latitude, hotel_info, elementTop){
    oWin = new sWindow(this.options.caption ? this.options.caption : "Google Map Picker");

    oWin.setWidth(this.options.width);
    oWin.setHeight(this.options.height);
	
    oWin.setVisible(true);
    oWin.addForDoc();
    
    oWin.setInheritPosition(this.options.top, this.options.left);
	if(elementTop > 0)
		oWin.setTop(elementTop - Math.round(this.options.height / 2));

    var cont = new sComponent();
    cont.setWidth(this.options.width-1);//-125
    cont.setHeight(this.options.height-24);
    cont.setTop(22);
    cont.setLeft(1);
    cont.setOverflow("hidden");

    oWin.add(cont);

    oWin.addEvent("close", function( e ){
      oWin.deleteContent();
      oWin = false;
    });
      
     
    var longitude = longitude ? longitude : this.options.defaultLng;
    var latitude = latitude ? latitude : this.options.defaultLat;
    if (GBrowserIsCompatible()) {

      var map = new GMap2( cont.getElement() );
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      
      var _go = new GOverviewMapControl();
  		map.addControl(_go);
  		_go.hide(true);
  			
  		map.enableContinuousZoom();
  		map.enableDoubleClickZoom();
      
      var marker = false;
      if (latitude && longitude)
	  { /*(latField.value && lngField.value)*/
	 
        marker = new GMarker(new GLatLng(latitude, longitude));
		
		GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(unescape(hotel_info)); });
		
        map.addOverlay(marker);
      }
      
      GEvent.addListener(map, "mousemove", function(point){

        lastPoint = point;
      });
      
    }
    
    map.setCenter(new GLatLng(latitude, longitude), this.options.zoom ? this.options.zoom : 7);
	
  }
}