var map1; var bounds1; var businesses1; var geocodes1; var cntGeocoded1 = 0; var directionsPanel1; var directions1; var focusedBusiness1; function generateMap1() { if (GBrowserIsCompatible() && document.getElementById("svmap_canvas1") != null) { geocoder1 = new GClientGeocoder(); geocoder1.setCache(null); var mapOptions = { mapTypes:[G_NORMAL_MAP] }; map1 = new GMap2(document.getElementById("svmap_canvas1"), mapOptions); var mapControl = new GMapTypeControl(); map1.addControl(mapControl); map1.addControl(new GSmallZoomControl3D()); map1.disableDoubleClickZoom(); map1.disableScrollWheelZoom(); bounds1 = new GLatLngBounds; map1.setCenter(new GLatLng(29.272025,47.609253), 8); var marker40 = new GIcon(); marker40.image = "http://thermalloys.com/components/com_svmap/markers/apartment-3.png"; marker40.iconSize = new GSize(32,37); marker40.iconAnchor = new GPoint(16,37); marker40.infoWindowAnchor = new GPoint(16,18.5); businesses1 = [[72,marker40,"Sandvik Endüstriyel Mamüller",26.071586,50.542603,'
Bahrain
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/bahrain/sandvik-enduestriyel-mamueller.html",""],[73,marker40,"DJ Metals",31.926505521409112,35.01810550689697,'
Israel
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/israel/dj-metals.html",""],[74,marker40,"Import Building & Trading Co. Ltd.",32.05728166387555,34.776341915130615,'
Israel
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/israel/import-building-a-trading-co-ltd.html",""],[75,marker40,"Sandvik Endüstriyel Mamüller",29.31166,47.481766,'
Kuwait
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/kuwait/sandvik-enduestriyel-mamueller.html",""],[76,marker40,"Sandvik Endüstriyel Mamüller",21.512583,55.923255,'
Oman
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/oman/sandvik-enduestriyel-mamueller.html",""],[77,marker40,"Heater Systems Co. Ltd.",24.57928525502192,46.790428161621094,'
Saudi Arabia
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/saudi-arabia/heater-systems-co-ltd.html",""],[78,marker40,"Masterheat Industrial Co. LLC.",25.364503,55.410919,'
United arab emirates
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/united-arab-emirates/masterheat-industrial-co-llc.html",""],[79,marker40,"Sandvik Endüstriyel Mamüller",33.223191,43.679291,'
Iraq
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/iraq/sandvik-enduestriyel-mamueller.html",""],[80,marker40,"Sandvik Endüstriyel Mamüller",30.585164,36.238414,'
Jordan
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/jordan/sandvik-enduestriyel-mamueller.html",""],[81,marker40,"Warid Industrial Equipment Co.",31.95722354046042,35.94572067260742,'
Jordan
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/jordan/warid-industrial-equipment-co.html",""],[82,marker40,"Sandvik Endüstriyel Mamüller",33.854721,35.862285,'
Lebanon
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/lebanon/sandvik-enduestriyel-mamueller.html",""],[83,marker40,"Sandvik Endüstriyel Mamüller",25.354826,51.183884,'
Qatar
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/qatar/sandvik-enduestriyel-mamueller.html",""],[84,marker40,"Tannira Trading",33.518356122147715,36.31050109863281,'
Syria
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/syria/tannira-trading.html",""],[85,marker40,"Sandvik Endüstriyel Mamüller",15.552727,48.516388,'
Yemen
',"/thermalloys/site/en/thermalloys-worldwide/middle-east/yemen/sandvik-enduestriyel-mamueller.html",""]]; addBusinesses1(); } } function setBounds1(bounds) { map1.setZoom(map1.getBoundsZoomLevel(bounds)); map1.setCenter(bounds.getCenter()); } function geocodeBusinesses1() { if (cntGeocoded1 < geocodes1.length) { geocoder1.getLocations(geocodes1[cntGeocoded1][7], addressResolved1); } } function addressResolved1(response) { var delay = 0; if (response.Status.code == 620) { delay = 500; } else { if (response.Status.code == 200) { var address = response.Placemark[0]; geocodes1[cntGeocoded1][3] = address.Point.coordinates[1]; geocodes1[cntGeocoded1][4] = address.Point.coordinates[0]; addBusiness1(geocodes1[cntGeocoded1]); } // Move onto the next address; this skips bad addresses, too. cntGeocoded1 += 1; } window.setTimeout(geocodeBusinesses1, delay); } function addBusinesses1() { for (var i=0; i < businesses1.length; i++) { addBusiness1(businesses1[i]); } } function addBusiness1(business) { var point = new GLatLng(business[3], business[4]); var markerOptions = { icon:business[1], draggable: false, "title":business[2] }; var marker = new GMarker(point, markerOptions); var form = ''; var info = business[5]; info = '