var Map={

ObjMap:null

              ,

ObjBounds:null
  
              ,

map:function(){
                if(this.ObjMap==null){

                this.ObjMap=new GMap2($('map'));
                }
                return this.ObjMap;
              }
              
              ,

bounds:function(){
                if(this.ObjBounds==null){
                this.ObjBounds=new GLatLngBounds();
                }
                return this.ObjBounds;
              }
            
              ,

init:function(mapControl){
                if(mapControl=='Small'){
                    this.map().addControl(new GSmallMapControl());
                    //this.map().addControl(new GMapTypeControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10, 10)));
                }
                if (mapControl=='Large'){
                this.map().addControl(new GLargeMapControl());
                //this.map().addControl(new GMapTypeControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10, 10)));
                              
                }
                var center = new GLatLng(0,0);
                this.map().setCenter(center);
                this.map().getContainer().style.overflow = 'hidden';
              }
            
              ,
            
setZoomAndCenter:function(level){
                var center=this.bounds().getCenter();
                this.map().setCenter(center);
                this.map().setZoom(level);
              }
                        
			  ,
			  
addPlace:function(html,url,latitude,longitude,pos){
              
              var point=new GLatLng(latitude,longitude);
              var marker = new GMarker(point,null,html);      
             
              this.map().addOverlay(marker);
              this.bounds().extend(point);
              }
              
			  ,

centerAndZoom:function(level){
              var center=this.bounds().getCenter();
              this.map().setCenter(center);
              var zoom=Math.min(this.map().getBoundsZoomLevel(this.bounds()),level);
              this.map().setZoom(zoom);
              }
              
              ,

clear:function(){
              this.map().clearOverlays();
              this.ObjBounds=null;
              }

}