var flag=false;

function DrawImage(ImgD){
    //trade页面
    var image=new Image();
    image.src=ImgD.src;
	var iwidth=80;
	var iheight=80;
    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*iwidth)/image.width;}else{ ImgD.width=image.width;  ImgD.height=image.height; } } else{if(image.height>iheight){   ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;         }else{ ImgD.width=image.width;   ImgD.height=image.height; } } }
} 

function Draw(ImgD){
    //Tradedetails.aspx 页面的大图
    var image=new Image();
	var iwidth=250;
	var iheight=250;
    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*iwidth)/image.width;}else{ ImgD.width=image.width;  ImgD.height=image.height; } } else{if(image.height>iheight){   ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;         }else{ ImgD.width=image.width;   ImgD.height=image.height; } } }
} 

function Draw1(ImgD){
    //Tradedetails.aspx 页面的滚动图
    var image=new Image();
	var iwidth=40;
	var iheight=40;
    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*iwidth)/image.width;}else{ ImgD.width=image.width;  ImgD.height=image.height; } } else{if(image.height>iheight){   ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;         }else{ ImgD.width=image.width;   ImgD.height=image.height; } } }
} 

function Draw2(ImgD){
   ////Tradedetails.aspx 页面的底部图
    var image=new Image();
	var iwidth=75;
	var iheight=75;
    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*iwidth)/image.width;}else{ ImgD.width=image.width;  ImgD.height=image.height; } } else{if(image.height>iheight){   ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;         }else{ ImgD.width=image.width;   ImgD.height=image.height; } } }
} 
function Draw3(ImgD){
   //zoom.aspx页面
    var image=new Image();
	var iwidth=60;
	var iheight=60;
    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*iwidth)/image.width;}else{ ImgD.width=image.width;  ImgD.height=image.height; } } else{if(image.height>iheight){   ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;         }else{ ImgD.width=image.width;   ImgD.height=image.height; } } }
} 
function Draw5(ImgD){
   //首页trade图片大小
    var image=new Image();
	var iwidth=80;
	var iheight=80;
    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*iwidth)/image.width;}else{ ImgD.width=image.width;  ImgD.height=image.height; } } else{if(image.height>iheight){   ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;         }else{ ImgD.width=image.width;   ImgD.height=image.height; } } }
} 


