//<![CDATA[
var map;
var point=[
[35.71245598494324, 139.7798091173172],
[35.716548036432066, 139.77761507034302],
[35.71190499016671, 139.7801148891449],
[35.70746858117116, 139.790578186512],
[35.707962979671244, 139.79015707969665],
[35.722893676187226, 139.7918039560318],
[35.704680726067885, 139.7881293296814],
[35.71110789216777, 139.78928804397583],
[35.69886512077859, 139.71661359071731],
[35.71867782362046, 139.69483137130737],
[35.691933759286876, 139.68652725219726],
[35.72288932108276, 139.75161373615265],
[35.71591867124419, 139.73887592554092],
[35.71314635642109, 139.74554121494293],
[35.721081932170264, 139.748797416687],
[35.71089010444265, 139.75147157907486],
[35.72098611763772, 139.75584626197815]];
var c_pov;
var c_point;

function load() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map"));
    map.addControl(new GMapTypeControl());
    map.addControl(new GSmallMapControl());
    map.setCenter(new GLatLng(point[0][0],point[0][1]),16);
    
   gViewChange(0,10);
  
  }
}
 
function gViewChange(me,mel) {
   var position = new GLatLng(point[me][0],point[me][1]);
   var marker   = new GMarker(position);
   map.addOverlay(marker);
   map.panTo(position);
   c_pov = { yaw:mel };
   c_point = position;
   GetStreetView();
}

   function openWindow(id){
   
   switch(id) {
   case 1:
    gViewChange(1,45);
    break;
   case 2:
    gViewChange(2,10);
    break;
   case 3:
    gViewChange(3,350);
    break;
  case 4:
    gViewChange(4,315);
    break;
 case 5:
     gViewChange(5,30);
    break;
 case 6: 
     gViewChange(6,135);
	 break;
 case 7:
     gViewChange(7,20);
	 break;
 case 8:
     gViewChange(8,0);
	 break;
 case 9:
     gViewChange(9,90);
	 break;
 case 10:
     gViewChange(10,320);
	 break;
  case 11:
     gViewChange(11,0);
	 break;
  case 12:
     gViewChange(12,350);
	 break;
  case 13:
     gViewChange(13,270);
	 break;
  case 14:
     gViewChange(14,150);
	 break;
  case 15:
     gViewChange(15,270);
	 break;
  case 16:
     gViewChange(16,90);
	 break;
  }
}

function GetStreetView(){
  var scontainer = document.getElementById("street");
  var panorama = new GStreetviewPanorama(scontainer);
  panorama.setLocationAndPOV(c_point,c_pov);
  }
//]]>


