function submitSearch(form){
	var cnt =0;
	if (document.forms['Search'].key[0].checked) 	{document.forms['Search'].SearchFieldText00.value = document.forms['Search'].keyword.value;cnt +=1 ;}
	if (document.forms['Search'].key[1].checked)  	{document.forms['Search'].SearchFieldText01.value = document.forms['Search'].keyword.value;cnt +=1 ; }
	if (document.forms['Search'].key[2].checked)	{document.forms['Search'].SearchFieldText02.value = document.forms['Search'].keyword.value;cnt +=1 ;}
	document.forms['Search'].Action.value = "And";
	if (cnt==0) {
			document.forms['Search'].Action.value="Or";
			document.forms['Search'].SearchFieldText00.value = document.forms['Search'].keyword.value;
			document.forms['Search'].SearchFieldText01.value = document.forms['Search'].keyword.value;
			document.forms['Search'].SearchFieldText02.value = document.forms['Search'].keyword.value;
	}
	if (document.forms['Search'].keyword.value=="" || document.forms['Search'].keyword.value.length==0 ){
			alert('Please enter a keyword!\n'); return ; 
	}
	else {document.forms['Search'].submit(); return ;}

 }
function pressKey(form){
if (event.keyCode==13 || event.keyCode==0 ){
	submitSearch(form); return false ;}
else 
	return false;
}
// ISBN : idx 0, Title :1 , Author :2 

document.write("<form name='Search' action='/Common/Reader/Search/Search.jsp' method='post'><td>");
document.write("<input type=hidden name='Sid' value='1'>");
document.write("<input type=hidden name=Charset value=big5_hkscs>");
document.write("<input type=hidden name=Action value=''>");
document.write("<input type=hidden name=page value='0'>");
document.write("<input type=hidden class='text' name='SearchFieldText00' value=''>");//�詨�
document.write("<input type=hidden  name='SearchFieldText01' value=''>");//ISBN
document.write("<input type=hidden class='text' name='SearchFieldText02' value=''>");//雿�

document.write('<img src="/Template/Shared/iso-8859-1/new/index_04.png" alt="" align="absmiddle">');
document.write('<input name="keyword" onKeyPress="pressKey(this.form);" type="text">');
document.write('<input name="key" value="Title" type="checkbox">');
document.write('<img src="/Template/Shared/iso-8859-1/new/index_07.png" alt=""  align="absmiddle">');
document.write('<input name="key" value="ISBN" type="checkbox">');
document.write('<img src="/Template/Shared/iso-8859-1/new/index_09.png" alt=""  align="absmiddle">');
document.write('<input name="key" value="Author" type="checkbox">');
document.write('<img src="/Template/Shared/iso-8859-1/new/index_11.png" alt=""  align="absmiddle">');
document.write('<a href="javascript: submitSearch(this.form);">');
document.write('<img src="/Template/Shared/iso-8859-1/new/index_12.png" border="0" align="absmiddle">');
document.write('</a>');

document.write('</form>');
