function ResizeImage(ImgObj,imgWidth,imgHeight) 
{
	//////////////////////////////////////////////////////////////
	//  等比列缩放图片大小
	//////////////////////////////////////////////////////////////
	var w,h; 
	var k; 
	var con; 
	w=ImgObj.width; 
	h=ImgObj.height; 
	k=w/h; 
	if(k>=1){ 
		if (w>=imgWidth){ 
			w=imgWidth; 
			h=w/k; 
		   }
		} 
	else 
		{if (h>=imgHeight){ 
			h=imgHeight; 
			w=k*h; 
		} 
	}
	ImgObj.offsetWidth=w; 	
	ImgObj.offsetheight=h;
	//document.images[ImgObj].width=w;
	//document.images[ImgObj].height=h;
} 
//onload="javascript:
//if(this.width>screen.width-600)this.style.width=screen.width-600;
//if(this.height>250)this.style.width=(this.width*250)/this.height;"

function changeImageSize(img) {
	var w,h; 
	var width,height;
	var k; 
	w=img.width; 
	h=img.height; 
	k=h/w; 
	width=80;
	height=80;
    if(img.height > height || img.width > width){
      if(img.height >= img.width)
      {
        img.height=height;
		img.width=height/k;
      } 
	  else 
	  {
        img.width=width;
		img.height=width*k;
      }
    }
  }  
  
function changeImageSize2(img,width,height) {
	var w,h; 
	var k; 
	w=img.width; 
	h=img.height; 
	k=h/w; 
    if(img.height > height || img.width > width){
      if(img.height >= img.width)
      {
        img.height=height;
		img.width=height/k;
      } 
	  else 
	  {
        img.width=width;
		img.height=width*k;
      }
    }
  }