	/* google map 
	**************************************************************************************************/
    function kgmap(name) {
		
		/******************************/
	  	/* 	properties	*/
		this.latitude = 41.86217;
		this.longitude = -87.616696;
		this.map = new GMap2(document.getElementById(name));
		
		/******************************/
	  	/*	methods	*/
		this.setCenter = gmap_center;
		this.setZoom = gmap_set_zoom;
		this.addPin = gmap_add_pin;
		this.displayBubble = call;
		this.addControl = gmap_add_control;
		
		//var mapTypeControl = new GMapTypeControl();
		//var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(5,5));		
		//this.map.addControl(mapTypeControl, topRight);
		
		GEvent.addListener(this.map, "dblclick", function() {
			  //map.removeControl(mapTypeControl);
		});
		//this.map.addControl(new GSmallMapControl());
		this.map.setCenter(new GLatLng(this.latitude,this.longitude));
    	this.map.setZoom(13);
	}
	function gmap_center(a,b){
		this.map.setCenter(new GLatLng(a,b));	
	}
	function gmap_set_zoom(a){
		this.map.setZoom(a);	
	}
	function gmap_add_control(a){
		var mapTypeControl = new GMapTypeControl();
		var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(5,5));		
		this.map.addControl(mapTypeControl, topRight);
	}
	function gmap_add_pin(lat,lon,bubble){
		//bubble = "<h3>test</h3>";
		var baseIcon = new GIcon();
		baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
		baseIcon.iconSize = new GSize(20, 34);
		baseIcon.shadowSize = new GSize(37, 34);
		baseIcon.iconAnchor = new GPoint(9, 34);
		baseIcon.infoWindowAnchor = new GPoint(9, 2);
		baseIcon.infoShadowAnchor = new GPoint(18, 25);
		
		var letteredIcon = new GIcon(baseIcon);
		letteredIcon.image = "http://www.google.com/mapfiles/marker.png";
		
		var point = new GLatLng(lat,lon);
		var marker = new GMarker(point);
		
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(bubble);
		});		
		this.map.addOverlay(marker);		
	}
	function call(i){
             marker.openInfoWindowHtml(i);
	}




