function imageResize(nbItems, newImg1, newImg2)
{
	/**
	 * Determination de la taille de la fentre
	 */
	var windowWidth = 1020 ;
	var windowHeight = 650;

	if (typeof( window.innerWidth ) == 'number')
	{
		//Non-IE
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	}
	else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ))
	{
		//IE 6+ in 'standards compliant mode'
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	}
	else if (document.body && ( document.body.clientWidth || document.body.clientHeight ))
		{
			//IE 4 compatible
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}
	var MAX_WINDOW_WIDTH = windowWidth - 142 - 25 - 50 ;
	var MAX_WINDOW_HEIGHT = windowHeight - 60 ;
	$("#mainTable").height(MAX_WINDOW_HEIGHT);

	/**
	 * Taille d'origine de l'image
	 */
	var imageHeight1 = newImg1.height;
	var imageWidth1 = newImg1.width;
	//alert("imageHeight1 = " + imageHeight1 + " -- imageWidth1 = " + imageWidth1) ;
	/**
	 * Total image width
	 */
	var totalWidth = imageWidth1 ;
	if (nbItems == 2)
	{

		var imageHeight2 = newImg2.height;
		var imageWidth2 = newImg2.width;
		totalWidth += imageWidth2;

	}

	var ratioWidth1 = (MAX_WINDOW_WIDTH - 30) / (totalWidth) ;
	var ratioHeight1 = MAX_WINDOW_HEIGHT / imageHeight1 ;
	var ratio1 = Math.min(Math.min(ratioWidth1, ratioHeight1), 1) ;
	var resizedWidth1 = Math.ceil(imageWidth1 * ratio1) ;
	var resizedHeight1 = Math.ceil(imageHeight1 * ratio1) ;
	//alert("resizedWidth1 = " + resizedWidth1 + " -- resizedHeight1 = " + resizedHeight1) ;
	$("#picture1").width(resizedWidth1);
	$("#picture1").height(resizedHeight1);
	$("#legend").height(resizedHeight1 - 52);
	$('#legend').css("display", "table-cell");
	//$('#legend').css("vertical-align","bottom");

	if (nbItems == 2)
	{

		var ratioWidth2 = (MAX_WINDOW_WIDTH - 30) / (totalWidth) ;
		var ratioHeight2 = MAX_WINDOW_HEIGHT / imageHeight2 ;
		var ratio2 = Math.min(Math.min(ratioWidth2, ratioHeight2), 1) ;
		var resizedWidth2 = Math.ceil(imageWidth2 * ratio2) ;
		var resizedHeight2 = Math.ceil(imageHeight2 * ratio2) ;
		$("#picture2").width(resizedWidth2);
		$("#picture2").height(resizedHeight2);

	}
}