function newMap(map_id, address, title){
	var point = new GLatLng(49.11152333333461, 6.168909072875977);
	var map = new GMap2(document.getElementById(map_id));
	map.setCenter(point, 17);
	map.addControl(new GLargeMapControl());
	
	function showAddress(address,title) {
		var geocoder = new GClientGeocoder();
		if (geocoder) {
			geocoder.getLatLng(address, 
				function(point) {
					if (!point) {
					} 
					else {
						map.setCenter(point, 17);
						var marker = new GMarker(point);
						map.addOverlay(marker);
						marker.openInfoWindowHtml(title);
					}
				}
			);
		}
	}	
	
	showAddress(address, title);
}
function allMaps(){

	if(document.getElementById("map_exupery_7")){
		newMap(
			"map_exupery_7",
			"Place de l'Hotel de Ville 57140 Woippy",
			"<h2>Salle St Exup&eacute;ry</h2>Place de l'H&ocirc;tel de Ville<br/>57140 Woippy"
		);
	}

	if(document.getElementById("map_trinitaires_1")){
		newMap(
			"map_trinitaires_1",
			"12, rue de Trinitaires 57000 Metz",
			"<h2>Les Trinitaires</h2>salle 1<sup>er</sup> &eacute;tage<br/>12, rue de Trinitaires<br/>57000 Metz	"
		);
	}
	
	if(document.getElementById("map_printemps_2")){
		newMap(
			"map_printemps_2",
			"8, Rue Serpenoise 57000 Metz",
			"<h2>Le Printemps</h2>8, Rue Serpenoise<br/>57000 Metz	"
		);	
	}
	
	if(document.getElementById("map_saulcy_3")){
		newMap(
			"map_saulcy_3",
			"ile du Saulcy 57000 Metz",
			"<h2>&icirc;le du Saulcy</h2>1, &icirc;le du Saulcy<br/>57000 Metz"
		);		
	}
	
	if(document.getElementById("map_tiffany_4")){
		newMap(
			"map_tiffany_4",
			"22 coetlosquet metz 57000 Metz",
			"<h2>Le Tiffany Club</h2>22, Rue du Co&euml;tlosquet<br/>57000 Metz"
		);			
	}

	if(document.getElementById("map_bu_5")){
		newMap(
			"map_bu_5",
			"1, ile du saulcy 57000 Metz",
			"<h2>BU - Saulcy</h2>1, &icirc;le du Saulcy<br/>57000 Metz"
		);			
	}

	if(document.getElementById("map_tiffany_6")){
		newMap(
			"map_tiffany_6",
			"22 coetlosquet metz 57000 Metz",
			"<h2>Le Tiffany Club</h2>22, Rue du Co&euml;tlosquet<br/>57000 Metz"
		);			
	}	

	if(document.getElementById("map_etedulivre_7")){
		newMap(
			"map_etedulivre_7",
			"1 rue du Roi Albert metz 57070 Metz",
			"<h2>&Eacute;t&eacute; du livre</h2>1, rue du Roi Albert<br/>57070 Metz"
		);			
	}	

	if(document.getElementById("map_symphorien_8")){
		newMap(
			"map_symphorien_8",
			"1 Boulevard Saint-Symphorien metz 57070 Metz",
			"<h2>Saint-Symphorien</h2>Boulevard Saint-Symphorien<br/>57070 Metz"
		);			
	}		
	
	if(document.getElementById("map_tcrm_9")){
		newMap(
			"map_tcrm_9",
			"7 Avenue de Blida metz 57000 Metz",
			"<h2>TCRM</h2>7, Avenue de Blida<br/>57070 Metz"
		);			
	}

	if(document.getElementById("map_tcrm_10")){
		newMap(
			"map_tcrm_10",
			"1 Avenue Robert Schuman metz 57000 Metz",
			"<h2>Espace Bus TCRM</h2>Place de la R&eacute;publique<br/>1, Avenue Robert Schuman, Metz"
		);			
	}	

	if(document.getElementById("map_tcrm_11")){
		newMap(
			"map_tcrm_11",
			"1 Avenue Robert Schuman metz 57000 Metz",
			"<h2>Espace Bus TCRM</h2>Place de la R&eacute;publique<br/>1, Avenue Robert Schuman, Metz"
		);			
	}	


	if(document.getElementById("map_urbis_12")){
		newMap(
			"map_urbis_12",
			"13 rue coetlosquet metz 57000 METZ",
			"<h3>Maison du stationnement</h3>13 rue du Co&euml;tlosquet, Metz"
		);			
	}		
	
	if(document.getElementById("map_gare_13")){
		newMap(
			"map_gare_13",
			"gare SNCF de Metz 1 place du General De Gaulle 57000 METZ",
			"<h3>Gare de Metz</h3>1, place du G&eacute;n&eacute;ral De Gaulle, Metz"
		);			
	}	
		

	if(document.getElementById("map_saulcy_14")){
		newMap(
			"map_saulcy_14",
			"ile du Saulcy 57000 Metz",
			"<h2>&icirc;le du Saulcy</h2>1, &icirc;le du Saulcy<br/>57000 Metz"
		);		
	}

	if(document.getElementById("map_petitjoueur_15")){
		newMap(
			"map_petitjoueur_15",
			"31 rue des Jardins 57000 Metz",
			"<div><h2>Petit Joueur</h2><p>31, rue des Jardins<br/>57000 Metz</p><p><b>T&eacute;l-Fax</b> : 03 87 35 60 78<br/><b>Email</b> : <a href='mailto:contact@petit-joueur.fr' title='Contacter la boutique Petit Joueur à metz'>contact@petit-joueur.fr</a><br/><br/></p></div>"
		);		
	}

	if(document.getElementById("map_saulcy_16")){
		newMap(
			"map_saulcy_16",
			"ile du Saulcy 57000 Metz",
			"<h2>&icirc;le du Saulcy</h2>1, &icirc;le du Saulcy<br/>57000 Metz"
		);		
	}

	if(document.getElementById("map_saulcy_17")){
		newMap(
			"map_saulcy_17",
			"ile du Saulcy 57000 Metz",
			"<h2>&icirc;le du Saulcy</h2>1, &icirc;le du Saulcy<br/>57000 Metz"
		);		
	}	

	if(document.getElementById("map_montigny_18")){
		newMap(
			"map_montigny_18",
			"73 rue de Pont-a-Mousson 57950 Montigny-les-Metz",
			"<h2>Espace Europa-Courcelles</h2><p>73, rue de Pont-à-Mousson<br/>57950 Montigny-Lès-Metz<br/><br/><br/></p>"
		);		
	}	
	
	if(document.getElementById("map_saulcy_19")){
		newMap(
			"map_saulcy_19",
			"ile du Saulcy 57000 Metz",
			"<h2>Amphi Lemoigne</h2>&icirc;le du Saulcy<br/>57000 Metz"
		);		
	}		

	if(document.getElementById("map_chambre_20")){
		newMap(
			"map_chambre_20",
			"place de chambre 57000 Metz",
			"<h2>Place de Chambre</h2>57000 Metz"
		);		
	}
	if(document.getElementById("map_saulcy_21")){
		newMap(
			"map_saulcy_21",
			"ile du Saulcy 57000 Metz",
			"<h2>Campus du Saulcy</h2><p>île du Saulcy<br/>57000 Metz</p>"
		);		
	}
	if(document.getElementById("map_bridoux_22")){
		newMap(
			"map_bridoux_22",
			"rue du General Delestraint 57000 Metz",
			"<h2>Campus Bridoux-Technopôle</h2><p>rue du General Delestraint<br/>57000 Metz<br/><br/></p>"
		);		
	}	
	if(document.getElementById("map_palace_23")){
		newMap(
			"map_palace_23",
			"Cinema Palace 5/7 rue Fabert 57000 Metz",
			"<h2>Cinéma Palace</h2><p>5/7 rue Fabert<br/>57000 Metz<br/><br/></p>"
		);		
	}	
	if(document.getElementById("map_theatre_24")){
		newMap(
			"map_theatre_24",
			"Theatre du Saulcy, Ile du Saulcy 57000 Metz",
			"<h2>Théâtre du Saulcy</h2><p>Ile du Saulcy<br/>57000 Metz<br/><br/></p>"
		);		
	}

	if(document.getElementById("map_univers_25")){
		newMap(
			"map_univers_25",
			"D55bis 57525 Talange",
			"<h2>L'Univers</h2><p>57525 Talange<br/><br/></p>"
		);		
	}

	if(document.getElementById("map_etedulivre_26")){
		newMap(
			"map_etedulivre_26",
			"Place d'Armes 57000 Metz",
			"<h2>Été du livre</h2>Place d'Armes à Metz<br/>57070 Metz"
		);			
	}	

	if(document.getElementById("map_bu_27")){
		newMap(
			"map_bu_27",
			"1, ile du saulcy 57000 Metz",
			"<h2>BU - Saulcy</h2><p>1, île du Saulcy<br/>57 050 Metz<br/>Téléphone : +33 (0) 3.87.31.50.80</p>"
		);			
	}
	
	if(document.getElementById("map_montigny_28")){
		newMap(
			"map_montigny_28",
			"73 rue de Pont-a-Mousson 57950 Montigny-les-Metz",
			"<h2>Espace Europa-Courcelles</h2><p>73, rue de Pont-à-Mousson<br/>57950 Montigny-Lès-Metz<br/><br/><br/></p>"
		);		
	}		
}

allMaps();
