// JavaScript Document
mylocation = 1; //在这里设置需要复位到的菜单的编号，例如为“3”就表示菜单将复位到第三个菜单信息中心
Office = 2;
Info = 3;
Learn = 4;
Service = 9;
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
	function Sub_M(num){
	maintr.onmouseover="Sub_M(1);";
	for (i=1;i<=9;i++){
			whichnum = eval("m" + i);
			whichnuma = eval("m" + num);

			if (num != i) {
			    whichnum.style.display = "none";
			}

			else {
			    whichnuma.style.display = "block";
			}

			var menu = document.getElementById("menu" + i);
			
			if (i == 0) {
			    //menu.className = "menu1";
			}
			else {
			    
			    if (num != i) {
			        menu.className = "menu2";
			        menu.style.color = "#ffffff";
			    }
			    else {
			        menu.className = "menu2Hover";
			        menu.style.color = "#f75e00";

			    }
			}
	 }
	}
	

	function Sub_N(numT,strL){
	for (U=1;U<=4;U++){
			whichnumB = eval("n" + U);
			whichnumC= eval("n" + numT);
			mylinkj=eval("l"+ numT);
			mylinkk=eval("l"+U)
			if (numT!=U){
				whichnumB.style.display = "none";
				mylinkk.className='myBblack'+strL;
			}
			else if(whichnumC.style.display=="block"){
				whichnumC.style.display = "none";
				mylinkj.className='myBblack'+strL;
			}
			else{
				whichnumC.style.display = "block";
				mylinkj.className='myBblackSelect'+strL;
			}
	 }
	}




		function Openform(page)
		{
			var thisID=document.location.search.substring(document.location.search.lastIndexOf("=")+1);
			page = page + "&SessionName=" + document.all("txtHide").value+"&MyID="+thisID;
			window.open(page,"_self");
		}
		function SelectAll()
		{
			for(var i=0;i<document.all.length;i++)
			{
				if(document.all(i).type=="checkbox")
				{
					document.all(i).checked=true;
				}
			}
			SetData(document.all('txtSelectAll').value);
		}
		

		function Clear()
		{
			for(var i=0;i<document.all.length;i++)
			{
				if(document.all(i).type=="checkbox")
				{
					document.all(i).checked=false;
				}
			}
			SetData('');
		}
		
		function SelectCurPageAll()
		{
			for(var i=0;i<document.all.length;i++)
			{
				if(document.all(i).type=="checkbox")
				{
					document.all(i).checked=true;
					SetThis(document.all(i));
				}
			}
		}
		function ClearCurPage()
		{
			for(var i=0;i<document.all.length;i++)
			{
				if(document.all(i).type=="checkbox")
				{
					document.all(i).checked=false;
					SetThis(document.all(i));
				}
			}
		}
		//如果需要得到空间选中的checkboxID，则需要第一个参数为  ID=隐藏的文本框的ID
		//var OerCtrlID=GetID();
		function GetID()
		{		    
			if(document.location.search.indexOf('&')<0)
		    {
			    tmpID=document.location.search.substring(4,document.location.search.length);	
			}
			else
			{
			     tmpID=document.location.search.substring(4,document.location.search.indexOf('&'));
			}
			var thisID=document.location.search.substring(document.location.search.lastIndexOf("=")+1);
			tmpID=thisID+"_"+tmpID;
			return tmpID;
		}
		
		function GetNewSelTxt(chk)
		{
			var sTmpStr=parent.document.all(GetID()).value;

		    if(chk.checked)//如果被选中
		    {
		        if(sTmpStr.indexOf(chk.id+",")>-1)//在该临时存储区域已经有这个ID
		        {
		        }
		        else
		        {
		            sTmpStr=sTmpStr+chk.id+","
		        }
		    }
		    else
		    {
				if(sTmpStr.indexOf(chk.id+",")>-1)//在该临时存储区域已经有这个ID
		        {
		            sTmpStr=sTmpStr.replace(chk.id+",","");//清除这个ID
		        }
		        else
		        {
		        }
		    }
		    
		    return sTmpStr;
		}
		
		function SetThis(chk)
		{
		    var sTmpStr=GetNewSelTxt(chk);
		    SetData(sTmpStr);
		}
		
		function SetData(sData)
		{
		    var sID=GetID();
		    parent.document.all(sID).value=sData;
		}
		
		function SetPageCtrl()
		{
			var sTmpStr=parent.document.all(GetID()).value;
			sTmpStr.replace(" ","");
			sTmpStr.replace("	","");
			if(sTmpStr=="")
			{
			    return;
			}
			
			for(var i=0;i<document.all.length;i++)
			{
			    if(sTmpStr.indexOf(","+document.all(i).id+",")>-1)
			    {
			        document.all(i).checked=true;
			    }
			}
		}