function setsrch(c){
	for(i=0;i<=1;i++){
		document.getElementById("stab"+i).className = "";
	}
	c.className = "so1";
	if(c.id=="stab0"){
	document.getElementById("searchq").style.display="";
	document.getElementById("searchq1").style.display="none";
	
		document.getElementById("stab10").innerHTML='书籍名称';
		document.getElementById("stab11").innerHTML='<a title="按作者名称搜索书籍"  href="javascript:void(0);" target=_self class="so2">作者名称</a>';
		
		document.srchfrm.action="name";
		document.srchfrm.q.value="请输入书籍名称关键字！";
		 if(document.srchfrm.q.value=='请请输入书籍名称关键字！'){
			 document.srchfrm.q.style.color='#989797';
		}
	}
	if(c.id=="stab1"){
	document.getElementById("searchq").style.display="none";
	document.getElementById("searchq1").style.display="";
	
		document.getElementById("stab10").innerHTML='<a title="按书籍名称搜索"  href="javascript:void(0);" target=_self class="so2">书籍名称</a>';
		document.getElementById("stab11").innerHTML='作者名称';
	
		document.srchfrm.action="author";document.srchfrm.q1.value="请输入作者名称关键字！";
		 if(document.srchfrm.q1.value=='请输入作者名称关键字！'){
			document.srchfrm.q1.style.color='#989797';
		}
	}	
	
}
function submitForm(){
	if(document.srchfrm.action==''){				
					top.location.href= "/modules/article/search.php?searchtype=articlename&searchkey="+document.srchfrm.q.value+"";
	}else if(document.srchfrm.action=='author'){
		top.location.href= "/modules/article/search.php?searchtype=author&searchkey="+document.srchfrm.q1.value+"";
	
	}
}
