// JavaScript Document
//<![CDATA[
	var elm;
	var map;
    var gdir;
    var geocoder = null;
    var addressMarker;


function googleLoad() {
	
	   // Create our "tiny" marker icon
      var icon = new GIcon();
      icon.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/puce-here.png";
	  
	  var hotelun = new GIcon();
	  hotelun.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
	 
	  var hoteldeux = new GIcon();
	  hoteldeux.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
	  
	  var hoteltrois = new GIcon();
	  hoteltrois.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
	 
	  var hotelquatre = new GIcon();
	  hotelquatre.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
	  
	  var hotelcinq = new GIcon();
	  hotelcinq.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
	  
	  var hotelsix = new GIcon();
	  hotelsix.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
	  
	  var hotelsept = new GIcon();
	  hotelsept.image = "http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here.png";
      
	  icon.iconSize = new GSize(20, 20);
      icon.shadowSize = new GSize(16, 16);
      icon.iconAnchor = new GPoint(6, 20);
      icon.infoWindowAnchor = new GPoint(5, 1);
	 
	  hotelun.iconSize = new GSize(18, 19);
      hotelun.shadowSize = new GSize(16, 16);
      hotelun.iconAnchor = new GPoint(6, 20);
      hotelun.infoWindowAnchor = new GPoint(5, 1);
	  
	  hoteldeux.iconSize = new GSize(18, 19);
      hoteldeux.shadowSize = new GSize(16, 16);
      hoteldeux.iconAnchor = new GPoint(6, 20);
      hoteldeux.infoWindowAnchor = new GPoint(5, 1);
	  
	  hoteltrois.iconSize = new GSize(18, 19);
      hoteltrois.shadowSize = new GSize(16, 16);
      hoteltrois.iconAnchor = new GPoint(6, 20);
      hoteltrois.infoWindowAnchor = new GPoint(5, 1);
	  
	  hotelquatre.iconSize = new GSize(18, 19);
      hotelquatre.shadowSize = new GSize(16, 16);
      hotelquatre.iconAnchor = new GPoint(6, 20);
      hotelquatre.infoWindowAnchor = new GPoint(5, 1);
	  
	  hotelcinq.iconSize = new GSize(18, 19);
      hotelcinq.shadowSize = new GSize(16, 16);
      hotelcinq.iconAnchor = new GPoint(6, 20);
      hotelcinq.infoWindowAnchor = new GPoint(5, 1);
	  
	  hotelsix.iconSize = new GSize(18, 19);
      hotelsix.shadowSize = new GSize(16, 16);
      hotelsix.iconAnchor = new GPoint(6, 20);
      hotelsix.infoWindowAnchor = new GPoint(5, 1);
	  
	  hotelsept.iconSize = new GSize(18, 19);
      hotelsept.shadowSize = new GSize(16, 16);
      hotelsept.iconAnchor = new GPoint(6, 20);
      hotelsept.infoWindowAnchor = new GPoint(5, 1);
	  	  	  
      if (GBrowserIsCompatible()) {
      	var elm = document.getElementById("map");
		
		
      	if (elm)
      	{
      		var map = new GMap2(elm);
			gdir = new GDirections(map, document.getElementById("directions"));
			
			
	        map.setCenter(new GLatLng(48.831458, 2.287731), 15);
			map.addControl(new GSmallMapControl());

			map.addControl(new GMapTypeControl());
						
			
			
			var hotelunpoint = new GLatLng(48.833145, 2.288997);
			var hotelunmarker = new GMarker(hotelunpoint, hotelun);
			map.addOverlay(hotelunmarker);
			GEvent.addListener(hotelunmarker, "click", function() {
          hotelunmarker.openInfoWindowHtml("<p><strong>Hôtel Terminus Vaugirard</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here2.png><br>403, rue de Vaugirard</br>75015 Paris</br>Tél. 01.48.28.18.72</p>");
		 });
			
			var hoteldeuxpoint = new GLatLng(48.834021, 2.295263);
			var hoteldeuxmarker = new GMarker(hoteldeuxpoint, hoteldeux);
			map.addOverlay(hoteldeuxmarker);
			GEvent.addListener(hoteldeuxmarker, "click", function() {
          hoteldeuxmarker.openInfoWindowHtml("<p><strong>Aurianne Hôtel Paris Convention</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here2.png><br>60, rue Olivier de Serres</br>75015 Paris</br>Tél. 01.45.32.44.33</p>");
		 });
			
			var hoteltroispoint = new GLatLng(48.832947, 2.278054);
			var hoteltroismarker = new GMarker(hoteltroispoint, hoteltrois);
			map.addOverlay(hoteltroismarker);
			GEvent.addListener(hoteltroismarker, "click", function() {
          hoteltroismarker.openInfoWindowHtml("<p><strong>Hôtel Pullmann Paris Rive Gauche</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here1.png><br>8-12 rue Louis Armand</br>75015 Paris</br>Tél. 01.40.60.30.30</p>");
		 });
			
			var hotelquatrepoint = new GLatLng(48.833766, 2.295134);
			var hotelquatremarker = new GMarker(hotelquatrepoint, hotelquatre);
			map.addOverlay(hotelquatremarker);
			GEvent.addListener(hotelquatremarker, "click", function() {
          hotelquatremarker.openInfoWindowHtml("<p><strong>Hôtel Printania</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here3.png><br>55, rue Olivier de Serres</br>75015 Paris</br>Tél. 01.45.33.96.77</p>");
		 });
			
			var hotelcinqpoint = new GLatLng(48.836408, 2.289619);
			var hotelcinqmarker = new GMarker(hotelcinqpoint, hotelcinq);
			map.addOverlay(hotelcinqmarker);
			GEvent.addListener(hotelcinqmarker, "click", function() {
          hotelcinqmarker.openInfoWindowHtml("<p><strong>Hôtel de Versailles</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here3.png><br>213, rue de la Croix de Nivert</br>75015 Paris</br>Tél. 01.48.28.48.66</p>");
		 });
			
			var hotelsixpoint = new GLatLng(48.831803, 2.304404);
			var hotelsixmarker = new GMarker(hotelsixpoint, hotelsix);
			map.addOverlay(hotelsixmarker);
			GEvent.addListener(hotelsixmarker, "click", function() {
          hotelsixmarker.openInfoWindowHtml("<p><strong>Hôtel Kyriad Brancion Paris Expo</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here3.png><br>1, rue de Chambéry</br>75015 Paris</br>Tél. 01.45.33.99.06</p>");
		 });
			
			var hotelseptpoint = new GLatLng(48.830292, 2.301979);
			var hotelseptmarker = new GMarker(hotelseptpoint, hotelsept);
			map.addOverlay(hotelseptmarker);
			GEvent.addListener(hotelseptmarker, "click", function() {
          hotelseptmarker.openInfoWindowHtml("<p><strong>Hôtel Ibis Brancion Paris Expo</strong>&nbsp;<img src=http://congresLNE.esthetinet.com/themes/congresLNE/images/hotel-here3.png><br>105, rue de Brancion</br>75015 Paris</br>Tél. 01.56.56.62.30</p>");
		 });
			
			
			var point = new GLatLng(48.831458, 2.287731);
			var marker2 = new GMarker(point, icon);
			 map.addOverlay(marker2);
        
			
		 
		GEvent.addListener(gdir, "load", onGDirectionsLoad);
		GEvent.addListener(gdir, "error", handleErrors);
		 
		}
		}
		}

 function setDirections(fromAddress, toAddress, locale) {
      gdir.load("from: " + fromAddress + " to: " + toAddress,
                { "locale": locale });
    }

    function handleErrors(){
	   if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
	     alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + gdir.getStatus().code);
	   else if (gdir.getStatus().code == G_GEO_SERVER_ERROR)
	     alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir.getStatus().code);
	   
	   else if (gdir.getStatus().code == G_GEO_MISSING_QUERY)
	     alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir.getStatus().code);

	//   else if (gdir.getStatus().code == G_UNAVAILABLE_ADDRESS)  <--- Doc bug... this is either not defined, or Doc is wrong
	//     alert("The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual reasons.\n Error code: " + gdir.getStatus().code);
	     
	   else if (gdir.getStatus().code == G_GEO_BAD_KEY)
	     alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir.getStatus().code);

	   else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
	     alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code);
	    
	   else alert("An unknown error occurred.");
	   
	}
    //]]>