<!--
var flag_d=false;
function DrawImage(ImgD,ImgW,ImgH){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag_d=true;

widths=ImgW
hights=ImgH
if(image.width>widths || image.height>hights){ 
hightt=(image.height*widths)/image.width

if(image.width/widths - image.height/hights >=0){
ImgD.width=widths;
ImgD.height=(image.height*widths)/image.width;
}
else{
ImgD.width=	(image.width*hights)/image.height;
ImgD.height=hights
}




}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}


}
} 
//-->