function redimImage(idImg, inMW, inMH) {
	// Cette function recoit 3 parametres
	// idImg: ID de l'image
	// inMW	: Largeur maximale
	// inMH	: Hauteur maximale
	var maxWidth	= inMW;
	var maxHeight	= inMH;
	// Declarations des variables "Nouvelle Taille"
	var dW = 0;
	var dH = 0;
	// Declaration d'un objet Image
	var oImg = new Image();
	// Affectation du chemin de l'image a l'objet
	oImg = document.getElementById(idImg);
	// On recupere les tailles reelles
	var h = dH = oImg.height;
	var w = dW = oImg.width;
	// Si la largeur ou la hauteur depasse la taille maximale
	if ((h >= maxHeight) || (w >= maxWidth)) {
		// Si la largeur et la hauteur depasse la taille maximale
		if ((h >= maxHeight) && (w >= maxWidth)) {
			// On cherche la plus grande valeur
			if (h > w) {
				dH = maxHeight;
				// On recalcule la taille proportionnellement
				dW = parseInt((w * dH) / h, 10);
			} else {
				dW = maxWidth;
				// On recalcule la taille proportionnellement
				dH = parseInt((h * dW) / w, 10);
			}
		} else if ((h > maxHeight) && (w < maxWidth)) {
			// Si la hauteur depasse la taille maximale
			dH = maxHeight;
			// On recalcule la taille proportionnellement
			dW = parseInt((w * dH) / h, 10);
		} else if ((h < maxHeight) && (w > maxWidth)) {
			// Si la largeur depasse la taille maximale
			dW = maxWidth;
			// On recalcule la taille proportionnellement
			dH = parseInt((h * dW) / w, 10);
		}
	}
	// On redimenssionne l'image dans le document
	oImg.height = dH;
	oImg.width  = dW;
};

function redimAllImages() {
	for(var i=0; i < document.images.length; ++i) {
		// REDIMENSIONNEMENT A LA UNE
		/*
		var okGF = document.images[i].id.indexOf("GF");
		if(okGF!=-1) {
			var id = document.images[i].id;
			redimImage(id, 220, 220);
		}
		*/
		// REDIMENSIONNEMENT UNIVERS
		var okMF = document.images[i].id.indexOf("MF");
		if(okMF!=-1) {
			var id = document.images[i].id;
			redimImage(id, 190, 125);
		}
		// REDIMENSIONNEMENT DERNIERS ARTICLES
		var okPF = document.images[i].id.indexOf("PF");
		if(okPF!=-1) {
			var id = document.images[i].id;
			redimImage(id, 110, 110);
		}
	}
}