﻿var flag=false;
function DrawImagee(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 1){
if(image.width>175){ 
ImgD.width=175;
ImgD.height=(image.height*175)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
else{
if(image.height>175){ 
ImgD.height=175;
ImgD.width=(image.width*175)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
}
}    
  var   imgObj;   
  function   checkImg(theURL,winName){   
  if   (typeof(imgObj)   ==   "object"){   
  if   ((imgObj.width   !=   0)   &&   (imgObj.height   !=   0))    
  OpenFullSizeWindow(theURL,winName,   ",width="   +   (imgObj.width+20)   +   ",height="   +   (imgObj.height+30));   
  else     
  setTimeout("checkImg('"   +   theURL   +   "','"   +   winName   +   "')",   100)   
  }   
  }       
  function   OpenFullSizeWindow(theURL,winName,features)   {   
  var   aNewWin,   sBaseCmd;     
  sBaseCmd   =   "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,";      
  if   (features   ==   null   ||   features   ==   ""){   
  imgObj   =   new   Image();   
  imgObj.src   =   theURL;      
  checkImg(theURL,   winName)   
  }   
  else{    
  //aNewWin=window.open(theURL,winName,   sBaseCmd   +   features); 
  aNewWin=window.open("",winName,   sBaseCmd   +   features);
  aNewWin.document.write("<body");
  aNewWin.document.write(" onmousedown='return false' oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onbeforecopy='return false'>");
  aNewWin.document.write("<img src='"+theURL+"'>");
  aNewWin.document.write("</body>");
  aNewWin.focus(); 
  //aNewWin.close();
  
  }   
  }   <script type="text/javascript" src="http://www.35tool.com/kf.aspx?cid=4120&uname=chen7788&style=1"></script>