// JavaScript Document
  
  {   
  var   flag=false;   
  function   DrawImage(ImgD,imgw,imgh){   
        var   image=new   Image();   
        image.src=ImgD.src;   
        if(image.width>0   &&   image.height>0){   
          flag=true;   
          if(image.width/image.height>=0){   
            if(image.width>imgw){       
            ImgD.width=imgw;   
            ImgD.height=(image.height*imgw)/image.width;   
            }
          else{   
            ImgD.width=image.width;       
            ImgD.height=image.height;   
            }   
            ImgD.alt=image.width+"¡Á"+image.height;   
            }   
       else{   
            if(image.height>imgh){       
            ImgD.height=imgh;   
            ImgD.width=(image.width*imgh)/image.height;             
            }else{   
            ImgD.width=image.width;       
            ImgD.height=image.height;   
            }   
            ImgD.alt=image.width+"¡Á"+image.height;   
            }   
          }   
  }     
  }   
function changeImg(mypic,imgw,imgh){ 
    var xw=imgw; //¿í¶È
    var xl=imgh; //¸ß¶È        
    var width = mypic.width; 
    var height = mypic.height; 
    var bili = width/height;                  
    var A=xw/width; 
    var B=xl/height;         
    if(A<1||B<1) 
    { 
        if(A<B) 
        { 
            mypic.width=xw; 
            mypic.height=xw/bili; 
        } 
        if(A>B) 
        { 
            mypic.width=xl*bili; 
            mypic.height=xl; 
        } 
    } 
} 