<!--
function DrawImage(ImgD,WidthD,HeightD){
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= WidthD/HeightD){
     if(image.width>WidthD){
     ImgD.width=WidthD;
     ImgD.height=(image.height*WidthD)/image.width;
     }else{
     ImgD.width=image.width;
     ImgD.height=image.height;
     }
     ImgD.alt=image.width+"กม"+image.height;
     }
    else{
     if(image.height>HeightD){
     ImgD.height=HeightD;
     ImgD.width=(image.width*HeightD)/image.height;
     }else{
     ImgD.width=image.width;
     ImgD.height=image.height;
     }
     ImgD.alt=image.width+"กม"+image.height;
     }
    }
}


//-->