
	//Target设置
	function target_top()
	{
		if (self != top) top.location.href = window.location.href
	}

	//Select All设置
	function  SA(obj)
	{
		var i;
		for(i=0;i<document.all.id.length;i++)
		{
			if (document.all.id[i].value != 0)
			{
				document.all.id[i].checked = obj.checked
			}
		}
	}
	function  SA1(obj)
	{
		var i;
		for(i=0;i<document.all.id1.length;i++)
		{
			if (document.all.id1[i].value != 0)
			{
				document.all.id1[i].checked = obj.checked
			}
		}
	}
	//去空格函数
	function Trim(obj)
	{   
        return obj.replace(/(^\s*)|(\s*$)/g,"");       
    }
	//菜单函数
	function turnit(cc,ii) 
	{
		cccc = document.all.CCount.value;
		var ccc;
		for (i=1; i<= cccc; i++)
		{
			ccc="Content"+i;
			if(cc!=eval(ccc))
			{
				eval(ccc).style.display="none";
			}
		 } 
  
		if (cc.style.display=="none")
		{
			cc.style.display="";
		} 
		else 
		{
			cc.style.display="none"; 
		}
	}

	//“,”“|”两个系统字符的输入控制
	function checkValid0()
	{
		if (event.keyCode == 44 || event.keyCode == 124) {
			event.returnValue = false;
		}
		else if(event.keyCode == 13) {
			event.returnValue = true;
		}
		else {
			event.returnValue = true;
		}
	}
	
	//整数输入控制
	function checkValidInt()
	{
		if (event.keyCode >= 48 && event.keyCode <= 57) {
			event.returnValue = true;
		}
		else if(event.keyCode == 13) {
			event.returnValue = true;
		}
		else {
			event.returnValue = false;
		}
	}
	
	//小数输入控制
	function checkValidDouble()
	{
		if (event.keyCode >= 48 && event.keyCode <= 57) {
			event.returnValue = true;
		}
		else if(event.keyCode == 46) {
			event.returnValue = true;
		}
		else if(event.keyCode == 13) {
			event.returnValue = true;
		}
		else{
			event.returnValue = false;
		}
	}
	
	//随机函数的生成
	function RandomCode(num)
	{
		var listChar="0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z";
		var arrayChar=listChar.split(',');
		listChar="";
		for(var i=0;i<num;i+=1)
		{
			var mr=Math.random();
			mr=Math.round(35*mr);
			listChar=listChar+arrayChar[mr];
		}
		return listChar;
	}

	//随机函数的生成
	function RandomNum(num)
	{
		var listChar="0,1,2,3,4,5,6,7,8,9";
		var arrayChar=listChar.split(',');
		listChar="";
		for(var i=0;i<num;i+=1)
		{
			var mr=Math.random();
			mr=Math.round(9*mr);
			listChar=listChar+arrayChar[mr];
		}
		return listChar;
	}
	
	//关闭子窗口，或链接到导航页面
	function openerclose(linkto)
	{
		try
		{
			window.opener.location.href(linkto);
			window.close();
		}
		catch(e)
		{
			location.href(linkto);
		}
	}

	//关闭子窗口，同时刷新父窗口
	function openerreload(linkto)
	{
		try
		{
			window.opener.location.reload();
			window.close();
		}
		catch(e)
		{
			location.href(linkto);
		}
	}
	
	//打开修改链接页面
	function linkto(links,linkname,linkstyle)
	{
		var varlinkid;
		try
		{
			for(var i=0;i<document.all.id.length;i++)
			{
				if (document.all.id[i].checked)
				{
					varlinkid=document.all.id[i].value;
				}
			}
			if(varlinkid.length>0)
			{
				window.open(""+links+varlinkid+"",linkname,linkstyle);
			}
		}catch(e)
		{
			window.alert("请先选择列表内容");
		}
	}
	
	//隐藏图层
	function hidequerylayer(obj)
	{
		obj.style.display="none";
	}
	
	//显示详细内容（数组类型）
	function showdetailarray(width,objthis,objlayer,objbind,obj1,obj2)
	{
		var varhtml="<TABLE cellSpacing=0 cellPadding=3 width=100% border=0>";
		var array1=obj1.split('|');
		var array2=obj2.split('|');
		for(var i=0;i<array1.length;i+=1)
		{
			varhtml=varhtml+"<tr><td width=20%>"+array1[i]+"</td><td width=80%>"+array2[i]+"</td></tr>";
		}
		varhtml=varhtml+"</table>";
		
		objbind.innerHTML=varhtml;
		
		layerdownlefts(width,objthis,objlayer);
	}