
function equalizeDivHeight()
{
	//Cette fonction permet de mettre à la même hauteur les div menu (bandeau gauche) et div main (panneau droite)
	var divDefHeight = 800;
	var divMenuHeight = divDefHeight;
	var divMainHeight = divDefHeight;

	divMenu = window.document.getElementById("bl_menu");	
	divMain = window.document.getElementById("bl_main");

	//Collect heights of Div
	if (divMenu.offsetHeight)
		{divMenuHeight = divMenu.offsetHeight;}
	else if (divMenu.style.pixelHeight)
		{divMenuHeight=divMenu.style.pixelHeight;}	
	else
		{divMenuHeight=divDefHeight;}
	
	if (divMain.offsetHeight)
		{divMainHeight = divMain.offsetHeight;}
	else if (divMain.style.pixelHeight)
		{divMainHeight=divMain.style.pixelHeight;}	
	else
		{divMainHeight=divDefHeight;}
	
	//Applying collected heights
	if (divMenuHeight>divMainHeight)
	{
		divMain.style.height=divMenuHeight-8+'px';
	}
	else if (divMenuHeight<divMainHeight)
	{
		divMenu.style.height=divMainHeight+'px';
	}
}


function fSpPopup(mylink)
{
	var wname;
	wname = Math.round(Math.random() * 1000) + "fer";
	if (! window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	window.open(href, wname, 'scrollbars=no, resizable=yes, status=no, height=546, width=714');
	return false;
}	


function popup(mylink, windowname, fwW, fwH)
{
	if (! window.focus)return true;
	
	if (fwW==undefined){fwW=714;}
	if (fwH==undefined){fwH=546;}
	
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	window.open(href, windowname, 'width='+fwW+',height='+fwH+',scrollbars=no,resizable=1,status=yes');
	return false;
}

function PopupImage(img)
{ 
	titre="Agrandissement"; 
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='Mon image'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
	//link : <A href="javascript:PopupImage('img/grandes/numero1.jpg')"><IMG src="img/petites/numero1.jpg"  class="image" alt="Cliquer pour agrandir"></A>
}






