/* Javascripts utilisés sur le site
 * Mettez l'ensemble de vos fonctions générique javascript ici
 * 
 * La liaison avec les page se fait à l'aide du code ci-dessous :
 * <script type="text/javascript" src="css-js/scripts.js"></script>
 */




/* GESTION PIEDS DE PAGE */
var hauteurFooter;

function setFooter(footerHeight){
	footerHeight = parseInt(footerHeight);
	hauteurFooter = footerHeight;
	if(window.innerHeight){
		var maxHeight = window.innerHeight;
	} else {
		var maxHeight = document.body.clientHeight;
	}

	// récuopération de la hauteur du footer
	var footer = document.getElementById('footer');
	var divHeight = (maxHeight - footerHeight);
	document.getElementById('container').style.height=divHeight+'px';

}
if(!window.innerHeight){
	event.cancelBubble = true;
}
window.onresize = function(){
	setFooter(hauteurFooter);
}

function imgPopup(chemin){
   i1 = new Image;
   i1.src = chemin;
   if(document.all){
		html = '<HTML><HEAD><TITLE>Image</TITLE></HEAD>';
		html += '<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>';
		html += '<CENTER><IMG SRC="'+chemin+'" BORDER="0" NAME="imagePopup" onLoad="window.resizeTo(document.imagePopup.width+14,document.imagePopup.height+32)"></CENTER></BODY></HTML>';
   } else {
	   html = '<HTML><HEAD><TITLE>Image</TITLE></HEAD>';
	   html += '<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 >';
	   html += '<CENTER><IMG SRC="'+chemin+'" BORDER="0" NAME="imagePopup" id="imagePopup" onLoad="window.resizeTo(this.width+30,this.height+63)"></CENTER></BODY></HTML>';
   }
   popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close();
}