﻿// JScript 文件
//<!-- 
var flag=false; 
function DrawImage(ImgD){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 var numb=240
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= 1){ 
   if(image.width>numb){
    ImgD.width=numb; 
    ImgD.height=(image.height*numb)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 

  } 
  else{ 
   if(image.height>numb){
    ImgD.height=numb; 
    ImgD.width=(image.width*numb)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 

  } 
 }
}
//--> 
