// JavaScript Document
<!-- 
var flag=false; 
function DrawImage(ImgD,nW,nH){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
flag=true; 
if(image.width/image.height>= nW/nH){ 
if(image.width>nW){ 
ImgD.width=nW; 
ImgD.height=(image.height*nW)/image.width; 
}else{ 
ImgD.width=image.width; 
ImgD.height=image.height; 
} 
ImgD.alt=""; 
} 
else{ 
if(image.height>nH){ 
ImgD.height=nH; 
ImgD.width=(image.width*nH)/image.height; 
}else{ 
ImgD.width=image.width; 
ImgD.height=image.height; 
} 
ImgD.alt=""; 
} 
} 
} 
//--> 
