function imageResize(which, max) {
  var elem = $(which);
  
  if (!elem) return false;    
  if (max ==  null || max ==  undefined) max = 75;
  
  if (elem.width > elem.height) {
    if (elem.width > max) elem.width = max;
  } else {
    if (elem.height > max) elem.height = max;
  }
  
}
