
    //<![CDATA[

	var map = null;
    var latlng1,latlng2,latlng3 = null;
    var marker1,marker2,marker3 = null;
   
    function setupMap() {
      if (GBrowserIsCompatible()) {   
      
	        map = new GMap2(document.getElementById("map_canvas"));
	        map.addControl(new GSmallMapControl());
	        map.setCenter(new GLatLng(29.3964280, 115.1094970), 3);
	        map.enableDoubleClickZoom();
      
		latlng1 = new GLatLng(22.2777406, 114.1838141); // HK
        latlng2 = new GLatLng(39.9224522, 116.4407629); // BJ
        latlng3 = new GLatLng(31.247709, 121.472618); // SH
	

        var icon = new GIcon();      
        icon.image = 'http://www.eightpartnership.com/wp-content/themes/eightv2/style/images/eight-logo.png';
        //icon.image = 'http://www.eightpartnership.com/wp-content/themes/eightv2/style/images/eight-logo.png';
        icon.iconSize = new GSize(25, 34);
        icon.iconAnchor = new GPoint(16, 16);
        icon.infoWindowAnchor = new GPoint(25, 7);

        opts = { 
          "icon": icon,
          "clickable": true,
           "labelOffset": new GSize(-6, -10)
        };
        marker1 = new LabeledMarker(latlng1, opts);
        marker2 = new LabeledMarker(latlng2, opts);
        marker3 = new LabeledMarker(latlng3, opts);
	     
    	GEvent.addListener(marker1, "mouseover", function() {
			//marker1.openInfoWindowHtml("Hong Kong office - click to zoom");
	    });
	    GEvent.addListener(marker1, "mouseout", function() {
			//map.closeInfoWindow() 
	    });
	    GEvent.addListener(marker1, "click", function() {
		    zoomHongKong();
			//map.zoomIn(latlng1);
	
			
	    });
	    map.addOverlay(marker1);
  
    	GEvent.addListener(marker2, "mouseover", function() {
			//marker2.openInfoWindowHtml("Beijing office - click to zoom");
	    });
	    GEvent.addListener(marker2, "mouseout", function() {
			//map.closeInfoWindow() 
	    });
	    GEvent.addListener(marker2, "click", function() {
		    zoomBJ();
			//map.zoomIn(latlng2);
	    });
       	map.addOverlay(marker2); 
       	
    	GEvent.addListener(marker3, "mouseover", function() {
			//marker3.openInfoWindowHtml("Shanghai office - click to zoom");
	    });
	    GEvent.addListener(marker3, "mouseout", function() {
			//map.closeInfoWindow() 
	    });
	    GEvent.addListener(marker3, "click", function() {
			//map.zoomIn(latlng3);
			zoomSH();
	    });
       	map.addOverlay(marker3); 
       				
     }
   }
   function zoomHongKong() {
   		map.setCenter(latlng1, 16);
   		marker1.openInfoWindowHtml("21/F East Exchange Tower<br />38 Leighton Road<br/>Causeway Bay, Hong Kong");

   }
      function zoomBJ() {
   		map.setCenter(latlng2, 14);
   		marker2.openInfoWindowHtml("2905 Chaowai Soho Building A,<br />No. 6 Chaowai Avenue B,<br />Chaoyang District, Beijing, China");

   }
      function zoomSH() {
   		map.setCenter(latlng3, 15);
   		marker3.openInfoWindowHtml("Unit 2302 Highstreet Loft,<br />283 Jianguo Xi Lu, <br />Xuhui Shanghai 2000031, China");

   }
   	function resetRegional() {
           map.setCenter(new GLatLng(29.3964280, 115.1094970), 3);
			map.closeInfoWindow() 
	
   	}  	

    //]]>