function ReSizePic(ThisPic){
    var RePicWidth = 180; //这里修改为您想显示的宽度值
	if(ThisPic.width>180){
		ThisPic.height=ThisPic.height*180/ThisPic.width;
		ThisPic.width=180;
	} 
    //============以下代码请勿修改==================================

    //var TrueWidth = ThisPic.width;    //图片实际宽度
//    var TrueHeight = ThisPic.height;  //图片实际高度
//    var Multiple = TrueWidth / RePicWidth;  //图片缩小(放大)的倍数
//
//    ThisPic.width = RePicWidth;  //图片显示的可视宽度
//    ThisPic.height = TrueHeight / Multiple;  //图片显示的可视高度
}
function Dopic(w,h,th)
{
  var imag=new Image(); //定义图形类
  imag.src=th.src;//图形类和this联系
  var bili=imag.width/imag.height;//定义图形高宽比例；
  var is_wh=((imag.width/imag.height) > (w/h))?1:2;//判断是宽大还是高大

  if(imag.width>w || imag.height>h){  
  if(is_wh==1){ 
th.width =w
th.height=imag.height*(w/imag.width);
  }else{
  th.height =h
th.width=imag.width*(h/imag.height);
  }
  }else{ 
  th.width = imag.width;
  th.height =imag.height;
  }
}

