
    <!--
            //photo大小跟随高度变化
        function reSize(image, width, height)
        {
         /// <summary>根据指定宽度和高度按比例缩放图片, 在图片的onload事件中调用此方法</summary> 
         /// <param name="image" type="Image" mayBeNull="false">要缩放的图片</param>
         /// <param name="width" type="Integer">允许的最大宽度</param>
         /// <param name="height" type="Integer">允许的最大高度</param>
         
         image.removeAttribute('width');
         image.removeAttribute('height');
         
         var w = image.width, h = image.height;
         var scaling = w / h;
         
         if(width != null)
         { 
          w = image.width;
          if(w > width)
          {
           image.width = width;
           image.height = width / scaling;
           //h * width / w;
          }
         }
         
         if(height != null)
         { 
          h = image.height;
          if(h > height)
          {
           //w * height / h;
           image.width = height * scaling;   
           image.height = height;
          }
         }
        }
        function SetMiddle(image, height)
        {
         /// <summary>重设图片大小后让图片相对于DIV居中</summary>
         
         if (typeof(image) == 'string') image = document.images[image] || document.getElementById(image);
         var div = image.parentNode;
         
         if(div.nodeName != "DIV")
         {
             div = div.parentNode;
         }
         if(image.height > 0 && image.height < height)
         {
          
          image.style.marginTop = (height - image.height) / 2;
         }
         else
         {
             image.height = height;
          div.style.paddingTop = 0;
         }
        }
    //-->
