function ResetImg(ImgArea,ImgWidth,ImgHeight)
{
var imgList1=document.getElementById(ImgArea).getElementsByTagName("img");
for(var i in imgList1){
	var flag=false; 
	var image=new Image();
	var iwidth = ImgWidth;  //定义允许图片宽度 
	var iheight = ImgHeight;  //定义允许图片高度 
	image.src=imgList1[i].src; 
	if(image.width>0 && image.height>0){ 
	flag=true; 
	if(image.width/image.height>= iwidth/iheight){ 
	if(image.width>iwidth){   
	imgList1[i].width=iwidth; 
	imgList1[i].height=(image.height*iwidth)/image.width; 
	}else{ 
	imgList1[i].width=image.width;   
	imgList1[i].height=image.height; 
	} 
	} 
	else{ 
	if(image.height>iheight){   
	imgList1[i].height=iheight; 
	imgList1[i].width=(image.width*iheight)/image.height;   
	}else{ 
	imgList1[i].width=image.width;   
	imgList1[i].height=image.height; 
	} 
	} 
	}
		}
}