function show_street_view(lat, lang)
{
		var arrowIcon = new GIcon();
        arrowIcon.iconSize = new GSize(24, 24);
        arrowIcon.shadowSize = new GSize(1, 1);
        arrowIcon.iconAnchor = new GPoint(12, 12);
        arrowIcon.infoWindowAnchor = new GPoint(0, 0);
        //arrowIcon.image = "http://www.google.com/intl/en_ALL/mapfiles/dir_0.png";

       var map = new GMap2(document.getElementById("streetmap"));
        //the latitude, longitude, pitch, yaw and zoom might all come from a web service call
        var latlng = new GLatLng(lat, lang);
        var myPov = { yaw: 176.03773913343627, pitch: -0.13590989423507835 };
        
        map.setCenter(latlng, 16);
        //map.addControl(new GMapTypeControl());
        //map.addControl(new GLargeMapControl());
        map.addOverlay(new GStreetviewOverlay());
        
        var svp = new GStreetviewPanorama(document.getElementById("panorama"));
        svp.setLocationAndPOV(latlng, myPov); //this initializes the the street view panorama
        
        var arrow = new GMarker(new GLatLng(90, 0), { icon: arrowIcon });
        map.addOverlay(arrow);
        arrow.setLatLng(latlng);
        var lastPoint;

        //document.getElementById("txtLat").value = latlng.lat();
        //document.getElementById("txtLong").value = latlng.lng();

        //listener reacts to the click event on the map
        GEvent.addListener(map, "click", function(overlay, point) {
            if (!overlay) {
                svp.remove();
                svp.setLocationAndPOV(point);
                arrow.setLatLng(point);
                lastPoint = point;
                //document.getElementById("txtLat").value = point.lat();
                //document.getElementById("txtLong").value = point.lng();
            }
        });
        
        //listener reacts to the yawchanged event on the streetview panorama
        GEvent.addListener(svp, "yawchanged", function(yaw) {
            var dir = Math.round(yaw / 3) * 3;
            while (dir >= 120) { dir -= 120; }
            arrow.setImage("http://www.google.com/intl/en_ALL/mapfiles/dir_" + dir + ".png");
            //document.getElementById("txtYaw").value = yaw;
        });
        
        //listener reacts to pitchchanged even on street view panorama
        GEvent.addListener(svp, "pitchchanged", function(pitch) {
            //document.getElementById("txtPitch").value = pitch;
        });
        
        //listener reacts to zoomchanged event on streetview panoram
        GEvent.addListener(svp, "zoomchanged", function(zoom) {
            //document.getElementById("txtZoom").value = zoom;
        });
        
        //listener reacts to initialized event on street view panorama
        GEvent.addListener(svp, "initialized", function(a) {
            arrow.setLatLng(a.latlng);
            map.addOverlay(new GPolyline([lastPoint, a.latlng]));
            lastPoint = a.latlng;
        });
}
