function redimensionne(fotosource, fotodest, width_new, height_new) {
	if (jQuery(fotodest).attr("src") != jQuery(fotosource).attr("src")) {
		jQuery(fotodest).attr("src", jQuery(fotosource).attr("src"));

		var width_orig = jQuery(fotosource).attr("width");
		var height_orig = jQuery(fotosource).attr("height");
		var ratio_orig = width_orig/height_orig;

		//comparaison à la grande photo
		if (width_new/height_new > ratio_orig) {
		width_new = height_new*ratio_orig;
		} else {
		height_new = width_new/ratio_orig;
		}

		jQuery(fotodest).attr("width",width_new);
		jQuery(fotodest).attr("height",height_new);
	}

}
