<?php

function mp_create_div(&$filters) {
	$mp_map_div  = '
		<div id="ljdp_map_wrapper">
			<div id="ljdp_map_filters">
	';

	foreach ($filters as $key => $filter) {
		$mp_map_div .= '
			<div class="filter_menu" style="display:none;">
				<div class="filter_menu_title" tabindex=0>
					<p>'.$key.'</p>
				</div>
				<div class="filter_menu_drop" tabindex=0>
					<p>TOUT DESELECTIONNER</p>
		';
		foreach ($filter as $value) {
			$mp_map_div .= '
					<p onclick="mp_filter_selection('.json_encode($value->indexes).')">'.$value->_name.'</p>
			';
		}
		$mp_map_div .= '
				</div>
			</div>
		';
	};

	$mp_map_div .= '
			</div>
			<div id="ljdp_map"></div>
		</div>
	';

	return $mp_map_div;
}

?>
