// JavaScript Document
function DrawImage(ImgD,width,height){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>width){ 
ImgD.width=width;
ImgD.height=(image.height*width)/image.width;
image.height=(image.height*width)/image.width;
image.width=width;
}
if(image.height>height){ 
ImgD.height=height;
ImgD.width=(image.width*height)/image.height;
}
}

