//Toogle fullscreen Google Maps
function fullscreen(a) {
	if (a.id == 'fullscreen') {
		a.id = 'nofullscreen';
		$('<div id="substitut"></div>').prependTo('body');
		$('#substitut').css('width', parseInt($('#map-content').css('width'))+'px');
		$('#substitut').css('height', parseInt($('#map-content').css('height'))+'px');
		$('#map-content').fadeOut(400, function() {
			//Création du fond
			var array_page_size = getPageSize();
			ze_height = array_page_size[1];
			$('<div id="full_screen"></div>').prependTo('body');
			$('#full_screen').css('width', '100%');
			$('#full_screen').css('height', ze_height+'px');

			//$('#map-content').css('border', '0');
			$('#map-content').css('position', 'absolute');
			$('#map-content').css('z-index', '1000');

			//Resize
			var array_page_size = getPageSize();
			ze_width = array_page_size[0]/1.2;
			ze_height = array_page_size[3]/1.2;
			$('#map-content').css('width', ze_width+'px');
			$('#map-content').css('height', ze_height+23+'px');
			$('#map').css('width', ze_width + 'px');
			$('#map').css('height', ze_height+'px');

			//Positionnement de map-content
			var array_page_scroll = getPageScroll();
			$('#map-content').css('top', array_page_scroll[1]+'px');
			$('#map-content').css('left', ((array_page_size[0]/2)-(parseInt($('#map-content').css('width'))/2))+'px');

			$('#map-resize').css('display', 'none');
			$('#map-content').fadeIn(400, function() {
				map.checkResize();
			});
		});
	}
	else {
		a.id = 'fullscreen';
		$('#map-content').fadeOut(400, function() {
			//$('#map-content').css('border', '1px solid #000');
			$('#map-content').css('position', 'relative');
			$('#map-content').css('z-index', '1');
			$('#map-content').css('width', parseInt($('#substitut').css('width'))+'px');
			$('#map-content').css('height', parseInt($('#substitut').css('height'))+'px');
			$('#map').css('width', parseInt($('#substitut').css('width')) + 'px');
			$('#map').css('height', parseInt($('#substitut').css('height')) - 23 + 'px');
			$('#map-content').css('top', 0+'px');
			$('#map-content').css('left', 0+'px');
			$('#map-resize').css('display', 'block');
			$('#substitut').remove();
			$('#full_screen').fadeOut(200, function() {
				$(this).remove();
				$('#map-content').fadeIn(200, function() {
					map.checkResize();
				});
			});
		});
	}
}