var infoBox3 = new BFInfoWindow(); function loads() { var markerBounds = new google.maps.LatLngBounds(); var myOptions = { disableDefaultUI: true, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map"), myOptions); var fluster = new Fluster2(map); downloadUrl("/assets/markerdata.php?lang=it", function(data, responseCode) { var markers = data.documentElement.getElementsByTagName("marker"); for (var i=0; i

'+clickToEnlarge+'

'+1+' '+near+'

'); infoBox3.open(map, this); }); google.maps.event.addListener(marker, 'mouseout', function() { infoBox3.close(); }); google.maps.event.addListener(marker, 'click', function() { Shadowbox.open({player:'iframe', title:'Bibione.eu', content:'/assets/mappa_grande.php?lang='+language_set+'&lz='+this.getPosition(), width:'752', height:'410'}); }); markerBounds.extend(new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng")))); fluster.addMarker(marker); } fluster.initialize(); map.fitBounds(markerBounds); }); fluster.styles = { 0: { image: '/images/maps/icon_alloggi_group_s.png', imageHover: '/images/maps/icon_4_group_s.png', textColor: '#FFFFFF', width: 20, height: 23, lineHeight: 16 } }; } function createXmlHttpRequest(){ try { if (typeof ActiveXObject != 'undefined') { return new ActiveXObject('Microsoft.XMLHTTP'); } else if (window["XMLHttpRequest"]) { return new XMLHttpRequest(); } } catch (e) { changeStatus(e); } return null; } function downloadUrl(url, callback) { var status = -1; var request = createXmlHttpRequest(); if (!request) { return false; } request.onreadystatechange = function(){ if (request.readyState == 4) { try { status = request.status; } catch (e) { } if (status == 200) { callback(request.responseXML, request.status); request.onreadystatechange = function() {}; } } } request.open('GET', url, true); try { request.send(null); } catch (e) { changeStatus(e); } }