//<![CDATA[
var map;
var point=[
[35.69377884112287, 139.70366656780243],
[35.67942659544947, 139.7201943397522],
[35.71129954487358, 139.6811681985855],
[35.71095979657945, 139.6817797422409],
[35.684415753220634, 139.72056180238724],
[35.689334888032626, 139.70952987670898],
[35.70042252483135, 139.7344073653221],
[35.70538858913738, 139.7268944978714],
[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,300);
  
  }
}
 
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,90);
    break;
   case 2:
    gViewChange(2,45);
    break;
   case 3:
    gViewChange(3,45);
    break;
  case 4:
    gViewChange(4,245);
    break;
 case 5:
     gViewChange(5,0);
    break;
 case 6: 
     gViewChange(6,320);
	 break;
 case 7:
     gViewChange(7,270);
	 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);
  }
//]]>


