/***
 *  Init Google Map
 ***/
function initialize(){
    //init map
    var map = new google.maps.Map2(document.getElementById("map1"));
    var geocoder = new GClientGeocoder(); //geocoder

    //customize map view
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());

    //open a desired address
    showAddress(addressToShow,markerHTML);

    /***
     *  Creates a Marker on the Map
     ***/
    function createMarker(latlng, message) {
        var marker = new GMarker(latlng);

        if(message){
            GEvent.addListener(marker,"click", function() {
                map.openInfoWindowHtml(latlng, message);
            });
        }

        return marker;
    }

    /***
     *  Add a Pointer at a desired Address on the Map
     ***/
    function showAddress(address) {
        if (geocoder) {
           

            geocoder.getLatLng(
                address,
                function(point) {
                    if (!point) {
                        alert(address + " not found");
                    } else {
                        map.setCenter(point, mapZoomLevel);
                        var marker = new GMarker(point);
                        map.addOverlay(marker);
                       

                        GEvent.addListener(marker,"click", function() {
                            map.openInfoWindowHtml(point);
                        });
                    }
                }
            );

        }

    } //showAddress

}



