// Function généric de préchargement d'image

var TableauRegion = new Array();
//TABLEAU DE REGIONS//
TableauRegion['01'] = "Nord-Pas-de-Calais";
TableauRegion['02'] = "Picardie";
TableauRegion['03'] = "Champagne-Ardennes";
TableauRegion['04'] = "Lorraine";
TableauRegion['05'] = "Alsace";
TableauRegion['06'] = "Haute-Normandie";
TableauRegion['07'] = "Paris-Ile-de-France";
TableauRegion['08'] = "Basse-Normandie";
TableauRegion['09'] = "Centre";
TableauRegion['10'] = "Bourgogne";
TableauRegion['11'] = "Bretagne";
TableauRegion['12'] = "Pays-de-la-Loire";
TableauRegion['13'] = "Franche-Comt&eacute;";
TableauRegion['14'] = "Poitou-Charente";
TableauRegion['15'] = "Limousin";
TableauRegion['16'] = "Auvergne";
TableauRegion['17'] = "Rh&ocirc;ne-Alpes";
TableauRegion['18'] = "Aquitaine";
TableauRegion['19'] = "Midi-Pyr&eacute;n&eacute;es";
TableauRegion['20'] = "Languedoc-Roussillon";
TableauRegion['21'] = "Provence-Alpes-C&ocirc;te-d'Azur";
TableauRegion['22'] = "Corse";
//////////////////////

function preload_img(img){
	var image = new Image;
	image.src = img;
}

function MapFrance(e, dept){
	if(dept != ''){
		document.getElementById('index_map').src = 'Design/images/map/map_'+dept+'.gif';
		document.getElementById('ma_region').innerHTML = TableauRegion[dept];

		var posx = 0;
		var posy = 0;
		if (!e) var e = window.event;
		if (e.pageX || e.pageY) 	{
			posx = e.pageX;
			posy = e.pageY;
		}else if (e.clientX || e.clientY) 	{
			posx = e.clientX + document.body.scrollLeft
				+ document.documentElement.scrollLeft;
			posy = e.clientY + document.body.scrollTop
				+ document.documentElement.scrollTop;
		}

		document.getElementById('bd_info_annonce').style.display = 'block';
		document.getElementById('bd_info_annonce').style.top = (posy-50)+'px';
		document.getElementById('bd_info_annonce').style.left = (posx-70)+'px';
	}
	else{
		document.getElementById('index_map').src = 'Design/images/map/map.gif';
		document.getElementById('bd_info_annonce').style.display = 'none';
	}
}

