﻿// JScript File

function Right(str,nbr)
{
    return str.substr(str.length-nbr)
}

function GM_Initialise(address)
{
      if (GBrowserIsCompatible()){
        map = new GMap2(document.getElementById("map_canvas"));
        //map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        geocoder = new GClientGeocoder();
        //var address = '23, rue de la gravette, 31300, toulouse, france';
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              //marker.openInfoWindowHtml(address);
            }
          }
        );
      }
}