<!-- 
/**
@author Runbo
@version DrawImage0.11,2008-01-2
@example
<img src="ddd.jpg" alt="" width="148" height="102" border="0" onload="DrawImage(this,148,102);">
*/
var flag=false; 
function DrawImage(ImgD,Iwidth,Iheight){ 

var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
flag=true; 
if(image.width/image.height>= Iwidth/Iheight){ 
if(image.width>Iwidth){
ImgD.width=Iwidth; 
ImgD.height=(image.height*Iheight)/image.width; 
}else{ 
ImgD.width=image.width;
ImgD.height=image.height; 
} 
/*ImgD.alt="bigpic" */
} 
else{ 
if(image.height>Iheight){
ImgD.height=Iheight; 
ImgD.width=(image.width*Iheight)/image.height; 
}else{ 
ImgD.width=image.width;
ImgD.height=image.height; 
} 
/*ImgD.alt="bigpic" */ 
} 
}
}
//--> 