	//*****************************************************************************************
	// 图像效果
	//*****************************************************************************************
	function makevisible(cur,which)
	{
		if (which==0)
			cur.filters.alpha.opacity=100;
		else
			cur.filters.alpha.opacity=50;
	}

	function new_win(url,width,height,wName,sb,status)
	{   
		var param = "";
		var swidth;
		var sheight;
		if(status)
		{
			param = status;
		}
		else
		{
			if(sb)
			{		
				param = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no";		
			}
			else
			{
				param = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no";		
			}
		}
		if(width)
		{
			swidth=(screen.width-width)/2;
			param = param + ",width=" + width+",left="+swidth;
		}
		else
		{
			param = param + ",height=540";
		}
		if(height)
		{
			sheight=(screen.height-height)/2;
			param = param + ",height=" + height+",top="+sheight;
		}
		else
		{
			param = param + ",height=518";
		}
		newwin=window.open(url,wName,param);
	}
	
	
	function new_win1(url,width,height,left,top)
	{   
		var param = "";
		param+="status:no;resizable:yes;help:no;scrollbar:no;dialogWidth:" + width + "px;dialogHeight:" + (parseInt(height)-18) + "px;";
		if(left!="")
		{
			param+="dialogLeft:"+left+";";
		}
		if(top!="")
		{
			param+="dialogTop:"+top+";";
		}
		newwin=window.showModalDialog(url,window,param);
	}
	
	function jTrim(str)
	{
		var i=0;
		var len=str.length;
		if (str=="")
		{
			return(str);
		}
		j=len-1;
		flagbegin=true;
		flagend=true;
		while(flagbegin==true&&i<len)
		{
		   if (str.charAt(i)==" ")
		   {
				i=i+1;
				flagbegin=true;
			}
			else
			{
				flagbegin=false;
			}
		}
		while(flagend== true && j>=0)
		{
			if (str.charAt(j)==" ")
			{
				j=j-1;
				flagend=true;
			}
			else
			{
				flagend=false;
			}
		}
		if ( i > j )
		{
			return ("");
		}
		trimstr = str.substring(i,j+1);
		return trimstr;
	}
	function DrawImage(ImgD,ww,hh)
	{ 
		var flag=false; 
		var image=new Image(); 
		var iwidth = ww;  //定义允许图片宽度 
		var iheight = hh;  //定义允许图片高度  
		image.src=ImgD.src; 
		//alert(image.width+image.height) 
		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; 
				} 
				ImgD.alt=image.width+"×"+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; 
				} 
				ImgD.alt=image.width+"×"+image.height; 
			}
		} 
	}	
