/*<![CDATA[*/
<!--
	var libraryList = new Array();
	
	// This method get the library names starting with the specified character
	// And populate those in the list box. 
	function Alphabets_check(character, libselected) {
		var temp = 0;

		if (character != null){
			if (isNaN(character))
			{
				character = character.toUpperCase();
			}else if (character > 0)
			{
				character = 0;
			}
		}

		clr();

        for(var i=0;i <libraryList.length;i++) {
			var liblist = libraryList[i].split("#@#");
			if (character != null)
			{
				var tmpChar = liblist[0].charAt(0).toUpperCase();
				if (character == 0 && !isNaN(tmpChar))
				{
					document.search.libpref.options[temp] = new Option(liblist[0],liblist[1]);
					if (libraryList[1] == libselected)
					{
						document.search.libpref.options[temp].selected = true;
					}
					temp++;
				}else if (character == tmpChar)
				{
					document.search.libpref.options[temp] = new Option(liblist[0],liblist[1]);		
					if (liblist[1] == libselected)
					{
						document.search.libpref.options[temp].selected = true;
					}
					temp++;
				}
			}else{
				document.search.libpref.options[temp++] = new Option(liblist[0],liblist[1]);
			}
		}                                               
		document.search.libpref.options[temp] = new Option("None","None");
	}                                          

	// This method is to clear all the list box items.
    function clr() {
    	document.search.libpref.options.length = 0;
	}   

	// This method load the specified library names in the list box
	// And if the library name specified for selection, 
	// then list the library names start with that begin character 
	//			and select the specified library name.
	// Otherwise, show the 'u' character library list as default
    function loadJnlNames(namestemp, libselected) {
		libraryList = (namestemp.split("#@@#")).sort();
		if(libselected == 'None') {
			libselected = '';
		}
		if (libselected != ''){
			var firstchar = "";
			for (var i=0;i<libraryList.length;i++){
				var liblist = libraryList[i].split("#@#");
				if (liblist[1] == libselected) {
					firstchar = liblist[0].charAt(0);
					break;
				}
			}
			Alphabets_check(firstchar, libselected);
		}else{
			Alphabets_check('u');
		}
	}                   

//-->
/*]]>*/