var  Global = this;
var Map = Class.create();
Map.prototype = {
    initialize: function(x, y, z, map_type){
	if (GBrowserIsCompatible()) {
	    this.mapElement = $("map");
	    this.map = new GMap2(document.getElementById("map"));
	    this.map.addControl(new GSmallMapControl());
	    this.map.addControl(new GMapTypeControl());
	    this.map.setCenter(new GLatLng(x, y), z);
	    if(0 <= map_type && map_type < 3){
		this.map.setMapType(G_DEFAULT_MAP_TYPES[map_type]);
	    }
	    Event.observe(window, "resize", function(){
		this.map.checkResize();
	    }.bind(this));
	    var marker = new GMarker(new GLatLng(x, y));
	    this.map.addOverlay(marker);
	}
    },
    addComment: function(pos){
	$('comment_pos').value = pos;
	setTimeout( function(){$('comment_form').submit()}, 10);
    }
}




