function create_map(id) {
	var map = new GMap2(document.getElementById(id));
//	map.addControl(new GLargeMapControl());
	var customUI = map.getDefaultUI();
	map.setUI(customUI);
	map.setCenter(new GLatLng(0, 0), 1);
	return map;
}function show_map(id,but) {
	try {
		but.style.display = 'none'
		var map_div = document.getElementById(id);
		if (map_div) {
			map_div.style.display = 'block';
			map_div.InnerHTML = 'Loading...';
			var script = document.createElement('script');
			script.src = '/static/js/maps/'+id+'.js';
			script.type = 'text/javascript'
			map_div.parentNode.appendChild(script);
		}
	} catch (e) {}
}
function createMarker(point,count,country,city) {
	var size = count/4;
	var html = '<div style="font-family:Arial,Helvetica,Tahoma;font-size:11px;" align="left"><strong>Country</strong>: '+country+'<br>';
	if (city) {
		html+= '<strong>City</strong>: '+city+'<br>';
	}
	if (count>1) {
		html+= '<strong>Count</strong>: '+count;
	}
	html+= '</div>';
	min_height = 24; max_height = 64; height = size<min_height?min_height:size; height = height>max_height?max_height:height; width = height;
	var icon = new GIcon();
	icon.image = "/static/images/hazard.png";
//	icon.shadow = "/static/images/hazard_shadow.png";
	icon.iconSize = new GSize(width, height);
//	icon.shadowSize = new GSize(Math.floor(width*1.6), height);
	icon.iconAnchor = new GPoint(width/2, height); icon.infoWindowAnchor = new GPoint(width/2, Math.floor(height/12));
	var marker = new GMarker(point, icon); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html);});
	return marker;
}
function cm(map,p1,p2,count,country,city) {
	map.addOverlay(createMarker(new GPoint(p1,p2),count,country,city));
}
