function popupcentree(page,nom,largeur,hauteur,options) {
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,nom,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

// Affiche ou non la boite complète des outils (JQuery)
function fAfficheOutils() {
	$('#outils_complets').slideToggle('slow');
}


function redirect(id) {
	window.location.href = document.getElementById(id).options[document.getElementById(id).selectedIndex].value;
}

// impression des mentions légales
function Imprimer() {
	// Définie la zone à imprimer
	var zi = document.getElementById('mentions').innerHTML;

	// Ouvre une nouvelle fenetre
	var f = window.open("", "ZoneImpr", "height=500, width=600, toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");

	var Headers = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n';
	Headers += '<html dir="ltr" lang="fr">\n<head>\n<title>Ville de Cabourg - Mentions légales</title>';
	Headers += '<style type="text/css">table{color: #FFFFFF;}</style>';
	Headers += $("head").html()+'</head><body>';
	var Footers = "</body></html>";

	// écrit la page
	f.document.write ("" + Headers + zi + Footers);

	// Imprime et ferme la fenetre
	f.window.print();
	f.window.close();
}

$(document).ready(function(){
	$("#show_visite").click( function() {
		popupcentree(this.href, '' , 400, 323, '');
		return false;
	});
	$("#show_cam").click( function() {
		popupcentree(this.href, '' , 360, 630, '');
		return false;
	});
	$("#show_cam_pied").click( function() {
		popupcentree(this.href, '' , 360, 610, '');
		return false;
	});

});

function rechercheManif(form, mois_courant, annee_courante){					
	if(document.getElementById('mois').value < mois_courant  ){					
		document.getElementById('annee').value = parseInt(annee_courante) + 1;
	}
	else{
		document.getElementById('annee').value = parseInt(annee_courante);
	}
	form.submit();
}