var geocoder;
var map;
var icon = new GIcon();
icon.image = "http://www.rany.be/images/flag.png";
icon.shadow = "http://www.rany.be/images/shadow.png";
icon.iconSize = new GSize(18, 29);
icon.shadowSize = new GSize(35, 29);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

function load() {
	if (GBrowserIsCompatible()) {
		geocoder = new GClientGeocoder();
		geocoder.getLocations(address, addToMap);
	}
}

function addToMap(response){
	map = new GMap2(document.getElementById("googlemaps"));
	
	place = response.Placemark[0];
	point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
	
	map.setCenter(point, 14);
	map.addControl(new GSmallMapControl());
	map.addOverlay(createMarker(point, "","", ""));
}

function createMarker(point, title, pic, quicklink) {
	var marker = new GMarker(point,icon);
	return marker;
}

function printPopUp(pagina){
	var f;
	f = pagina;
	
	window.open(f, "print", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=true,top=0,left=0,width=800,height=600");
}
