/*global mainNavi setActiveStyleSheet google MarkerWithLabel ActiveXObject */ /* This file is checked with http://www.jslint.com/ ('Assume console, alert, ...' & 'Assume a browser')*/ var map; var zoomlvl; var latlng; var lArray = []; // contains MyLanguage objects var mArray = []; // contains marker objects function MyLanguage(urlName, region) { "use strict"; this.urlName = urlName; this.region = region; } function getScreenWidth() { "use strict"; var windowwidth; /* window.innerWidth is not understood by Internet Explorer < 9 */ if (window.innerWidth !== "undefined") { windowwidth = window.innerWidth; } else if (document.body.clientWidth !== "undefined") { windowwidth = document.body.clientWidth; } if (windowwidth > 0) { return windowwidth; } return 1001; } // Internet Explorer does not scale Marker Icons !? Find different solution... two icon sets? var dobesMarkerIconS = new google.maps.MarkerImage('/pic/dobes_marker_s.png', new google.maps.Size(10, 10), new google.maps.Point(0, 0), new google.maps.Point(5, 5)); var dobesMarkerHighlightS = new google.maps.MarkerImage('/pic/dobes_marker_hover_s.png', new google.maps.Size(10, 10), new google.maps.Point(0, 0), new google.maps.Point(5, 5)); var dobesMarkerShadowS = new google.maps.MarkerImage('/pic/dobes_marker_shadow_s.png', new google.maps.Size(17, 10), new google.maps.Point(0, 0), new google.maps.Point(5, 5)); var dobesMarkerIcon = new google.maps.MarkerImage('/pic/dobes_marker.png', new google.maps.Size(14, 14), new google.maps.Point(0, 0), new google.maps.Point(7, 7)); var dobesMarkerHighlight = new google.maps.MarkerImage('/pic/dobes_marker_hover.png', new google.maps.Size(14, 14), new google.maps.Point(0, 0), new google.maps.Point(7, 7)); var dobesMarkerShadow = new google.maps.MarkerImage('/pic/dobes_marker_shadow.png', new google.maps.Size(24, 14), new google.maps.Point(0, 0), new google.maps.Point(7, 7)); var dobesIcon = dobesMarkerIcon; var dobesShadow = dobesMarkerShadow; var dobesHighlight = dobesMarkerHighlight; function setSmallIcons() { "use strict"; dobesIcon = dobesMarkerIconS; dobesShadow = dobesMarkerShadowS; dobesHighlight = dobesMarkerHighlightS; } function setNormalIcons() { "use strict"; dobesIcon = dobesMarkerIcon; dobesShadow = dobesMarkerShadow; dobesHighlight = dobesMarkerHighlight; } function showMarker(number) { "use strict"; setTimeout("highlightMarker(" + number + ")", 500); } function deMarker(number) { "use strict"; setTimeout("normalizeMarker(" + number + ")", 500); } function highlightMarker(number) { "use strict"; var marker = mArray[number]; marker.setIcon(dobesHighlight); document.getElementById("l_" + lArray[number].urlName).style.visibility = "visible"; } function normalizeMarker(number) { "use strict"; var marker = mArray[number]; marker.setIcon(dobesIcon); document.getElementById("l_" + lArray[number].urlName).style.visibility = "hidden"; } function initialize(vLatitude, vLongitude) { // Create an array of styles. "use strict"; var styles = [ { "featureType": "water", "stylers": [ { "saturation": -79 } ] } ], styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"}); latlng = new google.maps.LatLng(vLatitude, vLongitude); zoomlvl = 1; // markerIconSize = Math.round(iconFact / 4 * 14); // markerShadowSize = Math.round(iconFact / 4 * 24); var myOptions = { zoom: zoomlvl, center: latlng, streetViewControl: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.TOP_LEFT }, mapTypeControl: true, mapTypeControlOptions: { //style: google.maps.MapTypeControlStyle.DROPDOWN_MENU }, panControl: false, scaleControl: false, mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style'] }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); //Associate the styled map with the MapTypeId and set it to display. map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); /* Now the markers are created: */ lArray[0] = new MyLanguage('lakota',1); mArray[0] = new MarkerWithLabel({ position: new google.maps.LatLng(43.833333333619,-101.83333333445), map: map, labelContent: "Lakota", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels lakota_div", labelId: ("l_lakota") }); lArray[1] = new MyLanguage('wichita',1); mArray[1] = new MarkerWithLabel({ position: new google.maps.LatLng(35.064063888889,-98.228311111111), map: map, labelContent: "Wichita", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels wichita_div", labelId: ("l_wichita") }); lArray[2] = new MyLanguage('lacandon',1); mArray[2] = new MarkerWithLabel({ position: new google.maps.LatLng(16.978456233723,-91.582671073965), map: map, labelContent: "Lacandon", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels lacandon_div", labelId: ("l_lacandon") }); lArray[3] = new MyLanguage('beaver',1); mArray[3] = new MarkerWithLabel({ position: new google.maps.LatLng(56.61658355314,-120.48278268202), map: map, labelContent: "Beaver", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels beaver_div", labelId: ("l_beaver") }); lArray[4] = new MyLanguage('hocank',1); mArray[4] = new MarkerWithLabel({ position: new google.maps.LatLng(44.286619444444,-90.839677777778), map: map, labelContent: "Hoocąk", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels hocank_div", labelId: ("l_hocank") }); lArray[5] = new MyLanguage('deline',1); mArray[5] = new MarkerWithLabel({ position: new google.maps.LatLng(65.188851001624,-123.42275198318), map: map, labelContent: "Délı̨nę", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels deline_div", labelId: ("l_deline") }); lArray[6] = new MyLanguage('chontal',1); mArray[6] = new MarkerWithLabel({ position: new google.maps.LatLng(15.985707341595,-95.708870441868), map: map, labelContent: "Chontal", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels chontal_div", labelId: ("l_chontal") }); lArray[7] = new MyLanguage('chipaya',2); mArray[7] = new MarkerWithLabel({ position: new google.maps.LatLng(-19.041586710574,-68.089538421094), map: map, labelContent: "Chipaya", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels chipaya_div", labelId: ("l_chipaya") }); lArray[8] = new MyLanguage('uru-chipaya',2); mArray[8] = new MarkerWithLabel({ position: new google.maps.LatLng(-19.041586710574,-68.089538421094), map: map, labelContent: "Uru-Chipaya", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels uru-chipaya_div", labelId: ("l_uru-chipaya") }); lArray[9] = new MyLanguage('tsafiki',2); mArray[9] = new MarkerWithLabel({ position: new google.maps.LatLng(-0.18697921235565,-79.151903701124), map: map, labelContent: "Tsafiki", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels tsafiki_div", labelId: ("l_tsafiki") }); lArray[10] = new MyLanguage('trumai',2); mArray[10] = new MarkerWithLabel({ position: new google.maps.LatLng(-11.857214131182,-53.59444202212), map: map, labelContent: "Trumai", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels trumai_div", labelId: ("l_trumai") }); lArray[11] = new MyLanguage('center',2); mArray[11] = new MarkerWithLabel({ position: new google.maps.LatLng(-2.5094799063595,-72.54564450106), map: map, labelContent: "People of the Center", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels center_div", labelId: ("l_center") }); lArray[12] = new MyLanguage('movima',2); mArray[12] = new MarkerWithLabel({ position: new google.maps.LatLng(-13.741172222222,-65.4219), map: map, labelContent: "Movima", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels movima_div", labelId: ("l_movima") }); lArray[13] = new MyLanguage('ache',2); mArray[13] = new MarkerWithLabel({ position: new google.maps.LatLng(-24.126843359663,-55.641149536734), map: map, labelContent: "Aché", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels ache_div", labelId: ("l_ache") }); lArray[14] = new MyLanguage('kuikuro',2); mArray[14] = new MarkerWithLabel({ position: new google.maps.LatLng(-12.351757731829,-53.20926628408), map: map, labelContent: "Kuikuro", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels kuikuro_div", labelId: ("l_kuikuro") }); lArray[15] = new MyLanguage('yurakare',2); mArray[15] = new MarkerWithLabel({ position: new google.maps.LatLng(-16.003215768993,-65.163723718568), map: map, labelContent: "Yurakaré", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels yurakare_div", labelId: ("l_yurakare") }); lArray[16] = new MyLanguage('chaco',2); mArray[16] = new MarkerWithLabel({ position: new google.maps.LatLng(-26.808576437362,-60.207248156373), map: map, labelContent: "Chaco Languages", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels chaco_div", labelId: ("l_chaco") }); lArray[17] = new MyLanguage('southeastern_rondonia',2); mArray[17] = new MarkerWithLabel({ position: new google.maps.LatLng(-12.651000000121,-60.41380000195), map: map, labelContent: "Southeastern Rondônia", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels southeastern_rondonia_div", labelId: ("l_southeastern_rondonia") }); lArray[18] = new MyLanguage('cashinahua',2); mArray[18] = new MarkerWithLabel({ position: new google.maps.LatLng(-10.429696934604,-71.575451832153), map: map, labelContent: "Cashinahua", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels cashinahua_div", labelId: ("l_cashinahua") }); lArray[19] = new MyLanguage('aweti',2); mArray[19] = new MarkerWithLabel({ position: new google.maps.LatLng(-12.382923905274,-53.391541627618), map: map, labelContent: "Awetí", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels aweti_div", labelId: ("l_aweti") }); lArray[20] = new MyLanguage('baure',2); mArray[20] = new MarkerWithLabel({ position: new google.maps.LatLng(-13.654824878982,-63.693477878301), map: map, labelContent: "Baure", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels baure_div", labelId: ("l_baure") }); lArray[21] = new MyLanguage('chintang',3); mArray[21] = new MarkerWithLabel({ position: new google.maps.LatLng(26.988460056044,87.01590016489), map: map, labelContent: "Chintang/Puma", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels chintang_div", labelId: ("l_chintang") }); lArray[22] = new MyLanguage('minderico',3); mArray[22] = new MarkerWithLabel({ position: new google.maps.LatLng(39.513849000155,-8.689602000269), map: map, labelContent: "Minderico", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels minderico_div", labelId: ("l_minderico") }); lArray[23] = new MyLanguage('salar',3); mArray[23] = new MarkerWithLabel({ position: new google.maps.LatLng(36.002364393899,101.78970957448), map: map, labelContent: "Salar/Monguor", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels salar_div", labelId: ("l_salar") }); lArray[24] = new MyLanguage('shiri_sanzhi',3); mArray[24] = new MarkerWithLabel({ position: new google.maps.LatLng(42.266685069856,47.408725722172), map: map, labelContent: "Shiri/Sanzhi", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels shiri_sanzhi_div", labelId: ("l_shiri_sanzhi") }); lArray[25] = new MyLanguage('lower_sorbian',3); mArray[25] = new MarkerWithLabel({ position: new google.maps.LatLng(51.760556,14.334167), map: map, labelContent: "Lower Sorbian", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels lower_sorbian_div", labelId: ("l_lower_sorbian") }); lArray[26] = new MyLanguage('slm',3); mArray[26] = new MarkerWithLabel({ position: new google.maps.LatLng(6.9001042462923,79.896671558925), map: map, labelContent: "Sri Lanka Malay", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels slm_div", labelId: ("l_slm") }); lArray[27] = new MyLanguage('svan',3); mArray[27] = new MarkerWithLabel({ position: new google.maps.LatLng(43.045722222222,42.730197222222), map: map, labelContent: "Svan/Udi/Tsova-Tush", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels svan_div", labelId: ("l_svan") }); lArray[28] = new MyLanguage('singpho_tai_tangsa',3); mArray[28] = new MarkerWithLabel({ position: new google.maps.LatLng(27.297348999428,95.658941003782), map: map, labelContent: "Tangsa/Tai/Singpho", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels singpho_tai_tangsa_div", labelId: ("l_singpho_tai_tangsa") }); lArray[29] = new MyLanguage('kurumba',3); mArray[29] = new MarkerWithLabel({ position: new google.maps.LatLng(11.590167584476,76.486386855464), map: map, labelContent: "Kurumba Languages", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels kurumba_div", labelId: ("l_kurumba") }); lArray[30] = new MyLanguage('sami',3); mArray[30] = new MarkerWithLabel({ position: new google.maps.LatLng(68.006360557757,35.016026889227), map: map, labelContent: "Kola Sámi", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels sami_div", labelId: ("l_sami") }); lArray[31] = new MyLanguage('khinalug',3); mArray[31] = new MarkerWithLabel({ position: new google.maps.LatLng(41.178689754402,48.127693378464), map: map, labelContent: "Khinalug", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels khinalug_div", labelId: ("l_khinalug") }); lArray[32] = new MyLanguage('tofa',3); mArray[32] = new MarkerWithLabel({ position: new google.maps.LatLng(53.69415,98.23505), map: map, labelContent: "Tofa", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels tofa_div", labelId: ("l_tofa") }); lArray[33] = new MyLanguage('gorani',3); mArray[33] = new MarkerWithLabel({ position: new google.maps.LatLng(34.920574782439,46.302679656894), map: map, labelContent: "Gorani", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels gorani_div", labelId: ("l_gorani") }); lArray[34] = new MyLanguage('even',3); mArray[34] = new MarkerWithLabel({ position: new google.maps.LatLng(65.023856262161,131.86355104062), map: map, labelContent: "Ėven", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels even_div", labelId: ("l_even") }); lArray[35] = new MyLanguage('nenets',3); mArray[35] = new MarkerWithLabel({ position: new google.maps.LatLng(66.69712337471,81.883686272733), map: map, labelContent: "Nenets", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels nenets_div", labelId: ("l_nenets") }); lArray[36] = new MyLanguage('taa',4); mArray[36] = new MarkerWithLabel({ position: new google.maps.LatLng(-23.168538888889,20.003655555556), map: map, labelContent: "Taa", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels taa_div", labelId: ("l_taa") }); lArray[37] = new MyLanguage('tima',4); mArray[37] = new MarkerWithLabel({ position: new google.maps.LatLng(11.721433750344,29.253926637703), map: map, labelContent: "Tima", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels tima_div", labelId: ("l_tima") }); lArray[38] = new MyLanguage('akie',4); mArray[38] = new MarkerWithLabel({ position: new google.maps.LatLng(-5.4776651525611,36.088122216292), map: map, labelContent: "Akie", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels akie_div", labelId: ("l_akie") }); lArray[39] = new MyLanguage('bainounk',4); mArray[39] = new MarkerWithLabel({ position: new google.maps.LatLng(12.741825996678,-16.331208997735), map: map, labelContent: "Baïnounk", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels bainounk_div", labelId: ("l_bainounk") }); lArray[40] = new MyLanguage('oyda',4); mArray[40] = new MarkerWithLabel({ position: new google.maps.LatLng(5.9438000016387,36.650299997388), map: map, labelContent: "Oyda", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels oyda_div", labelId: ("l_oyda") }); lArray[41] = new MyLanguage('nsambaan_nsong_ngong',4); mArray[41] = new MarkerWithLabel({ position: new google.maps.LatLng(-5.0410634652044,18.816257229285), map: map, labelContent: "Nsambaan/Nsong/Ngong", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels nsambaan_nsong_ngong_div", labelId: ("l_nsambaan_nsong_ngong") }); lArray[42] = new MyLanguage('bakola',4); mArray[42] = new MarkerWithLabel({ position: new google.maps.LatLng(3.2333329996647,10.733332998567), map: map, labelContent: "Bagyeli/Bakola", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels bakola_div", labelId: ("l_bakola") }); lArray[43] = new MyLanguage('bayso_haro',4); mArray[43] = new MarkerWithLabel({ position: new google.maps.LatLng(6.2499999985853,37.750000000464), map: map, labelContent: "Bayso/Haro", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels bayso_haro_div", labelId: ("l_bayso_haro") }); lArray[44] = new MyLanguage('bezen',4); mArray[44] = new MarkerWithLabel({ position: new google.maps.LatLng(6.7524942525271,10.067832107876), map: map, labelContent: "Bezen", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels bezen_div", labelId: ("l_bezen") }); lArray[45] = new MyLanguage('isubu_wovia',4); mArray[45] = new MarkerWithLabel({ position: new google.maps.LatLng(4.0224659981118,9.1954430003221), map: map, labelContent: "Isubu/Wovia", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels isubu_wovia_div", labelId: ("l_isubu_wovia") }); lArray[46] = new MyLanguage('kyanga_shanga',4); mArray[46] = new MarkerWithLabel({ position: new google.maps.LatLng(11.213138500596,4.5792102849489), map: map, labelContent: "Kyanga/Shanga", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels kyanga_shanga_div", labelId: ("l_kyanga_shanga") }); lArray[47] = new MyLanguage('laal',4); mArray[47] = new MarkerWithLabel({ position: new google.maps.LatLng(9.999999999606,17.666666666596), map: map, labelContent: "Laal", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels laal_div", labelId: ("l_laal") }); lArray[48] = new MyLanguage('akhoe',4); mArray[48] = new MarkerWithLabel({ position: new google.maps.LatLng(-17.812030555556,16.508352777778), map: map, labelContent: "≠Akhoe Hai//om", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels akhoe_div", labelId: ("l_akhoe") }); lArray[49] = new MyLanguage('marquesan',5); mArray[49] = new MarkerWithLabel({ position: new google.maps.LatLng(-9.3774826625532,220.06005347454), map: map, labelContent: "Marquesan", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels marquesan_div", labelId: ("l_marquesan") }); lArray[50] = new MyLanguage('ambrym',5); mArray[50] = new MarkerWithLabel({ position: new google.maps.LatLng(-16.244565375478,167.9403407703), map: map, labelContent: "West Ambrym", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels ambrym_div", labelId: ("l_ambrym") }); lArray[51] = new MyLanguage('wooi',5); mArray[51] = new MarkerWithLabel({ position: new google.maps.LatLng(-1.6794722222222,135.50769444444), map: map, labelContent: "Wooi", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels wooi_div", labelId: ("l_wooi") }); lArray[52] = new MyLanguage('celd',5); mArray[52] = new MarkerWithLabel({ position: new google.maps.LatLng(-4.1995474915334,139.33518916254), map: map, labelContent: "CELD Papua", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels celd_div", labelId: ("l_celd") }); lArray[53] = new MyLanguage('waimaa',5); mArray[53] = new MarkerWithLabel({ position: new google.maps.LatLng(-8.464103646239,126.45030324317), map: map, labelContent: "Waima’a", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels waimaa_div", labelId: ("l_waimaa") }); lArray[54] = new MyLanguage('vures_veraa',5); mArray[54] = new MarkerWithLabel({ position: new google.maps.LatLng(-13.763113888889,167.48007777778), map: map, labelContent: "Vurës/Vera’a", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels vures_veraa_div", labelId: ("l_vures_veraa") }); lArray[55] = new MyLanguage('tuamotuan',5); mArray[55] = new MarkerWithLabel({ position: new google.maps.LatLng(-18.420749422881,220.66560471467), map: map, labelContent: "MEL project / Tuamotuan", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels tuamotuan_div", labelId: ("l_tuamotuan") }); lArray[56] = new MyLanguage('ujir',5); mArray[56] = new MarkerWithLabel({ position: new google.maps.LatLng(-5.6126074641053,134.27729741446), map: map, labelContent: "Ujir", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels ujir_div", labelId: ("l_ujir") }); lArray[57] = new MyLanguage('saliba',5); mArray[57] = new MarkerWithLabel({ position: new google.maps.LatLng(-10.645175,152.60169444444), map: map, labelContent: "Saliba/Logea", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels saliba_div", labelId: ("l_saliba") }); lArray[58] = new MyLanguage('semaq_beri_batek',5); mArray[58] = new MarkerWithLabel({ position: new google.maps.LatLng(3.9333334,102.36667), map: map, labelContent: "Semaq Beri/Batek", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels semaq_beri_batek_div", labelId: ("l_semaq_beri_batek") }); lArray[59] = new MyLanguage('totoli',5); mArray[59] = new MarkerWithLabel({ position: new google.maps.LatLng(1.0429611111111,120.81631388889), map: map, labelContent: "Totoli", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels totoli_div", labelId: ("l_totoli") }); lArray[60] = new MyLanguage('iwaidja',5); mArray[60] = new MarkerWithLabel({ position: new google.maps.LatLng(-11.14851401427,132.57795796409), map: map, labelContent: "Iwaidja", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels iwaidja_div", labelId: ("l_iwaidja") }); lArray[61] = new MyLanguage('jaminjung',5); mArray[61] = new MarkerWithLabel({ position: new google.maps.LatLng(-15.523688888889,130.38034722222), map: map, labelContent: "Jaminjungan and Eastern Ngumpin", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels jaminjung_div", labelId: ("l_jaminjung") }); lArray[62] = new MyLanguage('morehead',5); mArray[62] = new MarkerWithLabel({ position: new google.maps.LatLng(-8.5846993738285,141.99171997506), map: map, labelContent: "Morehead (Nen/Kómnzo)", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels morehead_div", labelId: ("l_morehead") }); lArray[63] = new MyLanguage('benabena',5); mArray[63] = new MarkerWithLabel({ position: new google.maps.LatLng(-6.11391,145.537003), map: map, labelContent: "Bena Bena", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels benabena_div", labelId: ("l_benabena") }); lArray[64] = new MyLanguage('savosavo',5); mArray[64] = new MarkerWithLabel({ position: new google.maps.LatLng(-9.1268417649547,159.83847505839), map: map, labelContent: "Savosavo", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels savosavo_div", labelId: ("l_savosavo") }); lArray[65] = new MyLanguage('semang',5); mArray[65] = new MarkerWithLabel({ position: new google.maps.LatLng(5.4158869591452,101.15571929354), map: map, labelContent: "Semang", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels semang_div", labelId: ("l_semang") }); lArray[66] = new MyLanguage('teop',5); mArray[66] = new MarkerWithLabel({ position: new google.maps.LatLng(-5.5778972222222,155.074625), map: map, labelContent: "Teop", icon: dobesIcon, shadow: dobesShadow, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels teop_div", labelId: ("l_teop") }); /* Add event listeners for highlighting markers under the mouse: */ var i = 0, marker = 0, language = 0; while (i < lArray.length) { marker = mArray[i]; language = lArray[i].urlName; google.maps.event.addListener(marker, 'mouseover', (function (i) { return function () { highlightMarker(i); }; })(i)); google.maps.event.addListener(marker, 'mouseout', (function (i) { return function () { normalizeMarker(i); }; })(i)); google.maps.event.addListener(marker, 'click', (function (language) { return function () { window.location.href = "projects/" + language + ""; }; })(language)); i++; } } /* Displays a region's markers / all markers for region = 0 */ function showMarkers(region) { var i = 0; var marker; while (i < lArray.length){ marker = mArray[i]; if ((lArray[i].region === region) || (region === 0)){ marker.setVisible(true); }else{ marker.setVisible(false); } i++; } } function resetMap() { showMarkers(0); map.setZoom(zoomlvl); map.setCenter(latlng); document.getElementById("main_navi").innerHTML = mainNavi(); } /* AJAX function from http://www.dynamicdrive.com/forums/showthread.php?t=28882: (alternatives: http://codesnippets.joyent.com/posts/show/602 )*/ function ajaxFunction(id, url) { var xmlHttp; var elem = document.getElementById(id); try {// Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch (e2) {// Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e3) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e4) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState === 4) { //Get the response from the server and extract the section that comes in the body section of the second html page avoid inserting the header part of the second page in your first page's element var respText = xmlHttp.responseText.split(''); elem.innerHTML = respText[1].split('')[0]; } }; if (!elem) { alert('The element with the passed ID doesn\'t exists in your page'); return; } xmlHttp.open("GET", url, true); xmlHttp.send(null); } function setRegion(id) { switch (id) { case 1: map.setCenter(new google.maps.LatLng(38.5, -94.8)); break; case 2: map.setCenter(new google.maps.LatLng(-20.7, -60.8)); break; case 3: map.setCenter(new google.maps.LatLng(40, 88)); break; case 4: map.setCenter(new google.maps.LatLng(0, 15)); break; case 5: map.setCenter(new google.maps.LatLng(-7.7, 164.7)); break; } } function setPos(lat, lng) { map.setCenter(new google.maps.LatLng(lat, lng)); } function setRegionEurasia() { map.setCenter(new google.maps.LatLng(40, 88)); map.setZoom(zoomlvl); ajaxFunction("main_navi", "dobes_project_links/index.php?region=3"); showMarkers(3); } function setRegionOceania() { map.setCenter(new google.maps.LatLng(-7.7, 164.7)); map.setZoom(zoomlvl + 1); ajaxFunction("main_navi", "dobes_project_links/index.php?region=5"); showMarkers(5); } function setRegionSouth() { map.setCenter(new google.maps.LatLng(-20.7, -60.8)); map.setZoom(zoomlvl + 1); ajaxFunction("main_navi", "dobes_project_links/index.php?region=2"); showMarkers(2); } function setRegionNorth() { map.setCenter(new google.maps.LatLng(38.5, -94.8)); map.setZoom(zoomlvl + 1); ajaxFunction("main_navi", "dobes_project_links/index.php?region=1"); showMarkers(1); } function setRegionAfrica() { map.setCenter(new google.maps.LatLng(0, 15)); map.setZoom(zoomlvl + 1); ajaxFunction("main_navi", "dobes_project_links/index.php?region=4"); showMarkers(4); } function setSmallMap() { setSmallIcons(); showMarkers(0); zoomlvl = 1; var i = 0; var marker; while (i < lArray.length){ marker = mArray[i]; marker.setIcon(dobesIcon); marker.setShadow(dobesShadow); i++; } map.setZoom(zoomlvl); map.setCenter(latlng); } function setNormalMap() { setNormalIcons(); zoomlvl = 2; var i = 0; var marker; while (i < lArray.length){ marker = mArray[i]; marker.setIcon(dobesIcon); marker.setShadow(dobesShadow); i++; } map.setZoom(zoomlvl); map.setCenter(latlng); }