var map = null;
var geocoder = null;


var f=1;
var fSV=1;
var fGM=1;
var point=null;


function showMap(mapType){

	if (GBrowserIsCompatible()) {
	
            switch (mapType)
            {
                case 'SV':
                    myMap = new GStreetviewPanorama(document.getElementById("map_canvas"));
                    break;
                default:
                    myMap = new GMap2(document.getElementById("map_canvas", G_SATELLITE_MAP));
            }     
            
            
            geocoder = new GClientGeocoder();             
            if (geocoder)
            {
                geocoder.getLatLng(address,function(point)
                {
                    if (!point)
                    {
                        alert(address + " not found");
                        map = null;
                    }
                    else
                    {
                        switch (mapType)
                        {
                            case 'SV':
                                myMap.setLocationAndPOV(point, myPOV);                                
                                break;
                            default:
                                var marker = new GMarker(point);
                                myMap.addOverlay(marker);
                                myMap.setCenter(point, 16);
                                //marker.openInfoWindowHtml(address);                            
                        }
                    }
                });
            }
        }

}

