// JavaScript Document
//¿ØÖÆÍ¼Æ¬´óÐ¡
var flag=false; 
function DrawImage(ImgD,awidth,aheight){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= awidth/aheight){ 
   if(image.width>awidth){
    ImgD.width=awidth; 
    ImgD.height=(image.height*aheight)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   }
   /*ImgD.alt="bigpic"  */
  } 
  else{ 
   if(image.height>aheight){
    ImgD.height=aheight; 
    ImgD.width=(image.width*awidth)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
    /*ImgD.alt="bigpic"  */ 
  } 
}
}
/*¿ØÖÆ¿í*/
lit_pic=function(xImgD,bwidth){
var image=new Image(); 
image.src=xImgD.src; 
if(image.width>0 && image.height>0){ 
 if(image.width>bwidth){
	 xImgD.width=bwidth;	 
	 xImgD.height=image.height/image.width*bwidth
 }
}
}
