var info_resto = new Array();
info_resto[1] = new Array();
info_resto[2] = new Array();
info_resto[3] = new Array();
info_resto[4] = new Array();
info_resto[5] = new Array();
info_resto[6] = new Array();

info_resto[1]['nom'] = 'Brasserie Flore';
info_resto[1]['lat'] = 50.63608;
info_resto[1]['lng'] = 3.0632;
info_resto[1]['txt'] = '<b>BRASSERIE LE FLORE</b><br />11 place Rihour - Lille<br /><br />Tel. +33 (0) 3 20 57 97 07<br />Fax. +33 (0) 3 20 15 17 40';

info_resto[2]['nom'] = 'Brasserie de la Paix';
info_resto[2]['lat'] = 50.63578;
info_resto[2]['lng'] = 3.06336;
info_resto[2]['txt'] = '<b>BRASSERIE LA PAIX</b><br />25 place Rihour - Lille<br /><br />Tel. +33 (0) 3 20 54 70 41<br />Fax. +33 (0) 3 20 40 15 52';

info_resto[3]['nom'] = 'Brasserie la Chicorée';
info_resto[3]['lat'] = 50.63592;
info_resto[3]['lng'] = 3.06316;
info_resto[3]['txt'] = '<b>BRASSERIE LA CHICOREE</b><br />15 place Rihour - Lille<br /><br />Tel. +33 (0) 3 20 54 81 52<br />Fax. +33 (0) 3 20 54 00 23';

info_resto[4]['nom'] = 'Orange Expression';
info_resto[4]['lat'] = 50.64137;
info_resto[4]['lng'] = 3.06548;
info_resto[4]['txt'] = '<b>ORANGE EXPRESSION</b><br />36 place Louise de Bettignies - Lille<br /><br />Tel. +33 (0) 3 20 74 18 47<br />Fax. +33 (0) 3 20 74 18 93';

info_resto[5]['nom'] = 'La Baignoire';
info_resto[5]['lat'] = 50.63272;
info_resto[5]['lng'] = 3.06234;
info_resto[5]['txt'] = '<b>LA BAIGNOIRE</b><br />8 place Béthune - Lille<br /><br />Tel. +33 (0) 3 20 30 07 44<br />Fax. +33 (0) 3 20 30 08 30';

info_resto[6]['nom'] = 'Le Square';
info_resto[6]['lat'] = 50.63454;
info_resto[6]['lng'] = 3.06096;
info_resto[6]['txt'] = '<b>BRASSERIE LE SQUARE</b><br />8 square Morison - Lille<br /><br />Tel. +33 (0) 3 20 54 64 51';


//fonction du plan général
function load_plan_general(val) {
	if (GBrowserIsCompatible()) {
		if(val==7){
			var plan_general = new GMap2(document.getElementById("centreplanunik"), {mapTypes:[G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]});
			plan_general.setCenter(new GLatLng(50.637, 3.063), 15);
		}
		else{
			var plan_general = new GMap2(document.getElementById("planresto"), {mapTypes:[G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]});
			plan_general.setCenter(new GLatLng(info_resto[val]['lat'], info_resto[val]['lng']), 15);
		}
		plan_general.addControl(new GLargeMapControl());
		plan_general.addControl(new GMapTypeControl());
		
		function creer_marker_bulle(point,icon,txt,nom){
			var baseIcon = new GIcon();
			baseIcon.iconSize=new GSize(40,47);
			baseIcon.shadowSize=new GSize(0,0);
			baseIcon.iconAnchor=new GPoint(40,47);
			baseIcon.infoWindowAnchor=new GPoint(40 ,0);
			
			var iconspe = new GIcon(baseIcon, icon, null, null);
			var marker_resto = new GMarker(point,{title:nom,icon:iconspe});
			
			GEvent.addListener(marker_resto, 'click', function() {
				marker_resto.openInfoWindowHtml(txt);
			});
			return marker_resto; 
		}
		
		function creer_marker_simple(point,icon,nom){
			var baseIcon = new GIcon();
			baseIcon.iconSize=new GSize(40,47);
			baseIcon.shadowSize=new GSize(0,0);
			baseIcon.iconAnchor=new GPoint(40,47);
			baseIcon.infoWindowAnchor=new GPoint(40 ,0);
			
			var iconspe = new GIcon(baseIcon, icon, null, null);
			var marker_resto = new GMarker(point,{title:nom,icon:iconspe});
			return marker_resto; 
		}
		
		for(var i=1;i<7;i++){
			var point = new GLatLng(info_resto[i]['lat'], info_resto[i]['lng']);
			if(val==7 || val==i) var marker_resto = creer_marker_bulle(point,"imgs/ico_plan_gm_"+i+".jpg",info_resto[i]['txt'],info_resto[i]['nom']);
			else var marker_resto = creer_marker_simple(point,"imgs/ico_plan_gm_"+i+".jpg",info_resto[i]['nom']);
			plan_general.addOverlay(marker_resto);		
			if(i==val) marker_resto.openInfoWindowHtml(info_resto[i]['txt']);
		}
		
	}
}
