function showDropDownMenu(id){
	var obj=document.getElementById(id);
	var obj1=document.getElementById("c_fship");
	if(obj.style.display=="none"){	
		obj.style.display="";
		obj1.className="bbx1";
	}
	else{
		clearTimeout(hiddenTimer);
	}
}
function hiddenDropDownMenu(){
	hiddenTimer=setTimeout(hiddenDD,10);
}
function hiddenDD(){
	var obj=document.getElementById("ddMenu");
	var obj1=document.getElementById("c_fship");
	if(obj.style.display==""){
		obj.style.display="none";
		obj1.className="bbx";
	}
}

//各地分站
function showCentstationDownMenu(id){
	var obj=document.getElementById(id);
	var obj1=document.getElementById("Centstation");
	if(obj.style.display=="none"){	
		obj.style.display="";
		obj1.className="bbx1";
	}
	else{
		clearTimeout(hiddenTimerCents);
	}
}
function hiddenCentstationDownMenu(){
	hiddenTimerCents=setTimeout(hiddenDDCents,100);
}
function hiddenDDCents(){
	var obj=document.getElementById("Centstation");
	var obj1=document.getElementById("nva");
	if(obj.style.display==""){
		obj.style.display="none";
		obj1.className="bbx";
	}
}

//左侧菜单
  function showCateMenu(id){
  	var obj=document.getElementById("cateMenu"+id);
	if (obj.style.display=="none"){
		obj.style.display="";
		//obj.parentNode.getElementsByTagName("img")[0].src="images/2a.gif";
	}
	else{
		obj.style.display="none";
		//obj.parentNode.getElementsByTagName("img")[0].src="images/2.gif";
	}
}

//标签切换
function Discard(T,B,name1,name2,classname){
var tli=document.getElementById(name1).getElementsByTagName("li");
var mli=document.getElementById(name2).getElementsByTagName("ul");
	for(i=0;i<tli.length;i++){
		//alert(tli[i].className=i);
	   tli[i].className=i==B?""+classname+"":"";
	   mli[i].style.display=i==B?"block":"none";
	}
}

//滚动商机
function slideLine(ul, delay, speed, lh) {
	var slideBox = (typeof ul == 'string')?document.getElementById(ul):ul;
	var delay = delay||1000, speed=speed||20, lh = lh||70;
	var tid = null, pause = false;
	var start = function() {
		tid=setInterval(slide, speed);
	}
	var slide = function() {
		if (pause) return;
		slideBox.scrollTop += 1;	
		if (slideBox.scrollTop % lh == 0) {
			clearInterval(tid);
			slideBox.appendChild(slideBox.getElementsByTagName('li')[0]);
			slideBox.scrollTop = 0;
			setTimeout(start, delay);
		}
	}
	slideBox.onmouseover=function(){pause=true;}
	slideBox.onmouseout=function(){pause=false;}
	setTimeout(start, delay);
  }

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function checklogin2()
{
	if(document.form_login2.username.value=="")
    {
		alert("请填写您的用户名！");
		document.form_login2.username.focus();
		return false;
	}
	var filter=/^\s*[.A-Za-z0-9_-]{4,15}\s*$/;
    	if (!filter.test(document.form_login2.username.value)) { 
			alert("用户名填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9 _ - .)\n用户名长度不小于5个字符，不超过15个字符，注意不要使用空格。"); 
			document.form_login2.username.focus();
			return false;		
		}
	if(document.form_login2.password.value=="")
    {
		alert("请填写您的密码！");
		document.form_login2.password.focus();
		return false;
	} 
    	if (!filter.test(document.form_login2.password.value)) { 
			alert("密码填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9 _ - .)\n密码长度不小于6个字符，不超过20个字符，注意不要使用空格。"); 
			document.form_login2.password.focus();
			return false;		
		}
}