function DrawImage(ImgD,StrW,StrH){
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0   &&   image.height>0){
		if(image.width/image.height>=   StrW/StrH){
			if(image.width>StrW){
				ImgD.width=StrW;
				ImgD.height=(image.height*StrW)/image.width;
			}
			else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
			ImgD.alt=image.width+"กม"+image.height;
		}
		else{
			if(image.height>StrH){
				ImgD.height=StrH;
				ImgD.width=(image.width*StrH)/image.height;
			}
			else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
			ImgD.alt=image.width+"กม"+image.height;
		}
	}
}