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 = "实际大小：" + 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 = "实际大小：" + image.width + "×" + image.height+ ",点击查看原始图";
         }*/
      }
   }
   /*else{
    ImgD.src="";
    ImgD.alt=""
    }*/
}

