Hi,
I'm having a hard time getting this google maps script to work on my website.
It loads successfully and it shows up inside my div, but without any address markers.
Pretty much all of the script came from here. I removed and added only a couple of lines.
The goal is to have google geocode the "addresses" array and to display them on the map with markers.
Can anyone point out what's wrong?

Code:
    var delay = 100;
    var geo = new GClientGeocoder(); 

    function getAddress(search, next) {
        geo.getLocations(search, function (result) {		 
            var p = result.Placemark[0].Point.coordinates;
            var lat=p[1];
            var lng=p[0];
			next();
        }
        );
    }

    var addresses = [
                "Amsterdam",
                "Berlin",
                "Frankfurt",
                "London"
    ];

    var nextAddress = 0;

    function theNext() {
        if (nextAddress < addresses.length) {
            setTimeout('getAddress("'+addresses[nextAddress]+'",theNext)', delay);
            nextAddress++;
        } 
    }
	
    theNext();

	function initialize() {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(0, 0), 1);

	    for (var i = 0; i < addresses.length; i++) {
            var point = new GLatLng(lat[i], lng[i]);
            map.addOverlay(new GMarker(point));
        }
		
    }