	//onload="DrawImage(this,80,80,0)" 图片自适应
	function DrawImage(ImgD,intLargeImgWidth,intLargeImgHeight,intAltFlag)
	{
		var image = new Image();
		image.src = ImgD.src;

		if (image.width > 0 && image.height > 0)
		{
			flag = true;
			if (image.width/image.height >= intLargeImgWidth/intLargeImgHeight)
			{
				if (image.width > intLargeImgWidth)
				{  
					ImgD.width = intLargeImgWidth;
					ImgD.height = (image.height * intLargeImgWidth)/image.width;
				} 
				else
				{
					ImgD.width = image.width;  
					ImgD.height = image.height;
				}

				if (intAlfFlag = 0 )
				{
					ImgD.alt = "Actual size:" + image.width + "×" + image.height + ",点击查看原始图";
				}
			}
			else
			{
				if (image.height > intLargeImgHeight)
				{  
					ImgD.height = intLargeImgHeight;
					ImgD.width = (image.width * intLargeImgHeight)/image.height;     
				}
				else
				{
					ImgD.width = image.width;  
					ImgD.height = image.height;
				}
				
				if (intAltFlag = 0 )
				{
					ImgD.alt = "Actual size:" + image.width + "×" + image.height+ ",点击查看原始图";
				}
			}
		}
	}


