function initialize_map(id,latitude,longitude) {
	 if (GBrowserIsCompatible()) {
		 var map = new GMap2(document.getElementById("map_container"+id));
		 map.addControl(new GSmallMapControl()); // масштаб и перемещение карты
		 map.addControl(new GMapTypeControl()); // переключение типов карты
		 //map.checkResize();
		 map.setCenter(new GLatLng(latitude,longitude), 13);

		var point = new GLatLng(latitude,longitude);
		var marker = new GMarker(point);
		map.addOverlay(marker);


	}
}


function display_map(id, latitude,longitude, map_id) {

	if ($('#td_'+id).css("display") == 'none') {
		$('#td_'+id).show();
		if ($('#tr_'+id).attr("class") == "noimg") {
			old_class = "noimg";
			$('#tr_'+id).attr("class", "noimg tr_activ");
		} else {
			$('#tr_'+id).attr("class", "tr_activ");
		}


		$('#tr_'+id+' .onmap').hide();
		$('#tr_'+id+' .nomap').show();
		initialize_map(map_id,latitude,longitude);

	} else {
		$('#td_'+id).hide();
		if ($('#tr_'+id).attr("class") == "noimg tr_activ") {
			$('#tr_'+id).attr("class", "noimg");
		} else {
			$('#tr_'+id).attr("class", "");
		}

		$('#tr_'+id+' .onmap').show();
		$('#tr_'+id+' .nomap').hide();
	}
}

function dis_main_map() {
	if ($("#map_main_1").css("display") == "block") {
		$("#hide_map").hide();
		$("#show_map").show();
		$("#map_main_1").hide();
	} else {
		$("#hide_map").show();
		$("#show_map").hide();
		$("#map_main_1").show();
	}
}
