function Geocoder(map) {
	this.initialize(map);
}

Geocoder.prototype = {
	initialize: function(map){
		this.map = map;
		this.geocoder = new GClientGeocoder();
		
		this.nextAddress = 0;
		this.markers = null;
		this.delay = 100;
	},
	
	getIcon: function () {
		var icon = new GIcon(G_DEFAULT_ICON);
		icon.iconAnchor = new GPoint(5,5);
		icon.iconSize = new GSize(20,20);
		icon.shadow = null;
		
		return icon;
	},
	
	setCallBack: function(callback) {
		this.callback = callback;
	},
	
	createMarker: function(id, iconFileName, x, y, address, RS, bdd) {
		var icon = this.getIcon();
		
		icon.image = "images/pictos/" + iconFileName + ".bmp";
		
		var marker = this.map.createMarker(y, x, icon);
		marker.id = id;
		marker.address = address;
		marker.addInfoWindowTabsHtml({'adresse': RS + '<br/><br/>' + address}, 1);
		marker.addInfo('icon', iconFileName);
		marker.addInfo('bdd', bdd);
		marker.addInfo('RS', RS);
		
		return marker;
	}
}
