var totalnomarkers;var currentlocation="island";var iconBeach=new GIcon();iconBeach.image="http://www.mymenorca.info/media/images/map/icons/servicedbeach.png";iconBeach.iconSize=new GSize(32,32);iconBeach.shadowSize=new GSize(22,20);iconBeach.iconAnchor=new GPoint(7,30);iconBeach.infoWindowAnchor=new GPoint(1,0);var iconHBeach=new GIcon();iconHBeach.image="http://www.mymenorca.info/media/images/map/icons/highlightservicedbeach.png";iconHBeach.iconSize=new GSize(32,32);iconHBeach.shadowSize=new GSize(22,20);iconHBeach.iconAnchor=new GPoint(7,30);iconHBeach.infoWindowAnchor=new GPoint(1,0);var iconVBeach=new GIcon();iconVBeach.image="http://www.mymenorca.info/media/images/map/icons/virginbeach.png";iconVBeach.iconSize=new GSize(32,32);iconVBeach.shadowSize=new GSize(22,20);iconVBeach.iconAnchor=new GPoint(7,30);iconVBeach.infoWindowAnchor=new GPoint(1,0);var iconHVBeach=new GIcon();iconHVBeach.image="http://www.mymenorca.info/media/images/map/icons/highlightvirginbeach.png";iconHVBeach.iconSize=new GSize(32,32);iconHVBeach.shadowSize=new GSize(22,20);iconHVBeach.iconAnchor=new GPoint(7,30);iconHVBeach.infoWindowAnchor=new GPoint(1,0);var iconTown=new GIcon();iconTown.image="http://www.mymenorca.info/media/images/map/icons/Town.png";iconTown.iconSize=new GSize(21,31);iconTown.shadowSize=new GSize(22,20);iconTown.iconAnchor=new GPoint(7,30);iconTown.infoWindowAnchor=new GPoint(1,0);iconTown.iconSize=new GSize(24,30);iconTown.shadowSize=new GSize(36,30);iconTown.iconAnchor=new GPoint(12,28);iconTown.infoWindowAnchor=new GPoint(12,15);var iconBlue=new GIcon();iconBlue.image="http://www.mymenorca.info/media/images/map/icons/Villa.png";iconBlue.shadow="";iconBlue.iconSize=new GSize(21,31);iconBlue.shadowSize=new GSize(22,20);iconBlue.iconAnchor=new GPoint(7,30);iconBlue.infoWindowAnchor=new GPoint(1,0);var iconBluecb=new GIcon();iconBluecb.image="http://www.mymenorca.info/media/images/map/icons/Villacb.png";iconBlue.shadow="";iconBluecb.iconSize=new GSize(21,31);iconBluecb.shadowSize=new GSize(22,20);iconBluecb.iconAnchor=new GPoint(7,30);iconBluecb.infoWindowAnchor=new GPoint(1,0);var iconBluega=new GIcon();iconBluega.image="http://www.mymenorca.info/media/images/map/icons/Villaga.png";iconBlue.shadow="";iconBluega.iconSize=new GSize(21,31);iconBluega.shadowSize=new GSize(22,20);iconBluega.iconAnchor=new GPoint(7,30);iconBluega.infoWindowAnchor=new GPoint(1,0);var iconApartment=new GIcon();iconApartment.image="http://www.mymenorca.info/media/images/map/icons/Apartment.png";iconApartment.shadow="";iconApartment.iconSize=new GSize(21,31);iconApartment.shadowSize=new GSize(22,20);iconApartment.iconAnchor=new GPoint(7,30);iconApartment.infoWindowAnchor=new GPoint(5,1);var iconApartmentcb=new GIcon();iconApartmentcb.image="http://www.mymenorca.info/media/images/map/icons/Apartmentcb.png";iconApartmentcb.shadow="";iconApartmentcb.iconSize=new GSize(21,31);iconApartmentcb.shadowSize=new GSize(22,20);iconApartmentcb.iconAnchor=new GPoint(7,30);iconApartmentcb.infoWindowAnchor=new GPoint(5,1);var iconApartmentga=new GIcon();iconApartmentga.image="http://www.mymenorca.info/media/images/map/icons/Apartmentga.png";iconApartmentga.shadow="";iconApartmentga.iconSize=new GSize(21,31);iconApartmentga.shadowSize=new GSize(22,20);iconApartmentga.iconAnchor=new GPoint(7,30);iconApartmentga.infoWindowAnchor=new GPoint(5,1);var iconCC=new GIcon();iconCC.image="http://www.mymenorca.info/media/images/map/icons/CC.png";iconCC.shadow="";iconCC.iconSize=new GSize(21,31);iconCC.shadowSize=new GSize(22,20);iconCC.iconAnchor=new GPoint(7,30);iconCC.infoWindowAnchor=new GPoint(5,1);var iconCCcb=new GIcon();iconCCcb.image="http://www.mymenorca.info/media/images/map/icons/CCcb.png";iconCCcb.shadow="";iconCCcb.iconSize=new GSize(21,31);iconCCcb.shadowSize=new GSize(22,20);iconCCcb.iconAnchor=new GPoint(7,30);iconCCcb.infoWindowAnchor=new GPoint(5,1);var iconCCga=new GIcon();iconCCga.image="http://www.mymenorca.info/media/images/map/icons/CCga.png";iconCCga.shadow="";iconCCga.iconSize=new GSize(21,31);iconCCga.shadowSize=new GSize(22,20);iconCCga.iconAnchor=new GPoint(7,30);iconCCga.infoWindowAnchor=new GPoint(5,1);var iconPhoto=new GIcon();iconPhoto.image="http://www.mymenorca.info/media/images/icons/poiphoto.png";iconPhoto.shadow="";iconPhoto.iconSize=new GSize(21,31);iconPhoto.shadowSize=new GSize(22,20);iconPhoto.iconAnchor=new GPoint(7,30);iconPhoto.infoWindowAnchor=new GPoint(5,1);var iconResort=new GIcon();iconResort.image="http://www.mymenorca.info/media/images/map/icons/Resort.png";iconResort.iconSize=new GSize(21,31);iconResort.shadowSize=new GSize(22,20);iconResort.iconAnchor=new GPoint(7,30);iconResort.infoWindowAnchor=new GPoint(5,1);var iconAttraction=new GIcon();iconAttraction.image="http://www.mymenorca.info/media/images/map/icons/attraction.png";iconAttraction.shadow="";iconAttraction.iconSize=new GSize(24,30);iconAttraction.shadowSize=new GSize(36,30);iconAttraction.iconAnchor=new GPoint(12,28);iconAttraction.infoWindowAnchor=new GPoint(12,15);var iconTransport=new GIcon();iconTransport.image="http://www.mymenorca.info/media/images/map/icons/transport.png";iconTransport.shadow="";iconTransport.iconSize=new GSize(24,30);iconTransport.shadowSize=new GSize(36,30);iconTransport.iconAnchor=new GPoint(12,28);iconTransport.infoWindowAnchor=new GPoint(12,15);var iconSP=new GIcon();iconSP.image="http://www.mymenorca.info/media/images/map/icons/SP.png";iconSP.iconSize=new GSize(21,31);iconSP.shadowSize=new GSize(22,20);iconSP.iconAnchor=new GPoint(7,30);iconSP.infoWindowAnchor=new GPoint(1,0);iconSP.iconSize=new GSize(24,30);iconSP.shadowSize=new GSize(36,30);iconSP.iconAnchor=new GPoint(12,28);iconSP.infoWindowAnchor=new GPoint(12,15);var customIcons=[];var noofgmarkers=0;var SidebarcustomIcons=[];customIcons.attraction=iconAttraction;customIcons.town=iconTown;customIcons.resort=iconResort;customIcons.beach=iconBeach;customIcons.highlightbeach=iconHBeach;customIcons.vbeach=iconVBeach;customIcons.highlightvbeach=iconHVBeach;customIcons.poiphoto=iconPhoto;customIcons.transport=iconTransport;customIcons.Villacb=iconBluecb;customIcons.Villaga=iconBluega;customIcons.Apartment=iconApartment;customIcons.Apartmentcb=iconApartmentcb;customIcons.Apartmentga=iconApartmentga;customIcons.CC=iconCC;customIcons.CCcb=iconCCcb;customIcons.CCga=iconCCga;customIcons.SP=iconSP;var markerPIDS=[];var side_bar_list=[];var highlightCircle;var currentMarker;document.getElementById("showlocation").innerHTML=" Whole Island";var gmarkers=new Array();function hideShowinline(a,b){if(document.getElementById(b).style.display=="inline"){document.getElementById(b).style.display="block";chevron=document.getElementById(a);if(chevron!=null){chevron.src="/media/images/graphics/icons/upmorehelp.png"}}else{if(document.getElementById(b).style.display=="inline"){document.getElementById(b).style.display="none";chevron=document.getElementById(a);if(chevron!=null){chevron.src="/media/images/graphics/icons/downmorehelp.png"}}}}function hideShow(a,b){if(document.getElementById(b).style.display=="none"){document.getElementById(b).style.display="block";chevron=document.getElementById(a);if(chevron!=null){chevron.src="/media/images/graphics/icons/upmorehelp.png"}}else{if(document.getElementById(b).style.display=="block"){document.getElementById(b).style.display="none";chevron=document.getElementById(a);if(chevron!=null){chevron.src="/media/images/graphics/icons/downmorehelp.png"}}}}function setLocationlist(c){var a=document.getElementById("islandlocation");for(var b=0;b<a.options.length;b++){if(a.options[b].value==c){a.selectedIndex=b}}}function createLabeledMarker(l,b,f,i,g,c,a,o){var n="";var d="";var k="";var h=f;var j=" "+b;if(c=="sp"){c="http://www.mymenorca.info/media/images/maps/icons/mapCENTER.png"}f=f.replace(/<a href/,"<a target='_blank' href");propertylocation=b.toLowerCase();switch(propertylocation){case"addaia":case"addaya":locationname="addaia";break;case"alaior":locationname="alaior";break;case"arenal den castell":case"arenal en castell":locationname="arenal-en-castell";break;case"es castell":locationname="es-castell";break;case"es grau":locationname="es-grau";break;case"binibeca":case"binibequer":locationname="binibeca";break;case"cala en porter":case"cala den porter":case"calan porter":locationname="calan-porter";break;case"cala blanca":locationname="cala-blanca";break;case"cala torret":locationname="cala-torret";break;case"ciutadella":locationname="ciutadella";break;case"son bou":case"Son bou":locationname="son-bou";break;case"sol del este":locationname="es-castell";break;case"cala en bosch":case"cala den bosch":case"calan bosch":locationname="calan-bosch";break;case"cala en brut":case"cala den brut":case"calan brut":locationname="calan-brut";break;case"cala en blanes":case"cala den blanes":case"cala blanes":case"Cala Blanes":case"Cala en blanes":case"Cala den Blanes":case"Cala Den Blanes":locationname="cala en blanes";break;case"es mercadel":locationname="es mercadel";break;case"fornells":locationname="fornells";break;case"playa de fornells":case"playa fornells":case"playa den fornells":locationname="playa-fornells";break;case"punta prima":locationname="punta-prima";break;case"mao":case"mahon":locationname="mahon";break;case"cala galdana":case"cala santa galdana":locationname="cala-galdana";break;case"sant climent":locationname="sant-climent";break;case"sant lluis":locationname="sant-lluis";break;case"santandria":locationname="santandria";break;case"sant tomas":case"santo tomas":locationname="santo-tomas";break;case"son parc":locationname="son-parc";break;case"turo amagat":locationname="turo-amagat";break}switch(i){case"0":d="<img class='infophoto' src='"+c+"'/>";content="<table><tr><td>"+d+"</td></tr><tr><td>"+f+"</td></tr></table>";n="SP";var k=" <div class='towncontainer'><b>"+b+"</b> </br>"+content+"<br> <a href='/"+locationname+"/index.html'>More details &gt;&gt;</a></div>";break;case"1":d="<img class='infophoto' src='"+c+"'/>";if(g!=2){n="beach"}else{n="vbeach"}var k=" <div class='beachcontainer'><h4><a href='http://www.panoramio.com/'><img style='width:75px;' border='0' alt='Photos panoramio' src='http://maps.google.com/intl/en/mapfiles/iw_panoramio.png' /></a></h4> </br>"+f+" </div>";break;case"2":d="<img class='infophoto' src='"+c+"'/>";content="<table><tr><td>"+d+"</td></tr><tr><td>"+f+"</td></tr></table>";n="town";var k=" <div class='towncontainer'><b>"+b+"</b> ("+a.toFixed(1)+" km ) </br>"+content+"<br> <a href='/"+locationname+"/index.html'>More details &gt;&gt;</a></div>";break;case"3":d="<img class='infophoto' src='"+c+"'/>";n="attraction";var k=" <div class='attractioncontainer'><b>"+b+"</b> ("+a.toFixed(1)+" km ) </br>"+f+"</div>";break;case"6":d="<img class='infophoto' src='"+c+"'/>";n="resort";var k=" <div class='resortcontainer'><h4><b>"+b+"</b> ("+a.toFixed(1)+" km ) </h4><p>"+f+"</p><a href='/"+locationname+"/index.html'> More details &gt;&gt;</a></div>";break;case"7":d="<img class='infophoto' src='"+c+"'/>";n="transport";var k=" <div class='transportcontainer'><h4><b>"+b+"</b> ("+a.toFixed(1)+" km ) </h4><p>"+f+"</p><a href='/menorca-places/transport.php?type="+g+"'> More details &gt;&gt;</a></div>";break}var e=new LabeledMarker(l,{title:j,icon:customIcons[n],labelText:b,labelOffset:new GSize(-10,-50),minZoom:13,maxZoom:17});e.point=l;e.name=b;e.type=i;e.subtype=g;e.desc=f;e.distance=a;e.photo=c;e.id=o;var m=createMarkerClickHandler(e,k);GEvent.addListener(e,"click",m);GEvent.addListener(e,"zoomclose",function(){map.closeInfoWindow();switch(e.type){case"1":map.setCenter(l,16);document.getElementById("showlocation").innerHTML=e.name;break;case"2":map.setCenter(l,16);document.getElementById("showlocation").innerHTML=e.name;break;case"3":map.setCenter(l,15);break;case"4":map.setCenter(l,15);break;case"5":map.setCenter(l,15);break;case"6":map.setCenter(l,15);document.getElementById("showlocation").innerHTML=e.name;break;case"7":map.setCenter(l,15);break;default:map.setCenter(l,18);break}});GEvent.addListener(e,"mouseover",function(){currentMarker=e;if(e.type!="0"){var p=document.getElementById("sidebarid"+e.id);p.style.border="thin solid black";p.style.backgroundColor="#cfd6f9"}switch(e.type){case"1":if(e.subtype==1){e.setImage("/media/images/map/icons/highlightservicedbeach.png")}else{e.setImage("/media/images/map/icons/highlightvirginbeach.png")}break}});GEvent.addListener(e,"mouseout",function(){currentMarker=e;if(e.type!="0"){var p=document.getElementById("sidebarid"+e.id);p.style.border="thin solid #92b4f0";p.style.backgroundColor="#e5e8f7"}switch(e.type){case"1":if(e.subtype==1){e.setImage("/media/images/map/icons/servicedbeach.png")}else{e.setImage("/media/images/map/icons/virginbeach.png")}break}});GEvent.addListener(e,"sidebarshowonmap",function(){switch(e.type){case"1":if(e.subtype==1){e.setImage("/media/images/map/icons/highlightservicedbeach.png")}else{e.setImage("/media/images/map/icons/highlightvirginbeach.png")}break;case"2":e.setImage("/media/images/map/icons/highlightservicedbeach.png");break}});GEvent.addListener(e,"sidebarmouseover",function(){switch(e.type){case"1":if(e.subtype==1){e.setImage("/media/images/map/icons/highlightservicedbeach.png")}else{e.setImage("/media/images/map/icons/highlightvirginbeach.png")}break;case"2":e.setImage("/media/images/map/icons/highlightTown.png");break;case"3":e.setImage("/media/images/map/icons/highlightattraction.png");break;case"6":e.setImage("/media/images/map/icons/highlightresort.png");break;case"7":e.setImage("/media/images/map/icons/highlighttransport.png");break}});GEvent.addListener(e,"sidebarmouseout",function(){switch(e.type){case"1":if(e.subtype==1){e.setImage("/media/images/map/icons/servicedbeach.png")}else{e.setImage("/media/images/map/icons/virginbeach.png")}break;case"2":e.setImage("/media/images/map/icons/Town.png");break;case"3":e.setImage("/media/images/map/icons/attraction.png");break;case"6":e.setImage("/media/images/map/icons/resort.png");break;case"7":e.setImage("/media/images/map/icons/transport.png");break}});return e}function process(e){var f=escape(document.getElementById("myname").value);var a=document.getElementById("pid").value;var c=escape(document.getElementById("email").value);var d=escape(document.getElementById("questions").value);var b="sendcontact.php?pid="+a+"&myemail="+c+"&myname="+f+"&comments="+d;GDownloadUrl(b,function(h,g){if(g==200&&h.length<=1){lastmarker.closeInfoWindow();GEvent.trigger(lastmarker,"messagesent")}});lastmarker.closeInfoWindow();GEvent.trigger(lastmarker,"messagesent")}function highlightLocation(q){var n=q;var f=Array();if(highlightCircle){map.removeOverlay(highlightCircle)}var k=G_NORMAL_MAP.getProjection();var i=map.getZoom();var j=k.fromLatLngToPixel(n,i);var p=40;var m=40;var h=18;for(var l=0;l<(m+1);l++){var e=h*l*(Math.PI/180);var b=p;var g=j.x+b*Math.cos(e);var d=j.y+b*Math.sin(e);var c=new GPoint(g,d);var o=k.fromPixelToLatLng(c,i);f.push(o)}highlightCircle=new GPolygon(f,"#000000",2,0,"#444444",0.5);map.addOverlay(highlightCircle)}function highlightCurrentMarker(){var n=currentMarker.getPoint();var f=Array();if(highlightCircle){map.removeOverlay(highlightCircle)}var k=G_NORMAL_MAP.getProjection();var h=map.getZoom();var j=k.fromLatLngToPixel(n,h);var p=40;var m=20;var i=18;for(var l=0;l<(m+1);l++){var e=i*l*(Math.PI/180);var b=p;var g=j.x+b*Math.cos(e);var d=j.y+b*Math.sin(e);var c=new GPoint(g,d);var o=k.fromPixelToLatLng(c,h);f.push(o)}highlightCircle=new GPolygon(f,"#000000",2,0,"#444444",0.3);map.addOverlay(highlightCircle)}function showmarkers(a,c){for(var b=0;b<gmarkers.length;b++){if(gmarkers[b].type==a&&gmarkers[b].subtype==c){gmarkers[b].show()}}document.getElementById(a+""+c+"Checkbox").checked=true;toggleLabels()}function hidemarkers(a,c){var b=0;for(b=0;b<gmarkers.length;b++){if(gmarkers[b].type==a&&gmarkers[b].subtype==c){gmarkers[b].hide()}}document.getElementById(a+""+c+"Checkbox").checked=false;toggleLabels();map.closeInfoWindow()}function boxclick(b,c,a){if(document.getElementById(c+""+a+"Checkbox").checked){showmarkers(c,a)}else{hidemarkers(c,a)}makeSidebar()}function myclick(a){GEvent.trigger(gmarkers[a],"click")}function sidebarshowonmap(b,a){GEvent.trigger(gmarkers[b],"sidebarshowonmap",a)}function zoomclick(b,a){GEvent.trigger(gmarkers[b],"zoomclose",a)}function ownercontactclick(a){GEvent.trigger(gmarkers[a],"ownercontact",gmarkers[a].name,gmarkers[a].pid)}function showMinimapRect(c){var b=c.getBounds();var a=[b.getSouthWest(),new GLatLng(b.getSouthWest().lat(),b.getNorthEast().lng()),b.getNorthEast(),new GLatLng(b.getNorthEast().lat(),b.getSouthWest().lng()),b.getSouthWest()];rect=new GPolygon(a,"#000000",1,1,"#000000",0.3);map.addOverlay(rect)}function changeBodyClass(b,a){document.body.className=document.body.className.replace(b,a);return false}function createMarkerClickHandler(a,b){return function(){a.openInfoWindowHtml(b);return false}}function loadlocationmap(b,e,d,c,a){if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("mymap"));map.setCenter(new GLatLng(39.977120098439634,4.07867431640625),10,G_SATELLITE_MAP);ui=map.getDefaultUI();ui.zoom.scrollwheel=false;map.setUI(ui);map.addControl(new PromoControl("http://www.mymenorca.info/index.php"));map.addControl(new GOverviewMapControl());GEvent.addListener(document.getElementById("islandlocation"),"zoom",function(f,g){if(g!="Menorca"){map.setCenter(f,15);document.getElementById("showlocation").innerHTML=g;showMinimapRect(map)}else{map.setCenter(f,11);document.getElementById("showlocation").innerHTML="Whole Island"}highlightLocation(f);setLocationlist(g);makeSidebar()});GEvent.addListener(document.getElementById("RESET"),"RESET",function(){map.closeInfoWindow();map.setCenter(new GLatLng(39.977120098439634,4.07867431640625),10,G_SATELLITE_MAP);document.getElementById("showlocation").innerHTML="Whole Island";currentlocation="island";setLocationlist("Menorca");makeSidebar("island")});document.getElementById("11Checkbox").checked=false;document.getElementById("12Checkbox").checked=false;document.getElementById("20Checkbox").checked=true;document.getElementById("60Checkbox").checked=true;document.getElementById("30Checkbox").checked=false;document.getElementById("70Checkbox").checked=true;document.getElementById("labelsCheckbox").checked=false;GDownloadUrl(b,function(m,t){if(t==200){var o=GXml.parse(m);var u=o.documentElement;var k=u.getElementsByTagName("marker");map.clearOverlays();totalnomarkers=k.length;for(var n=0;n<k.length;n++){var h=k[n].getAttribute("name");var q=k[n].getAttribute("description");var g=parseFloat(k[n].getAttribute("distance"));var f=k[n].getAttribute("photo");var r=k[n].getAttribute("type");var p=k[n].getAttribute("subtype");var s=new GLatLng(parseFloat(k[n].getAttribute("lat")),parseFloat(k[n].getAttribute("lng")));var l=createLabeledMarker(s,h,q,r,p,f,g,n);window.gmarkers.push(l);map.addOverlay(l)}var j=new GLatLng(d,c);var l=createLabeledMarker(j,e,"All markers shown are within a radius of "+a+" Km of this location","0","0","sp",0,n+1);window.gmarkers.push(l);map.addOverlay(l);hidemarkers(1,1);hidemarkers(1,2);showmarkers(2,0);hidemarkers(6,0);hidemarkers(3,0);hidemarkers(7,0);makeSidebar();toggleLabels()}})}else{alert("Sorry your Browser is not compatible with our Maps - Please enable Javascript!")}}function toggleLabels(){var b=document.getElementById("labelsCheckbox").checked;for(var a=0;a<gmarkers.length;a++){gmarkers[a].setLabelVisibility(b)}}function zoomtolocation(){var d=document.getElementById("islandlocation");var b=document.getElementById("islandlocation").selectedIndex;var c=d[b].value;switch(c){case"Menorca":currentlat=39.9602803542957;currentlng=4.071807861328125;break;case"Addaya":currentlat=40.00888066156387;currentlng=4.197807312011719;break;case"Alaior":currentlat=39.93382832231187;currentlng=4.140815734863281;break;case"Arenal den Castell":currentlat=40.0216004699687;currentlng=4.183773994445801;break;case"Binibeca":currentlat=39.82053500355178;currentlng=4.237632751464844;break;case"Binisafuller":currentlat=39.82590748611062;currentlng=4.229435920715332;break;case"Cala Blanca":currentlat=39.97718;currentlng=3.83397;break;case"Cala Coves":currentlat=39.864326613335;currentlng=4.146523475646973;break;case"Cala Galdana":currentlat=39.93994873163127;currentlng=3.961515426635742;break;case"Cala Llonga":currentlat=39.89268234054683;currentlng=4.297885894775391;break;case"Cala en Bosch":currentlat=39.92777318528353;currentlng=3.827362060546875;break;case"Cala en Brut":currentlat=40.0006213772508;currentlng=3.806612491607666;break;case"Cala en Bruc":currentlat=40.0006213772508;currentlng=3.806612491607666;break;case"Cala en Blanes":currentlat=40.0006460333177;currentlng=3.8132429122924805;break;case"Cala Morell":currentlat=40.05403017727761;currentlng=3.883817195892334;break;case"Cala en Porter":currentlat=39.87351633862449;currentlng=4.133090972900391;break;case"Ciutadella":currentlat=40.00210894401827;currentlng=3.8402366638183594;break;case"Es Canutells":currentlat=39.85205525828814;currentlng=4.171757698059082;break;case"Es Grau":currentlat=39.949572461623006;currentlng=4.269647598266602;break;case"Es Castell":currentlat=39.874702019957475;currentlng=4.294710159301758;break;case"Es Mercadel":currentlat=39.98846485213644;currentlng=4.093823432922363;break;case"Ferreries":currentlat=39.98325307601886;currentlng=4.011082649230957;break;case"Fornells":currentlat=40.0565266580714;currentlng=4.128971099853516;break;case"Los Delfines":currentlat=40.00184595114704;currentlng=3.8002395629882812;break;case"Llucmassanes":currentlat=39.86956391948272;currentlng=4.242267608642578;break;case"Mahon":currentlat=39.88639305766033;currentlng=4.263424873352051;break;case"Playas de Fornells":currentlat=40.047952835201315;currentlng=4.109830856323242;break;case"Punta Prima":currentlat=39.81555766637023;currentlng=4.277758598327637;break;case"Santandria":currentlat=39.98139;currentlng=3.8392;break;case"Sa Roca":currentlat=39.87351633862449;currentlng=4.133090972900391;break;case"S'Algar":case"S Algar":currentlat=39.836486422931394;currentlng=4.299130439758301;case"Sant Climent":currentlat=39.871738;currentlng=4.2073774337768555;break;case"Sant Lluis":currentlat=39.84960072396995;currentlng=4.258146286010742;break;case"Santo Tomas":currentlat=39.915529641706314;currentlng=4.041595458984375;break;case"Son Bou":currentlat=39.905654221614384;currentlng=4.071807861328125;break;case"Son Parc":currentlat=40.03136057548627;currentlng=4.162702560424805;break;case"Son Xoriguer":currentlat=39.928365559281666;currentlng=3.8422107696533203;break;case"Trebaluger":currentlat=39.85549804778931;currentlng=4.277973175048828;break;default:currentlat=39.9602803542957;currentlng=4.071807861328125;break}var a=new GLatLng(currentlat,currentlng);GEvent.trigger(document.getElementById("islandlocation"),"zoom",a,c)}function makeSidebar(b){var g="";var c="";resorthtmltext="<div id='resortlist'>";attractionshtmltext="<div id='attractionlist'>";var d="<div id='townlist'>";beachhtmltext="<div id='beachlist'>";virginbeachhtmltext="<div id='beachlist'>";transporthtmltext="<div id='transportlist'>";var j="";var a="";var e="";for(var f=0;f<window.gmarkers.length;f++){if(!gmarkers[f].isHidden()){switch(gmarkers[f].type){case"1":if(gmarkers[f].subtype!=2){var h="sidebarmouseover";e="<span style='cursor:pointer;' onmouseover=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseover' )\"  onmouseout=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseout' )\"  ><img alt='Highlight on map' class='listphoto' src='"+gmarkers[f].photo.replace(/medium/,"small")+"'/></span>";beachhtmltext+="<table  id='sidebarid"+gmarkers[f].id+"'  class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+" <br> </br><a href=\"javascript:zoomclick('"+f+"')\"><img src='/media/images/map/icons/zoomto.png' alt='Zoom to location' title='Zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>"}else{e="<span style='cursor:pointer;' onmouseover=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseover' )\"  onmouseout=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseout' )\" ><img alt='Show on map' class='listphoto' src='"+gmarkers[f].photo.replace(/medium/,"small")+"'/></span>";virginbeachhtmltext+="<table  id='sidebarid"+gmarkers[f].id+"'  class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+" <br></br><a href=\"javascript:zoomclick('"+f+"')\"><img src='/media/images/map/icons/zoomto.png' alt='Zoom to location' title='Zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>"}break;case"2":e="<span style='cursor:pointer;' onmouseover=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseover' )\"  onmouseout=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseout' )\"  ><img alt='Highlight on map' class='listphoto' src='"+gmarkers[f].photo.replace(/medium/,"small")+"'/></span>";if(gmarkers[f].subtype!=2){a="Town"}else{a="Town"}d+="<table  id='sidebarid"+gmarkers[f].id+"' class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+" <br>distance "+gmarkers[f].distance.toFixed(1)+" km </br><a href=\"javascript:zoomclick('"+f+"' )\"><img src='/media/images/map/icons/zoomto.png' alt='zoom to location' title='zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>";break;case"3":e="<span style='cursor:pointer;' onmouseover=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseover' )\"  onmouseout=\"javascript:GEvent.trigger(gmarkers["+f+"],'sidebarmouseout' )\"  ><img alt='Highlight on map' class='listphoto' src='"+gmarkers[f].photo.replace(/medium/,"small")+"'/></span>";if(gmarkers[f].subtype!=2){a="Attraction"}else{a="Attraction"}attractionshtmltext+="<table  id='sidebarid"+gmarkers[f].id+"' class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+" <br>distance"+gmarkers[f].distance.toFixed(1)+" km </br></br><a href=\"javascript:myclick('"+f+"')\">   show on map  </a><a href=\"javascript:zoomclick('"+f+"')\"><img src='/media/images/map/icons/zoomto.png' alt='zoom to location' title='zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>";break;case"6":e="";if(gmarkers[f].subtype!=2){a="Resort"}else{a="Resort"}resorthtmltext+="<table  id='sidebarid"+gmarkers[f].id+"' class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+"  <br>distance "+gmarkers[f].distance.toFixed(1)+" km </br></br><a href=\"javascript:myclick('"+f+"')\">   show on map  </a><a href=\"javascript:zoomclick('"+f+"')\"><img src='/media/images/map/icons/zoomto.png' alt='zoom to location' title='zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>";break;case"7":e="<img  src='"+gmarkers[f].photo+"'/>";if(gmarkers[f].subtype!=2){a="Transport"}else{a="Transport"}transporthtmltext+="<table  id='sidebarid"+gmarkers[f].id+"' class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+"  <br>distance "+gmarkers[f].distance.toFixed(1)+" km </br></br><a href=\"javascript:myclick('"+f+"')\">   show on map </a><a href=\"javascript:zoomclick('"+f+"')\"><img src='/media/images/map/icons/zoomto.png' alt='zoom to location' title='zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>";break;case"Apartment":case"Villa":case"CC":e="<img alt='' class='listphoto' src='http://www.holidayhomerentalsonline.com/online/temp/"+gmarkers[f].photo+"'/>";a=propertyinfo.pid;c+="<table id='sidebarid"+gmarkers[f].id+"' class='listcontainer "+gmarkers[f].type+"' ><tr><td width='50px'>"+e+"</td><td>"+gmarkers[f].name+" ( Pid "+a+") <br>distance </br></br><a href=\"javascript:myclick('"+f+"')\">   zoom to location </a><a href=\"javascript:zoomclick('"+f+"')\"><img src='/media/images/map/icons/zoomto.png' alt='zoom to location' title='zoom to location' style='width: 24px; height: 20px;'  border='0'></a></td></tr></table>";break}}}d+="</div >";resorthtmltext+="</div >";attractionshtmltext+="</div >";beachhtmltext+="</div >";virginbeachhtmltext+="</div >";transporthtmltext+="</div >";if(document.getElementById("20Checkbox").checked){townheader="<div class='listheader'><img src='/media/images/pixel.gif'  width='8' height='15' align='middle' border='0'><img  id='townexpand' style='cursor:pointer' src='/media/images/graphics/icons/upmorehelp.png' onClick=\"hideShow('townexpand' ,'townbody')\"   alt='expand' width='15' height='15' align='middle' border='0'> Island Towns</div>";townbody="<div style='display:block' class='addhelptext' id='townbody'>"+d+"</div>";c+=townheader+townbody}if(document.getElementById("60Checkbox").checked){resortheader="<div class='listheader'><img src='/media/images/pixel.gif'  width='8' height='15' align='middle' border='0'><img  id='resortexpand' style='cursor:pointer' src='/media/images/graphics/icons/upmorehelp.png' onClick=\"hideShow('resortexpand' ,'resortbody')\"   alt='expand' width='15' height='15' align='middle' border='0'> Island Resorts</div>";resortbody="<div style='display:block' class='addhelptext' id='resortbody'>"+resorthtmltext+"</div>";c+=resortheader+resortbody}if(document.getElementById("11Checkbox").checked){beachheader="<div class='listheader'><img src='/media/images/pixel.gif'  width='8' height='15' align='middle' border='0'><img  id='beachexpand' style='cursor:pointer' src='/media/images/graphics/icons/upmorehelp.png' onClick=\"hideShow('beachexpand' ,'beachbody')\"   alt='expand' width='15' height='15' align='middle' border='0'> Serviced Beaches</div>";beachbody="<div style='display:block' class='addhelptext' id='beachbody'>"+beachhtmltext+"</div>";c+=beachheader+beachbody}if(document.getElementById("12Checkbox").checked){virginbeachheader="<div class='listheader'><img src='/media/images/pixel.gif'  width='8' height='6' align='middle' border='0'><img  id='virginbeachexpand' style='cursor:pointer' src='/media/images/graphics/icons/upmorehelp.png' onClick=\"hideShow('virginbeachexpand' ,'virginbeachbody')\"   alt='expand' width='15' height='15' align='middle' border='0'> Virgin Beaches</div>";virginbeachbody="<div style='display:block' class='addhelptext' id='virginbeachbody'>"+virginbeachhtmltext+"</div>";c+=virginbeachheader+virginbeachbody}if(document.getElementById("30Checkbox").checked){attractionsheader="<div class='listheader'><img src='/media/images/pixel.gif'  width='8' height='15' align='middle' border='0'><img  id='attractionexpand' style='cursor:pointer' src='/media/images/graphics/icons/upmorehelp.png' onClick=\"hideShow('attractionexpand' ,'attractionbody')\"   alt='expand' width='15' height='15' align='middle' border='0'> See and Do</div>";attractionsbody="<div style='display:block' class='addhelptext' id='attractionbody'>"+attractionshtmltext+"</div>";c+=attractionsheader+attractionsbody}if(document.getElementById("70Checkbox").checked){transportheader="<div class='listheader'><img src='/media/images/pixel.gif'  width='8' height='15' align='middle' border='0'><img  id='transportexpand' style='cursor:pointer' src='/media/images/graphics/icons/upmorehelp.png' onClick=\"hideShow('transportexpand' ,'transportbody')\"   alt='expand' width='15' height='15' align='middle' border='0'> Transport Services</div>";transportbody="<div style='display:block' class='addhelptext' id='transportbody'>"+transporthtmltext+"</div>";c+=transportheader+transportbody}document.getElementById("property-list").innerHTML=c}function setitup(b,c,a){if(b==null){b=15}if(c==null){c="a"}if(a==null){a="Menorca"}switch(a){case"Menorca":currentlat=39.9602803542957;currentlng=4.071807861328125;break;case"Addaya":currentlat=40.00888066156387;currentlng=4.197807312011719;break;case"Alaior":currentlat=39.93382832231187;currentlng=4.140815734863281;break;case"Arenal den Castell":currentlat=40.0216004699687;currentlng=4.183773994445801;break;case"Binibeca":currentlat=39.82053500355178;currentlng=4.237632751464844;break;case"Binisafuller":currentlat=39.82590748611062;currentlng=4.229435920715332;break;case"Cala Blanca":currentlat=39.97718;currentlng=3.83397;break;case"Cala Coves":currentlat=39.864326613335;currentlng=4.146523475646973;break;case"Cala Galdana":currentlat=39.93994873163127;currentlng=3.961515426635742;break;case"Cala Llonga":currentlat=39.89268234054683;currentlng=4.297885894775391;break;case"Cala en Bosch":currentlat=39.92777318528353;currentlng=3.827362060546875;break;case"Cala en Brut":currentlat=40.0006213772508;currentlng=3.806612491607666;break;case"Cala en Bruc":currentlat=40.0006213772508;currentlng=3.806612491607666;break;case"Cala en Blanes":currentlat=40.0006460333177;currentlng=3.8132429122924805;break;case"Cala Morell":currentlat=40.05403017727761;currentlng=3.883817195892334;break;case"Cala en Porter":currentlat=39.87351633862449;currentlng=4.133090972900391;break;case"Ciutadella":currentlat=40.00210894401827;currentlng=3.8402366638183594;break;case"Es Canutells":currentlat=39.85205525828814;currentlng=4.171757698059082;break;case"Es Grau":currentlat=39.949572461623006;currentlng=4.269647598266602;break;case"Es Castell":currentlat=39.874702019957475;currentlng=4.294710159301758;break;case"Es Mercadel":currentlat=39.98846485213644;currentlng=4.093823432922363;break;case"Ferreries":currentlat=39.98325307601886;currentlng=4.011082649230957;break;case"Fornells":currentlat=40.0565266580714;currentlng=4.128971099853516;break;case"Los Delfines":currentlat=40.00184595114704;currentlng=3.8002395629882812;break;case"Llucmassanes":currentlat=39.86956391948272;currentlng=4.242267608642578;break;case"Mahon":currentlat=39.88639305766033;currentlng=4.263424873352051;break;case"Playas de Fornells":currentlat=40.047952835201315;currentlng=4.109830856323242;break;case"Punta Prima":currentlat=39.81555766637023;currentlng=4.277758598327637;break;case"Santandria":currentlat=39.98139;currentlng=3.8392;break;case"Sa Roca":currentlat=39.87351633862449;currentlng=4.133090972900391;break;case"S'Algar":currentlat=39.836486422931394;currentlng=4.299130439758301;break;case"Sant Climent":currentlat=39.871738;currentlng=4.2073774337768555;break;case"Sant Lluis":currentlat=39.84960072396995;currentlng=4.258146286010742;break;case"Santo Tomas":currentlat=39.915529641706314;currentlng=4.041595458984375;break;case"Son Bou":currentlat=39.905654221614384;currentlng=4.071807861328125;break;case"Son Parc":currentlat=40.03136057548627;currentlng=4.162702560424805;break;case"Son Xoriguer":currentlat=39.928365559281666;currentlng=3.8422107696533203;break;case"Trebaluger":currentlat=39.85549804778931;currentlng=4.277973175048828;break;default:currentlat=39.9602803542957;currentlng=4.071807861328125;break}urlstr="http://www.mymenorca.info/myislandmap.php?radius="+b+"&mt="+c+"&lat="+currentlat+"&lng="+currentlng+"&lang=en";loadlocationmap(urlstr,a,currentlat,currentlng,b)}var PromoControl=function(a){this.url_=a};PromoControl.prototype=new GControl(true);PromoControl.prototype.initialize=function(b){var a=document.createElement("div");a.innerHTML='<img alt="My Menorca - www.mymenorca.info "  title="My Menorca - www.mymenorca.info " style="cursor:pointer" src="http://www.holidayhomerentalsonline.com/online/myimages/graphics/maplogo.png" border="0">';a.style.width="120px";a.style.height="32px";url=this.url_;GEvent.addDomListener(a,"click",function(){document.location=url});b.getContainer().appendChild(a);return a};PromoControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_BOTTOM_LEFT,new GSize(2,80))};
