var marker,loc,dir;
window.onload = function() {
	if (GBrowserIsCompatible()) {
		loc = document.getElementById('map_location').innerHTML;
		dir = document.getElementById('map_directions').innerHTML;
		var map = document.getElementById('map'),
			streetView = document.getElementById("streetView");
		map.style.height = '488px';
		map = new GMap2(map);
		var point = new GLatLng(50.769101,0.280226);
		marker = new GMarker(point);
		map.setCenter(point,18,G_HYBRID_MAP);
		map.setUIToDefault();
		map.addControl(new GOverviewMapControl());
		map.addOverlay(marker);
		openInfo();
		GEvent.addListener(marker,"click",openInfo);
			
		streetView.style.height = '350px'
		
		streetView = new GStreetviewPanorama(streetView,{
			latlng : point,
			pov : {
				yaw : 185,
				pitch : 0
			},
			features : {
				userPhotos : false
			}
		});

	}
};
function openInfo() {
	marker.openInfoWindowTabsHtml([
		new GInfoWindowTab('Location',loc),
		new GInfoWindowTab('Directions',dir)										 
	]);	
}