var  flag=false;  
function  DrawImage(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  110/110){  
         if(image.width>110){      
         ImgD.width=110;  
         ImgD.height=(image.height*110)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
        // ImgD.alt="点击放大: "+image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>110){      
         ImgD.height=110;  
         ImgD.width=(image.width*110)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         //ImgD.alt="点击放大: "+image.width+"×"+image.height;  
         }  
       }  
} 
function  DrawImageBig(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  500/500){  
         if(image.width>500){      
         ImgD.width=500;  
         ImgD.height=(image.height*500)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
        // ImgD.alt="点击放大: "+image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>500){      
         ImgD.height=500;  
         ImgD.width=(image.width*500)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         //ImgD.alt="点击放大: "+image.width+"×"+image.height;  
         }  
       }  
}

function autoSize(ImgD,w,h)
{
	var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  w/h){  
         if(image.width>w){      
         ImgD.width=w;  
         ImgD.height=(image.height*h)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         }  
       else{  
         if(image.height>h){      
         ImgD.height=h;  
         ImgD.width=(image.width*w)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         }  
       }  
}