var  flag=false;  
function  DrawImage(ImgD,iwidth,ihight){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  iwidth/ihight){  
         if(image.width>iwidth){      
         ImgD.width=iwidth;  
         ImgD.height=(image.height*iwidth)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"กม"+image.height;  
         }  
       else{  
         if(image.height>ihight){      
         ImgD.height=ihight;  
         ImgD.width=(image.width*ihight)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"กม"+image.height;  
         }  
       }  
}


    hs.graphicsDir = 'http://www.liyuankang.com/share/highslide/graphics/';
    hs.outlineType = 'rounded-white';
    hs.outlineWhileAnimating = true;
    hs.objectLoadTime = 'after';
    window.onload = function() {
        hs.preloadImages();
    }    
