/*	JavaScript to create the google map.
	Input: This script needs the object of the AMDGoogleMap class with the relevant information to create Markers
	Output: Will show the World Map marking all the locations provided as input	
	Created By: Ajeet Singh , July 31, 2007

*/


var m_mapProvider = "google.com";
var m_map = null;
var m_startAddress = "One AMD Place";
var m_startLat = 37.38688;
var m_startLong = -121.998042;
var m_iconLocation = "resources/images/icons";
var m_iconFileType = ".png";
var m_shadowLocation = "resources/images/icons/shadows";
var m_shadowFileType = ".png";
var geocoder = null;
var windowLoaded = false;
var directions = null;

window.onunload = function()
{
    //-- Closure leak cleanup for google
    GUnload();    
}


var AMDGoogleMapManager =
{

	
	// Array to hold the Marker items object (GoogleMapItem) with the relevant information
	// See GoogleMapItem Constructor
	Items : new Array(),

	// Memeber Function to add items based on Latitude and Longitude
	AddMapMarkerPoint : function( latitude, longitude, icon, title, innerContent )
	{
		var dupeRef = false;
		var marker;
		var endLat;
		var endLong;
		

		// To check if an GoogleMapItem of same latitude and longitude already exist in the array then fetch the object
		for( var markerRef in this.Items )
		{
			marker = this.Items[markerRef];
			
			if(marker.Lat == latitude && marker.Long == longitude )
			{
				endLat = latitude;
				endLong = longitude;
				dupeRef = true;
				break;
			}

		}
		
		innerContent+= "<div STYLE=\"font:normal 8pt Arial; background-color: white\"><br><a href=\"http://maps.google.com/maps?f=d\" target=\"new\" >Get Directions</a> </div>";

		// If duplicate exist then update the object with new content: icon, title, innercontent
		if( dupeRef )
		{
			this.Items.push( new GoogleMapItem( this.Items.length, "", endLat, endLong, icon, title, innerContent,true ));
		}
		else
		{
			this.Items.push( new GoogleMapItem(this.Items.length, "", latitude, longitude, icon, title, innerContent,true  ));
		}

	},


	//Memeber Function to add items based on Address String
	AddMapMarker : function( address, icon, title, innerContent )
    {
        //-- Check whether something at the same address have already been added.
        var dupeRef = false;
        var marker;
        var endAddress;
        
        for( var markerRef in this.Items )
        {
            marker = this.Items[markerRef];
            
            if( marker.Address == address )
            {
                endAddress = address;
                dupeRef = true;                
                break;
            }
        }
        
		//If duplicate exist then update with new content
        if( dupeRef )
        {
            this.Items.push( new GoogleMapItem( this.Items.length, endaddress,0 , 0, icon, title, innerContent,false ) );
        }
        else
        {
            this.Items.push( new GoogleMapItem( this.Items.length, address,0 , 0, icon, title, innerContent,false ) );
        }                
    },

	
	// Sets the Center of the Map, needs default center location as Address or Latitude/Longitude
	SetMapDefaults : function()
    {        
        if( m_mapProvider == "google.com" )
        {
        
			// Check if we have default Address then set center based on it	
			if(m_startLat == 0 || m_startLong == 0)
			{
			
				if (geocoder) {
					 geocoder.getLatLng(
						m_startAddress,
						function(point) {
							if (!point) {
								alert(m_startAddress + " not found. Please check if the given default Center address is correct");
							} else {
						
								m_map.setCenter(point, 17);
							}
						}
					);
				}
			} 
			else 
			{
				// Else set the center based on Latitude/Logitude
				m_map.setCenter(new GLatLng(m_startLat, m_startLong ), 17);
			}
			
				// Add the map control on the map.
				m_map.addControl( new GLargeMapControl() );
				m_map.addControl( new GMapTypeControl() );

				// Register directions clear function
				GEvent.addListener(m_map,"singlerightclick",function() { 
					
					if(directions) { directions.clear(); } 
					
					});
		}
        
		// Plots the rest of the Markers
        this.PlotMarkers();
    },

	PlotMarkers : function()
    {
        var marker;
        
        for( var markerRef in this.Items )
        {
            marker = this.Items[markerRef];

            if( m_mapProvider == "google.com" )
            {
               this.CreateMarker( marker );
			}
        }
    },

	//Function to Create a Marker on the Map and layout it
	CreateMarker : function( marker )
	{                
        if( m_mapProvider == "google.com" )
        {            
            var icon = new GIcon();
			var pushPin = null;
            icon.iconSize = new GSize( 12, 20 );
            icon.shadowSize = new GSize( 12, 20 );
            icon.iconAnchor = new GPoint( 12, 20 );
            icon.infoWindowAnchor = new GPoint( 12, 0 );
            icon.infoShadowAnchor = new GPoint( 0, 0 );
            icon.image = marker.Icon;
            icon.shadow = marker.ShadowIcon;
            			
			if(marker.Latitude == 0 && marker.Longitude == 0) 
			{
				if (geocoder) {
					 geocoder.getLatLng(
						marker.Address,
						function(point) {
							if (!point) {
								alert(marker.Address + " not found while creating Marker. Please check the address for ID:" + marker.ID);
							} else {

			            		pushPin = new GMarker( point, icon );
								GEvent.addListener( pushPin, "mouseover", function() { pushPin.openInfoWindowHtml( marker.Content ); } );
								GEvent.addListener( pushPin, "click", function() { m_map.setCenter(point, 15 ); } );
								m_map.addOverlay( pushPin );
							}
						}
					);
				}
			}
			else
			{
						var point = new GLatLng( marker.Latitude, marker.Longitude );
						var pushPin = new GMarker( point, icon );
						
						GEvent.addListener( pushPin, "mouseover", function() { pushPin.openInfoWindowHtml( marker.Content ); } );
						GEvent.addListener( pushPin, "click", function() { m_map.setCenter(point, 15 ); pushPin.openInfoWindowHtml( marker.Content ); } );
						m_map.addOverlay( pushPin );
			}

        }
    }
}

function showDirections( arr)
{
	//for( var markerRef in this.Items )
	//alert(AMDGoogleMapManager.Items[arr].Latitude+","+AMDGoogleMapManager.Items[arr].Longitude);
	//document.write("<script> alert(\"Hello\"); </script>");
	//alert(document.getElementById("directionsText").value);
var destPoint = AMDGoogleMapManager.Items[arr].Latitude+","+ AMDGoogleMapManager.Items[arr].Longitude;

	if (geocoder) {
		 geocoder.getLatLng(
			document.getElementById("directionsText").value,
			function(point) {
				if (!point) {
					alert(document.getElementById("directionsText").value + " not found while searching for Source Location.");
				} else {
            		//alert(srcPoint.toString());
					directionsPanel = document.getElementById("dPanel");
					if(directions) { directions.clear(); }
					directions = new GDirections(m_map,directionsPanel);
					var srcPoint = point.y+","+ point.x ;
					var arr = new Array();
					arr[0]=srcPoint;
					arr[1]=destPoint;

					
					
					directions.loadFromWaypoints(arr);
					
					//pushPin = new GMarker( point, icon );
					//GEvent.addListener( pushPin, "mouseover", function() { pushPin.openInfoWindowHtml( marker.Content ); } );
					//GEvent.addListener( pushPin, "click", function() { m_map.setCenter(point, 15 ); } );
					//m_map.addOverlay( pushPin );
				}
			}
		);
		}
}

//-- Constructor for GoogleMap item
function GoogleMapItem( id, address, latitude, longitude, icon, title, content )
{
    this.ID = id;
    this.Address = address;
	this.Latitude = latitude;
	this.Longitude = longitude;
    this.Icon = "/GoogleMap/" + icon + m_iconFileType;
	this.Title = title;
    this.Content = content;
    this.ShadowIcon = m_shadowLocation + "/" + icon + m_shadowFileType;
}

//-- Load the Map Provider
window.onload = function()
{    

	if( m_mapProvider == null )
    {
        alert( "Map provider hasn't been defined." );
        return;
    }
    
    if( m_mapProvider == "google.com" )
    {        
        if( GBrowserIsCompatible() )
        {        
            
			windowLoaded = true;
			
			m_map = new GMap2( document.getElementById( "AMDGoogleMap" ) );
			geocoder = new GClientGeocoder();
			AMDGoogleMapManager.SetMapDefaults();
        }                
    }    
	
}

function AMDGoogleMapDefaultView(latitude, longitude)
{
	m_startLat = latitude;
	m_startLong = longitude;
	
	if (windowLoaded == true)
	{
		if(m_map != null)
		{
			var ll = location.search;
			var Isll=ll.indexOf("ll");
			var llValue;
	
	
			if (Isll != -1)
			{
				var lastIndex = ll.indexOf('&',Isll);
				if (lastIndex != -1)
				{
					llValue = ll.substring(Isll+3,lastIndex);
				} else 
				{
					llValue = ll.substring(Isll+3);
				}
	
				var llArr = llValue.split(",");
			
				m_map.setCenter(new GLatLng( llArr[0], llArr[1] ), 15);

			
				for( var markerRef in AMDGoogleMapManager.Items )
				{	
					marker = AMDGoogleMapManager.Items[markerRef];
			
					if(marker.Latitude == llArr[0] && marker.Longitude == llArr[1] )
					{
						var point = new GLatLng( marker.Latitude, marker.Longitude );
						m_map.openInfoWindowHtml( point, marker.Content );
						break;
					}

				}
				
				//m_map.setMapType(G_HYBRID_MAP);
	
			} 
			else
				m_map.setCenter(new GLatLng( m_startLat, m_startLong ), 1);
				//m_map.setMapType(G_HYBRID_MAP);
			
			}

	} else {
		window.setTimeout("AMDGoogleMapDefaultView("+latitude+","+ longitude+");", 1000);
	}
	
	
}



function AMDShowGoogleMap()
{
	
			AMDGoogleMapManager.AddMapMarkerPoint( "37.38688","-121.998042","red","One AMD Place ","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>One AMD Place<br>P.O. Box 3453<br><b>Sunnyvale, CA 94088-3453</b><br>Tel: 408-749-4000<br>Business Operations; Headquarters<br></div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "37.397079","-121.977875","red","Advanced Micro Devices ","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>4555 Great America Parkway<br>Suite 501<br><b>Santa Clara, CA 95054-1208</b><br>Tel: 408-572-6500<br>Business Operations<br></div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "32.879695","-117.210453","blue","Advanced Micro Devices ","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br> 4445 Eastgate Mall<br>Second Floor<br><b> San Diego, CA  92121</b><br>Tel: 858-812-2835<br>Sales Office </div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "40.145568","-105.1215","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>1351 South Sunset St<br><b>Longmont, CO 80501</b><br>Tel: 303-774-5000<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "40.524353","-105.023589","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>2950 East Harmony Road<br><b>Fort Collins, CO 80528-9558</b><br>Tel: 970-226-9500<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "28.599651","-81.215701","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>3501 Quadrangle Blvd.<br>Suite 375<br><b>Orlando, FL 32817</b><br>Tel: 407-541-6800<br>Fax: 407-541-6801<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "34.046757","-84.40753","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>10730 Stroup Road<br>Suite 101<br><b>Roswell, GA 30075</b><br>Tel: 770-552-9200<br>Fax: 770-552-3230<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "42.061306","-88.079517","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>1901 North Roselle Road<br>Suite 620<br><b>Schaumburg, IL  60195</b><br>Tel:  847-330-6386<br>Fax:  847-490-0724<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "42.334327","-71.572602","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>62 Forest Street<br><b>Marlborough, MA 01752</b><br>Tel: 508-303-3900<br>Fax: 508-303-3920<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "42.708883","-71.452739","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>98 Spitbrook Road, Suite 200<br><b>Nashua, NH  03062</b><br>Tel: 603-891-3073<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "35.674119","-79.111905","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>332 Talon Drive<br><b>Pittsboro, NC 27312</b><br>Tel: 919-545-5564<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "40.22699","-74.884315","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Lower Makefield Corporate Center<br>770 Township Line Road<br>Suite 200<br><b>Yardley, PA 19067</b><br>Tel: 267-757-1100<br>Fax: 267-757-1120<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "30.215409","-97.725298","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>5204 East Ben White Blvd<br><b>Austin, TX 78741</b><br>Tel: 512-602-1000<br>Business Operations<br><i>Primary Austin Office</i><br></div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "30.214853","-97.719676","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>5900 East Ben White Blvd<br><b>Austin, TX 78741</b><br>Tel: 512-602-5204<br>Business Operations<br><i>Product Shipping, FedEx/DHL only</i></div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "30.392404","-97.752292","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>9500 Arboretum Blvd. - Suite 400<br><b>Austin, TX 78759</b><br>Tel: 512-602-6777<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "29.98923","-95.572364","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>20333 State Highway 249<br>Suite 320<br><b>Houston, TX 77070</b><br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "33.094184","-96.55607","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>13 N. Star Drive<br><b>Allen, TX  75002</b><br>Tel: 972-396-8429<br>Fax: 972-747-0729<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "47.63402","-122.137713","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>2459 - 152nd Ave NE<br>Suite 2459<br><b>Redmond, WA 98052</b><br>Tel: 425-861-4430<br>Fax: 425-861-4680<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "47.593778","-122.131877","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>2010 156th Ave, Suite 110<br><b>Bellevue, WA 98007</b><br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "30.250467","-97.860804","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>AMD Austin, Lone Star Campus<br>7171 Southwest Pkwy<br><b>Austin, TX 78735</b><br>Tel: 512-602-1000<br>Business Operations</div>");
			

			//<!-- North America_Canada -->
			AMDGoogleMapManager.AddMapMarkerPoint( "43.840563","-79.380941","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>1 Commerce Valley Dr. East<br>Markham, ON  L3T 7X6<br><b>Canada</b><br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "43.840904","-79.380276","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>33 Commerce Valley Dr. East<br>Markham, ON  L3T 7N6<br><b>Canada</b><br>Tel: 905-882-2600<br>Fax: 905-882-2620<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "43.839325","-79.382272","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>55 Commerce Valley Dr. West<br>Markham, ON  L3T 7V9<br><b>Canada</b><br>Tel: 905-882-2600<br>Fax: 905-882-2620<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "43.855775","-79.370105","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>75 Tiverton Court<br>Markham, Ontario  L3R 9S3<br><b>Canada </b><br>Tel: 905-882-2600<br>Fax: 905-882-2620<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "43.840687","-79.383216","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>105 Commerce Valley Dr. West<br>Markham, Ontario  L3T 7W3<br><b>Canada</b><br>Tel: 905-882-2600<br>Fax: 905-882-2620<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "43.840702","-79.382701","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>10 Commerce Valley Dr. East<br>Markham, Ontario  L3T 7N7<br><b>Canada</b><br>Tel: 905-882-2600<br>Fax: 905-882-2620<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "45.354739","-75.913682","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>340 Terry Fox Drive<br>Suite 202<br><b>Kanata, Ontario</b><br>K2K 3A2<br>Tel:  613-592-1052<br>Fax: 613-592-3195<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "19.410583","-99.130669","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Blvd. Manuel Ávila Camacho No. 40,<br>Torre Esmeralda 1, Piso 18<br>Col. Lomas de Chapultepec<br><b>México DF, CP 11000 - México</b><br>Tel: 52-55-9138-0240<br>Fax:52-55-5520-9113<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "42.499978","-71.475849","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>90 Central St<br><b>Boxborough, MA 01719</b><br>R&D and Design</div>");

			//<!-- South & Central America & Carib -->
			AMDGoogleMapManager.AddMapMarkerPoint( "-34.438628","-58.8198","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Av. del Libertador 602, piso 16<br>C1001ABT - Buenos Aires<br><b>Argentina</b><br>Tel: (54-11) 4877-6400<br>Fax:(54-11) 4877-6416<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "13.10623","-59.610443","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Heart Foundation Building<br>3 Railway View<br>Ladymeade Gardens<br>Jemmott's Lane<br><b>St. Michael, Barbados</b><br>Tel:  (246) 430-0851<br>Fax:  (246) 431-0854<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "-23.609905","-46.695735","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD South America Ltda.<br>Rua James Joule, Nº 65<br>Conjunto 141 - Torre Sul<br>São Paulo - SP - 04576-080<br><b>Brasil</b><br>Tel: (55-11) 5501-2150<br>Fax: (55-11) 5505-4628<br>Sales Office</div>");

			//<!-- MiddleEast& Africa -->
			AMDGoogleMapManager.AddMapMarkerPoint( "25.137825","55.423279","orange","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Dubai Internet City<br>Building #17, Suite 160<br><b>Dubai, UAE</b><br>Tel: 971-4-367-0289</div>");
            AMDGoogleMapManager.AddMapMarkerPoint( "25.137825","55.433300","orange","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Dubai Internet City<br>Building 13, Office 115<br>P.O.Box: 500545<br><b>Dubai, UAE</b><br>Tel: 971-4-362-5457<br>Fax: 971-4-390-4819</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "25.137825","55.443279","orange","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Emaar Building 2, Suite S-304<br><b>Dubai, UAE</b><br>Tel:  971-4-364-8920</div>");

			//<!-- Asia -->
			AMDGoogleMapManager.AddMapMarkerPoint( "-33.77995","151.128166","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Far East Ltd.<br>Level 8<br>15 Talavera Road<br>North Ryde, NSW 2113<br><b>Australia</b><br>Tel: 61-2-8877-7211<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "39.944226","116.400146","red","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Greater China<br>19/F North Building<br>Raycom Infotech Park Tower C<br>No. 2 Science Institute South Rd.<br>Zhong Guan Cun, Haidian Dist.<br><b>Beijing, China 100080</b><br>Tel: 86-10-82861888<br>Business Operations</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "22.31889","114.168515","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Suites 1101-6, Level 11<br>Langham Place Office Tower<br>8 Argyle Street<br><b>Kowloon, Hong Kong</b><br>Tel: 852-2956-0388<br>Fax:852 2956 0588<br>Sales Office</div>");	     	
			AMDGoogleMapManager.AddMapMarkerPoint( "31.355982","121.470337","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Rm. 4903-4908, 49/F<br>Shanghai Maxdo Centre, No. 8<br><b>XingYi Road, SHANGHAI, P.R.C.</b><br>200336<br>Tel:  86-21-52082299<br>Fax: 86-21-52082133<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "22.535708","114.137306","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Room A, 17/F, Tianmian City Tower<br>Middle Shennan Blvd.<br>Shenzhen City, 518000<br><b>CHINA</b><br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "31.363018","120.62027","purple","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>88 Su Tong Road<br>Suzhou Industrial Park<br>Suzhou,  215021<br><b>China</b><br>Manufacturing</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "25.020284","121.449738","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>9F, 2, Sec. 3, Min-Chuan E Rd<br><b>Taipei, Taiwan R.O.C.</b><br>Tel: 886-2-2518-8333<br>Fax: 886-2-2518-8799<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "25.020284","121.459738","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>6F, 3, YuanCyu St (NanKang Software Park)<br><b>Taipei, Taiwan  R.O.C.</b><br>Tel: 886-2-2655-8885<br>Fax: 886-2-2655-7855<br>Business Operations & Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "28.570691","77.273755","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Far East Ltd.<br>Hotel Crown Plaza Surya<br>Business Centre<br>O Floor, New Friends Colony<br><b>New Delhi-110 065</b><br><b>India</b><br>Tel: 011-41672614<br>Fax: 011-41672623<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "19.072015","72.85635","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Far East Ltd.<br>Vaibhav Chambers, 5th Floor<br>Opp. Income Tax Office,<br>Bandra-Kurla Complex<br>Bandra (East)<br><b>Mumbai-400 051</b><br><b>India</b><br>Tel: 022-30687772<br>Fax: 022-30687768<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "12.967026","77.606435","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD India Engineering Centre Pvt Ltd<br>No.10, Chambers @ Mantri<br>Richmond Road<br><b>Bangalore - 560 025</b><br><b>India</b><br>Tel: 080-41372400<br>Fax: 080- 41123544<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "12.967026","77.616435","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Far East Ltd.<br>No.10, Chambers @ Mantri<br>Richmond Road,<br><b>Bangalore - 560 025</b><br><b>India</b><br>Tel: 080-41372400<br>Fax: 080-41123544<br>R&D and Design</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "-6.207784","106.844788","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Plaza Business Center<br>30FL  Menara KADIN<br>Suite No. 26<br>JL. H.R. Rasuna Said<br>Block X-5, Kav 2-3<br><b>Jakarta 12950, Indonesia</b><br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "35.669988","139.769998","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Shinjuku i-LAND Building<br>6-5-1 Nishi-Shinjuku<br>Shinjuku-ku, Tokyo 163-1334<br><b>Japan</b><br>Business Operations & Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "35.673265","139.768538","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Kojimachi Nakata Bldg 4F<br>5-3 Kojimachi, Chiyoda-ku<br>Tokyo 102-0083,<br><b>JAPAN</b><br>Tel: 81-35-275-2241<br>Fax: 81-35-275-2242<br>Business Operations & Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "37.573971","126.958008","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices, Kor., Far East Ltd.<br>9F, Glass Tower, 946-1<br>Daechi-Dong, Kangnam-Ku<br>Seoul, 135-708<br><b>Korea</b><br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "5.449225","100.668347","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Export Sdn. Bhd.<br>Phase 2, Free Industrial Zone, Bayan Lepas<br>11900, Pulau Pinang, Malaysia<br><b>Malaysia</b><br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "5.774501","101.365356","purple","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Phase 3, Free Industrial Zone, Bayan Lepas<br><b>11900 Penang, Malaysia</b><br>Tel: 6042522000<br>Manufacturing</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "5.331644","116.249329","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Level 10(E), Main Office Tower,<br>Financial Park Labuan Complex,<br>Jalan Merdeka,<br>87000 Labuan F.T.<br><b>MALAYSIA</b><br>Tel: 6087408133<br>Fax: 6087418818<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "1.330535","103.917596","purple","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices (Singapore) Pte Ltd<br>508, Chai Chee Lane, #07- 01 To #07-15<br>Bedok Industrial Estate<br><b>Singapore 1646</b><br>Manufacturing; Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "13.730797","100.52104","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD FAR EAST LTD.<br>25th Floor M, Thai Tower<br>All Seasons Place, 87<br>Wireless Road<br>Lumpini Pathumwan<br><b>Bangkok, Thailand, 10330</b><br>Sales Office</div>");

			//<!-- Europe -->
			AMDGoogleMapManager.AddMapMarkerPoint( "51.253321","4.413757","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices, BELG<br>Korte Lozannastraat 20-26<br><b>Antwerp, Belgium 2018</b><br>Tel: 32-3-248-43-00<br>Fax: 32-3-248-46-42<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "61.585349","21.85215","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Rauhalammintie 1<br>29600 Noormarkku<br><b>Finland</b><br>Tel: 358-2-522 0400<br>Fax: 358-2-522 0401<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "60.211723","24.752154","green","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Kutojantie 7<br>02630 Espoo<br><b>Finland</b><br>R&D & Fab</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "48.742352","2.359915","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices, Sa.<br>1 Allee Helene Boucher<br>91781 Paray Vieille Poste<br>Wissous Cedex<br><b>Zone Orlytech, France</b><br>Tel: 33 (0)1 49 75 10 10<br>Fax: 33 (0)1 49 75 10 13<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "48.151457","11.6822","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD GmbH<br>Karl-Hammerschmidt Strasse 34<br>Dornach B. 85609<br><b>Munchen, Germany</b><br>Tel: 49 (0) 89 45053-0<br>Fax: 49 (0) 89-406490<br>Business Operations & Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "51.131377","13.715444","purple","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD Saxony LLC & Co. KG<br>AMD Fab 36 LLC & Co. KG<br>Wilschdorfer Landstrasse 101<br><b>01109 Dresden, Germany</b><br>Tel: 49 (0) 351 277-0<br>Manufacturing</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "47.490355","19.013085","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>1146 Budapest, Hermina Towers<br>1146 Hernina UT 17 <br><b>Hungary</b><br>Tel: 361-471-8916<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "45.492149","9.094791","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices, Spa.<br>Via Novara 570<br>20153 Milano<br><b>Italy</b><br>Tel: 39 02 3008161<br>Fax: 39 02 33497689<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "52.287929","4.768581","orange","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Koolhovenlaan 1<br>1119 NB Schiphol-Rijk<br><b>The Netherlands</b><br>European Distribution Center</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "55.778504","37.617702","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">AMD International Sales & Services, Ltd.<br>Trubnaya Street 12, B/C Millennium House<br>Ru-103045 Moscow<br><b>Russia</b><br>Tel: 7 095 726 55 05<br>Fax: 7 095 726 55 04<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "40.493497","-3.875427","orange","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>C/ Collado Ventoso, s/n<br>Edificio Prisma. Portal 2, planta 3ª<br>28230 Las Rozas<br>Madrid<br><b>Spain</b><br>Tel: 349 1 637 69 14<br>Fax: 349 1 636 31 62</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "56.055983","12.689853","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Adolfsbergsvagen 31, Box 20008<br><b>S-161 02 Bromma, Sweden</b><br>Tel: 46-8-562-540-00<br>Fax: 46-8-562-540-99<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "51.312693","-0.751079","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices, Uk, Ltd.<br>AMD House, Frimley Business Park<br>Frimley, Camberley, Surrey<br><b>United Kingdom GU16 7SL</b><br>Tel: 44-1276-803100<br>Fax: 44-1276-803227<br>Sales Office</div>");
			AMDGoogleMapManager.AddMapMarkerPoint( "52.053441","-0.702181","blue","Advanced Micro Devices","<div STYLE=\"font:normal 8pt Arial; background-color: white\">Advanced Micro Devices<br>Regus House<br>Fairbourne Drive, Atterbury<br>Milton Keynes<br>MK10 9RG<br><b>United Kingdom</b><br>Tel: 44 (0) 1908 487 547<br>Fax: 44 (0) 1908 695 891<br>Sales Office</div>");
			//checkQueryAndSetCenter()
}

