//<!--

function DrawImage(ImgD,wd,hd){
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0){
		

		
		if(image.width>=image.height){
			
			if(image.width>wd){ 
				
				ImgD.width=wd;
				
				ImgD.height=(image.height*wd)/image.width;
			
			}else{
				
				ImgD.width=image.width; 
				
				ImgD.height=image.height;
			
			}
		
		}else{
			
			if(image.height>hd){ 
			
				ImgD.height=hd;
				
				ImgD.width=(image.width*hd)/image.height; 
				
			}else{
				ImgD.width=image.width; 
				
				ImgD.height=image.height;
			}
		}
	}
} 
//-->
