function DrawImage(ImgD,H){
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= H/550){
     if(image.width>H){  
     ImgD.width=H;
	  if(image.height>H){
     ImgD.height=(image.height*H)/image.width;}
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    else{
     if(image.height>H){  
     ImgD.height=H;
     ImgD.width=(image.width*H)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    }
   /*else{
    ImgD.src="";
    ImgD.alt=""
    }*/
   }
