function Juge1(theForm) {//检索的判断
	if(theForm.word){
		if(theForm.word.value == "") {
			alert("请输入检索词！");
			theForm.word.focus();
			return false;
		}
		if(theForm.word.value == "%") {
			alert("不支持%检索，请重新输入检索词！");
			theForm.word.focus();
			return false;
		}
	}
	else{
		var title=theForm.title.value;
		var author=theForm.author.value;
		var publisher=theForm.publisher.value;
		var call_no=theForm.call_no.value;
		var subject=theForm.subject.value;
		var title_spell=theForm.title_spell.value;
		var isbn=theForm.isbn.value;
		var issn=theForm.issn.value;
		if (title==""&&author==""&&publisher==""&&call_no==""&&subject==""&&title_spell==""&&isbn==""&&issn=="") {
			window.alert("检索条件不能全部为空，请至少输入一个检索词 ！");
			theForm.title.focus();
			return false;
		}
		if (title=="%" || author=="%"||publisher=="%"||call_no=="%"||subject=="%"||title_spell=="%"||isbn=="%" || issn=="%") {
			window.alert("不支持%检索，请重新输入检索词！");
			theForm.title.focus();
			return false;
		}
	}
}

function Juge(theForm) {//读者登陆的判断
	if(!theForm.identification_id){
		if (theForm.barcode.value == "") {
			alert("请输入读者证号！");
			theForm.barcode.focus();
			return false;
		}
	}
	else{
		if ((theForm.barcode.value == "") && (theForm.identification_id.value == "")) {
			alert("读者条码和学生证号不能同时为空！");
			theForm.barcode.focus();
			return false;
		}
	}
}

function showTab(tag){
	for(i=1; i <4; i++){
	 	if (i==tag) { 
	 		document.getElementById("dbtitle"+i).className="tag-selected";
	 		document.getElementById("dblist"+i).style.display="block";
	 	}
	 	else{
	 		document.getElementById("dbtitle"+i).className="";
	 		document.getElementById("dblist"+i).style.display="none";
	 	}
	}
}
