window.onunload = function(){
	GUnload();
}
window.onload = function(){

	if (GBrowserIsCompatible()) {
		
		// Init a new map
		var map = new GMap2(document.getElementById('map'));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(27,31.0), 5);
		
		
		
		// Creating a new marker
		var alex = new GMarker(new GLatLng(31.2135, 29.9443))
		GEvent.addListener(alex, 'click', function() {
			var tabalex = [];
			tabalex.push(new GInfoWindowTab('Alexandria', '<div class="google-infoWindow"><img src="/images/gallery/thumbs/3/Viewcafe_1265246112.jpg" class="google-image"><p>Alexandria the second largest city in Egypt known as the “Pearl of the Mediterranean”, rich with cultural attractions, sprawling beaches and charming atmosphere.</p></div>'));
			tabalex.push(new GInfoWindowTab('Hotels', '<div class="google-list"><a href="/hotel/3/Mediterranean Azur" >Mediterranean Azur (5 star)</a></div>'));
			alex.openInfoWindowTabsHtml(tabalex);
		});
		
		// Creating a new marker
		var hurg = new GMarker(new GLatLng( 27.2574, 33.8097))
		GEvent.addListener(hurg, 'click', function() {
			var tabhurg = [];
			tabhurg.push(new GInfoWindowTab('Hurghada', '<div class="google-infoWindow"><img src="/images/gallery/thumbs/4/OasisRestaurant_1265234575.jpg" class="google-image"><p>One of Egypt’s touristic hotspots known for its outstanding diving, stunning beaches and vibrant nightlife.</p></div>'));
			tabhurg.push(new GInfoWindowTab('Hotels', '<div class="google-list"><a href="/hotel/4/Arabella Azur" >Arabella Azur (4 star)</a><a href="/hotel/5/Arabia Azur" >Arabia Azur (4 star)</a><a href="/hotel/6/Bel Air Azur" >Bel Air Azur (4 star)</a><a href="/hotel/7/Giftun Azur" >Giftun Azur (3 star)</a></div>'));
			hurg.openInfoWindowTabsHtml(tabhurg);
		});
		
			// Creating a new marker
		var makadi = new GMarker(new GLatLng( 26.9833, 33.9000))
		GEvent.addListener(makadi, 'click', function() {
			var tabmakadi = [];
			tabmakadi.push(new GInfoWindowTab('Makadi Bay', '<div class="google-infoWindow"><img src="/images/gallery/thumbs/8/poolview2_1265243607.jpg" class="google-image"><p>Exclusive holiday destination only 25 km from Hurghada, best known for its tranquil ambience, diving, and beautiful beaches.</p></div>'));
			tabmakadi.push(new GInfoWindowTab('Hotels', '<div class="google-list"><a href="/hotel/8/Royal Azur" >Royal Azur (5 star)</a><a href="/hotel/9/Club Azur" >Club Azur (4 star)</a></div>'));
			makadi.openInfoWindowTabsHtml(tabmakadi);
		});
		
			// Creating a new marker
		var marsa = new GMarker(new GLatLng( 25.0768, 34.8917))
		GEvent.addListener(marsa, 'click', function() {
			var tabmarsa = [];
			tabmarsa.push(new GInfoWindowTab('Marsa Alam', '<div class="google-infoWindow"><img src="/images/gallery/thumbs/10/BeachView_1265244582.jpg" class="google-image"><p>A destination that is rich in historical sites, outstanding natural landscapes and only 2 hours away from the city of Luxor.</p></div>'));
			tabmarsa.push(new GInfoWindowTab('Hotels', '<div class="google-list"><a href="/hotel/10/Pensee Azur" >Pensee Azur (4 star)</a></div>'));
			marsa.openInfoWindowTabsHtml(tabmarsa);
		});
		
			// Creating a new marker
		var sahl = new GMarker(new GLatLng( 26.7833, 33.9000))
		GEvent.addListener(sahl, 'click', function() {
			var tabsahl = [];
			tabsahl.push(new GInfoWindowTab('Sahl Hasish', '<div class="google-infoWindow"><img src="/images/gallery/thumbs/11/mainrest_1265245410.jpg" class="google-image"><p>High end resort destination only 30 km from sahlhada , known for its pristine beaches, crystal waters and exquisite dining.</p></div>'));
			tabsahl.push(new GInfoWindowTab('Hotels', '<div class="google-list"><a href="/hotel/11/Citadel Azur" >Citadel Azur (5 star)</a></div>'));
			sahl.openInfoWindowTabsHtml(tabsahl);
		});
		
			// Creating a new marker
		var berenice = new GMarker(new GLatLng( 23.9461, 35.4865))
		GEvent.addListener(berenice, 'click', function() {
			var tabberenice = [];
			tabberenice.push(new GInfoWindowTab('Berenice', '<div class="google-infoWindow"><img src="/images/gallery/thumbs/12/DSCF1180_1265375091.jpg" class="google-image"><p>An ancient city that dates two thousand years in Egyptian history and is known for its virgin beaches, unspoilt reefs and serene ambiance.</p></div>'));
			tabberenice.push(new GInfoWindowTab('Hotels', '<div class="google-list"><a href="/hotel/12/Wadi Lahmy Azur" >Wadi Lahmy Azur (3 star)</a></div>'));
			berenice.openInfoWindowTabsHtml(tabberenice);
		});
		
		
		// Add marker to map
		map.addOverlay(alex);
		map.addOverlay(hurg);
		map.addOverlay(makadi);
		map.addOverlay(marsa);
		map.addOverlay(sahl);
		map.addOverlay(berenice);
		
				}
			}
