// JavaScript Document
function fnSearch() {
	if(!fnError("frm","txtsearch","Please enter searching Keyword.","")) return false;
	if(document.frm.lstsearch.value=="j")
		document.frm.action="http://www.globalindiapublications.com/search_result.php";
	else if(document.frm.lstsearch.value=="b")
		document.frm.action="http://www.globalindiapublications.com/search_result_book.php";
}

function fnLogin() {
	if(!fnError("frm","txtusername","Please enter Username.","")) return false;
	if(!fnError("frm","txtpwd","Please enter Password.","")) return false;
	document.frm.action="chklogin.php";
	document.frm.submit();
}
function fnLogin1() {
	if(!fnError("frm_login","txtusername","Please enter Username.","")) return false;
	if(!fnError("frm_login","txtpwd","Please enter Password.","")) return false;
	document.frm_login.action="chklogin.php";
	document.frm_login.submit();
}

function fnSubject99() {
	if(document.frm.lstsubject.value!="-1") {
		if(document.frm.lstbrowse9.value=="j")
			document.frm.action="http://www.globalindiapublications.com/journals.php";
		else if(document.frm.lstbrowse9.value=="b")
			document.frm.action="http://www.globalindiapublications.com/books.php";
		return true;
	}  else {
		alert("Please select Subject");
		document.frm.lstsubject.focus();
		return false;
	}
}
function fnOption() {
	var lst=document.frm.lstsearch.value;
	if(lst=="j") {
		document.frm.item("lstoption").options[0]=new Option("Title", "Title");
		document.frm.item("lstoption").options[1]=new Option("ISSN", "ISSN");
		document.frm.item("lstoption").options[2]=new Option("Author", "Author");
		document.frm.item("lstoption").options[3]=new Option("Editor", "Editor");
		document.frm.item("lstoption").options[4]=new Option("Keyword", "Keyword");
	}
	
	else if(lst=="b") {
		document.frm.item("lstoption").options[0]=new Option("Title", "Title");
		document.frm.item("lstoption").options[1]=new Option("ISBN", "ISBN");
		document.frm.item("lstoption").options[2]=new Option("Author", "Author");
		document.frm.item("lstoption").options[3]=new Option("Editor", "Editor");
		document.frm.item("lstoption").options[4]=new Option("Keyword", "Keyword");
	}
}


function fnRead(jID) {
	document.frm.hdnid.value=jID;
	//alert(jID);
	//alert(document.frm.action);
	document.frm.submit();
	return true;
}