// JavaScript Document

function tocurr_input(){
	var normal_input = document.getElementById("normalbox");	
	normal_input.className = "curr_box";
	var normal_uname = document.getElementById('uname');
	normal_uname.className = "curr_input";
	normal_uname.setAttribute("value","");
}

function tocurr_pwd_input(){
	var normal_pwd_input = document.getElementById("normalpwdbox");	
	normal_pwd_input.className = "curr_box";
	var upwd = document.getElementById('upwd');
	upwd.className = "curr_input";
	upwd.setAttribute("value","");
}

function tonormal_input(){
	var normal_input = document.getElementById("normalbox");	
	normal_input.className = "normal_box";
	var normal_uname = document.getElementById('uname');
	normal_uname.className = "normal_input";
	//normal_uname.setAttribute("value","用户名");
}

function tonormal_pwd_input(){
	var normal_pwd_input = document.getElementById("normalpwdbox");	
	normal_pwd_input.className = "normal_box";
	var upwd = document.getElementById('upwd');
	upwd.className = "normal_input";
	//upwd.setAttribute("value","密码");
}

function clearvalue(obj){
	obj.value = "";
}

/*
 *	@ ali
 */
var al_timer;
var al_interval= 500;
function showalww(elem){
	var alww=document.getElementById(elem);
	alww.style.display='block';
} 

function hidealww(elem,cno,currmenu){
	var alww=document.getElementById(elem);
	clearTimeout(al_timer);
	var eobj = document.getElementById("m"+cno);
	var cobj = document.getElementById("m"+currmenu);
	
	al_timer=setTimeout(function(){
		alww.style.display='none';
		
		
		for(j = 1; j<=7; j++){
			if(j==currmenu){
				
				cobj.className="DQ_menu"+currmenu+"_off";
			} else{
				document.getElementById("m"+j).className="DQ_menu"+j+"_on";
			}
		}
		
	},al_interval);
	
	
}

function cancleHide(){
	clearTimeout(al_timer);
}

function showmenu(pre,curr,Subnum,cno){
	var obj,i;
	var eobj = document.getElementById("m"+cno);
	
	for(j = 1; j<=7; j++){
		if(j==cno){
			eobj.className="DQ_menu"+cno+"_off";
		} else{
			document.getElementById("m"+j).className="DQ_menu"+j+"_on";
		}
	}
	
	for(i=1; i<= Subnum; i++){
		if(i == curr){
			document.getElementById(pre+curr).style.display='block';
		}else{
			document.getElementById(pre+i).style.display='none';
		}
	}
}


function view(){
	document.getElementById("footer_quicklyMenu").style.display='block';
 }


window.onerror=function(){
	return true;
}

function togglefaqstate(idstr){
	
		
		if(document.getElementById("faqnor_"+idstr).style.display == "none"){
			document.getElementById("faqnor_"+idstr).style.display  = "block";
			document.getElementById("faqsub_"+idstr).style.display  = "none";
		}else {
			
			document.getElementById("faqnor_"+idstr).style.display  = "none";
			document.getElementById("faqsub_"+idstr).style.display  = "block";
				
		}

}


function togglefaqstate2(idstr){
		if($("#faqsub_"+idstr).is(":hidden")){
			$("#faqsub_"+idstr).slideDown("fast");
			$("#faqnor_"+idstr).removeClass();
			$("#faqnor_"+idstr).addClass("showhonor");
		}else {
			$("#faqsub_"+idstr).slideUp("fast");
			$("#faqnor_"+idstr).removeClass();
			$("#faqnor_"+idstr).toggleClass("normalhonor");
		}
}


function showhonordetail(no){
		
		if(document.getElementById("honorhide_"+no).style.display == "none"){
			$("#honorhide_"+no).show();
			$("#seedetail_btn_"+no).hide();
			$("#seedetail_xbtn_"+no).show();	
			close_group("faqnor_",2,4);
		}else{
			close_group("faqnor_",3,1);
			$("#honorhide_"+no).hide();		
			$("#seedetail_btn_"+no).show();
			$("#seedetail_xbtn_"+no).hide();	
		}
}

function xshowhonordetail(no){
		if(document.getElementById("honorhide_"+no).style.display == "none"){
			$("#honorhide_"+no).show();
			$("#seedetail_btn_"+no).hide();
			$("#seedetail_xbtn_"+no).show();	
			//close_group("faqnor_",2,4);
		}else{
			//close_group("faqnor_",3,1);
			$("#honorhide_"+no).hide();		
			$("#seedetail_btn_"+no).show();
			$("#seedetail_xbtn_"+no).hide();	
		}
}

function close_group(tpre,nums,start){
	var sum,i;
	sum=start;
	i=0;
	while(1){
		if(i >nums){
			break;
		}
		document.getElementById("faqsub_"+sum).style.display="none" ;
		document.getElementById("faqnor_"+sum).className  = "normalhonor";
		sum ++;
		i++;
	}
}


