function ShowMap( Elem, Latitude, Longtude, Zoom , Opis) {
    this.latitude  = Latitude;
    this.longtude  = Longtude;
    this.zoom   = Zoom;
    this.element= Elem;
    this.opis = Opis;
    this.show();
}

function ShowCityMap( Elem ) {
this.element= Elem;
	this.show();
}    


function CloseObjects(placeid) {
this.placeid = placeid;
}

CloseObjects.prototype = new GControl();
CloseObjects.prototype.initialize = function(map) {
    var container = document.createElement("div");
    var zoomInDiv2 = document.createElement("div");
    container.appendChild(zoomInDiv2);





    
    map.getContainer().appendChild(container);
    return container;
}
CloseObjects.prototype.getDefaultPosition = function() {
    return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 7));
}
CloseObjects.prototype.setButtonStyle_ = function(button) {
    with(button.style) {
        paddingLeft="1px";
        border="1px solid black";
        cursor="pointer";
        color="#000";
        backgroundColor="#fff";
        font="12px Arial";
        width="67px";
        textAlign="center";
        marginBottom="1px";
    }
}

GMapTypeControl.prototype.getDefaultPosition=function() {
    return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(80, 7));
}

ShowMap.prototype.show = function() {
    if (GBrowserIsCompatible()) {
	var map   = new GMap2( this.element );
	var point = new GLatLng( this.latitude, this.longtude );
	map.setCenter( point, this.zoom );
	map.addControl(new GSmallMapControl());
 //	map.addControl(new GMapTypeControl());

    scale = new GScaleControl(); 
    scale.printable=function(){return true}; 
    map.addControl(scale); 
    
 //   map.addControl(new CloseObjects(this.placeid));
	
							
	var marker = new GMarker(point )
	map.addOverlay( marker );
	var opisik = this.opis;
	GEvent.addListener(marker, "click", function() {
	        marker.openInfoWindowHtml(opisik);
	});
	
   }	
}