function sn_image_resize(_maxWidth,_maxHeight,_containerID,_excludeClass) { 
	var _container=document.getElementById(_containerID);
	var tags=_container.getElementsByTagName("img");
	for(i=0;i<tags.length;i++){
		if(tags[i].className != _excludeClass){
			// Get element height and width
			_currentHeight=tags[i].offsetHeight;
			_currentWidth=tags[i].offsetWidth;

			// Determine which is greater height or width
			if(_currentHeight > _currentWidth){
				_ratio=_currentHeight/_currentWidth;
				tags[i].style.width=(_maxHeight/_ratio)+'px';
				tags[i].style.height=_maxHeight+'px';
			}else{
				_ratio=_currentWidth/_currentHeight;
				tags[i].style.width=_maxWidth+'px';
				tags[i].style.height=(_maxHeight/_ratio)+'px';
			}
		}
	}
}


