	var intervalId=0;
	var mouseStatus=0;
	var intervalId2=0;
	var mouseStatus2=0;
	function chgbg(flag,obj){
		if(flag){
			obj.style.background="none";
		}else{
			obj.style.background="none";
		}
	}
	function resetFrm(){
		document.getElementById("frm").reset();
	}
	function checkFrm(){
		var v_sender=document.getElementById("t_sender").value;
		var v_mail=document.getElementById("t_mail").value;
		var v_subject=document.getElementById("t_subject").value;
		var v_content=document.getElementById("t_content").value;
		if((v_sender=="")||(v_subject=="")||(v_content=="")){
			document.getElementById("msg").innerHTML=("带*号标记项为必填");
			return false;
		}
		if(verifyEmail(v_mail))	document.getElementById("frm").submit();
	}
	function verifyEmail(email,obj)  
　　{  
　　　　　　var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;  
　　　　　　flag = pattern.test(email);  
　　　　　　if(!flag)  
　　　　　　{  
				document.getElementById("msg").innerHTML="邮箱地址不正确";
				document.getElementById("t_mail").focus();
				document.getElementById("t_mail").select();				
　　　　　　　　return false;  
　　　　　　} 
			return true;
		
　　 }  
	function changeColor(flag,obj){
		var tmpobj = new Object();
		tmpobj=obj;
		if(flag==1)
		   tmpobj.style.border="1px solid white";
		   
		   
        else{
		   tmpobj.style.border="1px gray solid";
		  
		   
		}
		   
	}
	
	function mouseAction2(isOut){
		mouseStatus2=isOut;
		if(isOut==1)intervalId2=setInterval(hideList2,800);	
	}
	
	
	function showList2(){
		noList();
		mouseStatus2=0;
		clearInterval(intervalId2);
		$("newsList").style.visibility="visible";
		
		$("newsLink").style.backgroundColor="#993300";
		$("newsLink").style.color="white";
	}
	
	function hideList2(){	
		if(mouseStatus2==1){
			noList2();
		}
	}
	
	function noList2(){
		$("newsList").style.visibility="hidden";
		//$("productList").style.visibility="hidden";
		$("newsLink").style.backgroundColor="#333333";
		$("newsLink").style.color="white";
	}
	
	
	function mouseAction(isOut){
		mouseStatus=isOut;
		if(isOut==1)intervalId=setInterval(hideList,800);	
	}
	
	function showList(){
		noList2();
		mouseStatus=0;
		clearInterval(intervalId);
		$("productList").style.visibility="visible";
		
		$("productLink").style.backgroundColor="#993300";
		$("productLink").style.color="white";
	}
	
	function hideList(){	
		if(mouseStatus==1){
			noList();
		}
	}
	
	function noList(){
		$("productList").style.visibility="hidden";
		$("productLink").style.backgroundColor="#333333";
		$("productLink").style.color="white";
	}
	
	function $(objname){
		return document.getElementById(objname);
	}
	function chkFrm(){
		$("searchFrm").action="result.php";
		var str=$('keywords').value;
		if (str.length<1) return false;
		if (isillegal(str)){
			window.alert('对不起，您输入的内容中包含了非法字符');	
			$('keywords').select();
			return false;
		}
		$("searchFrm").submit();
		return true;		
	}
	
	function isillegal(str){
		var reg=/[\s\'\"]/g;
		var str=str.replace(reg,'');
		return (str.length<1);
	}
	
	function chgTab(tabId){
		
		$('lnk0').className="tabGray";
		$('lnk1').className="tabGray";		
		$('lnk2').className="tabGray";
		
		$('content0').style.display='none';
		$('content1').style.display='none';
		$('content2').style.display='none';
	
		$('lnk'+tabId).className="tabLight";
		$('content'+tabId).style.display='block';
	
		//window.alert($('content'+tabId));
	}
