//--------------------------------------------------------------
//函数名称：常用转换/检测...函数
//版权所有：你我工作室    http://www.iuair.com
//程序设计：孤魂、SPOOKSOUL、浅愿
//最后更新：2007-4-19
//---------------------------------------------------------------

//弹出模式弹出窗口	2007-4-19
function ShowDialog(url,width,height){
	var arr = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:yes;status:no");
}

function ShowDialogNoSr(url,width,height){
	var arr = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
}


//这样可以实现等比例缩放!但是这样的压缩的效果并不能改变图片的真实大小，只是显示出来大小变化了，最好的方法是使用aspjpeg组件来压缩，来生成小的图片。
//<!-- javascript等比压缩图片 
var  flag=false;  
function  DrawImage(ImgD){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  164/112){  
         if(image.width>164){      
         ImgD.width=164;  
         ImgD.height=(image.height*164)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>112){      
         ImgD.height=112;  
         ImgD.width=(image.width*112)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
}    
//--> 图片调用  
//<a  href="http://www.sina.com.cn"  target="_blank"><img  src="http://i3.sinaimg.cn/ty/k/2007-11-18/U2136P6T12D3302307F44DT20071118133843.jpg"  border="0"  width="164"  height="112"  onload="javascript:DrawImage(this);"></a>