/* Pickles AdjustImage for Handheld */
function PxAdjustImage4handheld( contElm , bufferSize ){
	if( !bufferSize ){
		bufferSize = 0;
	}
	if( document.getElementsByTagName ){
		var img;
		var fullwidth = screen.width;
		if( window.innerWidth && fullwidth > window.innerWidth ){
			fullwidth = window.innerWidth;
		}
		if( contElm ){
			fullwidth = contElm.offsetWidth;
		}
		var toWidth = ( fullwidth - bufferSize );
		var imgTagList = document.getElementsByTagName('img');
		for( img in imgTagList ){
			if( imgTagList[img].offsetWidth > toWidth ){
				var rate = toWidth / imgTagList[img].offsetWidth;
				var toHeight = imgTagList[img].offsetHeight * rate;
				imgTagList[img].width = toWidth;
				imgTagList[img].style.width = toWidth+'px';
				imgTagList[img].height = toHeight;
				imgTagList[img].style.height = toHeight+'px';
			}
		}
	}
}
