  document.write('<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAM7jPy2Za2P3J6-_A9Wx4-xTE_-waCt1Os12ormh80mbPkD7CeRRx4wjVaeAlYvIcAF3NDfLPf5POtg" type="text/javascript"></script>');

//ABQIAAAAM7jPy2Za2P3J6-_A9Wx4-xTE_-waCt1Os12ormh80mbPkD7CeRRx4wjVaeAlYvIcAF3NDfLPf5POtg



//ABQIAAAAM7jPy2Za2P3J6-_A9Wx4-xT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTYC82JiOck-vOnHfEJWMtEswr53g  local





    var map = null;

    var geocoder = null;





    function load() {



        if ( typeof( document.adminForm) != "undefined" ) {

    if ( typeof( document.adminForm.getit) != "undefined" ) {



      if (GBrowserIsCompatible()) {

        map = new GMap2(document.getElementById("map"));

        map.addControl(new GSmallMapControl());

        map.addControl(new GMapTypeControl());

          point='';



          if(document.adminForm.getit.value){

          point=filterNum(document.adminForm.getit.value);



          var pointarray=point.split(',');

          title=document.adminForm.venuename.value;

          map.setCenter(new GLatLng(pointarray[0],pointarray[1]), 13);

          }else{

          title='Tour Eiffel,Champ de Mars,75007 Paris!';

          map.setCenter(new GLatLng(48.85904, 2.293493), 13);

          }





        map.openInfoWindow(map.getCenter(),document.createTextNode(title));

        geocoder = new GClientGeocoder();

      }

      }

      }



    }



 function filterNum(str) {

          re = /\$|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\|\!|\$|/g;

          // remove special characters like "$" and "," etc...

          return str.replace(re, "");

     }





    function showAddress(address) {

      if (geocoder) {

        geocoder.getLatLng(

          address,

          function(point) {

            if (!point) {

              alert(address + " n'a pas peut etre trouver- Essayez encore!");

            } else {

            document.adminForm.getit.value=point;

            alert(" Trouver!!!");

              map.setCenter(point, 13);

              var marker = new GMarker(point);

              map.addOverlay(marker);

              marker.openInfoWindowHtml(address);

            }

          }

        );

      }

    }







        function getAddress() {

  if (geocoder) {

         address=document.adminForm.addy.value;



        geocoder.getLatLng(

          address,

          function(point) {

            if (!point) {

              alert(address + " not found - try a more accurate address!");

            } else {

            document.adminForm.getit.value=point;

            alert(point + " Found!");

              map.setCenter(point, 13);

              var marker = new GMarker(point);

              map.addOverlay(marker);

              marker.openInfoWindowHtml(address);

            }

          }

        );

      }



    }
