
function changewh(ImgD) {
	var image = new Image();
	image.src = ImgD.src;
	
	if (image.width > 0 && image.height > 0) {
		flag = true;
		if (image.width / image.height >= 4 / 3) {
				ImgD.width = 125;
				ImgD.height = 85;
		} else {
			if ((image.width / image.height < 4 / 3) && (image.width / image.height >= 3 / 4)) {
					ImgD.height = 85;
					ImgD.width = 125;
			} else {
				if ((image.width / image.height < 3 / 4)) {
						ImgD.height = 63;
						ImgD.width = 85;
				}
			}
		}
	}
}