﻿function $$(id)
	{
		return document.getElementById(id);
	}
	
function cutString(str,cutstr1,cutstr2)
{
	if(str.indexOf(cutstr1)!=-1 && str.indexOf(cutstr2)!=-1)
     {
       return str.substring(str.indexOf(cutstr1)+cutstr1.length,str.indexOf(cutstr2));
       }
       else
       {
         return false;
         }

}

		
  
   function about()
  {
	   
		 theurl=document.location.href.replace(".html/",".html");
		  if(theurl.indexOf("about/index")>0)
		  {$$("leftmenu1").className="current";$$("guid").innerHTML="企业简介";$$("guidleft").innerHTML="企业简介";}
		  if(theurl.indexOf("about/culture")>0)
		  {$$("leftmenu2").className="current";$$("guid").innerHTML="企业文化";$$("guidleft").innerHTML="企业文化";}
		  if(theurl.indexOf("about/shebei")>0)
		  {$$("leftmenu3").className="current";$$("guid").innerHTML="环境设备";$$("guidleft").innerHTML="环境设备";}
		  if(theurl.indexOf("about/rongyu")>0)
		  {$$("leftmenu4").className="current";$$("guid").innerHTML="企业荣誉";$$("guidleft").innerHTML="企业荣誉";}
		  if(theurl.indexOf("about/history")>0)
		  {$$("leftmenu5").className="current";$$("guid").innerHTML="发展历程";$$("guidleft").innerHTML="发展历程";}	
		  if(theurl.indexOf("about/video")>0)
		  {$$("leftmenu6").className="current";$$("guid").innerHTML="视频展播";$$("guidleft").innerHTML="视频展播";}
  }
  
     function news()
  {
	   
		 theurl=document.location.href.replace(".html/",".html");
		  if(theurl.indexOf("news/index")>0)
		  {$$("leftmenu1").className="current";$$("guid").innerHTML="行业新闻";$$("guidleft").innerHTML="行业新闻";}
		  if(theurl.indexOf("news/pinpai")>0)
		  {$$("leftmenu2").className="current";$$("guid").innerHTML="企业新闻";$$("guidleft").innerHTML="企业新闻";}
		  if(theurl.indexOf("news/shipin")>0)
		  {$$("leftmenu3").className="current";$$("guid").innerHTML="视频新闻";$$("guidleft").innerHTML="视频新闻";}
  }
  
       function products()
  {
	  theurl=document.location.href.replace(".html/",".html");
	   if(theurl.indexOf("product/technology")<=0)
	  { 
		 if($$("proNum"))
		 {
			 for(i=1;i<=parseInt($$("proNum").value);i++)
			 {
				 if(document.location.href.split("product").length==1)
		         {
			       $$("leftmenu1").className="current";$$("guid").innerHTML=$$("leftmenu1").innerHTML;$$("guidleft").innerHTML=$$("leftmenu1").innerHTML;
			       }
				   else
				   {
					    if(document.location.href.split("product/")[1].split("/")[0]==$$("leftmenu"+i).href.split("product/")[1].split("/")[0])
			            {
				         $$("leftmenu"+i).className="current";$$("guid").innerHTML=$$("leftmenu"+i).innerHTML;$$("guidleft").innerHTML=$$("leftmenu"+i).innerHTML;
				           }
					   }
			 }
		 }
	  }
	  else
	  {$$("leftmenuTech").className="current";$$("guid").innerHTML="产品科技";$$("guidleft").innerHTML="产品科技";}
  }
  
 
		 
       function talent()
  {
	   
		 theurl=document.location.href.replace(".html/",".html");
		  if(theurl.indexOf("hr/linian")>0)
		  {$$("leftmenu1").className="current";$$("guid").innerHTML="人才理念";$$("guidleft").innerHTML="人才理念";}
		  else
		  {$$("leftmenu2").className="current";$$("guid").innerHTML="人才招聘";$$("guidleft").innerHTML="人才招聘";}
  }
  
         function service()
  {
	   
		 theurl=document.location.href.replace(".html/",".html");
		  if(theurl.indexOf("/module/feedback")>0)
		  {$$("leftmenu1").className="current";$$("guid").innerHTML="留言反馈";$$("guidleft").innerHTML="留言反馈";}
		  if(theurl.indexOf("proinfo")>0)
		  {$$("leftmenu2").className="current";$$("guid").innerHTML="产品知识";$$("guidleft").innerHTML="产品知识";}
		  if(theurl.indexOf("contact/index")>0)
		  {$$("leftmenu3").className="current";$$("guid").innerHTML="联系我们";$$("guidleft").innerHTML="联系我们";}
  }
 