// JavaScript Document
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>=  180/220){  
         if(image.width>180){      
         ImgD.width=180;  
         ImgD.height=(image.height*180)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
        // ImgD.alt=image.width+"*"+image.height;  
         }  
       else{  
         if(image.height>220){      
         ImgD.height=220;  
         ImgD.width=(image.width*220)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
        // ImgD.alt=image.width+"*"+image.height;  
         }  
       }  
}  
function  abc(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  300/300){  
         if(image.width>300){      
         ImgD.width=300;  
         ImgD.height=(image.height*300)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
        // ImgD.alt=image.width+"*"+image.height;  
         }  
       else{  
         if(image.height>300){      
         ImgD.height=300;  
         ImgD.width=(image.width*300)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
        // ImgD.alt=image.width+"*"+image.height;  
         }  
       }  
}  

function aa(ImgD){
 if(ImgD.width/ImgD.height>1){
  ImgD.width=(ImgD.width>200)?200:ImgD.width;
  }else{
  ImgD.height=(ImgD.height>200)?200:ImgD.height;
  }
}
