function initialize() {
      if (GBrowserIsCompatible()) {          
var map = new GMap2(document.getElementById("map_canvas")); 
map.setCenter(new GLatLng(40.557895,8.281), 12);   
//icon defionition for tronas	 
var tronasIcon = new GIcon(G_DEFAULT_ICON); 	 
tronasIcon.image = "media/markers/marker1.png"; 	 
tronasIcon.iconSize = new GSize(20, 34); 	 
tronasIcon.shadowSize = new GSize(0, 0); 	 
tronasIcon.iconAnchor = new GPoint(10, 20); 
//icon defionition for carlos	 
var carlosIcon = new GIcon(G_DEFAULT_ICON); 	 
carlosIcon.image = "media/markers/marker2.png"; 	 
carlosIcon.iconSize = new GSize(20, 34); 	 
carlosIcon.shadowSize = new GSize(0, 0); 	 
carlosIcon.iconAnchor = new GPoint(10, 20); 
//icon definition for negra 	 
var negraIcon = new GIcon(G_DEFAULT_ICON); 	 
negraIcon.image = "media/markers/marker3.png"; 	 
negraIcon.iconSize = new GSize(20, 34); 	 
negraIcon.shadowSize = new GSize(0, 0); 	 
negraIcon.iconAnchor = new GPoint(20, 20);
//icon defionition for faro
var faroIcon = new GIcon(G_DEFAULT_ICON); 	 
faroIcon.image = "media/markers/marker4.png"; 	 
faroIcon.iconSize = new GSize(20, 34); 	 
faroIcon.shadowSize = new GSize(0, 0); 	 
faroIcon.iconAnchor = new GPoint(10, 30);  
//icon defionition for calabona 	 
var calabonaIcon = new GIcon(G_DEFAULT_ICON); 	 
calabonaIcon.image = "media/markers/marker5.png"; 	 
calabonaIcon.iconSize = new GSize(20, 34); 	 
calabonaIcon.shadowSize = new GSize(0, 0); 	 
calabonaIcon.iconAnchor = new GPoint(10, 30); 
//icon defionition for catalunya 	 
var catalunyaIcon = new GIcon(G_DEFAULT_ICON); 	 
catalunyaIcon.image = "media/markers/marker6.png"; 	 
catalunyaIcon.iconSize = new GSize(20, 34); 	 
catalunyaIcon.shadowSize = new GSize(0, 0); 	 
catalunyaIcon.iconAnchor = new GPoint(10, 30); 
//icon defionition for green	 
var greenIcon = new GIcon(G_DEFAULT_ICON); 	 
greenIcon.image = "media/markers/marker7.png"; 	 
greenIcon.iconSize = new GSize(20, 34); 	 
greenIcon.shadowSize = new GSize(0, 0); 	 
greenIcon.iconAnchor = new GPoint(10, 30); 
//icon definition for riviera 	 
var rivieraIcon = new GIcon(G_DEFAULT_ICON); 	 
rivieraIcon.image = "media/markers/marker8.png"; 	 
rivieraIcon.iconSize = new GSize(20, 34); 	 
rivieraIcon.shadowSize = new GSize(0, 0); 	 
rivieraIcon.iconAnchor = new GPoint(10, 30); 
//icon defionition for angedras	 
var angedrasIcon = new GIcon(G_DEFAULT_ICON); 	 
angedrasIcon.image = "media/markers/marker9.png"; 	 
angedrasIcon.iconSize = new GSize(20, 34); 	 
angedrasIcon.shadowSize = new GSize(0, 0); 	 
angedrasIcon.iconAnchor = new GPoint(10, 20); 
//icon defionition for alma 	 
var almaIcon = new GIcon(G_DEFAULT_ICON); 	 
almaIcon.image = "media/markers/marker10.png"; 	 
almaIcon.iconSize = new GSize(20, 34); 	 
almaIcon.shadowSize = new GSize(0, 0); 	 
almaIcon.iconAnchor = new GPoint(10, 25); 
//icon defionition for margherita	 
var margheritaIcon = new GIcon(G_DEFAULT_ICON); 	 
margheritaIcon.image = "media/markers/marker11.png"; 	 
margheritaIcon.iconSize = new GSize(20, 34); 	 
margheritaIcon.shadowSize = new GSize(0, 0); 	 
margheritaIcon.iconAnchor = new GPoint(10, 30); 
//icon definition for playa 	 
var playaIcon = new GIcon(G_DEFAULT_ICON); 	 
playaIcon.image = "media/markers/marker12.png"; 	 
playaIcon.iconSize = new GSize(20, 34); 	 
playaIcon.shadowSize = new GSize(0, 0); 	 
playaIcon.iconAnchor = new GPoint(10, 30); 

//icon definition for barcellona	 
var barcellonaIcon = new GIcon(G_DEFAULT_ICON); 	 
barcellonaIcon.image = "media/markers/marker13.png"; 	 
barcellonaIcon.iconSize = new GSize(20, 34); 	 
barcellonaIcon.shadowSize = new GSize(0, 0); 	 
barcellonaIcon.iconAnchor = new GPoint(10, 30); 

var mapTypeControl = new GMapTypeControl(); 
var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10));          
var bottomRight = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,10));  	 	 	 
//var marker = new GMarker(point);  	          
//this function constructs the info box 	  

function createMarker(point,html) {          
var marker = new GMarker(point, markerOptions);          
GEvent.addListener(marker, "click", function() {            
marker.openInfoWindowHtml(html);         });          
return marker;       	}  	 
function createMarker2(point) {          
var marker = new GMarker(point, markerOptions);          
return marker;       	}  
   //map.addOverlay(marker); 	 
//map.addOverlay(marker, markerOptions);  
//create catalunya marker 	 
markerOptions = { icon:tronasIcon }; 	 
var point = new GLatLng(40.550252,8.31811); 	 
var marker = createMarker(point,'<div style="width:240px; height:150px"><b><A target="_blank" rel="nofollow" href="http://holidaydestinations.at/25asr?LID=tronas&DURL=http://www.expedia.co.uk/Alghero-Northern-Sardinia-Hotels-Hotel-Villa-Las-Tronas.h1166158.Hotel-Information">Hotel Villa Las Tronas (5 star)</a></b><BR><div style="font-size:11px"><i>Lungomare Valencia 1 - 079 981 818</i></div><P style="font-size:9.5px"> This five star hotel is set on a private rocky promontory surrounded by small beaches and until the 1940s served as the Sardinian holiday residence for the Italian royal family. It is located in the southern part of Alghero, a short stroll from the old town.</div>')    
map.addOverlay(marker);
//create carlos marker 	 
markerOptions = { icon:carlosIcon }; 	 
var point = new GLatLng(40.549609,8.321214); 	 
var marker = createMarker(point,'<div style="width:240px; height:165px"><b><A target="_blank" rel="nofollow" href="http://laterooms.at/25asr?LID=carlos&DURL=http://www.laterooms.com/en/p1023/pvSR2SXA/hotel-reservations/145782_carlos-v-hotel-alghero.aspx">Hotel Carlos V (5 star)</a></b><BR><div style="font-size:11px"><i>Lungomare Valencia 24 - 079 972 0600</i></div><P style="font-size:9.5px">Located a short distance from Villa Las Tronas, on the promenade Lungomare Valencia, this large seafront hotel consists of 179 rooms, two restaurants, two swimming pools and a solarium. There is private parking and the old town centre is a ten minute walk away. Completely refurbished in 2007.</div>')    
map.addOverlay(marker); 
//create negra marker 	 
markerOptions = { icon:negraIcon }; 	 
var point = new GLatLng(40.59374,8.275585); 	 
var marker = createMarker(point,'<div style="width:240px; height:165px"><b><a target="_blank" rel="nofollow" href="http://www.tkqlhce.com/click-2488911-10411802?url=http%3A%2F%2Fwww.thomson.co.uk%2Fdestinations%2Feurope%2Fitaly%2Fsardinia%2Falghero%2Fhotels%2Fhotel-punta-negra.html" target="_top">Hotel Punta Negra (4 star)</a><img alt="thomson" src="http://www.lduhtrp.net/image-2488911-10411802" width="1" height="1" border="0"/></b><BR><div style="font-size:11px"><i>Fertilia - 079 930 222</i></div><P style="font-size:9.5px">Located a few kilometres north of Alghero just outside Fertilia, this hotel has 93 rooms and boasts its own private beach in addition to pool. Diners at the restaurant can enjoy sea views from the main terrace. There are half and full board options and a regular bus service into Alghero.</div>')    
map.addOverlay(marker); 
//create faro marker 	 
markerOptions = { icon:faroIcon }; 	 
var point = new GLatLng(40.593519,8.205554); 	 
var marker = createMarker(point,'<div style="width:240px; height:150px"><b><A target="_blank" rel="nofollow" href="http://hotelaccommodation.at/25asr?LID=faro&DURL=http://www.hotels.com/ho236224/el-faro-hotel-alghero-italy/">El Faro Hotel (4 star)</a></b><BR><div style="font-size:11px"><i>Porto Conte 52 - 079 942 010</i></div><P style="font-size:9.5px">Built in 1956, the 92 room El Faro enjoys an enviable position on Nymph Bay with views out to Capo Caccia just a few miles distant. The hotel, which has its own private beach, is surrounded by a marine reserve. Alghero can be reached in approximately 15 minutes by car.</div>')    
map.addOverlay(marker); 
//create calabona marker 	 
markerOptions = { icon:calabonaIcon }; 	 
var point = new GLatLng(40.54700,8.321089); 	 
var marker = createMarker(point,'<div style="width:240px; height:117px"><b><a target="_blank" rel="nofollow" href="http://www.jdoqocy.com/click-2488911-10411802?url=http%3A%2F%2Fwww.thomson.co.uk%2Fdestinations%2Feurope%2Fitaly%2Fsardinia%2Falghero%2Fhotels%2Fhotel-calabona.html" target="_top">Hotel Calabona (4 star)</a><img alt="Thomson" src="http://www.tqlkg.com/image-2488911-10411802" width="1" height="1" border="0"/></b><BR><div style="font-size:11px"><i>Localita Calabona - 079 975 728</i></div><P style="font-size:9.5px">This 110 room hotel is situated in a rocky cove just under 1 km south of Alghero old town. Facilities include a private beach, two swimming pools, spa and solarium.</div>')    
map.addOverlay(marker); 
//create catalunya marker 	 
markerOptions = { icon:catalunyaIcon }; 	 
var point = new GLatLng(40.560901,8.317197); 	 
var marker = createMarker(point,'<div style="width:240px; height:150px"><b><a target="_blank" rel="nofollow" href="http://track.webgains.com/click.html?wgcampaignid=102196&wgprogramid=5380&clickref=catalunya&wgtarget=http://www.octopustravel.com/hotels/uk/italy/alghero-sardinia/catalunya">Hotel Catalunya (4 Star)</a></b><BR><div style="font-size:11px"><i>Via Catalogna 20 - 079 953 172</i></div><P style="font-size:9.5px">This purpose built hotel is located in the heart of the city centre just behind the marina and a few minutes walk to the old town. There are 116 rooms, two restaurants and in the peak summer months a shuttle bus service provides access to a private beach.</div>')    
map.addOverlay(marker); 
//create green marker 	 
markerOptions = { icon:greenIcon }; 	 
var point = new GLatLng(40.548354,8.321492); 	 
var marker = createMarker(point,'<div style="width:240px; height:118px"><b><a target="_blank" rel="nofollow" href="http://clkuk.tradedoubler.com/click?p(118779)a(1634384)g(17957074)url(http://www.lastminute.com/hotels/selectCategoryHotel.do?locale=en_GB&partnerId=0&accommAdditional=en_GB-OXF-%28%24n%29-%28%24n%29-1-GB-%28%24n%29-50-4-%28%24n%29-5-5-106%24v1v%24&catID=0&CATID=0&token=&stateChangeCount=2&tabSelection=hotelDetails&intcmp=opmtogt&accommCode=1061347-0-2-EXT:150933$v1v$)" title="Hotel Green Sporting Club">Hotel Green Sporting Club (4 star)</a><img ALT="Lastminute" src="http://impgb.tradedoubler.com/imp?type(inv)g(17957074)a(1634384)" /></a></b><BR><div style="font-size:11px"><i>Viale della Resistenza 1 - 079 978 124</i></div><P style="font-size:9.5px">Set in a quiet residential area just over 1 km south of the centre this hotel has 90 rooms, a solarium, sauna and swimming pool.</div>')    
map.addOverlay(marker); 
//create riviera marker 	 
markerOptions = { icon:rivieraIcon }; 	 
var point = new GLatLng(40.573354,8.318251); 	 
var marker = createMarker(point,'<div style="width:240px; height:150px"><b><a target="_blank" rel="nofollow" href="http://www.dpbolvw.net/click-2488911-10411802?url=http%3A%2F%2Fwww.thomson.co.uk%2Fdestinations%2Feurope%2Fitaly%2Fsardinia%2Falghero%2Fhotels%2Fhotel-riviera.html" target="_top">Hotel Riviera (3 star)</a><img ALT="Thomson" src="http://www.tqlkg.com/image-2488911-10411802" width="1" height="1" border="0"/></a></b><BR><div style="font-size:11px"><i>Via Fratelli Cervi 6 - 079 987 022</i></div><P style="font-size:9.5px">Situated to the north of the town and fifty metres from Alghero beach, this 55 room hotel includes a restaurant serving local and international dishes. The old town centre is a fifteen minute walk along the Lungomare Garibaldi promenade.</div>')    
map.addOverlay(marker); 
//create angedras marker 	 
markerOptions = { icon:angedrasIcon }; 	 
var point = new GLatLng(40.551366,8.32345); 	 
var marker = createMarker(point,'<div style="width:240px; height:135px"><b><A target="_blank" rel="nofollow" href="http://laterooms.at/25asr?LID=andregas&DURL=http://www.laterooms.com/en/p1023/pvULPFKQ/hotel-reservations/146549_angedras-alghero.aspx">Hotel Angedras (3 star)</a></b><BR><div style="font-size:11px"><i>Via Frank 2 - 079 973 5034</i></div><P style="font-size:9.5px">Situated in a quiet residential area to the south of the centre this three star hotel is approximately fifteen minutes walk to the old town. There are 33 rooms and an outside breakfast area.</div>')    
map.addOverlay(marker);  
//create alma marker 	 
markerOptions = { icon:almaIcon }; 	 
var point = new GLatLng(40.571692,8.318227); 	 
var marker = createMarker(point,'<div style="width:240px; height:135px"><b><A target="_blank" rel="nofollow" href="http://holidaydestinations.at/25asr?LID=alma&DURL=http://www.expedia.co.uk/Alghero-Northern-Sardinia-Hotels-Alma-Di-Alghero-Hotel.h1356215.Hotel-Information">Hotel Alma (3 Star)</a></b><BR><div style="font-size:11px"><i>Via Lido 29 - 079 985 616</i></div><P style="font-size:9.5px">A modern three star hotel with 32 rooms located on the Via Lido, opposite Alghero beach. The old town can be reached in about fifteen minutes on foot along the Lungomare Garibaldi promenade.</div>')    
map.addOverlay(marker); 
//create margherita marker 	 
markerOptions = { icon:margheritaIcon }; 	 
var point = new GLatLng(40.556288,8.31753); 	 
var marker = createMarker(point,'<div style="width:240px; height:135px"><b><a target="_blank" rel="nofollow" href="http://track.webgains.com/click.html?wgcampaignid=102196&wgprogramid=5380&clickref=margherita&wgtarget=http://www.octopustravel.com/hotels/uk/italy/alghero-sardinia/margherita">Hotel Margherita (3 star)</a></b><BR><div style="font-size:11px"><i>Via Sassari 70 - 079 979 006</i></div><P style="font-size:9.5px">This hotel is located in the centre of Alghero just a few minutes walk from the old town. In addition to 60 rooms facilities include a restaurant, outside dining, rooftop terrace and solarium.</div>')    
map.addOverlay(marker); 
//create playa marker 	 
markerOptions = { icon:playaIcon }; 	 
var point = new GLatLng(40.573908,8.317864); 	 
var marker = createMarker(point,'<div style="width:240px; height:165px"><b><A target="_blank" rel="nofollow" href="http://hotelaccommodation.at/25asr?LID=playa&DURL=http://www.hotels.com/ho328806/la-playa-alghero-italy/">Hotel La Playa (3 star)</a></b><BR><div style="font-size:11px"><i>Via Pantelleria 14 - 079 950 369</i></div><P style="font-size:9.5px">This family run three star hotel contains 33 rooms and is located in its own gardens about 150 metres from the beach to the north of the town. The marina is under fifteen minutes on foot with another five to the heart of the Old Town. The hotel contains a restaurant and optional B&amp;B is available.</div>')    
map.addOverlay(marker); 
//create barcellona marker 	 
markerOptions = { icon:barcellonaIcon }; 	 
var point = new GLatLng(40.563155,8.319499); 	 
var marker = createMarker(point,'<div style="width:240px; height:117px"><b><a target="_blank" rel="nofollow" href="http://laterooms.at/25asr?LID=barcellona&DURL=http://www.laterooms.com/en/p1023/pvVDA2DD/hotel-reservations/234979_hotel-barcellona-srl-alghero.aspx">Hotel Barcellona (3 star)</a></b><BR><div style="font-size:11px"><i>Via Gallura 15 - 079 952 270</i></div><P style="font-size:9.5px">The hotel has 46 rooms which are furnished in a simple and traditional style. Located in the centre of Alghero, the old town can be reached on foot in about five minutes.</div>')    
map.addOverlay(marker); 

//map.addOverlay(new GMarker(point, markerOptions));          	 	 
//add zoom controls 	 
map.addControl(mapTypeControl, topRight); 	  
GEvent.addListener(map, "dblclick", function() {
            map.removeControl(mapTypeControl);            
map.addControl(new GMapTypeControl(), bottomRight);         });          
map.addControl(new GLargeMapControl()); 	 }      }
