
        
			var latlong = {};
latlong["Andorra"] = {"latitude":42.5, "longitude":1.5};
			latlong["United Arab Emirates"] = {"latitude":24, "longitude":54};
			latlong["Afghanistan"] = {"latitude":33, "longitude":65};
			latlong["Antigua and Barbuda"] = {"latitude":17.05, "longitude":-61.8};
			latlong["Anguilla"] = {"latitude":18.25, "longitude":-63.1667};
			latlong["Albania"] = {"latitude":41, "longitude":20};
			latlong["Armenia"] = {"latitude":40, "longitude":45};
			latlong["Netherlands"] = {"latitude":12.25, "longitude":-68.75};
			latlong["Angola"] = {"latitude":-12.5, "longitude":18.5};
			latlong["China"] = {"latitude":35, "longitude":105};
			latlong["Antarctica"] = {"latitude":-90, "longitude":0};
			latlong["Argentina"] = {"latitude":-34, "longitude":-64};
			latlong["American Samoa"] = {"latitude":-14.3333, "longitude":-170};
			latlong["Austria"] = {"latitude":47.3333, "longitude":13.3333};
			latlong["Australia"] = {"latitude":-27, "longitude":133};
			latlong["Aruba"] = {"latitude":12.5, "longitude":-69.9667};
			latlong["Azerbaijan"] = {"latitude":40.5, "longitude":47.5};
			latlong["Bosnia and Herzegovina"] = {"latitude":44, "longitude":18};
			latlong["Barbados"] = {"latitude":13.1667, "longitude":-59.5333};
			latlong["Bangladesh"] = {"latitude":24, "longitude":90};
			latlong["Belgium"] = {"latitude":50.8333, "longitude":4};
			latlong["Burkina Faso"] = {"latitude":13, "longitude":-2};
			latlong["Bulgaria"] = {"latitude":43, "longitude":25};
			latlong["Bahrain"] = {"latitude":26, "longitude":50.55};
			latlong["Burundi"] = {"latitude":-3.5, "longitude":30};
			latlong["Benin"] = {"latitude":9.5, "longitude":2.25};
			latlong["Bermuda"] = {"latitude":32.3333, "longitude":-64.75};
			latlong["Brunei Darussalam"] = {"latitude":4.5, "longitude":114.6667};
			latlong["Bolivia"] = {"latitude":-17, "longitude":-65};
			latlong["Brazil"] = {"latitude":-10, "longitude":-55};
			latlong["Bahamas"] = {"latitude":24.25, "longitude":-76};
			latlong["Bhutan"] = {"latitude":27.5, "longitude":90.5};
			latlong["Bouvet Island"] = {"latitude":-54.4333, "longitude":3.4};
			latlong["Botswana"] = {"latitude":-22, "longitude":24};
			latlong["Belarus"] = {"latitude":53, "longitude":28};
			latlong["Belize"] = {"latitude":17.25, "longitude":-88.75};
			latlong["Canada"] = {"latitude":54, "longitude":-100};
			latlong["Cocos (Keeling) Islands"] = {"latitude":-12.5, "longitude":96.8333};
			latlong["Congo"] = {"latitude":0, "longitude":25};
			latlong["Central African Republic"] = {"latitude":7, "longitude":21};
			latlong["Congo"] = {"latitude":-1, "longitude":15};
			latlong["Switzerland"] = {"latitude":47, "longitude":8};
			latlong["Cote d'Ivoire"] = {"latitude":8, "longitude":-5};
			latlong["Cook Islands"] = {"latitude":-21.2333, "longitude":-159.7667};
			latlong["Chile"] = {"latitude":-30, "longitude":-71};
			latlong["Cameroon"] = {"latitude":6, "longitude":12};
			latlong["China"] = {"latitude":35, "longitude":105};
			latlong["Colombia"] = {"latitude":4, "longitude":-72};
			latlong["Costa Rica"] = {"latitude":10, "longitude":-84};
			latlong["Cuba"] = {"latitude":21.5, "longitude":-80};
			latlong["Cabo Verde"] = {"latitude":16, "longitude":-24};
			latlong["Christmas Island"] = {"latitude":-10.5, "longitude":105.6667};
			latlong["Cyprus"] = {"latitude":35, "longitude":33};
			latlong["Czech Republic"] = {"latitude":49.75, "longitude":15.5};
			latlong["Germany"] = {"latitude":51, "longitude":9};
			latlong["Djibouti"] = {"latitude":11.5, "longitude":43};
			latlong["Denmark"] = {"latitude":56, "longitude":10};
			latlong["Dominica"] = {"latitude":15.4167, "longitude":-61.3333};
			latlong["Dominican Republic"] = {"latitude":19, "longitude":-70.6667};
			latlong["Algeria"] = {"latitude":28, "longitude":3};
			latlong["Ecuador"] = {"latitude":-2, "longitude":-77.5};
			latlong["Estonia"] = {"latitude":59, "longitude":26};
			latlong["Egypt"] = {"latitude":27, "longitude":30};
			latlong["Western Sahara"] = {"latitude":24.5, "longitude":-13};
			latlong["Eritrea"] = {"latitude":15, "longitude":39};
			latlong["Spain"] = {"latitude":40, "longitude":-4};
			latlong["Ethiopia"] = {"latitude":8, "longitude":38};
			latlong["Switzerland"] = {"latitude":47, "longitude":8};
			latlong["Finland"] = {"latitude":62, "longitude":26};
			latlong["Fiji"] = {"latitude":-18, "longitude":175};
			latlong["Falkland Islands (Malvinas)"] = {"latitude":-51.75, "longitude":-59};
			latlong["Micronesia, Federated States of"] = {"latitude":6.9167, "longitude":158.25};
			latlong["Faroe Islands"] = {"latitude":62, "longitude":-7};
			latlong["France"] = {"latitude":46, "longitude":2};
			latlong["Gabon"] = {"latitude":-1, "longitude":11.75};
			latlong["United Kingdom"] = {"latitude":54, "longitude":-2};
			latlong["Grenada"] = {"latitude":12.1167, "longitude":-61.6667};
			latlong["Georgia"] = {"latitude":42, "longitude":43.5};
			latlong["French Guiana"] = {"latitude":4, "longitude":-53};
			latlong["Ghana"] = {"latitude":8, "longitude":-2};
			latlong["Gibraltar"] = {"latitude":36.1833, "longitude":-5.3667};
			latlong["Greenland"] = {"latitude":72, "longitude":-40};
			latlong["Gambia"] = {"latitude":13.4667, "longitude":-16.5667};
			latlong["Guinea"] = {"latitude":11, "longitude":-10};
			latlong["Guadeloupe"] = {"latitude":16.25, "longitude":-61.5833};
			latlong["Equatorial Guinea"] = {"latitude":2, "longitude":10};
			latlong["Greece"] = {"latitude":39, "longitude":22};
			latlong["South Georgia and the South Sandwich Islands"] = {"latitude":-54.5, "longitude":-37};
			latlong["Guatemala"] = {"latitude":15.5, "longitude":-90.25};
			latlong["Guam"] = {"latitude":13.4667, "longitude":144.7833};
			latlong["Guinea-Bissau"] = {"latitude":12, "longitude":-15};
			latlong["Guyana"] = {"latitude":5, "longitude":-59};
			latlong["Hong Kong"] = {"latitude":22.25, "longitude":114.1667};
			latlong["Heard Island and McDonald Islands"] = {"latitude":-53.1, "longitude":72.5167};
			latlong["Honduras"] = {"latitude":15, "longitude":-86.5};
			latlong["Croatia"] = {"latitude":45.1667, "longitude":15.5};
			latlong["Haiti"] = {"latitude":19, "longitude":-72.4167};
			latlong["Hungary"] = {"latitude":47, "longitude":20};
			latlong["Indonesia"] = {"latitude":-5, "longitude":120};
			latlong["Ireland"] = {"latitude":53, "longitude":-8};
			latlong["Israel"] = {"latitude":31.5, "longitude":34.75};
			latlong["India"] = {"latitude":20, "longitude":77};
			latlong["British Indian Ocean Territory"] = {"latitude":-6, "longitude":71.5};
			latlong["Iraq"] = {"latitude":33, "longitude":44};
			latlong["Cape Verde"] = {"latitude":16, "longitude":24};
			latlong["Iran, Islamic Republic of"] = {"latitude":32, "longitude":53};
			latlong["Iceland"] = {"latitude":65, "longitude":-18};
			latlong["Italy"] = {"latitude":42.8333, "longitude":12.8333};
			latlong["Jamaica"] = {"latitude":18.25, "longitude":-77.5};
			latlong["Jordan"] = {"latitude":31, "longitude":36};
			latlong["Japan"] = {"latitude":36, "longitude":138};
			latlong["Kenya"] = {"latitude":1, "longitude":38};
			latlong["Kyrgyzstan"] = {"latitude":41, "longitude":75};
			latlong["Cambodia"] = {"latitude":13, "longitude":105};
			latlong["Kiribati"] = {"latitude":1.4167, "longitude":173};
			latlong["Comoros"] = {"latitude":-12.1667, "longitude":44.25};
			latlong["Saint Kitts and Nevis"] = {"latitude":17.3333, "longitude":-62.75};
			latlong["Korea, Republic of"] = {"latitude":40, "longitude":127};
			latlong["Kuwait"] = {"latitude":29.3375, "longitude":47.6581};
			latlong["Cayman Islands"] = {"latitude":19.5, "longitude":-80.5};
			latlong["Kazakhstan"] = {"latitude":48, "longitude":68};
			latlong["Lao People's Democratic Republic"] = {"latitude":18, "longitude":105};
			latlong["Lebanon"] = {"latitude":33.8333, "longitude":35.8333};
			latlong["Saint Lucia"] = {"latitude":13.8833, "longitude":-61.1333};
			latlong["Liechtenstein"] = {"latitude":47.1667, "longitude":9.5333};
			latlong["Sri Lanka"] = {"latitude":7, "longitude":81};
			latlong["Liberia"] = {"latitude":6.5, "longitude":-9.5};
			latlong["Lesotho"] = {"latitude":-29.5, "longitude":28.5};
			latlong["Lithuania"] = {"latitude":55, "longitude":24};
			latlong["Luxembourg"] = {"latitude":49.75, "longitude":6};
			latlong["Macau"] = {"latitude":22.10, "longitude":113.33};
			latlong["Latvia"] = {"latitude":57, "longitude":25};
			latlong["Libya"] = {"latitude":25, "longitude":17};
			latlong["Morocco"] = {"latitude":32, "longitude":-5};
			latlong["Monaco"] = {"latitude":43.7333, "longitude":7.4};
			latlong["Moldova, Republic of"] = {"latitude":47, "longitude":29};
			latlong["Montenegro"] = {"latitude":42.5, "longitude":19.4};
			latlong["Madagascar"] = {"latitude":-20, "longitude":47};
			latlong["Marshall Islands"] = {"latitude":9, "longitude":168};
			latlong["Macedonia"] = {"latitude":41.8333, "longitude":22};
			latlong["Mali"] = {"latitude":17, "longitude":-4};
			latlong["Myanmar"] = {"latitude":22, "longitude":98};
			latlong["Mongolia"] = {"latitude":46, "longitude":105};
			latlong["Macao"] = {"latitude":22.1667, "longitude":113.55};
			latlong["Northern Mariana Islands"] = {"latitude":15.2, "longitude":145.75};
			latlong["Martinique"] = {"latitude":14.6667, "longitude":-61};
			latlong["Mauritania"] = {"latitude":20, "longitude":-12};
			latlong["Montserrat"] = {"latitude":16.75, "longitude":-62.2};
			latlong["Malta"] = {"latitude":35.8333, "longitude":14.5833};
			latlong["Mauritius"] = {"latitude":-20.2833, "longitude":57.55};
			latlong["Maldives"] = {"latitude":3.25, "longitude":73};
			latlong["Malawi"] = {"latitude":-13.5, "longitude":34};
			latlong["Mexico"] = {"latitude":23, "longitude":-102};
			latlong["Malaysia"] = {"latitude":2.5, "longitude":112.5};
			latlong["Mozambique"] = {"latitude":-18.25, "longitude":35};
			latlong["Namibia"] = {"latitude":-22, "longitude":17};
			latlong["New Caledonia"] = {"latitude":-21.5, "longitude":165.5};
			latlong["Niger"] = {"latitude":16, "longitude":8};
			latlong["Norfolk Island"] = {"latitude":-29.0333, "longitude":167.95};
			latlong["Nigeria"] = {"latitude":10, "longitude":8};
			latlong["Nicaragua"] = {"latitude":13, "longitude":-85};
			latlong["Netherlands"] = {"latitude":52.5, "longitude":5.75};
			latlong["Norway"] = {"latitude":62, "longitude":10};
			latlong["Nepal"] = {"latitude":28, "longitude":84};
			latlong["Nauru"] = {"latitude":-0.5333, "longitude":166.9167};
			latlong["Niue"] = {"latitude":-19.0333, "longitude":-169.8667};
			latlong["New Zealand"] = {"latitude":-41, "longitude":174};
			latlong["Oman"] = {"latitude":21, "longitude":57};
			latlong["Panama"] = {"latitude":9, "longitude":-80};
			latlong["Peru"] = {"latitude":-10, "longitude":-76};
			latlong["French Polynesia"] = {"latitude":-15, "longitude":-140};
			latlong["Papua New Guinea"] = {"latitude":-6, "longitude":147};
			latlong["Philippines"] = {"latitude":13, "longitude":122};
			latlong["Pakistan"] = {"latitude":30, "longitude":70};
			latlong["Palestinian Territory"] = {"latitude":32, "longitude":35.15};
			latlong["Poland"] = {"latitude":52, "longitude":20};
			latlong["Saint Pierre and Miquelon"] = {"latitude":46.8333, "longitude":-56.3333};
			latlong["Puerto Rico"] = {"latitude":18.25, "longitude":-66.5};
			latlong["Palestine"] = {"latitude":32, "longitude":35.25};
			latlong["Portugal"] = {"latitude":39.5, "longitude":-8};
			latlong["Palau"] = {"latitude":7.5, "longitude":134.5};
			latlong["Paraguay"] = {"latitude":-23, "longitude":-58};
			latlong["Qatar"] = {"latitude":25.5, "longitude":51.25};
			latlong["Reunion"] = {"latitude":-21.1, "longitude":55.6};
			latlong["Romania"] = {"latitude":46, "longitude":25};
			latlong["Serbia"] = {"latitude":44, "longitude":21};
			latlong["Russian Federation"] = {"latitude":60, "longitude":100};
			latlong["Rwanda"] = {"latitude":-2, "longitude":30};
			latlong["Saudi Arabia"] = {"latitude":25, "longitude":45};
			latlong["Solomon Islands"] = {"latitude":-8, "longitude":159};
			latlong["Seychelles"] = {"latitude":-4.5833, "longitude":55.6667};
			latlong["Sudan"] = {"latitude":15, "longitude":30};
			latlong["Sweden"] = {"latitude":62, "longitude":15};
			latlong["Singapore"] = {"latitude":1.3667, "longitude":103.8};
			latlong["Saint Helena"] = {"latitude":-15.9333, "longitude":-5.7};
			latlong["Slovenia"] = {"latitude":46, "longitude":15};
			latlong["Svalbard and Jan Mayen"] = {"latitude":78, "longitude":20};
			latlong["Slovakia"] = {"latitude":48.6667, "longitude":19.5};
			latlong["Sierra Leone"] = {"latitude":8.5, "longitude":-11.5};
			latlong["San Marino"] = {"latitude":43.7667, "longitude":12.4167};
			latlong["Senegal"] = {"latitude":14, "longitude":-14};
			latlong["Somalia"] = {"latitude":10, "longitude":49};
			latlong["Suriname"] = {"latitude":4, "longitude":-56};
			latlong["Sao Tome and Principe"] = {"latitude":1, "longitude":7};
			latlong["El Salvador"] = {"latitude":13.8333, "longitude":-88.9167};
			latlong["Syrian Arab Republic"] = {"latitude":35, "longitude":38};
			latlong["Swaziland"] = {"latitude":-26.5, "longitude":31.5};
			latlong["Turks and Caicos Islands"] = {"latitude":21.75, "longitude":-71.5833};
			latlong["Chad"] = {"latitude":15, "longitude":19};
			latlong["French Southern Territories"] = {"latitude":-43, "longitude":67};
			latlong["Togo"] = {"latitude":8, "longitude":1.1667};
			latlong["Thailand"] = {"latitude":15, "longitude":100};
			latlong["Tajikistan"] = {"latitude":39, "longitude":71};
			latlong["Tokelau"] = {"latitude":-9, "longitude":-172};
			latlong["Turkmenistan"] = {"latitude":40, "longitude":60};
			latlong["Tunisia"] = {"latitude":34, "longitude":9};
			latlong["Tonga"] = {"latitude":-20, "longitude":-175};
			latlong["Turkey"] = {"latitude":39, "longitude":35};
			latlong["Trinidad and Tobago"] = {"latitude":11, "longitude":-61};
			latlong["Tuvalu"] = {"latitude":-8, "longitude":178};
			latlong["Taiwan"] = {"latitude":23.5, "longitude":121};
			latlong["Tanzania, United Republic"] = {"latitude":-6, "longitude":35};
			latlong["Ukraine"] = {"latitude":49, "longitude":32};
			latlong["Uganda"] = {"latitude":1, "longitude":32};
			latlong["United States Minor Outlying Islands"] = {"latitude":19.2833, "longitude":166.6};
			latlong["United States"] = {"latitude":38, "longitude":-97};
			latlong["Uruguay"] = {"latitude":-33, "longitude":-56};
			latlong["Uzbekistan"] = {"latitude":41, "longitude":64};
			latlong["Holy See"] = {"latitude":41.9, "longitude":12.45};
			latlong["Saint Vincent and the Grenadines"] = {"latitude":13.25, "longitude":-61.2};
			latlong["Venezuela"] = {"latitude":8, "longitude":-66};
			latlong["Virgin Islands, British"] = {"latitude":18.5, "longitude":-64.5};
			latlong["Virgin Islands, U.S."] = {"latitude":18.3333, "longitude":-64.8333};
			latlong["Viet Nam"] = {"latitude":16, "longitude":106};
			latlong["Vanuatu"] = {"latitude":-16, "longitude":167};
			latlong["Wallis and Futuna"] = {"latitude":-13.3, "longitude":-176.2};
			latlong["Samoa"] = {"latitude":-13.5833, "longitude":-172.3333};
			latlong["Yemen"] = {"latitude":15, "longitude":48};
			latlong["Mayotte"] = {"latitude":-12.8333, "longitude":45.1667};
			latlong["South Africa"] = {"latitude":-29, "longitude":24};
			latlong["Zambia"] = {"latitude":-15, "longitude":30};
			latlong["Zimbabwe"] = {"latitude":-20, "longitude":30};
			latlong["Vietnam"] = {"latitude":16, "longitude":106};
			latlong["Europe"] = {"latitude":47, "longitude":8};
			latlong["Guernsey"] = {"latitude":49.27, "longitude":2.38};
			latlong["Jersey"] = {"latitude":49.13, "longitude":2.7};
		


			var map;
			var minBulletSize = 3;
			var maxBulletSize = 70;
			var min = Infinity;
			var max = -Infinity;

			AmCharts.theme = AmCharts.themes.black;

			 // get min and max values
			for (var i = 0; i < mapData.length; i++) {
				var value = mapData[i].value;
				if (value < min) {
					min = value;
				}
				if (value > max) {
					max = value;
				}
			}

			 // build map
			AmCharts.ready(function() {
				map = new AmCharts.AmMap();
				map.pathToImages = "app_needed/ammap/images/";

				map.addTitle("", 14);
				map.addTitle("", 11);
				map.areasSettings = {
					unlistedAreasColor: "#333",
					unlistedAreasAlpha: 0.1
				};
				map.imagesSettings = {
					balloonText: "<span style='font-size:14px;'><b>[[title]]</b>: [[value]]</span>",
					alpha:0.6
				}

				var dataProvider = {
					mapVar: AmCharts.maps.worldLow,
					images: []
				}

				// create circle for each country
				for (var i = 0; i < mapData.length; i++) {
					var dataItem = mapData[i];
					var value = dataItem.value;
					// calculate size of a bubble
					var size = (value - min) / (max - min) * (maxBulletSize - minBulletSize) + minBulletSize;
					if (size < minBulletSize) {
						size = minBulletSize;
					}
					var id = dataItem.code;

					dataProvider.images.push({
						type: "circle",
						width: size,
						height: size,
						color: dataItem.color,
						longitude: latlong[id].longitude,
						latitude: latlong[id].latitude,
						title: dataItem.name,
						value: value
					});
				}

				map.dataProvider = dataProvider;

				map.write("map");
			});