﻿function resizeImage(ele, max) {
	var defaultMax = 150;
	if (ele == undefined || ele == null) return false;
	if (max == undefined) max = defaultMax;
	if (ele.width > ele.height) {
	if (ele.width > max) ele.width = max;
	} else {
		if (ele.height > max) ele.height = max;
	}
}